Skip to content

Ship the factory wrapper inside this repository - #1427

Merged
pcapriolo-yc merged 3 commits into
qm-29-port-factory-loopfrom
factory-in-qm
Sep 19, 2026
Merged

pcapriolo-yc merged 3 commits into
qm-29-port-factory-loopfrom
factory-in-qm

Conversation

@pcapriolo-yc

Copy link
Copy Markdown
Contributor

Changes

Why this matters: The factory loop's work stage ran a wrapper fetched from the private deployment repository yc-software/qm-yc at 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.
  • The work stage fetches this repository at the commit the running core was built from (GIT_SHA, full sha only) into /workspace/qm-source and starts factory/.claude/io-coding-agent-js.sh. A core with no full build sha fetches main. Cold and warm sandboxes share one fetch-then-checkout script.
  • The monorepo-only machinery is gone: the Rails app table and stack start path, proof icon fonts, X-Current-User proof auth, hard-coded publish project, GitLab bot user ids, and the IO- 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:check
  • bash -n on the wrapper and every tools/factory/*.sh; node --check on the three workflows wrapped as a function body
  • Manual: grep -rniE "bookface|ycinternal|yc-software|pcap|Investment Ops|yc start|rubocop|sorbet|proof-fonts|IO-<|IO-\[0-9" factory/ prints nothing

Follow-ups

  • The qm-yc branch that shipped layer/factory (#2371) closes unmerged once this lands.
  • No IO_BUGBOT_GITLAB_USER_ID reaches the sandbox yet, so the wrapper-side Bugbot check reports not_required; the loop enforces bugbotRequired itself.

pcapriolo-yc and others added 3 commits September 18, 2026 17:31
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>
@pcapriolo-yc
pcapriolo-yc marked this pull request as ready for review September 19, 2026 16:22
@pcapriolo-yc
pcapriolo-yc merged commit 5366817 into qm-29-port-factory-loop Sep 19, 2026
16 checks passed
@pcapriolo-yc
pcapriolo-yc deleted the factory-in-qm branch September 19, 2026 16:28
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