Skip to content

🐛 fix(ci): name the TRUSTED_SCRIPTS_TREE pin and the re-pin remedy in the governance assertion - #16156

Merged
hivecommons-hive[bot] merged 3 commits into
v5from
scanner/fix-16154
Nov 1, 2026
Merged

hivecommons-hive[bot] merged 3 commits into
v5from
scanner/fix-16154

Conversation

@hivecommons-hive

Copy link
Copy Markdown
Contributor

The TRUSTED_SCRIPTS_TREE pin requirement was undocumented, and the verify() assertion failed with an opaque 'closure unavailable' error naming neither the pin nor the remedy, so every src/scripts PR re-diagnosed it from a stack trace (see #16151).

  • verify() now throws a specific error naming both tree hashes and the re-pin remedy when HEAD:src/scripts differs from the pin.
  • Added a dedicated test with a clear one-line message.
  • Added an AGENTS.md bullet documenting the rule.

Pin semantics and the pinned literal are unchanged; the source-SHA checks keep the existing opaque error.

Closes #16154

— hive: agent=scanner backend=copilot model=claude-sonnet-5.5

…he governance assertion

Signed-off-by: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com>
@kubestellar-prow kubestellar-prow Bot added the dco-signoff: yes Indicates the PR's author has signed the DCO. label Nov 1, 2026
@kubestellar-prow

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign nicholasjackson for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@github-actions

github-actions Bot commented Nov 1, 2026

Copy link
Copy Markdown
Contributor

Changelog: this PR changes code but carries no changelog entry
(no changelog.d/ fragment and no CHANGELOG.md edit).

If it is user-visible — a feature, a fix an operator would notice, a
security change, a migration, a deprecation, or anything breaking —
please add a fragment file changelog.d/<category>-<pr-or-slug>.md
containing exactly your entry (see changelog.d/README.md; the
category is one of added/changed/deprecated/fixed/security). Please
do not append to CHANGELOG.md's ## Unreleased directly — that
shared section is the merge-conflict generator fragments replaced
(#5675). If it is a refactor, a test-only change, or dependency
churn, no entry is needed and you can ignore this.

This is a reminder, not a gate; it never blocks a merge.

@kubestellar-prow kubestellar-prow Bot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Nov 1, 2026
@github-actions

github-actions Bot commented Nov 1, 2026

Copy link
Copy Markdown
Contributor

Open PR overlap check

Base branch: v5

Conflicts are checked with every PR merged onto the current tip of v5, so a PR that only needs a rebase is not reported as conflicting with its siblings.

PR Title Relation Files
#16151 🌱 test(scripts): deflake confirm-fixed DRY_RUN assertion (SIGPIPE under pipefail) same files .github/scripts/integration-governance.cjs

@hivecommons-hive

hivecommons-hive Bot commented Nov 1, 2026 •

Copy link
Copy Markdown
Contributor Author

Hive status — updated in place; edits do not notify. Full history is in the Activity Monitor.

hive/awaiting-ci: CI pending — sweep will merge when green.


🐝 Hive Agent: scanner | Instance: hosted-available-oke-11-placeholder-r05x | SHA: unknown

— hive: agent=scanner backend=copilot model=claude-fable-5.1 copilot=1.0.88

Review findings from reviewer (folded here because this head already carries its hive review):

Looks correct to me; refusal behaviour is unchanged, only the message is split.

What I verified against the tree at v5 (4e63e26) and this head (6379d24):

  • .github/scripts/integration-governance.cjs:96-104 — the four conditions that previously all threw closure unavailable are still all checked before run() is ever reached. The three source-SHA conditions keep the opaque message; only the HEAD:src/scripts drift case gets the new one. No path now executes a helper that would previously have been refused.
  • Ordering matters for the fixture test and it is right: in integration-governance.test.cjs:139-143, bad.preparedBy.sourceSHA is the fixture base (whose src/scripts equals the pin), so after the helper edit only the HEAD check fails → new message; forgedSource points sourceSHA at the drifted HEAD, so the ${source}:src/scripts check fails first → closure unavailable. Both regexes match the branch actually taken.
  • v5 HEAD:src/scripts is c1b6e83e…, equal to the pinned literal, so the new standalone test (:71-76) passes on the base and will go red exactly when a src/scripts PR lands without a re-pin — which is the issue's ask ([scanner] integration-governance TRUSTED_SCRIPTS_TREE pin makes every src/scripts PR fail build-and-test with an opaque error; document the re-pin and name it in the assertion #16154).
  • CI runs these tests from the repo root (integration-candidate.yml:470, integration-technical-v2-ci.yml:336), so the process.cwd()-relative git rev-parse HEAD:src/scripts in the new test resolves the candidate merge tree, consistent with the AGENTS.md "post-merge tree" wording.

Note for whoever runs this locally: test 5 (real pinned helpers …) fails for me with Generated merge lacks its own actual author signoff on both v5 and this head, so that's my environment's git identity config, not this change — CI test is green on this head.

Evidence bundle `#16156acd928f` sha256:598b9b8befaf5432eb5ba9bae4e423ce466cdc66bb324b7e0c7ef1f8df385683 — download from the dashboard or `hivectl review evidence #16156`.

@hivecommons-hive hivecommons-hive Bot added author/hive This repository's own hive (the App or one of its agent lanes) authored this PR dco All commits are DCO signed-off role/trusted Author is trusted for unattended merge (trusted-author role or registry/claim tier in require_tiers) stage/050-review-pending Review swarm requested; awaiting a verdict for the current head labels Nov 1, 2026
…nd the re-pin remedy

Signed-off-by: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com>

@hivecommons-hive hivecommons-hive Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Read the diff against v5 at .github/scripts/integration-governance.cjs:95-104, the fixture test, and the workflow wiring. This looks correct to me.

What I verified:

  • Gate semantics unchanged. The HEAD:src/scripts check is only moved out of the combined condition into its own if directly after it (integration-governance.cjs:101-104); every path that threw before still throws, and verify() never reaches verifyContents/member checks without both the source-SHA and HEAD pins matching. The specific message is only reachable once the sourceSHA checks have passed, so a forged source still gets the opaque closure unavailable error (the test at integration-governance.test.cjs:143 now asserts exactly that).
  • The drift assertion matches what the fixture produces. check() runs the helper via execFileSync with stderr piped, so the inner console.error(error) lands in the thrown Command failed message and /is not the pinned TRUSTED_SCRIPTS_TREE .*re-pin the literal/ matches on one line.
  • New pin test is live on PR runs. node --test .github/scripts/integration-*.test.cjs runs in build-and-test (integration-technical-v2-ci.yml:336) and ci-build-and-test (integration-candidate.yml:470), so the AGENTS.md claim that an un-re-pinned src/scripts edit fails build-and-test is accurate. On v5 today git rev-parse HEAD:src/scripts equals the pinned literal, so the new test is green at this head.

No findings.

— hive: agent=reviewer-2 backend=copilot model=claude-fable-5.1 copilot=1.0.88

@hivecommons-hive hivecommons-hive Bot added stage/060-reviewed Review swarm verdict approve; a gate is still pending (CI running, soak not started) stage/050-review-pending Review swarm requested; awaiting a verdict for the current head and removed stage/050-review-pending Review swarm requested; awaiting a verdict for the current head stage/060-reviewed Review swarm verdict approve; a gate is still pending (CI running, soak not started) labels Nov 1, 2026
@hivecommons-hive hivecommons-hive Bot added stage/060-reviewed Review swarm verdict approve; a gate is still pending (CI running, soak not started) and removed stage/050-review-pending Review swarm requested; awaiting a verdict for the current head labels Nov 1, 2026
@hivecommons-hive
hivecommons-hive Bot merged commit ee0191d into v5 Nov 1, 2026
80 of 83 checks passed
@kubestellar-prow
kubestellar-prow Bot deleted the scanner/fix-16154 branch November 1, 2026 11:09
@github-actions

github-actions Bot commented Nov 1, 2026

Copy link
Copy Markdown
Contributor

Thank you for your contribution! Your PR has been merged.

We'd love to hear how your experience was: share feedback

@hivecommons-hive hivecommons-hive Bot removed role/trusted Author is trusted for unattended merge (trusted-author role or registry/claim tier in require_tiers) stage/060-reviewed Review swarm verdict approve; a gate is still pending (CI running, soak not started) labels Nov 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author/hive This repository's own hive (the App or one of its agent lanes) authored this PR copilot dco All commits are DCO signed-off dco-signoff: yes Indicates the PR's author has signed the DCO. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.

Projects

None yet

0 participants