Repository navigation
chore(p3stack): stop the sync when upstream changes a file p3stack copies - #6
Merged
Merged
Conversation
p3stack copies two upstream files that live outside the synced folders: the docs check and the skill-name rule from the harness generator. The subtree merge can't see changes to them, so a later upstream fix would be dropped silently. scripts/ported.txt records each one with the blob hash p3stack's copy matches and the part it ports, and check.sh validates its rows. sync-upstream.sh compares each hash before running the checks. When a file changed, it prints the diff and stops. When upstream no longer has the path, it stops without guessing whether the file moved, was rewritten, or was deleted. Review found too many histories where a guess was wrong. Step 4 of sync-agent.md gives the commands to find out, says what each can't prove, and sends every path change or dropped line to Needs a human. 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.
Why
p3stack copies two upstream files that live outside the folders the subtree sync merges. One is the docs check, which comes from
scripts/check-pstack-docs.mjs. The other is the skill-name rule, which comes from upstream's harness generator. The sync can't see changes to either file, so a later upstream fix would be dropped silently.What changed
scripts/ported.txtlists each copied file with the blob hash p3stack's copy matches and the part it ports.scripts/check.shrequires the file to be committed and validates every row.scripts/sync-upstream.shchecks each hash before it runs the checks. If upstream changed the file, it prints the diff and stops. If the recorded blob is missing, it says so and stops without a diff. If upstream no longer has the path, it stops without guessing what happened.scripts/sync-agent.mdcovers both stops. For a file that is gone, it gives the commands for finding out what happened, says what each can't prove, and sends every path change or dropped line to Needs a human.scripts/ported.txtand describes the stop.Scope
Tradeoffs
Blast Radius
Every
scripts/check.shrun, including CI, now requiresscripts/ported.txtand validates its rows. The rows are valid today.sync-upstream.shstops only when upstream changes or drops one of the two tracked files. Neither has changed since p3stack copied it.Verification
sync-upstream.shpasses against the real upstream.scripts/check.shrejects a row that has no description, a short hash, or a missing local file, including a last row with no newline./interrogatereviewed this work in rounds 3 to 10. In round 10, Opus found no correctness problems. GPT and Grok found gaps in the investigation steps, which the final commit fixes. No reviewer has seen that commit.🤖 Generated with Claude Code