Skip to content

🐛 fix(workflows): verify "the App cannot push workflows" before parking on it - #16811

Merged
hivecommons-hive[bot] merged 7 commits into
hivecommons:v6from
Danathar:fix/workflows-blocker-verify
Nov 6, 2026
Merged

hivecommons-hive[bot] merged 7 commits into
hivecommons:v6from
Danathar:fix/workflows-blocker-verify

Conversation

@Danathar

@Danathar Danathar commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor

Executive summary

The hive took an agent's "the App cannot push .github/workflows/" as fact, even when that agent's own token could push the change. On projectbluefin, scanner (ISSUES_PRS_MERGE, merger tier, whose token asks for workflows: write) parked projectbluefin/testsuite#1059 and #1073 on 2026-11-01 at 05:09Z with that sentence. The App pushed .github/workflows/e2e.yml the same day (projectbluefin/testsuite@a017ce1, 13:02Z, in projectbluefin/testsuite#1089). Both issues sat as "Blocked · App lacks workflows permission" for four days.

This PR checks the claim before it parks anything:

  • Merger- or trusted-tier lane: if the installation grants workflows: write, the park is refused and the issue stays with that lane.
  • Contributor-tier lane: it is handed to the workflows lane (🐛 fix(relay): hand a workflow-only park to the lane that can push it #16692) unless the installation is known to lack the permission.
  • Blocker ledger: it records "App lacks workflows permission" only when no lane can push workflow files on that repo, or when the item is a fork PR. A fork branch takes no workflow-file push from the App whatever it is granted. A re-check that runs with the un-park sweep releases existing false blockers.
  • Kick: merger- and trusted-tier kicks now say their token can push .github/workflows/**.

What

Situation (workflow-only park) Before After
Merger-tier lane, installation grants workflows: write Parked at 045, "Blocked" pill Not parked; note "scanner's token can push .github/workflows/"; the issue stays with the lane
Merger-tier lane, installation lacks it or cannot be read Parked Parked (unchanged)
Merger-tier lane quotes GitHub's rejection of its push Parked Parked; the blocker is marked proven and never released by the re-check
Contributor-tier lane, capable lane serves repo, grant or unknown Handed off (#16692) Handed off (unchanged)
Contributor-tier lane, installation known to lack it Handed off to a lane that cannot push either Parked: the owner grants the permission
Ledger: prose says workflows cannot be pushed Workflows blocker recorded Recorded only when no capable lane serves the repo or the installation lacks the grant
Existing workflows blocker, hive can push Until someone clicks Re-check permissions Released on the next un-park sweep (start, then every 5 min); gets hive/workflows-lane
Merger/trusted-tier kick Says nothing about workflows "Workflow files are in reach at this mode": push the fix; park only on GitHub's rejection

Why

  • blocker.Observe → Detect → Record turns prose into a capability blocker with no check. The only installation probe (AppAuth.VerifyInstallation) ran from the manual Re-check permissions button.
  • 🐛 fix(relay): hand a workflow-only park to the lane that can push it #16692's hand-off asks config.WorkflowsLaneFor(agent, repo). That returns "" both when the agent can push workflows itself and when no lane can, so a merger-tier lane's park fell through to the owner.
  • The kick told contributor-tier lanes they cannot push workflow files, and told merger-tier lanes nothing.

How

  • config.AgentPushesWorkflows(agent) is modePushesWorkflows over the agent's effective mode.
  • pkg/github/issue_workflows_handoff.go:
    • installationGrantsWorkflows reads the installation through installationProbe, cached for 5 minutes. A token-authenticated client or a failed read counts as unknown.
    • workflowsHandoff returns SelfPush for a lane that pushes workflows on a granting installation. It skips the hand-off when the grant is known to be missing, and otherwise keeps today's behaviour.
    • WorkflowsPushable(repo) and CapabilityAvailable(repo, kind): a capable lane serves the repo, and the installation grants the permission.
    • SweepWorkflowsBlockers releases refuted blockers and adds hive/workflows-lane to each, through the writeback gate (KindStageLabel).
  • issue_request_watcher.go: a SelfPush downgrade parks nothing, adds no label (the issue keeps its lane), appends the note to the comment or new issue, and audits policy=workflows-self-push. ctx is threaded into the downgrade helpers for the probe.
  • pkg/blocker/ledger.go:
    • SetCapabilityCheck(func(repo, number, kind)): Observe stores a refuted capability report as a plain reason, so the loop guard still sees it. The check is per item: CapabilityAvailable reads the issue (and the PR, when it is one) and never refutes a fork PR's workflows blocker. feat(e2e): keep Linux security protections on during desktop tests and fail on blocked actions projectbluefin/testsuite#1037 is the case: the fixer's pushes to that fork were refused three times. An unreadable item keeps its blocker.
    • RecheckCapabilities(held) lifts blockers per item, so a repo with no capable lane keeps its blocker.
    • Human-only kinds are never checked.
  • Wiring (cmd/hive): configureGitHubClient installs the self-push lookup and the ledger check, so a rebuilt client re-installs them. runIssueUnparkSweepIfDue runs the re-check.
  • Kick: addWorkflowPushCeiling adds the "in reach" section for agents whose tier pushes workflows.

Tests

Test Covers
TestWorkflowsParkCheckedAgainstTierAndInstallation (9 rows, live #1059 text) agent tier × installation grant (write / read / error / token client) × capable lane
TestCreateWorkflowsParkRefusedForMergerTier issue --needs-decision: created actionable, no park, no routing label, note
TestInstallationGrantIsCached one installation read per 5 minutes
TestSweepWorkflowsBlockersReleasesGrantedBlockers issue and same-repo PR released + labelled; fork PR (testsuite#1037 shape), no-lane repo, CLA and branch-protection blockers stay; a re-report is a reason
TestObserveSkipsRefutedCapabilityBlocker, TestRecheckCapabilitiesReleasesOnlyRefuted ledger check, human-only kinds unchecked, stale reports stay stale
TestWorkflowPushReachForMergerTier, TestAgentPushesWorkflows kick line per mode; tier lookup incl. replicas
Existing #16692 hand-off and owner-step tests unchanged and passing
Mutants (29) 29/29 caught
go test blocker, github/..., scheduler, policies, cmd/hive, dashboard pass. pkg/config TestGateFailsClosedWithoutIP6Tables fails on this host on untouched v6; pkg/writeback ratchet passes with v6 (#16806) merged in
check-docs-citations.py src/docs 2006 verified (scale-envelope.md:37 re-anchored after the new client.go fields)

Notes

  • Related: 🐛 fix: route workflow blockers to capable lanes #16807 (the dashboard card work for 🐛 [v6] Workflows blocker card says "grant the App workflows: write" when the App has it; never offers the workflows-lane hand-off #16804) changes the card and adds a manual hand-off from it. It touches ledger.go in a different hunk (ClearItem). The two are complementary: that one is what a person sees and clicks; this one is what the relay and ledger record, plus the scheduled re-check.
  • Not done: a released blocker's park label stays. A person still answers the 045, now with "Let hive decide" enabled, and hive/workflows-lane sends the issue to the capable lane once it is answered. The scheduled pass does not un-park on its own.
  • Scope: only the workflows capability is verified. Secrets, branch protection and repo-write blockers are recorded as before.
  • The live parks were posted through hive-open-issue comment --needs-decision, the path this changes. A park added as a bare needs-human label is caught by the ledger check, not the relay.

🤖 Generated with Claude Code

https://claude.ai/code/session_01BQYnPGFJx81c8JXR3o1sg1

…ng on it

projectbluefin/testsuite#1059 and hivecommons#1073: scanner (ISSUES_PRS_MERGE, whose
token asks for workflows: write) parked "the hive app cannot push
.github/workflows/" the same day the App pushed e2e.yml (a017ce1), and the
issues sat as "Blocked · App lacks workflows permission" for four days.

- relay: a merger/trusted-tier lane's workflow-only park is refused when the
  installation grants workflows: write (cached 5 min); a contributor-tier
  hand-off is skipped when the installation is known to lack it.
- blocker ledger: SetCapabilityCheck records a workflows blocker only when
  no capable lane can push on that repo; RecheckCapabilities releases
  existing ones, run with the un-park sweep, which adds hive/workflows-lane
  through the writeback gate.
- config.AgentPushesWorkflows; merger/trusted-tier kicks say the token can
  push .github/workflows/**.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BQYnPGFJx81c8JXR3o1sg1
Signed-off-by: Danathar <Danathar@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 5, 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 hanthor 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

@kubestellar-prow kubestellar-prow Bot added the size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. label Nov 5, 2026
@github-actions

github-actions Bot commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor

Open PR overlap check

Base branch: v6

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

PR Title Relation Files
#16816 🐛 fix(adoption): refuse a fixer push that undoes the adopted PR's change same files src/pkg/github/issue_request_watcher.go
#16843 ✨ feat(ownership): CLOSE an agent finding whose cited lines are gone from main CONFLICT src/docs/scale-envelope.md
src/pkg/github/client.go
#16842 🐛 fix(labels): a later hive/verified-open or hive/already-done replaces the other same files src/docs/labels-and-control-signals/reference.md
src/pkg/github/issue_request_watcher.go
#16807 🐛 fix: route workflow blockers to capable lanes same files src/pkg/blocker/ledger.go

…ratchet fix)

Signed-off-by: Danathar <Danathar@users.noreply.github.com>
@hivecommons-hive

Copy link
Copy Markdown
Contributor

Superseded by #16807 (earlier fix for #16804). The merge queue carries one PR per issue, so this PR is held out of it and returned to its author; close it if #16807 covers the change, or let the delegate decide.

@hivecommons-hive hivecommons-hive Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Read this against v6 at merge-base with the callers (issue_request_watcher.go, blocker/ledger.go, main_sweeps.go). The mechanism is sound and the wiring is complete; the ledger Observe → capabilityHeld short-circuit and RecheckCapabilities' re-validation under lock (kind + Since must still match) are both careful. go build of pkg/github, pkg/blocker, pkg/scheduler, cmd/hive is clean on the head. One verified defect in the escape hatch, then a smaller open question.

1. The documented "park again quoting GitHub's rejection" path is refused by the same predicate that refused the first park — medium.

Both new texts tell a merger-tier lane what to do when its push really is rejected:

  • src/pkg/github/issue_workflows_handoff.go:126 (workflowsSelfPushNote): "If a push is still rejected, park again quoting GitHub's error."
  • src/pkg/scheduler/policy_overlays.go:176-177 (workflowPushReach): "Only if GitHub rejects the push for the workflows permission, park it and quote the rejection."

GitHub's rejection reads refusing to allow a GitHub App to create or update workflow ".github/workflows/<file>" without "workflows" permission (backticks in the original). That string contains .github/workflows and matches workflowsPermissionRE (issue_workflows_handoff.go:47, \bworkflows??\s+permission), so parkIsWorkflowsOnly (:90) is true for the re-park exactly as it was for the first one. workflowsHandoff (:102-113) then hits the same branch: workflowsSelfPushFor(agent)is still true,installationGrantsWorkflowsreturns the cachedgranted=true for 5 minutes (:174-196) and afterwards re-reads the same installation answer — so it returns SelfPush` again and refuses the park again. Nothing in the diff distinguishes a quoted rejection from an unverified claim.

Consequence: in the precise case this PR exists to handle correctly — installation says workflows: write, push still bounced — the lane is sent in a loop between "push it" and "not parked, push it", and the only exits are the ones the note names last (/hive hold, needs-human), which a kicked agent is told not to self-apply. The body's table row "park only on GitHub's rejection" is therefore not implemented. A narrow fix: let workflowsHandoff return issueDecisionDowngrade{} (park stands) when the text quotes the rejection itself — e.g. a second regexp on refusing to allow a GitHub App to (create|update) workflow — and add a row to TestWorkflowsParkCheckedAgainstTierAndInstallation for it.

2. Open question, not a finding: installationProbe (issue_workflows_handoff.go:170) is a package-level var swapped by tests. If any test in pkg/github that touches it runs with t.Parallel() this is a write race under -race; I did not find one in the new test file, so this is just something to keep in mind.

No other issues. I have not changed any state on this PR.

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

@hivecommons-hive

hivecommons-hive Bot commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor

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

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

Code reads correct to me; routing for a policy decision because it changes who is allowed to push .github/workflows/** without a human in the loop.

What I verified in the tree at abd91b0:

  • The gate is consistent with the token mint. src/pkg/github/app.go:344-360: trusted/merger tiers request Workflows: write; app.go:435-445 falls back to a token without it when the installation has not granted it. workflowsHandoff (src/pkg/github/issue_workflows_handoff.go) refuses the park only when config.AgentPushesWorkflows(agent) (trusted/merger tier, src/pkg/config/workflows_lane.go:36-46) and installationGrantsWorkflows returns known && granted. Unknown (token-auth client, probe error) keeps the old behaviour — the park stands.
  • installationGrantsWorkflows holds workflowsGrant.mu across the GitHub call, but VerifyInstallation bounds it with mintContext (app.go:686), so the ledger path calling it with context.Background() is not unbounded. A failed probe is not cached, so it retries next park rather than sticking.
  • Ledger.Observe runs capabilityHeld outside l.mu (src/pkg/blocker/ledger.go), and RecheckCapabilities re-reads each entry under the lock and skips ones whose kind/Since changed in between — no TOCTOU release of a newer blocker.
  • SweepWorkflowsBlockers gates the hive/workflows-lane label through WritebackAllowed before AddLabels.
  • go build ./... passes; CI still in progress at review time.

The decision, not a defect: today an agent's claim "the App cannot push workflows" is taken as fact and a human un-parks it. After this PR the hive (a) refuses such parks for merger/trusted lanes, (b) silently releases existing App lacks workflows permission blockers on every unpark sweep, and (c) tells merger-tier kicks they can push .github/workflows/**. Since .github/workflows is where CI permissions live, I'd rather an approver confirm that lanes pushing workflow files on their own is intended policy. The author is an approver; a second approver's call seems appropriate.

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

Style re-review of 6ed16c0 (delta since abd91b0: 3d1ae0ec fork-PR carve-out, 6ed16c0a proven-rejection flag; the other 24 files in the compare are the v6 merge, not this PR).

Low — two definitions of "fork PR" in pkg/github with opposite empty-head semantics. forkPR (src/pkg/github/issue_workflows_handoff.go:252-253) compares head.repo.full_name to owner/name inline and treats an empty head (deleted fork) as a fork; the package already has pullRequestIsFromFork (src/pkg/github/merge_ci_gate.go:501-504), which treats an empty head as not a fork. The intent here (a deleted head repo is unpushable, so keep the blocker) is right and documented, but a reader grepping for fork logic now finds two rules. Reuse the helper and make the one deliberate difference explicit:

	// A deleted head repository is unpushable too, which pullRequestIsFromFork
	// alone does not say.
	return pr.GetHead().GetRepo().GetFullName() == "" || pullRequestIsFromFork(pr), true

(Nit, same commit: Detect at src/pkg/blocker/blocker.go:231 and :234 repeat k == CapabilityWorkflowsPermission && QuotesWorkflowsRejection(text); a local proven := … computed once would keep the two return sites in step.)

Prior [security] note at issue_workflows_handoff.go:107 (hive self-resolves workflow-push policy): still present — the delta narrows it (a park quoting GitHub's own rejection now stands, :111-113) but does not change who decides; that is the security lane's call, not a style blocker.

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

HUMAN DECISION NEEDED — Danathar / clubanderson: whether the hive may refuse a trusted/merger lane's "App cannot push .github/workflows" park and auto-release recorded workflows blockers on its own probe (the policy question raised at abd91b0) still stands at 6ed16c0; the delta narrows it, it does not remove it.

Intent-alignment, delta re-review abd91b0 → 6ed16c0 (only 3d1ae0ec and 6ed16c0a are this PR's; the other 30 files are the v6 merge).

Prior finding (issue_workflows_handoff.go self-resolves workflow-push policy): still present. The new Proven exemption (src/pkg/blocker/blocker.go:148-151, ledger.go:166, ledger.go:321) keeps a park that quotes GitHub's rejection, but a merger-tier park without that quote is still refused on the hive's probe alone (issue_workflows_handoff.go:108-116). That is the decision a human owns.

Contract note: this PR has no closing keyword; #16804 is closed by #16807, and this body says so (Notes). Judged against the PR's own stated intent, the delta matches it: fork-PR blockers are kept (CapabilityAvailable, issue_workflows_handoff.go:218-247; unreadable item → known=false → kept), and the proven-rejection row in the table is implemented in Detect + Observe + RecheckCapabilities.

One new gap between body and code (low):

  • Proven is tier-blind. The body scopes it to "Merger-tier lane quotes GitHub's rejection", but Detect (blocker.go:231,234) sets Proven for any report that quotes the error, and Observe has no agent to consult (ledger.go:150). A contributor-tier lane that actually tried the push and quoted refusing to allow a GitHub App to create or update workflow … gets a blocker that RecheckCapabilities never releases (ledger.go:321) even though the workflows lane could push it — the exact false "App lacks workflows permission" this PR exists to stop. The relay path dodges it (workflowsHandoff only tests the quote inside the self-push branch, issue_workflows_handoff.go:108-112), so it bites only on the bare-needs-human-label path the body says the ledger covers. Suggested fix: carry the reporting agent into Observe and set Proven only when config.AgentPushesWorkflows(agent); or, cheaper, document in hive-open-issue.md:245-249 that a contributor-tier lane quoting the rejection also records a permanent blocker.

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

Security perspective — delta re-review at 3226505 (prior head abd91b0; previous review had no findings). Delta is mostly v6 merges; PR-authored changes are 3d1ae0e, 6ed16c0, 4a84f84 (Proven flag, fork-PR check, proof check). Verdict: approve, one advisory.

Advisory (low): a trailer-less rejection quote from any commenter pins an unrefutable blocker.

  • src/pkg/github/webhook_cache.go:607-613 — every issue_comment on a configured repo reaches itemblocker.Shared().Observe with no author check (webhookIssueCommentBody, :769-778, returns the body as-is).
  • src/pkg/blocker/blocker.go:231,234 — Detect sets Proven whenever the text matches workflowsRejectionRE.
  • src/pkg/github/issue_workflows_handoff.go:242-245 — WorkflowsRejectionProves returns true for agent == "" ("a person pasting the error is trusted"); a spoofed — hive: agent=scanner trailer also passes. Confirmed by issue_workflows_self_push_test.go:274 (quote: true).
  • src/pkg/blocker/ledger.go:187-190,223-224,351 — a Proven blocker skips the capability check, is carried forward over later unquoted re-reports, and is never released by RecheckCapabilities.

So any GitHub account that can comment on a managed repo can paste "refusing to allow a GitHub App to create or update workflow …" with a needs-human hint and hold the item in Blocked · App lacks workflows permission past the scheduled re-check this PR adds. Fail-closed (more parking, no privilege gain), and the manual Re-check permissions (ClearKind, ledger.go:319) still clears it; pre-PR the same comment created a blocker that nothing auto-released, so this is a bypass of the new verification rather than a regression. Not blocking.

If you want the sweep's refutation to hold against untrusted commenters, treat only a trailer from a pushing lane as proof (a person's paste then stays refutable, and the manual button remains the override):

func (c *Client) WorkflowsRejectionProves(text string) bool {
	agent := trailerAgent(text)
	return agent != "" && c.workflowsSelfPushFor(agent)
}

(and flip quote: true → false at issue_workflows_self_push_test.go:274). Trailer spoofing in a plain comment remains possible either way; closing that needs author gating at the webhook path, which is out of scope here.

Nothing else in the delta changes a trust boundary: forkPR (issue_workflows_handoff.go:252-266) treats an unreadable item or deleted head repo as fork/unknown, so it fails closed.

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

Style/maintainability pass on the delta since abd91b0 (commits 3d1ae0e, 6ed16c0, 4a84f84; the rest of the 145-file compare is the v6 merge). No prior style findings to re-check. Two small notes, neither blocking:

1. CapabilityAvailable drops the sweep's context — src/pkg/github/issue_workflows_handoff.go:224-235. It mints context.Background() for WorkflowsPushable and forkPR (two GitHub reads per item), while SweepWorkflowsBlockers(ctx) at :273-277 already holds a ctx it cannot pass through because RecheckCapabilities takes func(repo, number, kind) bool. The ledger-side call from Observe (webhook path) has no ctx to give, so the exported shape is fine there; but the sweep can hand its own via a closure:

-func (c *Client) CapabilityAvailable(repo string, number int, k itemblocker.Kind) bool {
+func (c *Client) CapabilityAvailable(repo string, number int, k itemblocker.Kind) bool {
+	return c.capabilityAvailable(context.Background(), repo, number, k)
+}
+
+func (c *Client) capabilityAvailable(ctx context.Context, repo string, number int, k itemblocker.Kind) bool {
 	if c == nil || k != itemblocker.CapabilityWorkflowsPermission {
 		return false
 	}
 	owner, name := c.splitRepo(repo)
-	ctx := context.Background()
 	if !c.WorkflowsPushable(ctx, owner+"/"+name) {
...
-	released := itemblocker.Shared().RecheckCapabilities(c.CapabilityAvailable)
+	released := itemblocker.Shared().RecheckCapabilities(func(repo string, number int, k itemblocker.Kind) bool {
+		return c.capabilityAvailable(ctx, repo, number, k)
+	})

2. Trailer-less proof trusts a stripped report — issue_workflows_handoff.go:242-245 treats a quote with no — hive: agent= trailer as a person's paste and proves the blocker. One ledger producer strips attribution before Observe: src/pkg/github/task_list_sweep.go:663 passes "needs-human: " + ref.Remainder, so a contributor-tier lane's quoted rejection in a merged PR's task list would arrive trailer-less and be marked Proven (never released by RecheckCapabilities, ledger.go:351). Narrow case; worth a comment on WorkflowsRejectionProves naming the known trailer-less producer, or threading ref.Agent (if the remainder carries one) into the text, so the next reader does not assume every trailer-less report is human.

Nit (src/pkg/blocker/blocker.go:231,234): the Proven: k == CapabilityWorkflowsPermission && QuotesWorkflowsRejection(text) expression is duplicated across the marker and inferred branches; a tiny proven(k, text) helper would keep the two in step.

Evidence bundle `#168113226505` sha256:892546da961578d3ad02468293047a8b097f64de8fdb84248ead6b68ac862bcc — download from the dashboard or `hivectl review evidence #16811`.

@hivecommons-hive

hivecommons-hive Bot commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor

Needs a decision, not a merge:

  • the reviewer swarm returned requires_human @6ed16c0
  • the review found: intent-alignment finding "Proven workflows blocker is tier-blind" flags insecure behaviour
  • reviewer summary: intent-alignment requires human: Delta abd91b0..6ed16c0: only commits 3d1ae0e (fork-PR blockers kept in CapabilityAvailable) and 6ed16c0 (Proven flag for parks quoting GitHub's rejection) are PR-authored; the other 30 files are the v6 merge. Prior security finding (hive self-resolves workflow-push policy, issue_workflows_handoff.go) is STILL PRESENT: the Proven exemption narrows it but a merger-tier park without the quote is still refused on the hive's probe alone, so the whole-PR verdict stays requires_human (human-authored, policy decision pending). Contract note: PR has no closing keyword; 🐛 [v6] Workflows blocker card says "grant the App workflows: write" when the App has it; never offers the workflows-lane hand-off #16804 is closed by 🐛 fix: route workflow blockers to capable lanes #16807 and the body says so; against the PR's own stated intent the delta matches, with one new low gap: Proven is set regardless of reporting lane's tier. No scope creep in the delta.
  • the lane reported merge-train:claim-conflict#16807:16804/0:0/0:

Head: verdict requires_human @6ed16c0, 18/53 checks green, 35 pending, DCO yes, soak 0s of 10m0s.

How to release it:

  • After reading the verdict, a trusted merger can submit a GitHub Approve review for the current head and the lane clears the hold on its next pass; /hive approve replies on a PR are acknowledged but not consumed.

Clear the cause and the hive re-evaluates on its next pass; the stage moves to stage/090-ready-for-human-merge, stage/095-pre-merge-soak or the merge queue on its own. Approval does not bypass CI, hold labels or other merge gates.

Updated 2026-11-05 22:18 UTC.

Danathar and others added 3 commits November 5, 2026 16:58
A fork branch takes no workflow-file push from the App whatever the
installation grants (projectbluefin/testsuite#1037: three refused fixer
pushes), so the ledger check is per item: CapabilityAvailable reads the
issue/PR and refutes a workflows blocker only on an issue or a same-repo
PR. An unreadable item keeps its blocker.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BQYnPGFJx81c8JXR3o1sg1
Signed-off-by: Danathar <Danathar@users.noreply.github.com>
Signed-off-by: Danathar <Danathar@users.noreply.github.com>
Reviewer finding on hivecommons#16811: the self-push note tells a merger-tier lane to
park again quoting GitHub's error when a push still bounces, but the same
check refused that park too, looping the lane. A park or report quoting
"refusing to allow a GitHub App to create or update workflow" is evidence:
the relay lets it park, and the ledger records the blocker as Proven, which
neither the record-time check nor the scheduled re-check releases.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BQYnPGFJx81c8JXR3o1sg1
Signed-off-by: Danathar <Danathar@users.noreply.github.com>
@Danathar

Danathar commented Nov 5, 2026

Copy link
Copy Markdown
Contributor Author

Thanks, finding 1 was right. Fixed in 6ed16c0:

  • A park that quotes GitHub's rejection of the push now stands. That covers a GitHub App, an OAuth App or a token: "refusing to allow … to create or update workflow". This is the case the self-push note and the kick tell the lane to report (workflowsHandoff, via blocker.QuotesWorkflowsRejection).
  • The ledger records that blocker as Proven. Neither the record-time check nor the scheduled re-check releases it.
  • Tests: a new row in TestWorkflowsParkCheckedAgainstTierAndInstallation, and TestQuotedWorkflowsRejectionIsProven. Five new mutants, all caught.

Separately, in 3d1ae0e, fork PRs keep their workflows blocker. A fork branch takes no workflow-file push from the App whatever it is granted (projectbluefin/testsuite#1037).

On point 2: no test in pkg/github that touches installationProbe uses t.Parallel(), so I left it as is.

@hivecommons-hive hivecommons-hive Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Correctness — delta re-review at 6ed16c0 (vs abd91b0)

Read the two PR-specific commits (3d1ae0e fork-PR guard, 6ed16c0 Proven); the rest of the delta is the v6 merge. The mechanism is sound: Observe skips the capability check for Proven (ledger.go:166), RecheckCapabilities skips it too (ledger.go:321), RecordReason keeps e.Blocker so a weaker re-report does not release a proven blocker (ledger.go:220-229), and forkPR treats a deleted head repo as a fork (issue_workflows_handoff.go:252-253). Tests cover the relay row, the ledger path, and the fork/same-repo sweep split.

One narrow edge, advisory:

  • Proven is dropped on a same-kind re-report that Record accepts — Record does e.Blocker = &b (ledger.go:187-193) and only carries Since forward. If an agent re-posts an un-quoted "the App cannot push workflows" while capabilityHeld is momentarily false (e.g. installation read fails, installationGrantsWorkflows returns unknown → WorkflowsPushable false), the entry is rewritten with Proven=false and the next sweep can release it once the grant reads again — contrary to "never released by the re-check" (hive-open-issue.md:248-249). Suggested fix in Record:
	if e.Blocker != nil && e.Blocker.Kind == b.Kind && !e.Blocker.Since.IsZero() && e.Blocker.Since.Before(b.Since) {
		b.Since = e.Blocker.Since
	}
	// Evidence outlives a later unquoted re-report of the same kind.
	if e.Blocker != nil && e.Blocker.Kind == b.Kind && e.Blocker.Proven {
		b.Proven = true
	}

Previous security note (issue_workflows_handoff.go:107, hive self-resolves workflow-push policy): still present — the SelfPush override at issue_workflows_handoff.go:108-117 is unchanged in kind; this delta only adds the rejection-quote escape hatch before it. Not re-reported here.

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

Danathar and others added 2 commits November 5, 2026 18:17
…lane's quote proves

Review on hivecommons#16811 (adjudicator, 6ed16c0):
- Record keeps Proven when a later unquoted report of the same kind lands
  while the capability check could not refute it.
- intent-alignment: Proven was tier-blind. A contributor-tier lane quoting
  GitHub's refusal proves only its own token lacks workflows; the ledger's
  new proof check (Client.WorkflowsRejectionProves, by the report's
  `— hive: agent=` trailer) keeps such a blocker refutable.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BQYnPGFJx81c8JXR3o1sg1
Signed-off-by: Danathar <Danathar@users.noreply.github.com>
Signed-off-by: Danathar <Danathar@users.noreply.github.com>
@github-actions github-actions Bot added the conflicts-with-open-pr Open PR has a merge conflict with another open PR label Nov 5, 2026
@Danathar

Danathar commented Nov 5, 2026

Copy link
Copy Markdown
Contributor Author

Both points from the 6ed16c0 re-review are fixed in 3226505 (the PR's own commit, then a v6 merge):

The policy question, whether the hive may refuse a merger-tier lane's park and release these blockers itself, is still the owner's to decide. I haven't touched it.

@hivecommons-hive hivecommons-hive Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

docs-currency (delta review, head 3226505): the three PR commits since abd91b0 keep src/docs/hive-open-issue.md:242-252 and the changelog fragment in step with the new Blocker.Proven rule, but the operator-facing dashboard doc was only updated for the fork-PR case (3d1ae0e), not for the quoted-rejection case (6ed16c0, 4a84f84).

src/docs/dashboard-sections/activity-monitor.md:385 still says "A workflows blocker is recorded only when the hive cannot push workflow files for that item" and that the un-park sweep re-check releases recorded blockers. Since 6ed16c0, pkg/blocker/ledger.go Observe records a workflows blocker even when capabilityHeld is true if the report quotes GitHub's rejection (!b.Proven && l.capabilityHeld(...)), and RecheckCapabilities skips e.Blocker.Proven entries — so an operator reading that paragraph will see a Blocked · App lacks workflows permission pill on a repo the doc says cannot draw one, and will expect the five-minute sweep to clear it when it never will (only the manual Re-check permissions path does).

Suggested addition after the "A fork PR keeps the blocker…" sentence in activity-monitor.md:385:

A fork PR keeps the blocker, because a fork branch takes no workflow-file push from the App whatever it is granted. A report that quotes GitHub's own rejection of the push ("refusing to allow a GitHub App to create or update workflow … without `workflows` permission") is evidence rather than a claim: it is recorded as a blocker even when the check above would refute it, provided the quoting lane's own token asks for the permission (see `hive-open-issue.md` § Not parked), and the scheduled re-check never releases it — only *Re-check permissions* does.

(Keep the sentence as a single line to match the file's one-paragraph style.) Advisory only; verdict approve from this perspective.

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

conflicts-with-open-pr Open PR has a merge conflict with another open PR dco-signoff: yes Indicates the PR's author has signed the DCO. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant