Repository navigation
Conversation
Rebuild the updated head before landing it. Hive-Run: projectbluefin#864 Hive-Plan: refresh-behind-bump Hive-Spec: bump-gate#exact-head Assisted-by: openai-codex/gpt-6.1-terra via GitHub Copilot Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: Karibhou <157208370+Karibhou@users.noreply.github.com>
|
Summary: This update is ready for automated checks. Those checks will show whether the change works as intended. hive/awaiting-ci: CI pending — sweep will merge when green. The pull request is partial; see its remaining race before merging. — hive: agent=scanner backend=omp model=openai-codex/gpt-6.1-terra |
cd4d11b
|
|
@Karibhou this PR is back in your court ( Failing checks:
Reply here or push a new head to this branch (same sign-off); CI and the review swarm re-run automatically and the PR returns to the normal path. Your relay session received this as a |
|
Canary failed because this is a fork PR with no maintainer-run proof, not because a build failed (failed job). This PR changes |
|
@Karibhou the hive has adopted this PR ( |
|
Stand-in note (the hive's agents are out of quota), answering the 11-14 request for a maintainer canary run. I'm not pushing this to
Once a maintainer picks the approach and OKs the permission, someone with write access can push |
|
Thanks for reviewing. The |
|
hive-base-moved: merged main at c014abe into this PR branch. |
|
@Karibhou this PR has a new head without confirmed hive push evidence, so the hive has handed this PR back to you ( |
|
Canary is blocked on maintainer review and proof for the current head |
The landing step looked at mergeStateStatus in the discovery query and then watched the required checks, so main moving while the checks ran still left a stale head for the SHA-pinned merge to fail on (405). Read the state with gh pr view after the watch, re-read while GitHub reports UNKNOWN, and send a BEHIND head through update-branch and a fresh gate from there. Assisted-by: Claude Opus via GitHub Copilot Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
Maintainer review: this keeps #1013 over #940 for #864. Checked against the points that sank #940. |
#18950) * fix(dashboard): 085 row stops asking for an approval the head has At 085 the Activity monitor learned a head's trusted approver only from the `:human-approved@` reason suffix, which is written at 090. A head a trusted merger approved but that stays at 085 for another blocker (projectbluefin/utah-packages#1013: fork-guard:Canary) kept showing the reviewer's requires_human question and an enabled Approve. - The stage pass records the head's trusted approval it found (obs.Detail.HumanApprover for the head) on the stage record: Record.ApprovedHead / ApprovedBy, display evidence only. - The tracker row reads it at 085 when the reason carries no approver. - decisionForPR skips the reviewer question the approval answered and disables Approve with the approver named, except on a sentinel alert, where Approve also clears the label. Follow-up to #18849. Signed-off-by: Danathar <6772335+Danathar@users.noreply.github.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BQYnPGFJx81c8JXR3o1sg1 * test(dashboard): type-assert the open-PR entry before moving its head OpenPrs holds any; vet refused the field access. Signed-off-by: Danathar <6772335+Danathar@users.noreply.github.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BQYnPGFJx81c8JXR3o1sg1
hanthor
left a comment
There was a problem hiding this comment.
Security review: the landing logic is sound (BEHIND never merges, expected_head_sha guards the update, and the new head is re-gated). The token change is not.
Rejected: permission-actions: write on the mergeraptor token. That token can already push to and merge into main. Adding actions: write lets the same credential dispatch, re-run or cancel any workflow in the repository. The job needs only one capability: dispatching bump-upstream-gate.yml.
Acceptable scope: keep the app token at contents: write + pull-requests: write. Do the dispatch with the job's own GITHUB_TOKEN, scoped to actions: write. That's how bump-upstream-sources.yml and detect-rawhide-updates.yml already dispatch this gate (workflow_dispatch is allowed from GITHUB_TOKEN).
enqueue:
needs: validate
runs-on: ubuntu-24.04
- permissions: {}
+ permissions:
+ actions: write # gh workflow run bump-upstream-gate.yml only
...
permission-contents: write
permission-pull-requests: write
- permission-actions: write
- name: Enqueue the built head or merge it once when no queue exists
env:
GH_TOKEN: ${{ steps.app-token.outputs.token }}
+ DISPATCH_TOKEN: ${{ github.token }}
...
- gh workflow run bump-upstream-gate.yml -R "$REPOSITORY" --ref "$branch" -f pr="$PR"
+ GH_TOKEN="$DISPATCH_TOKEN" gh workflow run bump-upstream-gate.yml -R "$REPOSITORY" --ref "$branch" -f pr="$PR"Then add a test in tests/test_bump_gate.py that the app token doesn't request permission-actions. Happy to approve after that.
Reviewed on behalf of @hanthor with Claude Code
|
@Karibhou the hive has adopted this PR ( |
|
The hive's GitHub App lacks |
|
hive-base-moved: merged current main at |
Use the enqueue job token only to dispatch the fresh gate. Keep Actions permissions off the MergeRaptor installation token. Signed-off-by: Karibhou <157208370+Karibhou@users.noreply.github.com>
|
Addressed the requested credential split in |
|
@Karibhou this PR has a new head without confirmed hive push evidence, so the hive has handed this PR back to you ( |
There was a problem hiding this comment.
HUMAN DECISION NEEDED — @Karibhou: a maintainer must accept that the landing job's built-in workflow token now gets permission to start and manage workflow runs.
Summary: This change lets the daily package-update pull requests land even when the main branch moved ahead while they were being built: instead of failing, the robot refreshes the branch and sends it back through the build check. The newest revision fixes the concern from the last review: the merge robot's own credential no longer gets the power to start workflows. That power now sits on the job's short-lived built-in token instead. This is narrower, but it is still a newly granted permission on an automation file, so a person has to sign off.
What I need from you: Approve the new actions: write grant on the landing job, or ask for a different dispatch route.
Reviewed head cd4d11b7 (delta from 4b9cac9c). Most of the delta is a merge of main (brew packaging, gdm, openssl-pkcs11, hermetic verifier). Those landed on main already and were not re-judged here. The author's own change is commit cd4d11b7.
Previous finding — fixed: "Merge robot token gains power to start workflows" (.github/workflows/bump-upstream-enqueue.yml:97). The App token step now mints only permission-contents: write and permission-pull-requests: write (bump-upstream-enqueue.yml:96-97). The gate re-dispatch uses GH_TOKEN="$DISPATCH_TOKEN" at :171, sourced from ${{ github.token }} at :101. tests/test_bump_gate.py pins both: test_app_token_cannot_manage_actions checks that the App step has no permission-actions, and the BEHIND test asserts that every call except the final workflow run uses the App token.
Mechanics check out:
workflow_dispatchis one of the two events aGITHUB_TOKENmay start.- The gate workflow has no actor check (grep for
actorinbump-upstream-gate.ymlfinds none). validatekeys only on.event == "workflow_dispatch", path, branch and head (bump-upstream-enqueue.yml:50-55), so a gate run started byGITHUB_TOKENstill hands off.- Unit tests and the other checks at
cd4d11b7are green.
security
bump-upstream-enqueue.yml:85-86: the job'spermissionsgoes from{}toactions: write. TheGITHUB_TOKENin this job can now dispatch, cancel or re-run any workflow and delete artifacts/caches in this repo. Exposure is limited: the step runs only trustedmaincode with no checkout (:3-5,:88), and the token is passed asDISPATCH_TOKENenv to one step. It is still a newly granted scope on a workflow, so a human must accept it. No code change requested if accepted.
No findings from: correctness, intent-alignment, style, docs-currency.
Confidence: 3/5 (needs attention) — 1 perspective requires a human decision
— hive: agent=reviewer-2 backend=claude model=claude-opus-5-5 effort=medium claude=2.1.326
| runs-on: ubuntu-24.04 | ||
| permissions: {} | ||
| permissions: | ||
| actions: write # Re-dispatch the gate without granting Actions access to MergeRaptor. |
There was a problem hiding this comment.
security (needs maintainer sign-off): This job's GITHUB_TOKEN goes from no permissions to actions: write. With it, the token can dispatch, cancel or re-run any workflow in the repo and delete artifacts/caches. The risk is limited: the step runs trusted main code with no checkout, and only the final gh workflow run uses it (:171). This is narrower than the previous App-token grant, which is now removed (:96-97). It is still a newly granted scope, though, so a human should accept it explicitly. No code change requested if accepted.
|
Canary on 🐝 Hive Agent: |
|
Thanks for the review. The 🐝 Hive Agent: |
|
Closing this unmerged, on Doug's (Danathar) decision: the merge queue has fixed the problem it addresses, so this code would never run. What this PR fixes: a built daily bump PR that falls behind What changed on 2026-11-18:
Why close rather than keep it as a fallback: the remaining change adds Thanks @Karibhou: the logic held up in review, and the token split was done as asked. The problem simply went away underneath it. |
Summary: A daily bump PR that falls behind main under strict freshness (ruleset:
strict_required_status_checks_policy: true, no merge queue) could never land: the SHA-pinned merge answers 405. This sends a behind head back throughupdate-branchand a fresh gate instead of merging an unbuilt head.What the no-queue landing step in
bump-upstream-enqueue.ymlnow doesmergeStateStatuswithgh pr viewafter the watch (re-reading while GitHub reportsUNKNOWN), and refuses if the head is no longer the built SHA.BEHIND:PUT pulls/<n>/update-branchwithexpected_head_sha=<built SHA>, waits for the new head, then dispatchesbump-upstream-gate.ymlon the daily branch (onlybump/upstream-sourcesorbump/rawhide-imports). The new merge commit earns its own build verdict; the gate hands it back here.The app token gains
permission-actions: writefor that dispatch; themergeraptorinstallation already holdsactions: write.mergeStateStatusis a realgh pr view/ GraphQL field (unlikebehindBy, which sank #940).Tests (
tests/test_bump_gate.py): BEHIND → update + regate, never merge; checks watched before the update; UNKNOWN re-read before merging; head moved during the checks → no merge; failed update → no dispatch, no merge. Theghstub returns realgh pr viewshapes in sequence.Docs:
docs/skills/rawhide-recipe-reimports.md.Supersedes #940 (kylerankin's
tools/land_bump.pyapproach to the same issue).Closes #864
Verification:
just checkgreen (1569 passed);actionlintclean. Maintainer Canary: run oncanary/pr-1013at the head.Original author: @Karibhou. Read-after-checks change and tests added by a maintainer.