fix(brief): make the definition of done forge-aware so Forgejo workers are not told to use gh-axi #6
Loading…
Reference in a new issue
No description provided.
Delete branch "fm/fm-brief-forge-aware-dod"
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?
Makes the generated brief's definition of done match the project's actual forge, so a worker is never instructed to do something impossible.
The defect, and how long it hid
bin/fm-brief.shgenerated this for everydirect-PRship task, unconditionally:gh-axitargets GitHub. The captain's only delivery target is Forgejo. So on every Forgejo project the brief demanded an action that cannot succeed, and the worker stopped — because its stated definition of done was unreachable.This was recorded fifteen times as "workers stopping one step short of delivery" and treated as a worker-discipline problem across five different runtimes. It was never that. Five different models behaved identically because the instruction was impossible. Every pull request on the captain's forge today was opened by hand as a result.
Five runtimes agreeing should have been read as structural far sooner. Instead a guard was added to catch the symptom, and the occurrences were counted like weather.
What changed
The forge is resolved from the project clone's
remote.origin.url— an offlinegit configread, no network and no credential:gh-axi.done: branch fm/<id>, stop. The brief states plainly that firstmate opens the pull request, and that the worker must not go looking for a credential.The
gh-axitool rule is also dropped on the non-GitHub path, so a worker is not pointed at a tool it cannot use for this forge.Both
direct-PRandno-mistakesare covered — the same assumption was baked into the pipeline-complete text.local-onlyis untouched; it was already correct.Absent clone or origin takes the no-worker-PR path deliberately. An unnecessary hand-opened pull request costs a minute; an impossible instruction costs a worker.
Why the wording matters
Today's workers behaved well the moment they were told the boundary explicitly — they pushed, reported "cannot open the Forgejo PR, no credential here", and stopped without hunting for one. Earlier in the day, one that was not told went searching through the operator's home directory for a token. The brief now says it up front rather than setting that trap.
Tests
54 lines of new coverage across the GitHub, Forgejo and unknown-origin shapes.
Environment note
Run the suite with
FM_HOMEscoped to the worktree under test or unset — pointing it at the primary home while testing a worktree makesfm-arm-pretool-checkcase A13 fail falsely. Several other failures on this machine are environmental and verified today against cleanmainand pureupstream/main: the herdr presentation suite, theMISSING-tool checks in bootstrap and session-start,fm-on,fm-remote-doctor, the calm extension and the documentation-audience suite.Follow-up worth noting
bin/fm-brief.sh's header comment still describesdirect-PRas "push + open PR via gh-axi", which is now only true for a GitHub origin. Small documentation drift, not corrected here to keep this diff to the behaviour.