GeezerVison is showing github.com — Factory skeleton: an empty FactoryLayer wired in through one seam · Issue #1 · original-solutions/t3code-factory
Factory skeleton: an empty FactoryLayer wired in through one seam #1DescriptionOutcome
The fork's server starts a factory module that only logs for now, and the rules that keep the fork mergeable with upstream are written down and checked by tests.
Acceptance criteria
apps/server/src/factory/index.ts exports FactoryLayer, a Layer that logs factory started once when the server starts.
apps/server/src/server.ts gains one import line and one entry adding FactoryLayer to layerRuntimeCoreDependenciesBase. No other line of server.ts changes.
factory/UPSTREAM holds one line, <upstream ref> <sha>, naming the upstream commit this fork is based on: v0.0.46-nightly.20261015.3145 339179f50a84dc599cce373dbb48f172f182f44e on this branch.
factory/SEAMS lists every upstream file the fork changes, one path per line. On this branch it holds only apps/server/src/server.ts.
factory/scripts/check-seams.sh diffs the tree against the sha in factory/UPSTREAM (git diff --name-only <sha> HEAD, fetching that sha from https://github.com/pingdotgg/t3code when it is missing locally). It exits 1 and names each changed path that is not under apps/server/src/factory/, apps/web/src/factory/, factory/ or .dw/, does not match apps/web/src/routes/factory* or .github/workflows/factory-*, and is not listed in factory/SEAMS. Otherwise it exits 0.
- A test runs
check-seams.sh in a temporary git repo and shows both outcomes: an allowed change passes, an unlisted upstream change fails and is named.
apps/server/src/factory/boundary.test.ts fails when a file under apps/server/src/factory/, other than files under apps/server/src/factory/t3/, imports by relative path from outside apps/server/src/factory/ (package imports such as effect are allowed). It also fails when any file under apps/server/src/ outside factory/ imports from the factory folder, server.ts excepted. It passes on this branch, and its own tests show each rule catching a violation.
factory/docs/design.md is a copy of docs/superpowers/specs/2026-10-15-t3-factory-fork-design.md from rawphp/softfac main.
factory/README.md says what the fork is, links the design, states the seam rule and the boundary rule, and gives the commands to run the factory tests.
vp test run apps/server/src/factory passes and vp run --filter t3 typecheck passes.
Depends on
Notes
Follow the shape of layerThreadSettlementWorker in server.ts (Layer.effectDiscard). The design doc lands on softfac main through rawphp/softfac#400, which closes rawphp/softfac#401.
Reference
- softfac, the Rust factory this ports, pinned at
rawphp/softfac@bf273a1. Read it from a separate clone: git clone --filter=blob:none https://github.com/rawphp/softfac /tmp/softfac-ref && git -C /tmp/softfac-ref checkout bf273a1d93651992b4fc95b4dd6c111f8f3322cf. Its docs/lifecycle.md, docs/reference/ledger.md and docs/issues.md describe the behaviour; its tests pin it.
- Design:
factory/docs/design.md in this repo.
- Upstream's
AGENTS.md applies. Run only the tests and typechecks for the paths you touch (vp test run <path>, vp run --filter t3 typecheck), never the repo-wide checks.
- Edit no upstream file that is not listed in
factory/SEAMS. A new seam needs a line in factory/SEAMS and a reason in the PR body.
- Port behaviour, not code: port the named test cases first (TypeScript, vitest /
@effect/vitest), then make them pass. Exact comment and ledger wording is ported as is.
Activityrawphp commented on Oct 15, 2026 rawphp commented on Oct 15, 2026 The factory could not finish this issue and has released it.
Reason: the session run ended as failed
Fix the cause, then set the label back to factory:ready.
MetadataMetadataDevelopmentNo branches or pull requestsIssue actions
|