Repository navigation
Closed
Labels
factory:pr-openPR is open and passed the gatePR is open and passed the gate
Description
Outcome
The factory starts each issue's session on the T3 project's default model, the same model a person gets in a new thread on that project, instead of its own model_instance and model in the machine config. The Model instance and Model rows leave the factory settings page (/settings/factory), so a person picks the model once, in T3.
Acceptance criteria
- A launch and a relaunch (
runner/start.ts,runner/relaunch.ts) use the T3 project'sdefaultModelSelection, read from the project row thatFactorySessions.findProjectalready loads by workspace root (ProjectStoreV2.findActiveByWorkspaceRoot). When that is null they use the server settings'defaultModelSelection. Unit tests cover all three cases: project default, settings fallback, and neither. - When neither is set, nothing launches and the issue is not claimed. The launch returns
ok: falsewith a detail that names the fix, e.g.no default model: set one on the T3 project or in Settings, handled the same way as the existingno T3 project for this repo on this machine. A unit test asserts the detail. - The run record still writes
model_instanceandmodel(start.ts,relaunch.ts), now filled from the resolved selection, so/factoryand the ledger show which model each run used. parseMachineConfigno longer readsmodel_instanceormodel. A file that still has them loads without error, and each one is reported once as a warning that it is no longer used (not as an unknown-key error), so the running factory keeps loading its current~/.config/t3fac/factory/config.ymlafter the upgrade. A unit test loads a file with both keys and asserts it loads with the warnings.- Saving from the settings page (
saveMachineConfig/editMachineConfig) deletesmodel_instanceandmodelfrom the file when they are present, and keeps every other key and comment as written. A unit test asserts it. MachineConfigFields,MachineConfigDraft, the report, the webapi.tstypes andFactorySettingsPaneldrop both fields; the page has no Model instance or Model row.DEFAULT_MODEL_INSTANCEis removed.factory/config.example.ymlandfactory/README.mddrop the two keys and say the model comes from the T3 project's default model, falling back to the T3 settings default.vp test runon the touched test files passes, andvp run --filter t3 typecheckpasses.
Depends on
Notes
Why: T3 already stores a default model per project and in settings (packages/contracts/src/project.ts defaultModelSelection, packages/contracts/src/settings.ts defaultModelSelection). A second selector in the factory config duplicated it, and nothing checked that model_instance named a configured provider.
Waits on #61 because both edit apps/web/src/factory/settings/FactorySettingsPanel.tsx.
Settled choices:
- Precedence is project default, then settings default, then refuse. There is no hard-coded fallback model.
- The retired keys are tolerated with a warning rather than rejected, so the upgrade does not stop the factory that builds it.
Reference
- Upstream's
AGENTS.mdapplies. Run only the tests and typechecks for the paths you touch, never the repo-wide checks. - Edit no upstream file that is not listed in
factory/SEAMS. A new seam needs a line infactory/SEAMSand a reason in the PR body.
Metadata
Metadata
Assignees
Labels
factory:pr-openPR is open and passed the gatePR is open and passed the gate
Activity
rawphp commentedon Oct 17, 2026
Factory status: pr-open
feat(factory): retire model_instance and model from the machine config
test(factory): sessions launch on the project's default model, else t…
feat(factory): launch sessions on the T3 project's default model
test(web): the factory settings page has no model rows
feat(web): drop the Model instance and Model rows from the factory se…
docs(factory): say the session model comes from the T3 project, then …
fix(factory): resolve the session model as T3 does and record its opt…
fix(factory): keep the retired model keys through a settings save
docs(factory): a config written after #93 has no model keys to roll b…