Repository navigation
fix(software-factory): the five findings of the first live run (#1047 → PR #1050) - #1051
Merged
Merged
Conversation
…, 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]>
Co-Authored-By: Claude Fable 5.1 <[email protected]>
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
This branch was previously 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.
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.clitarget: promotion set is pin-specific. The Dockerfile hard-codes the nested dependencies it promotes over the root's; the set at84063ae1differs from the old pin's (image_prepare_failed). It now names this pin's set, dedupes an identicalname@versionnested twice, and says it moves with the pin.grep -R … .., followednode_modulesinto 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.dist/output.jsanddist/index.js, each costing a two-minute oracle proof. The static pre-check now refuses a<built>/<file>.jsimport that nosrc/<file>.tsat 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.clitarget pins84063ae1and capturestest/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.tool-outputs/. The correct repair was refused asscope_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 adefect.patchthat reverses it and a reference regenerated at that pin (same body, new offsets).Verification
pnpm --filter @b4-example/software-factory-controller test: 103 files, 1391 tests passed.pnpm build,pnpm typecheck,pnpm lintclean.--porthas no upper bound:b4 start --port 70000crashes with Node'sERR_SOCKET_BAD_PORTinstead ofInvalid port#1050.🤖 Generated with Claude Code