Repository navigation
feat(procevent): wake firstmate on Jev's Next: Build signal - #46
Merged
Merged
Conversation
…-github-assigned.sh:878 — the cmd_handle read loop declared url, title, signal, node as unused locals. Replaced the unused positional names with `_` placeholders in the `read -r` call and trimmed the `local` declaration to only the fields actually used (type, id, number, repo, jev). Verified with `shellcheck` (clean) and `bash -n` (syntax OK)
…kup signal and intake dispatch
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Intent
Build P3.3 "Firstmate builds on Jev's word" (https://github.com/digio-nz/digio-factory/issues/37), the last phase of Plan P3 #33 "Jev decides more, from facts", in the firstmate repository. The owner, 2026-10-04: "Merge p3" after P3.1 and P3.2 reached fcdispatch. Context: firstmate's only trigger to start building an issue is the owner's self-assignment, polled on fcdispatch alone; on 2026-10-03 fcdispatch kunchenguid#1320 sat assigned for an hour because the poller was blind to a gh-axi output change (fixed in PR 45, now on main: bin/fm-procevent-github-assigned.sh parses gh-axi 0.1.35 and wakes firstmate after repeated unparseable responses). Jev now labels every fcdispatch issue at intake with
Next: Build | Shaping | Plan Review; itsNext: Buildon an issue whose board card is inReady to Buildshould start work without the owner assigning it. The phase issue body is the contract:Plan
#33, phase 3. Independent of phase 2; lives in digbycampbell/firstmate.
Scope
The decision this executes: firstmate starts building on either the owner's self-assignment or Jev's
Next: Build. Owner 2026-10-03, after fcdispatch kunchenguid#1320 sat assigned for an hour: the poller was blind to a gh-axi output change, watched fcdispatch only, and Jev's intake had never run on the issue.bin/fm-procevent-github-assigned.shgains a second signal: an issue carryingNext: Buildwhose project-board card is inReady to Buildand which has no assignee, on every configured repo. Both signals produce the same wake.config/github-assigned, one REST call per repo per poll as today; the board read stays on its slower interval.jev.ymlon it by workflow dispatch and waits for the labels before resolving the model and brief.Out of scope
Acceptance criteria
Next: Buildand moved toReady to Buildwith no assignee produces a wake within one poll interval; moving it back out produces none.jev.ymldispatch run before the brief is written.What Changed
bin/fm-procevent-github-assigned.shnow detects a second wake signal: an unassigned issue labelledNext: Buildwhose project-board card sits inReady to Build, checked across every repo configured inconfig/github-assigned, in addition to the existing self-assignment signal.jev.ymland wait for labels before resolving the model or writing the brief.tests/fm-procevent-github-assigned.test.shto cover both wake signals and the parse-failure wake, and updateddocs/configuration.mdand theprocess-event-sourcesskill to describe the widened repo list and new signal.Co-Authored-By: Claude Sonnet 5 noreply@anthropic.com
Risk Assessment
✅ Low: The change extends the existing REST/GraphQL adapter with a second signal (unassigned Next: Build + Ready to Build column) and a Jev intake-dispatch instruction, cleanly reusing the existing canonical-cursor, quota-gating, and fail-closed/fail-open patterns; row-shape variability (7/8/9 TSV fields across draft/board-issue/REST-issue rows) is handled consistently by every consumer (build_snapshot, cmd_list, cmd_handle), the truncated-projectItems and malformed-card-output paths fail closed into the existing api-error wake, and the new tests exercise both signals, assignee/column gating, cursor sharing across signal switches, and the slower board cadence through the real public poll/handle interface rather than source-pattern assertions.
Testing
Only the fixture-driven adapter regression suite was run (17/17 assertions passing per the prior payload); this exercises the script's CLI subcommands against fixture data, not a live product drive, so no scenario here can be scored pass/fail — all are untested pending live validation authority/tooling.
Pipeline
Updates from git push no-mistakes
✅ **intent** - passed
✅ No issues found.
✅ **Rebase** - passed
✅ No issues found.
✅ **Review** - passed
✅ No issues found.
✅ No issues found.
✅ No issues found.
bash bin/fm-test-run.sh tests/fm-procevent-github-assigned.test.sh (target commit, 17/17 ok)bash bin/fm-test-run.sh tests/fm-procevent-github-assigned.test.sh (base commit + new test file only, confirmed red: 'an unassigned Next: Build issue in Ready to Build must produce a result')bash bin/fm-lint.shbash bin/fm-doc-audience-check.shLive validation:⚠️ inconclusive - 0 of 5 scenarios driven live against the product
bash bin/fm-test-run.sh tests/fm-procevent-github-assigned.test.sh✅ **Document** - passed
✅ No issues found.
✅ No issues found.
✅ **Lint** - passed
✅ No issues found.
✅ No issues found.
✅ **Push** - passed
✅ No issues found.
✅ No issues found.
Closes nothing in this repo.
Findings not fixed
bash bin/fm-test-run.sh tests/fm-procevent-github-assigned.test.sh tests/fm-procevent.test.shpassed the GitHub adapter subject and failed the generic process-event subject after 241 seconds.The unchanged source-recovery case reported
reconciled: published=0 started=0 stopped=0 uncertain=0 failed=0, where it expectedstarted=1after repairing a source.The generic suite also failed in an isolated exported snapshot of
origin/mainat834eea85bafdc219008d4b748eead4109e18acdd.The baseline command was
bash bin/fm-test-run.sh tests/fm-procevent.test.sh, run from the snapshot made withgit archive origin/main, and returned exit 1 after 208,674 ms.Its last passing case was the reused-pid surviving-process-group test; it exited before reaching this branch's failed assertion, so the exact assertion's cause remains unproven.
Baseline output is retained locally in
.no-mistakes/p3-3-main-test.log.The generic runner, test, shared test helpers, and sandbox runner are identical to
origin/main.Factory follow-up
The deployed
.claude/rules/firstmate-process.mdis not tracked here.In
digio-factory:agents/FIRSTMATE.md, replace the opening paragraphs and first four bullets of "Intake and the trigger" with these exact sentences, leaving the similar-issues bullet in place:Firstmate starts building an issue on either the owner's self-assignment or Jev's
Next: Buildwhen the issue has no assignee and its project-board card is inReady to Build.The GitHub pickup poller watches every fleet-process repository listed by
repo=inconfig/github-assigned;digio-nz/fcdispatchremains the default when no repositories are configured.Both signals produce the same wake, and firstmate judges every pickup before dispatching work.
Owner assignment remains the cleared-to-build stamp, applied as the last act of shaping; its signal does not depend on the board column.
An unassigned issue without the qualifying Jev signal remains intake only.
For a captured issue without Jev's
Next:labels, follow the adapter's handle output: rungh-axi workflow run jev.yml -R <repo> -f issue=<n>and wait for the labels before resolving the model or writing the brief.Unassigning an owner-assigned issue remains the stand-down signal.
The poller's seen-id set only grows across both signals, so unassigning and reassigning an issue, or changing a previously captured issue's label, does not produce a second wake.
In "Ready to Build has two entries", replace its final sentence with:
Reaching
Ready to Buildwith Jev'sNext: Buildand no assignee, or owner self-assignment, is firstmate's signal to build; see "Intake and the trigger".