Repository navigation
π ci: v6 top-up auto-resolves CHANGELOG, scripts-tree pin and index.html conflicts - #18277
Conversation
β¦tml conflicts The v5 -> v6 forward-merge failed on every run since 2026-11-15 04:09Z. Two of its conflicts recur on nearly every top-up: CHANGELOG.md (both lines prepend release sections) and the TRUSTED_SCRIPTS_TREE literal in .github/scripts/integration-governance.cjs (pins HEAD:src/scripts, so it differs whenever both lines touch src/scripts). The generated static/index.html is mechanically regenerable too. Move the known-pattern resolution into .github/scripts/v6-topup-autoresolve.sh (run from a copy taken off the triggering ref) and extend it: union for CHANGELOG.md, re-pin to the merged src/scripts tree when every hunk in the pin file is the literal, regenerate index.html from the manifest. Any other conflict still fails for a human. Add a throwaway-repo test and a workflow that runs it. Signed-off-by: Andy Anderson <andy@clubanderson.com>
|
Hive status β updated in place; edits do not notify. Full history is in the Activity Monitor. @clubanderson this PR is held at Why:
Next: the hive does not push to your branch. Push a new head (or reply here); CI and the review swarm re-run automatically and the PR returns to the normal path. Review findings from Code looks correct to me; routing because it touches a trust surface. I read What a person should decide: the script now writes the governance pin itself ( Minor: the header comment (L6) says the script aborts the merge on failure; it only exits 1 and the workflow's |
There was a problem hiding this comment.
Decision needed: @clubanderson should decide whether the v6 top-up may automatically rewrite the TRUSTED_SCRIPTS_TREE trust pin in integration-governance.cjs, or whether that file should keep going to a human.
Read .github/scripts/v6-topup-autoresolve.sh and the v6-topup.yml hunk at the PR head. I found no defect in the conflict-detection logic, but this PR changes a trust surface and needs an owner's call.
Decision needed. v6-topup-autoresolve.sh (the repin block) rewrites TRUSTED_SCRIPTS_TREE to whatever git rev-parse <merged-tree>:src/scripts returns. That pin is what the integration-governance check trusts. After this change, any src/scripts content that arrives through a v5 merge becomes trusted on v6 without a person re-pinning it. The script's header argues that it is a merge of two reviewed trees and that the top-up PR shows it. That is reasonable, but it moves the pin from a human step to an automated one, so I am not approving it.
Smaller observations (verified in the script, not blocking):
- The header says that on exit 1 it "aborts the merge and reports". The script does not abort. The workflow's
elsebranch does. By then the script may already have rungit rm/git addon the known files. The conflict inventory that branch prints is then taken from a partially resolved index, so it may omit the files that were resolved before the unknown one was hit. The up-frontknownfilter makes this unlikely, but a failure inside theCHANGELOG.mdor pin-hunk checks can still reach it. - The manifest guard
/*|..*)only rejects paths that begin with..or/.a/../../xpasses. The manifest is in-repo, so the risk is low.
The tests in test-v6-topup-autoresolve.sh look like they cover each pattern and the refusal case. I did not run them, per AGENTS.md.
β hive: agent=reviewer backend=claude model=claude-sonnet-5-5 claude=2.1.325
|
hive/scanner: CI triage. π Hive Agent: β hive: agent=scanner backend=claude model=claude-sonnet-5-5 claude=2.1.325 |
d6871f8
βΉοΈ Sentinel notice β informational; author is trusted (owner), merge is not blockedHive flagged this PR (author @clubanderson, head
Hive did not add the |
Signed-off-by: Andy Anderson <andy@clubanderson.com>
|
Needs a decision, not a merge:
Head: verdict requires_human @d6871f8, 11/30 checks green, 19 pending, DCO yes, soak 0s of 10m0s. How to release it:
Clear the cause and the hive re-evaluates on its next pass; the stage moves to |
|
[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 |
There was a problem hiding this comment.
Decision needed: @clubanderson should the v6 top-up workflow be allowed to re-pin TRUSTED_SCRIPTS_TREE automatically, given the pin exists to make a change to src/scripts visible to a human?
Needs a maintainer decision (trust surface), not a code defect.
This PR edits .github/workflows/v6-topup.yml, adds a workflow, and teaches the top-up bot to rewrite TRUSTED_SCRIPTS_TREE in .github/scripts/integration-governance.cjs on its own (.github/scripts/v6-topup-autoresolve.sh, the repin=1 branch: git write-tree β git rev-parse "${tree}:src/scripts" β sed -i).
What I verified in the script:
- The resolver is narrow.
pin_hunks_onlyrequires every hunk in the pin file to be exactly oneTRUSTED_SCRIPTS_TREE = '<40 hex>'line per side, and anything else still fails. The workflow copies the resolver to$RUNNER_TEMPbefore checking out v6, so v6 cannot substitute its own copy. - The consequence is that after an automated merge the pin equals whatever
src/scriptsis on the merged tree, by construction. The pin then no longer checks anything for that PR. A v5 change tosrc/scriptsthat would normally trip the pin's check arrives with a pin already updated to match. The PR body argues the top-up PR still shows the diff. That is a human-review safeguard, not a mechanical one, so it depends on someone readingsrc/scriptschanges in a forward-merge.
Open question for the owner: is a human-visible diff on the top-up PR enough, or should the re-pin stay a manual step (or require the top-up PR to carry a label or approval before the pin updates)?
Smaller, non-blocking: the header comment says the script "aborts the merge and reports" on failure (v6-topup-autoresolve.sh:6-8), but the script only exit 1s and never runs git merge --abort. Whether that matters depends on what the workflow does after a failure.
I have not merged, approved or closed anything.
β hive: agent=reviewer backend=claude model=claude-sonnet-5-5 claude=2.1.325
|
New changes are detected. LGTM label has been removed. |
There was a problem hiding this comment.
Decision needed: @clubanderson should decide whether the v6 top-up job may rewrite the TRUSTED_SCRIPTS_TREE pin in .github/scripts/integration-governance.cjs automatically.
Routing to a human: this PR touches trust surfaces. It adds a workflow, edits v6-topup.yml, and changes the governance pin. I found no defect in the script itself.
What I read (.github/scripts/v6-topup-autoresolve.sh, test-v6-topup-autoresolve.sh, the v6-topup.yml hunk):
- The resolver only runs when every unmerged path matches the
knownregex. The pin file is accepted only if each conflict hunk is exactly oneTRUSTED_SCRIPTS_TREE = '<40-hex>'line per side (pin_hunks_only). A real edit to that file still fails, and the testpin-file-real-edit-refusedcovers it. - The resolver is copied to
$RUNNER_TEMPbeforegit checkout -B sync/v5-to-v6 origin/v6, so v6's tree cannot replace the script that resolves its own merge. That is the right order. - The new test workflow has
permissions: contents: readand a SHA-pinned checkout, and it registers inrelease-lines.yml.
The decision: the pin exists so that src/scripts changes are reviewed. After this PR, the top-up bot re-pins to whatever tree the merge produces (git write-tree then rev-parse :src/scripts, script lines ~120-125). The top-up PR then shows a new pin value, and a reviewer has to check that it matches the merged scripts. The PR body says this is intended. Whether bot-generated pin updates are acceptable is a governance call, not a code one.
Minor, non-blocking: the header comment says the script "aborts the merge" on failure, but it only exits 1. The abort happens in the workflow's else branch. Worth rewording so the contract matches.
Suggestion, not a defect: add a test case where integration-governance.cjs conflicts only in the pin but src/scripts is unchanged on both sides. It would show that the re-pin is a no-op there.
I have not approved or closed anything.
β hive: agent=reviewer backend=claude model=claude-sonnet-5-5 claude=2.1.325
There was a problem hiding this comment.
Decision needed: @clubanderson @hanthor @Danathar should an automated job be allowed to rewrite the TRUSTED_SCRIPTS_TREE pin in .github/scripts/integration-governance.cjs during a v5βv6 top-up?
Routing to a code owner, not a defect: this touches trust surfaces that CODEOWNERS covers (.github/workflows/**) and adds an unattended rewrite of the governance verifier pin.
What I read at b2e1832:
.github/scripts/v6-topup-autoresolve.shre-pinsTRUSTED_SCRIPTS_TREEtogit rev-parse <write-tree>:src/scripts, i.e. the tree of whatever the merge produced, then the workflow commits it (v6-topup.yml). The guard (pin_hunks_only) correctly limits this to hunks that are exactly one pin line per side, and the resolver is copied from the triggering ref beforegit checkout -B sync/v5-to-v6β both look right to me.- The residual risk is policy, not code: the pin becomes "whatever
src/scriptsis after the merge". If a v5src/scriptschange was not reviewed to the v6 bar, the top-up PR diff shows only a changed 40-hex literal, which a reviewer cannot meaningfully eyeball. - Mechanics otherwise look sound: the
DU/UDremoval,--oursforconfig.go,merge-file --unionfor the CHANGELOG (v6 block first), and index.html regeneration from the manifest with the/*|..*path guard. The new test workflow hascontents: readonly, and itsKnown-conflict resolvercheck is green.
Question for the owner: is "pin follows the merged tree, reviewed via the top-up PR" acceptable, or should the pin conflict stay a human step? Everything else here I'd consider fine to land.
β hive: agent=reviewer-2 backend=claude model=claude-sonnet-5-5 claude=2.1.325
|
merged by Hive trusted-author auto-merge: author @clubanderson holds role owner and GitHub permission admin on repo; CI green at b2e1832. |
.github/workflows/v6-topup.ymlhas failed on every run since 2026-11-15 04:09Z (the 13:52Z run: content conflicts in.github/scripts/integration-governance.cjs,CHANGELOG.md,src/Dockerfile). The v6 line was topped up by hand in #18275. Two of those three conflicts come back on nearly every top-up:CHANGELOG.md: both lines prepend their own release sections under## Unreleasedon every release.TRUSTED_SCRIPTS_TREEin.github/scripts/integration-governance.cjs: it pinsgit rev-parse HEAD:src/scripts, so the literal differs between v5 and v6 whenever both lines changedsrc/scripts.src/pkg/dashboard/static/index.htmlis a generated file (byte concatenation ofstatic-src/manifest.txt) and conflicts whenever both lines touch the dashboard. Thesrc/Dockerfileconflict was a one-off (both sides edited the same metacopy-rewrite line) and is resolved in #18275.Change
elifinto.github/scripts/v6-topup-autoresolve.sh. The workflow copies the script to$RUNNER_TEMPbefore it checks out v6, so the resolver always runs from the triggering ref, not v6's tree.config.gosplit) and adds:CHANGELOG.md:git merge-file --union, v6's block first, then v5's (the layout v6's CHANGELOG already has).integration-governance.cjs: only when every conflict hunk is exactly oneTRUSTED_SCRIPTS_TREEline per side. The script re-pins it to the mergedsrc/scriptstree. Any other hunk in that file still goes to a human.static/index.html: regenerated from the manifest. Any conflict insidestatic-src/is outside the patterns and still fails..github/scripts/test-v6-topup-autoresolve.sh(builds throwaway repos for the all-known case, an unknown conflict, and a real edit in the pin file) andv6-topup-autoresolve-tests.ymlto run it on PRs and v5 pushes that touch these files.Security note on the re-pin: the pinned tree is the merge of two already-reviewed
src/scriptstrees, and the top-up still lands through a reviewed PR. No caller-supplied SHA gets to pick the verifier tree.The workflow-file push preflight (#7959) is unchanged. A top-up that carries workflow edits still needs
TOPUP_PUSH_TOKEN.Nothing was run locally. CI runs the new test.
π€ Generated with Claude Code