Repository navigation
039: A Finished Art Build Whose Index File Is Missing Isn't "Ready" - #175
Merged
Merged
Conversation
Spec 039 Phase 1 (FR-1, decision 4): MTG::Art::Index.file?(name) and MTG::ArtBuild#index_file_present?, plus the art_index_name spec helper. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
… is missing Spec 039 Phase 2 (Story 1, FR-2): MTG::Art::Operation gains the :index_missing state, judged only for a finished latest build once nothing is in flight, with the summary "Index file missing. Build the art index again." and the facts of decision 2. Existing "Ready." examples now write a real index file (art_index_name). Ruling: AC-1.5's "no file outside index/ is looked at" is proven by MTG::Art::Index.file? refusing any name that isn't NAME (Phase 1's example with ../../config/master.key); the operation example checks only the state and fact — stubbing a Pathname stat call would test the stub. Ruling: the AC-1.7 spy example lives in the "art matching off" context as the plan says; the plan's "not_to include Index file" check went into the AC-4.7 example, the one that reads facts. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…issing Spec 039 Phase 3 (Story 2, FR-3): MTG::Art.status_line reads a finished latest build without its file as "Art matching: index file missing (<name>); press Build art index on the admin catalog page to write it again." with the build's counts, and "no file name recorded" for a row without a name. The ready line's example now writes a real index file. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Spec 039 Phase 4 (Story 3): AC-3.1 (request: the enabled button queues one MTG::Art::BuildJob; a guard, the controller is unchanged) and AC-3.2 (a second build after the art directory is emptied fetches no image, writes the same named file, and the panel and line read ready again). Against Phase 1's operation and status line the AC-3.2 example failed on :index_missing; the AC-1.8 example likewise. Ruling: AC-3.2 also asserts the rebuilt row names the same index_file as the first build, which pins "the named file now exists" to the name the missing state showed. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…122) Spec 039 Phase 5 (Story 4): catalog operations gains the "Index file missing" row, the status line's wording, the glossary's "Ready (art index)" and the accepted limit on judging by name only; release and deploy's open limit for #122 becomes the fixed behaviour and its Sources name spec 039; README's two restore steps say what the page and catalog:status read until Build art index is pressed; the specs index records the supersessions of 015 AC-4.1, 011 AC-3.11 and 030 decision 12 on both sides; the roadmap gets #122's Housekeeping line. Ruling: the 030 row's Superseded-by text sat in a seventh cell; it is moved into the sixth (Superseded by), as the plan says, and the 039 clause appended. The spec header already read Approved v1.0.1 on main, so that plan item needed no change. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
… missing Spec 039: /admin/catalog's mtg panel in light and dark, with the art build row seeded by a scratch script into the worktree's dev database (no real art index; the ready shots have an empty index file written through MTG::Art::Index.write!, the missing shots have it deleted). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…eview
Implementation review (Opus, read-only), minor findings 1-3:
- README's two restore places quote the status line as it prints
("Art matching: index file missing"), not the panel's words.
- AC-2.2's guard compares the whole ready line, not a substring.
- AC-1.6 gains an interrupted example with a missing-file build behind a
left-behind one (stalled shares the running branch it now guards).
These are guards: they pass on the current code by design.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Red-then-green evidence per phase, the AC table, the local bin/ci result, and the Mode B review (Opus, read-only): SPEC-ALIGNED WITH MINOR GAPS, minors 1-3 fixed in 7633920, 4-6 ruled. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…se and deploy The area docs' rules were written in Phase 5 (fa3a0f4); this adds their Distillation log rows and marks the index row Frozen by both docs, its plan retirement owed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…se and deploy area docs (spec 027 D4) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Implements spec 039 (plan: plan.md; evidence: verification.md).
Summary
The art index is two things that can disagree: the latest
mtg_art_buildsrow and the file understorage/catalog/mtg/art/index/. After a restore, which holds the database only, or after the directory is lost, the Art index panel on/admin/catalogand the art line ofcatalog:statussaid "Ready." while the scanner offered text recognition only.Now a finished latest build whose own named index file isn't on the volume reads:
catalog:status:Art matching: index file missing (<name>); press Build art index on the admin catalog page to write it again. <counts>Pressing the button rebuilds the file without downloading any image, and both read "Ready." again. Only MTG code changed; the core, the controllers, the views and
AdminHelperare untouched (FR-4).Phases
446b507feat(art):MTG::Art::Index.file?(name)checks the name againstNAMEand makes onestat;MTG::ArtBuild#index_file_present?; spec helperart_index_name.f73f537fix(art):MTG::Art::Operationgets the:index_missingstate. It is judged only once nothing is queued or running, so those states win. The five existing "Ready." examples now write a real index file.5712f67fix(art):MTG::Art.status_linegets the missing wording, with "(no file name recorded)" for a row that has no name.474ee49test(art): AC-3.1 (pressing the button queues one build) and AC-3.2 (a rebuild after the art directory is emptied makes no image request, writes the same file name, and the panel and line read ready again).fa3a0f4docs: the catalog operations and release and deploy area docs, both restore places in the README, the specs index supersessions (015 AC-4.1, 011 AC-3.11 and 030 decision 12, each in part, recorded both ways), and the roadmap line.80aad73: the screenshots.7633920: fixes from the review.af1e7ae: verification and review.fef8f9b,6aa432aande75c454: distillation.Rulings and deviations
index/is looked at" is proven where it lives:Index.file?refuses any name that isn't of the index's shape (example with../../config/master.key). The operation example checks the state and the fact rather than stubbing astat.main, so that plan item needed no change.plainprogrammer/039-art-index-missing-file-2to039-art-index-missing-file. That name had carried the spec PR docs(specs): spec and plan 039, art index file missing #165, which merged; this push recreated it.446b507–474ee49andfa3a0f4sayCo-Authored-By: Claude Sonnet 5.5; the session runs on Opus 5.5. The coordinator said not to rewrite pushed commits, so later commits carry the Opus trailer.Tests
bin/ciat474ee49, the last code commit: every step passed, with 2435 examples, 0 failures, 1 pending.7633920added one example and tightened another. Their files pass (76 examples, 0 failures), and the pre-push hook's fullbin/cigates each push.verification.md.Implementation review
SPEC-ALIGNED WITH MINOR GAPS:
sdd-reviewMode B, Opus, read-only. Nothing blocking or major. The minor findings:7633920:art-index-upgrade.bin.gznow reads as missing; the spec already accepts this.Details are in
verification.md.Screenshots
/admin/catalogwith art matching on. The worktree's dev database was seeded by a scratch script: one admin, one applied refresh with 0 cards, and one finished build row. For "ready" an empty index file was written throughMTG::Art::Index.write!; for "missing" it was deleted. No real art index is involved.bin/rails "catalog:status[mtg]", readybin/rails "catalog:status[mtg]", index file missingWorth checking by hand
Closes #122
🤖 Generated with Claude Code