Skip to content

fix(software-factory): the five findings of the first live run (#1047 → PR #1050) - #1051

Merged
blove merged 7 commits into
mainfrom
blove/factory-live-run-1047
Oct 21, 2026
Merged

blove merged 7 commits into
mainfrom
blove/factory-live-run-1047

Conversation

@blove

@blove blove commented Oct 21, 2026

Copy link
Copy Markdown
Contributor

Summary

The factory's first live run (issue #1047, delivered as draft PR #1050 by b4dotrun[bot]) took five work orders. Each failure was a finding; this PR carries the factory-side fix for each, plus the as-landed notes in the rung 4 spec and plan. The framework-side finding (tool-output offloading rooted at the host path inside a sandboxed route) landed separately in #1048.

  1. cli target: promotion set is pin-specific. The Dockerfile hard-codes the nested dependencies it promotes over the root's; the set at 84063ae1 differs from the old pin's (image_prepare_failed). It now names this pin's set, dedupes an identical name@version nested twice, and says it moves with the pin.
  2. Builder search scope. The builder ran grep -R … .., followed node_modules into the image's install, and one tool result (1.7 MB) overflowed its context. The prompt now bounds searches to the package under repair and caps what a search prints.
  3. Pre-check refuses guessed built paths. Two redrafts imported dist/output.js and dist/index.js, each costing a two-minute oracle proof. The static pre-check now refuses a <built>/<file>.js import that no src/<file>.ts at the pin compiles to, and the package's bin/exports entry, naming the real path in the reason the redraft sees. The drafter prompt says the same.
  4. cli target pins 84063ae1 and captures test/helpers/header-auth.ts, which eight captured tests import; without it the visible suite failed to load and the builder spent its turn hunting the helper.
  5. Candidate assembly ignores tool-outputs/. The correct repair was refused as scope_violation: added tool-outputs/… because the offload's spill file sat in the workspace. The reader now leaves the framework's scratch prefix out of the observed set.

Consequence of (4): the shipped task cli-runs-wait-undefined (the #714 replay) was repaired forward from the pinned bytes; at the new pin the fix has landed, so it now ships a defect.patch that reverses it and a reference regenerated at that pin (same body, new offsets).

Verification

🤖 Generated with Claude Code

blove and others added 7 commits October 20, 2026 17:26
…, and the builder searches only its package

The first live run at pin c221ce0 found two things. The cli target's
Dockerfile hard-codes the nested dependencies it promotes over the
root's; the lockfile at this pin nests a different set (ag-ui now nests
the TypeScript 6 compiler core also nests, and axe-core; commander and
hono no longer nest), so the image build failed. The set is now this
pin's, the comment says it is pin-specific, and a name two packages nest
at the same version is promoted once instead of failing the build.

The builder then ran a recursive grep over .., which followed the
node_modules links into the image's install and returned 1.7 MB in one
tool result; the model refused the next call at 513k input tokens. The
working rules now confine searches to the package's own directories and
cap what a search prints.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
…iles to, and the CLI entry

Today's live run spent both intake attempts on guessed build paths: a check
importing packages/cli/dist/output.js (the file is dist/lib/output.js), then
one importing dist/index.js, the CLI entry, whose proof hung. Each cost a
two-minute oracle proof.

Rule (f) built-source: a location (static, import()/require()/new URL(), or a
path held in a variable built from join/resolve/process.cwd()/pathToFileURL)
under a target build prefix (snapshotIgnore entries ending dist/) must mirror a
source the pin holds: <pkg>/src/<file>.ts|.tsx|.js|.jsx (.mjs/.cjs likewise),
or <file>/index.ts|.tsx for an extensionless import. The refusal names the
path, the source looked for, and a same-named module under src/ or the
nearest directory's listing.

Rule (g) bin-entry: a location naming the built file a package bin runs
(read at the pin from package.json bin and the bin script's ../dist imports)
is refused.

The drafter prompt's target line now says the built path mirrors src/, to
verify with listDir/readFile under repo/<pkg>/src/, and never to import a bin
entry.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
…and the cli target test names this pin's promotion set

Co-Authored-By: Claude Fable 5.1 <[email protected]>
…the test helper its tests import

At pin 765e6e1 the captured cli tests did not import
test/helpers/header-auth.ts; at main's tip eight of them do, and the
explicit capture omitted it, so the builder's visible suite failed to
load and the builder spent its turn hunting a helper that was never in
its workspace. The target now pins 84063ae, captures the helper, and
the generator's build order at that pin puts sdk before ag-ui.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
…loaded tool outputs

B4 spills an oversized tool result to tool-outputs/ in the thread's
workspace. The reader's observed set now leaves that prefix out, as it
does the target's build output: the first live run's correct repair was
refused as a scope violation for the one file the offload had written.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
…w that the cli pin carries the fix

`cli-runs-wait-undefined` was repaired forward: its defect was the pinned
bytes at 765e6e1. The cli target now pins 84063ae, where #718's fix has
landed, so the task ships a defect.patch that reverses it and a reference
regenerated at that pin (same body, new offsets). The inspection test
names `tool-outputs/` as part of the ignored set.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
@vercel

vercel Bot commented Oct 21, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

2 Skipped Deployments
Project Deployment Actions Updated
b4-run Ignored Ignored Preview Oct 21, 2026 12:55am UTC
navlog-web Ignored Ignored Preview Oct 21, 2026 12:55am UTC

Request Review

@github-actions github-actions 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.

Automated approval for repository bookkeeping. The maintainer reviews and merges this PR.

@blove
blove enabled auto-merge (squash) October 21, 2026 00:55
@blove
blove temporarily deployed to vercel-preview October 21, 2026 00:55 — with GitHub Actions Inactive
@blove
blove merged commit 5673319 into main Oct 21, 2026
31 checks passed
@blove
blove deleted the blove/factory-live-run-1047 branch October 21, 2026 01:27

This branch was previously deployed

1 inactive deployment
vercel-preview — 70687a7c Deployed Oct 21, 2026 by blove via vercel-native #3069
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant