Ship the factory wrapper inside this repository - #1427
Merged
Merged
Conversation
The software factory's instruction book (the sandbox wrapper, the three work-ticket workflows, their prompts and skill, and the tools scripts) moves from the private deployment repository into factory/. The loop's work stage now fetches this repository at the commit the running core was built from (GIT_SHA) into /workspace/qm-source and starts factory/.claude/io-coding-agent-js.sh from it, so the wrapper and the loop always come from the same commit. A core with no full build sha fetches main. Cold and warm sandboxes share one fetch-then-checkout script. Nothing specific to the monorepo the factory was carved out of remains: the Rails app table and stack start path, the proof icon fonts, the X-Current-User proof auth, the hard-coded publish project and GitLab bot user ids, and the IO- ticket prefix in the linkback scan are gone or configuration-driven. Browser proof runs only against a configured stack (IO_PROOF_START_CMD / IO_PROOF_BASE_URL_CMD) and says so honestly otherwise. factory/ is excluded from eslint, knip, and prettier: the workflows run inside the Claude Workflow sandbox with its globals and are kept byte-stable. test/factory-layout.test.ts pins the file inventory, executable bits, shell syntax, the wrapper handshake, the tool preflight, and the absence of every monorepo literal.
The mutation gate and the source helper fall back to a built-in directory list when IO_SOURCE_APP_DIRS is unset. That list predates factory/, so a change to the wrapper was unclassifiable and the gate failed closed. The first factory-on-factory run found this and ledgered it.
…ts (#1433) Co-authored-by: Sprite <noreply@sprites.dev>
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.
Changes
Why this matters: The factory loop's work stage ran a wrapper fetched from the private deployment repository
yc-software/qm-ycat a hard-coded branch. Every Quartermaster that turns the factory on should carry its own instruction book, and nothing specific to one customer's monorepo belongs in the product.What changes:
factory/now holds the sandbox wrapper, the three work-ticket workflows, their prompts and skill, and the tools scripts.GIT_SHA, full sha only) into/workspace/qm-sourceand startsfactory/.claude/io-coding-agent-js.sh. A core with no full build sha fetchesmain. Cold and warm sandboxes share one fetch-then-checkout script.X-Current-Userproof auth, hard-coded publish project, GitLab bot user ids, and theIO-ticket prefix in the linkback scan. Browser proof runs only against a configured stack (IO_PROOF_START_CMD,IO_PROOF_BASE_URL_CMD) and says so honestly otherwise.factory/is excluded from eslint, knip, and prettier. The workflows run inside the Claude Workflow sandbox with its globals and are kept byte-stable.Test Plan
node --experimental-test-module-mocks --test test/loop-factory-*.test.ts test/factory-layout.test.ts(211 pass)npm test(6266 tests; three unrelated files timed out under load and pass in isolation)npm run typecheck,npm run lint,npm run lint:knip,npm run format:checkbash -non the wrapper and everytools/factory/*.sh;node --checkon the three workflows wrapped as a function bodygrep -rniE "bookface|ycinternal|yc-software|pcap|Investment Ops|yc start|rubocop|sorbet|proof-fonts|IO-<|IO-\[0-9" factory/prints nothingFollow-ups
qm-ycbranch that shippedlayer/factory(#2371) closes unmerged once this lands.IO_BUGBOT_GITLAB_USER_IDreaches the sandbox yet, so the wrapper-side Bugbot check reportsnot_required; the loop enforcesbugbotRequireditself.