Make the Forgejo done gate something a worker can actually satisfy #24
Loading…
Reference in a new issue
No description provided.
Delete branch "fm/fm-brief-forgejo-done-gate-unreachable"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The bug
The generated ship brief tells workers to report
done: branch <name> checks green. On a Forgejo project that is an attestation they structurally cannot produce:prandcisteps skip with "provider unknown is not supported yet", so a successful run returnsoutcome=passed, neverchecks-passed.pull_request, so nothing can run until a PR exists — and the same brief correctly tells the worker that firstmate opens the PR and that it must not go hunting for a forge credential.So the worker is asked to report a state it cannot produce, cannot observe, and is forbidden from getting the credential to check.
What it cost, in one overnight run
Five workers reported
done:at a commit believing they were finished. One of those "checks green" claims was verified false against the forge — the branch did not exist there at all. One finished job then sat idle for an hour, pipeline passed and branch pushed, because it had no defined way to say so.One worker did the right thing: read its own contract, worked out the gate was unreachable, and blocked with evidence in lieu — every check
ci.ymlruns, executed on the exact pushed head. That outcome depended entirely on that worker being unusually scrupulous.The fifth occurrence was the worker implementing this fix, which reported done at an unpushed commit while holding the explanation of the bug in its own brief. That is the strongest available evidence that the failure is in the contract rather than in any worker's judgement — a contract that asks for the impossible trains people to approximate it, and approximating "delivered" is how work silently fails to ship.
The change
bin/fm-brief.shalready resolves the origin to choose its PR-handoff wording. The done gate now uses the same resolution.For a Forgejo origin the worker's gate is: pipeline
outcome=passed, branch pushed, remote ref verified, local gates green on the exact pushed head — reported asdone: branch <name> pushed <sha>, pipeline passed, CI pending firstmate PR. The brief states that firstmate opens the PR and confirms CI, so the remaining step is visibly someone else's.The GitHub gate is unchanged.
Test
A divergent-gate test asserting the Forgejo and GitHub briefs differ appropriately, failing against pre-fix code.
Pipeline passed. Pushed at
b5af0ce3— and reported using the new wording this change introduces.