Repository navigation
fix(software-factory): run 3's operator follow-ups (approval already given, adopt's stale comment, up survives SIGHUP) - #1113
Merged
Conversation
…dy given, adopt's stale comment, up survives SIGHUP - review --approve --digest that finds the row past the gate answers with the intake approval the journal holds for that digest (ok, received, "Intake approved", the row as it reads now) instead of "Nothing to review"; a `run` following the work order dispatches the moment the approval lands (wo-9409eea3d48a98ab, 2026-10-21). - adopt drops a contiguous `//` run directly above the rewritten built-module import when it mentions dist, built or process.cwd (#1066 kept one). - up ignores SIGHUP, so a terminal that goes away no longer stops the factory; `factory down` stops it by the pid <state>/up.lock records (one SIGTERM, up's ordered stop) and waits for it to exit. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
blove
had a problem deploying
to
vercel-preview
October 27, 2026 02:40 — with
GitHub Actions
Failure
blove
enabled auto-merge (squash)
October 27, 2026 02:41
This branch had an error being deployed
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.
Three small items from the software factory's live runs, all in
examples/software-factory/controller. No changeset: this is an example package.1.
review --approveanswers "Nothing to review" after a successful intake approvalThe journal for
wo-9409eea3d48a98ab(2026-10-21) holds oneapprove_intakecommand, and the followingrundispatched 250 ms later. Areview --approve --digestsent while that approval was in flight already prints the route's outcome; a new CLI test (dispatching the moment the row readsreceived) passes onmaintoo. The refusal comes from the other order: the approval lands, the row moves on torunning, and thenreview --approve --digest <same digest>reads a row that is no longer parked.reviewOutcomenow checks the journal before refusing. If anapprove_intaketransition for exactly that digest is there, it answers with that approval:ok: true,state: received,message: "Intake approved", exit 0, and the row as it reads now goes underrow. A stderr line says when the approval landed. Any other digest still gets "Nothing to review". Tests cover both orders.2.
adoptleaves a stale comment above the rewritten importpromoteChecknow also matches a contiguous run of//lines directly above theawait import(join(process.cwd(), "<pkg>/dist/…"))statement. When the run mentionsdist,builtorprocess.cwd, it is dropped with the statement; any other comment stays where it was. The test covers the comment #1066 kept, a multi-line run, and a comment that stays.3.
updies when its terminal is resetpnpm relays only SIGINT and SIGTERM to its child. Its
signal-exitre-raises SIGHUP on itself and relays nothing, soupgets SIGHUP only from the terminal's foreground process group.stopOnSignalsnow registers a SIGHUP listener that only logs "ignored" and how to stopup. The children were already detached, andup's output already survives a dead terminal (lineWriter,<state>/logs/up.log).New
factory down: it reads<state>/up.lock(the lock already recordsup's pid and command line), sends one SIGTERM (up's ordered stop), and waits up to 90 s forupto exit. It acts only on a held lock: the pid must be alive and still showup's command. It never kills.Tests: unit tests for the handlers and for
down(held, stale, reused pid, not a lock, outlasting the wait), and a real-process test where the group gets SIGHUP, the process survives, and SIGTERM then exits 0. A CLI test coversdownwith no lock and with no state directory. The README documents both. The rung-4 spec's §14 gets a "landed after" note.The
--detach/setsidvariant was not needed for SIGHUP. If a host ever kills the terminal's group with SIGTERM or SIGKILL instead, that, or the restarting supervisor, is still the follow-up.Verification
pnpm --filter @b4-example/software-factory-controller typecheck: passespnpm lint: 31/31pnpm --filter @b4-example/software-factory-controller test: 1420/1421. The one failure wastest/runtime.test.ts› "dispatches to the one builder on its route…" (dispatch refused on thecli-flagsimage under full-suite load). That file isn't touched here, and it passed 4/4 rerun on its own.Also filed from the same hunt, not fixed here: #1112 (
load-env.ts).🤖 Generated with Claude Code