Repository navigation
fix: let the updater adopt a release's new generated outputs - #119
Merged
Merged
Conversation
A release that added a generator output deadlocked downstream updates: the updater refused the new merge=ours rules until the deployment had migrated, and the deployment's own ownership:check refused the migration until it had the new generated_paths.mjs. rc.11 needed two hand-made pull requests in BCHC (#143, #144) to get through. The updater now accepts a target contract that is the current one plus only literal merge=ours paths listed in the target's ownership.generated, absent from the deployment, still protected after every target rule, with every existing rule kept in order. It leaves those paths for npm run generate. Every other ownership change still fails closed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…rotects Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9a46234dff
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
In the manual update flow an untracked file is missing from git ls-files, so the updater would adopt the rule and npm run generate would replace the file. Any path on disk now refuses the adoption. 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.
Problem
A release that adds a generator output deadlocked downstream updates. rc.11 added
submit/answers.schema.jsonandsubmit/agent-instructions.txt, and BCHC hit both halves of the deadlock:assertStableOwnershipContractrefused the target's newmerge=oursrules until the deployment had migrated (run 38987627059).ownership:checkrejected the migration. That check runs the deployment's owngenerated_paths.mjs, which didn't list the new files (run 38988121431). It took a hand bridge (BCHC #144) to get through.Change
resolveOwnershipContractandgeneratedOutputAdditionsinscripts/apply_phct_update.mjsaccept two kinds of target contract:one equal to the current contract
one that only adds rules that are all of these:
merge=ourspath (no glob characters).phct/ownership.ymlownership.generatedEvery existing rule must also survive in order.
The updater then plans with the target's rules. It leaves those paths alone,
npm run generatewrites them from the deployment's data, and the log names them.Every other ownership change still fails closed: a glob, a reclaim, a reorder, a removed rule, a file the deployment already has, a path that isn't a generator output, or a path a later exception unprotects. The pre-update check stops deadlocking because the deployment no longer migrates first.
.gitattributes,.phct/ownership.ymlandgenerated_paths.mjsall arrive from the target together, and the target'sownership:checkvalidates them aftergenerate.assertStableOwnershipContractkeeps its strict behaviour for existing callers.Lag: a deployment runs the updater it already has. This takes effect from the update after the one that ships it, and that shipping release must not itself add a generated output.
docs/upgrading.mdand the CHANGELOG say so.Evidence
generatewrote both files from BCHC's config.ownership:checkpassed.npm run verifyto exit 0: 1309 + 5 Node tests and 283 Ruby runs, with 0 failures.isForkOwnedguard removed, the suite fails.npm run lintis clean andnpm testpasses 1314/1314.🤖 Generated with Claude Code