GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Config: the factory's machine config and a repo's factory block by rawphp · Pull Request #19866 · pingdotgg/t3code

Conversation

@rawphp

@rawphp rawphp commented Oct 15, 2026

Copy link
Copy Markdown

Closes #11

Contract

  • done: apps/server/src/factory/config.ts parses the machine config (<base>/factory/config.yml) and a .dw/config.yml factory block with softfac's fields, defaults and messages; an unknown machine key is an error that names it; a non-empty required_checks is required_checks is not supported yet; both loaders read the file again on every call; a missing machine config makes FactoryLayer log no factory config at <path> once per server start and stay idle; softfac's project-block tests from src/config.rs (pinned bf273a1) are ported and pass.
  • out: using the config in passes and claims, the Linear tracker, the users block, self_update/fleet/retro, warnings for unknown project keys, caching.
  • risk: none
  • test: vp test run apps/server/src/factory → pass (5 files, 104 tests)

Readings the issue left open

  • max_concurrent_runs: the issue says "softfac's defaults" for it and max_concurrent_gates, but softfac has no default for max_concurrent_runs (required, at least 1). The port keeps softfac's rule: max_concurrent_runs: is missing when absent. max_concurrent_gates defaults to 2. If a default of 1 was meant, it is one line in machineFrom.
  • Unknown machine key: one file-level error per key, <file>: unknown key <dotted path>, after the field errors, at the top level and inside each repos[i] (softfac's warning wording, as an error).
  • An invalid machine config logs each formatted error at error level and the factory stays idle (the issue only names the missing-file case).
  • softfac's project_required_checks_are_read_in_order is replaced by the not-supported case; [] still loads.

Acceptance criteria

  • config.ts reads <base>/factory/config.yml with gh_config_dir, poll_seconds 60, max_concurrent_runs, max_concurrent_gates 2, model_instance claudeAgent, model, repos of {repo, path}; an unknown key is an error that names it — config.test.ts "machine valid resolves every field and the defaults", "machine unknown top-level key is one file-level error", "machine unknown key inside a repo is named by its path"; the path comes from ServerConfig.baseDir in t3/paths.test.ts
  • A missing config.yml leaves the factory idle and logs no factory config at <path> once per server start — index.test.ts "logs that there is no config when the machine file does not exist" (the layer is built once per start)
  • A function parses .dw/config.yml text into the factory block with softfac's fields and defaults (minutes 180, gate_retries required, regates 5, checks_minutes 30, interruption_resumes 2) and softfac's messages — parseProjectConfig; config.test.ts "project valid resolves all fields" and the ported // ---- project: sections
  • A non-empty required_checks is required_checks is not supported yet — config.test.ts:204
  • Both are read again on every call; nothing is cached — config.test.ts "loadMachineConfig reads the file on every call", "loadProjectConfig reads the file on every call"
  • Uses the yaml package apps/server already depends on, no new dependency — package.json and the lockfile are unchanged in this branch
  • softfac's project-block cases from src/config.rs are ported and pass — one it per Rust #[test] in config.test.ts; the correctness reviewer checked each has a counterpart of equal or stronger strength

Gate

  • vp test run apps/server/src/factory → exit 0
  • vp run --filter t3 typecheck → exit 0

Models

  • maker: claude-sonnet-5-5 (host)
  • checker: claude-opus-5-5 (host)

Review

  • cycles: 1
  • personas: correctness (approve, 0 findings), maintainability (approve, 1 nit, fixed in 7265e29d6), testing (approve; 11 of 12 named mutants killed, the twelfth was equivalent as written and its intended form was killed too)
  • fixed: ConfigError and the ConfigErrors schema defined the same shape twice → one ConfigErrorSchema
  • leftovers: two testing nits, dropped as out of scope: ConfigErrors.message is never asserted; the must be a list of strings message text is never asserted (the ported softfac tests assert only the field for that case)

Notes

  • Worktree was behind origin/main at launch (e4bcce9f6); fast-forwarded to f1dba9a17 before provisioning.
  • Red phase confirmed: at aa0abf236 the suite fails (3 of 5 files); green from 45a137e8f.
  • No seam touched. No upstream file outside apps/server/src/factory/ changed. All seven factory:* labels already existed; none created.

Lessons

  • Read the branch from the worktree, not from the launch context. Symptom: the first push failed with "src refspec does not match any". Cause: the session's git status snapshot named a branch (t3/ffe914e1) that was not the worktree's branch (t3/factory-issue-11). Default: at Isolate run git branch --show-current in the worktree and use that name for every push and the PR.

Commits

  • aa0abf236 test(factory): port config parsing tests and the config-driven start — Make slice (red)
  • 45a137e8f feat(factory): load the machine config and start only when it is valid — Make slice (green)
  • 7265e29d6 refactor(factory): define the config error shape once — Check cycle 1

Files

  • apps/server/src/factory/config.ts — machine config and project factory block parsing, loaders
  • apps/server/src/factory/config.test.ts — ported softfac project cases, machine cases, loader cases
  • apps/server/src/factory/paths.ts — FactoryPaths service tag (factory-owned, no T3 import)
  • apps/server/src/factory/t3/paths.ts — FactoryPaths from ServerConfig.baseDir
  • apps/server/src/factory/t3/paths.test.ts — path derivation
  • apps/server/src/factory/index.ts — FactoryRuntime reads the config at build; FactoryLayer wires the paths
  • apps/server/src/factory/index.test.ts — the three start states

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
rawphp and others added 16 commits October 15, 2026 19:44
@rawphp
chore: factory block for softfac
55f49ea
@tomkaczocha
Merge pull request #29 from original-solutions/factory/dw-config
e4bcce9
chore: factory block for softfac
@rawphp
test: factory layer logs factory started
7abf1e1
Red: ./index.ts does not exist yet, so the import fails.

Issue: #1
@rawphp
feat(server): wire an empty FactoryLayer through server.ts
f5af01a
Green: factory started is logged once.

Issue: #1
@rawphp
test: check-seams.sh passes allowed changes and names unlisted ones
595cc20
Red: factory/scripts/check-seams.sh does not exist yet, so both cases fail.

Issue: #1
@rawphp
feat(factory): add UPSTREAM, SEAMS and check-seams.sh
f07d8e2
Green: both check-seams cases pass.

Issue: #1
@rawphp
test(factory): boundary test for factory imports
95afcec
No red phase: the tree already complies, so the real-tree test passes on
arrival. The synthetic cases show each rule catching a violation.

Issue: #1
@rawphp
docs(factory): design copy and README
611af0d
Issue: #1
@rawphp
test(factory): import vitest helpers from vite-plus/test
cc1c0ac
Typecheck could not resolve the bare vitest module; the repo imports it via vite-plus/test.

Issue: #1
@rawphp
test(factory): rename into an allowed path is named, seam assertions …
cbcf91a
…order-free

Red: "names an upstream file renamed into an allowed path" fails because
check-seams.sh lets git rename detection hide the deleted upstream path.
The fail case now changes server.ts itself, and the boundary real-tree
test asserts server.ts imports ./factory/index.ts; both already pass.

Issue: #1
@rawphp
fix(factory): check-seams.sh diffs without rename detection
0aadcf1
A git mv of an upstream file into an allowed path listed only the new
path, so the deleted upstream file passed the seam check. --no-renames
lists both sides.

Issue: #1
@rawphp
fix(factory): close boundary and seam-check gaps from review
71ba6b4
- boundary.test.ts flags factory code outside factory/t3/ that imports the
  server's workspace packages (@t3tools/*, effect-acp, ...), read from
  apps/server/package.json.
- check-seams.sh captures the diff before the loop, so a failed git diff
  fails the script instead of passing with nothing checked.
- README and the script header say the check covers committed HEAD only.
- check-seams tests cover apps/web/src/factory/ and a failing diff.
- Node built-ins imported as NodeFS/NodePath/... per namespace-node-imports.
@tomkaczocha
Merge pull request #30 from original-solutions/t3/t3code-factory-issue-1
f1dba9a
Factory skeleton: an empty FactoryLayer wired in through one seam
@rawphp
test(factory): port config parsing tests and the config-driven start
aa0abf2
Red: config.test.ts, index.test.ts and t3/paths.test.ts fail because
./config.ts, ./paths.ts, t3/paths.ts and FactoryRuntime do not exist yet.

Issue: #11
@rawphp
feat(factory): load the machine config and start only when it is valid
45a137e
Adds config.ts (project and machine config parsing ported from softfac,
plus loaders), the FactoryPaths service with its T3 layer, and makes the
factory log no-config, config errors, or started. Also fixes test-helper
slips in the ported tests (repos error path, 90.0 fixture, layer wiring).

Issue: #11
@rawphp
refactor(factory): define the config error shape once
7265e29
Issue: #11
@rawphp rawphp closed this Oct 15, 2026
@github-actions github-actions Bot added the vouch:unvouched Author is not yet trusted in the VOUCHED list. label Oct 15, 2026
@rawphp rawphp mentioned this pull request Oct 15, 2026
Config: the factory's machine config and a repo's factory block original-solutions/t3code-factory#37
Merged
7 tasks done
@github-actions github-actions Bot added the size:XL 500-999 changed lines (additions + deletions). label Oct 15, 2026
@zainmitchell

zainmitchell commented Oct 26, 2026

Copy link
Copy Markdown

Factory catalog cross-reference — 2026-10-26. Prior-work history: this PR is cataloged for its work on machine and repository factory configuration in the public original-solutions factory, acknowledged in our catalog. No code from that effort was copied into this derivative. This historical cross-reference requests no reopening and implies neither quality rejection nor an installation dependency.

Factory Ideas · Pinned fork source/guide · Source release. Version-pinned community experimental source preview; full lifecycle acceptance remains open. No upstream endorsement or current-PR-head test acceptance is claimed.

Prepared with GPT-6.1 Sol through Codex in T3 Code.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

size:XL 500-999 changed lines (additions + deletions). vouch:unvouched Author is not yet trusted in the VOUCHED list.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

3 participants

@rawphp @zainmitchell @tomkaczocha
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.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.