Reindex Card into ES on printing/tag consensus transitions - #10
Merged
WilfordGrimley merged 2 commits intoJul 14, 2026
Merged
Conversation
…solated Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016i9S7LQsCL3FGaih3ZTRBJ
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016i9S7LQsCL3FGaih3ZTRBJ
WilfordGrimley
marked this pull request as ready for review
July 14, 2026 06:01
WilfordGrimley
deleted the
worktree-recover-es-reindex-on-vote-transition
branch
July 14, 2026 06:03
This was referenced Jul 14, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Stage 3.5 on top of #9: reindex a card into ES immediately on a printing/tag
vote transition, instead of waiting for the next
update_databasescan.Design and implementation detail:
docs/features/printing-tags.md's new"Stage 3.5" section.
documents.py:reindex_card_safely(card)— failure-isolated ES push,shared by both consensus modules.
printing_consensus.py: reindexes only when the effective indexedprinting changes (enter/leave RESOLVED, or a changed resolved printing).
tag_consensus.py: its existing (already transition-gated) ES push nowgoes through the same failure-isolated helper.
inferred_canonical_artist/artist_vote_statusonly) — confirmed againstdocuments.py, no hook.Recovery note
The original session doing this work was killed mid-edit (terminal closed
before it could commit) — reconstructed from its transcript.
documents.pyand
printing_consensus.pyare verbatim recoveries.tag_consensus.py'sdocstring edit is verbatim; the call-site swap (
CardSearch().update(...)→
reindex_card_safely(card)) was never reached by the killed session — Icompleted it, matching the pattern already established in
printing_consensus.pyand required by the original spec's "if yes, samehook there" for any ES-indexed field. Diffed all three files against the
transcript's edit history to confirm no partial application beyond that one
documented completion.
Verification
test_printing_consensus.py::TestResolveAndPersistPrintingReindex):unresolved→RESOLVED fires one reindex call; re-resolve to the same outcome
fires zero; RESOLVED→contested fires one call and the indexed fields
(
get_expansion_code/get_collector_number) clear; an ES exception insidereindex_card_safelylogs but doesn't block the DB write.stack): 452 tests, 448 passed / 4 failed — the same 4 pre-existing
secret/fixture-dependent failures Vote-system Stage 3: printing-preferred search consumption #9 documents (2 Moxfield, 2
FileNotFoundError), no new failures.🤖 Generated with Claude Code
https://claude.ai/code/session_016i9S7LQsCL3FGaih3ZTRBJ