Repository navigation
π ci(v6-topup): never auto-drop v5 changes to the split config.go - #18309
Conversation
The resolver kept v6's side of any src/pkg/config/config.go conflict. v6 split that monolith into topical files, so a conflict there means v5 changed config.go since the last top-up and keeping v6's side drops the change without a trace (#18222's keystore sealing survived only through a hand port; #18300's meetings block was next). config.go is no longer a known pattern: the resolver now refuses and prints the diff command for a hand port. The manifest path check for the index.html regeneration now matches webstatic.ParseIndexManifest's clean-relative-path rule. The throwaway-repo test gains a case where v5 adds a real config field and asserts the resolver refuses and leaves the file unmerged. Signed-off-by: Andy Anderson <andy@clubanderson.com>
|
[APPROVALNOTIFIER] This PR is APPROVED Approval requirements bypassed by manually added approval. This pull-request has been approved by: The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
Review follow-ups (below
|
There was a problem hiding this comment.
Style review @ 44808dc β the resolver change reads fine. One test-readability issue to fix:
case_config_real_field inverts the expect convention, so a setup failure reads as a pass (.github/scripts/test-v6-topup-autoresolve.sh, new case, ~L121-131)
The sibling fail cases (case_unknown_conflict, case_pin_file_real_edit) just run bash "$RESOLVER" last and let its non-zero exit be the result. The new case instead returns 0 for every bug path and return 1 only on the happy path. expect ... fail treats rc!=0 as pass, so this works, but it is the reverse of the file's other cases. It also has a trap: the setup line git merge ... && { echo "expected conflicts"; return 1; } returns 1. If the merge ever stops conflicting (fixture drift), the case reports ok instead of failing, so the regression test passes without testing anything.
Suggested shape: match the siblings, run the resolver last, and make the assertions explicit.
- git merge --no-ff -q v5 -m merge >/dev/null 2>&1 && { echo "expected conflicts"; return 1; }
+ git merge --no-ff -q v5 -m merge >/dev/null 2>&1 || true
+ git status --porcelain | grep -q '^UU src/pkg/config/config.go$' || { echo "setup: no config.go conflict"; return 0; }This leaves the failed-setup path returning 0, which expect fail flags. Do the same for the other return 0 guards, and keep return 1 only as the final refusal path. Better still, add a small expect_refusal helper rather than relying on inverted return codes.
Minor, out-of-scope: the manifest clean-path rule change in v6-topup-autoresolve.sh (~L119) is unrelated to the title and has no test. It is worth a line in the PR body, which does mention it, or a separate PR.
β hive: agent=adjudicator-4 backend=claude model=claude-sonnet-5-5 claude=2.1.325
|
Hive status β updated in place; edits do not notify. Full history is in the Activity Monitor. Review findings from Read the diff and the resolver script. The change looks correct to me.
I'm routing rather than leaving a plain confirmation because the PR edits |
Problem
.github/scripts/v6-topup-autoresolve.sh(#18277) kept v6's side of anysrc/pkg/config/config.goconflict. v6 split the oldconfig.gomonolith into topical files (#9386, #9956). So a conflict there means v5 changedconfig.gosince the last top-up, and keeping v6's side dropped that change without any message. #18222's keystore sealing nearly went this way; it survived only because it was hand-ported into v6'sload.go/save.go. #18300's meetings config block would have been next.Change
config.go"keep v6" rule is removed. Aconfig.goconflict now counts as an unknown pattern. The resolver refuses and prints thegit diff <merge-base> MERGE_HEAD -- src/pkg/config/config.gocommand for a hand port.UUconflict, v5's diff against the merge-base is never empty. Telling whether v6 already has an equivalent change somewhere in the split files means matching code that has moved, and that cannot be proven safe mechanically.discord/anddiscord-syntax.ymlmodify/delete: keep v6's deletion. This is intentional (v6 removed discord in fix: discord legacy bot removal, MESSAGE_CONTENT docs, poll backoff [scanner]Β #9277), so the rule is unchanged.CHANGELOG.md:git merge-file --unionkeeps both sides' lines, so no v5 text is dropped. Unchanged.integration-governance.cjs: the resolver acts only when every hunk on both sides is theTRUSTED_SCRIPTS_TREEliteral. It then re-pins to the mergedsrc/scriptstree, and any other hunk is refused. Unchanged.static/index.html: the resolver regenerates the file fromstatic-src/manifest.txtas a byte-exact concatenation. That is the same output aswebstatic.ConcatIndex, whichgo generate(gen/concat.go) andTestIndexHTMLIsGenerateduse, and it never takes one side. It runs only when nostatic-srcfile is conflicted. The manifest path check now matchesParseIndexManifest's clean-relative-path rule.config-go-real-field-refused. In that case v5 adds a realConfigfield toconfig.gowhile v6 has the split version. The test asserts that the resolver exits non-zero, leavesconfig.gounmerged and prints the hand-port hint. As a control, the new case fails against the previous resolver.π€ Generated with Claude Code