fix: fingerprint material inputs for resumable archive runs - #2
Merged
DeepMathLLM merged 1 commit intoSep 5, 2026
Conversation
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.
Problem
The archive runner treated the queue JSON as immutable after state creation, but referenced local material files were not part of the persisted run identity. A queue could therefore resume the same object/session after a material file changed on disk while
input_sha256still matched the unchanged queue JSON.Cause
load_or_create_state()persisted and validated the queue JSON hash plus object/project/archive associations, but it did not persist content identity forObjectJob.materials.Contract
A resumable archive run must bind every referenced local material to its resolved path and exact SHA-256 content hash. Any mismatch must fail closed before session resume, material staging, model execution, verification, or publication.
Implementation
material_fingerprints(path+sha256) when queue state is created.process_object()entry before opening/resuming Moonshine.archive_tasksession metadata.No Moonshine change is required; this is a Creative-Intelligence workflow-state/provenance bug.
Regression evidence
TDD negative control: workflow run
33902896763failed on both Python 3.9 and 3.11 with the new mutation regression reportingRunnerError not raised, reproducing the provenance gap.The original implementation branch then passed workflow run
33903268250with 17/17 tests on both Python versions.After upstream PR #1 was merged, this branch was rebuilt directly on upstream commit
bee85b1eas a single clean implementation commit. Clean-baseline workflow run33943651282also passed on Python 3.9 and 3.11.Final coverage includes material path/SHA-256 persistence, unchanged-material resume acceptance, material-content mutation rejection, fail-closed handling of legacy material-backed state without fingerprints, and all 14 existing deterministic runner regressions.
Limitations
This closes persisted resume-provenance drift. It does not provide OS-level locking or an immutable snapshot against a concurrent external writer in the small interval after validation; that stronger TOCTOU/snapshot problem is outside this milestone.