feat(sync-submission): add v_(N+1) docx regeneration gate (Phase 7)#28
Merged
Merged
Conversation
Extends scripts/verify_package_integrity.py with --assert-vN-docx-changed mode. Asserts that v_(N+1) docx MD5 differs from v_N docx MD5; identical bytes = unmodified seed copy = block submission. Motivation: silent v_N → v_(N+1) docx copies (without regeneration via pandoc citeproc or Zotero CWYW field-code re-patch) cause markdown body edits to silently revert at portal peer review. Defense-in-depth gate. Adds Gate 10 + Phase 7 narrative to /sync-submission SKILL.md. Synthetic fixture tests cover identical/different/missing-v_N/missing-arg cases — all 4 pass. Co-Authored-By: Claude Opus 4.7 <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.
PR T1-3: v_(N+1) docx MD5 ≠ v_N docx assertion
Title:
feat(sync-submission): add v_(N+1) docx regeneration gate (Phase 7)Summary
Extends
scripts/verify_package_integrity.pywith an--assert-vN-docx-changedmode that compares two docx files by MD5 andexits non-zero when they are byte-identical. Documents the gate in
/sync-submissionSKILL.md as Phase 7.Motivation
Cross-project precedent (anonymized): an outcome-MA submission package
at v_(N+1) shipped with a v_(N+1) markdown body change (two-paragraph
edit) but the v_(N+1) docx in the submission folder was byte-identical
to the v_N docx — a silent
cpover the v_N seed that never wentthrough the pandoc / Zotero CWYW regeneration step.
When uploaded to the EM portal, the markdown changes would have silently
reverted at peer review. P0 active submission blocker.
This gate adds defense-in-depth: even if the upstream regeneration
pipeline appears to have run, the byte-identity check catches the case
where it didn't.
Changes
scripts/verify_package_integrity.py:md5_file()helperassert_vN_docx_changed()function with explanatory FAIL message--assert-vN-docx-changedmode +--vN-docx/--new-docxarguments (mutually exclusive with
--record/--verify)skills/sync-submission/SKILL.md: Gate 10 + Phase 7 narrative.skills/sync-submission/tests/test_vN_docx_assertion.sh— 4 cases(identical / different / missing v_N / missing --new-docx arg).
Test plan
bash skills/sync-submission/tests/test_vN_docx_assertion.sh— 4/4 PASSbash scripts/validate_skills.sh(
check_xref.py --vN-docx-md5).Related
/manage-refs(PR T1-4 adds the build-time companion)/revise(revision-round rebuilds invoke this gate)🤖 Generated with Claude Code
Pairs with: T1-4 (#29) for defense-in-depth v_(N+1) docx regeneration.