Skip to content

One check script, run by a factory-ci workflow and by the factory gate - #31

Merged
tomkaczocha merged 6 commits into
mainfrom
t3/factory-issue-2
Oct 15, 2026
Merged

tomkaczocha merged 6 commits into
mainfrom
t3/factory-issue-2

Conversation

@rawphp

@rawphp rawphp commented Oct 15, 2026

Copy link
Copy Markdown

Closes #2

Contract

  • done: factory/scripts/check.sh runs check-seams.sh, the factory tests, the server typecheck and the web typecheck in that order, prints each step name first, and stops at the first failure with that step's exit code; factory-ci.yml runs it on pull requests to main and pushes to main on ubuntu-latest after upstream's checkout and Vite+ setup steps and vp i, with no secrets; .dw/config.yml gate is [factory/scripts/check.sh] with provision: [vp i]; factory/README.md has a Checks section.
  • out: turning Actions back on, disabling upstream workflows, editing any upstream workflow file.
  • risk: none
  • test: vp test run apps/server/src/factory → pass (4 files, 14 tests)

Acceptance criteria

  • check.sh order, step names, first-failure stop with that exit code — apps/server/src/factory/check.test.ts (all four tests)
  • factory-ci.yml on pull_request to main and push to main, ubuntu-latest, upstream's Checkout and Setup Vite+ steps, then vp i, then check.sh, no secrets.* — verified .github/workflows/factory-ci.yml:3-44 against .github/workflows/ci.yml typecheck job; the workflow itself cannot run yet because Actions are off on this repo
  • .dw/config.yml gate [factory/scripts/check.sh], provision: [vp i] — verified .dw/config.yml:6-7
  • factory/README.md Checks section — verified factory/README.md:13-26 (replaces the old Commands section, which it supersedes)

Gate

  • factory/scripts/check.sh → exit 0 (log: .factory/gate-1.log)

Note: the worktree was cut before issue 1 merged; fast-forwarded to origin/main (f1dba9a17) at Isolate before any edit.

Models

  • maker: claude-sonnet-5-5 (no models block in config; Tom's roster)
  • checker: claude-opus-5-5

Review

  • cycles: 1 (correctness, testing)
  • fixed: testing-1 (script never run from a subdirectory), testing-2 (expected calls rebuilt their own constants) — both nits, applied in c97ed4f63
  • leftovers: none
  • mutants: 9 named, 5 killed, 4 survived as equivalent (dropping || exit $? or set -euo pipefail keeps the exit code; the || true variant cannot reach past exit); the one real survivor (cd "$root") is now covered

Lessons

  • none

Commits

  • 4a845194c test(factory): check.sh runs the gate steps in order and stops at the first failure — Make slice (red)
  • 5efa4066a feat(factory): check.sh runs seams, factory tests and typechecks in one gate — Make slice (green)
  • aef688ac9 ci(factory): factory-ci workflow runs check.sh on pull requests and pushes to main — Make slice
  • bf609da22 docs(factory): gate and CI run factory/scripts/check.sh — Make slice
  • 30845a328 test(factory): check.sh test names its logs with a counter, not Math.random — Make (the Effect diagnostic rejects Math.random(), caught by the server typecheck step)
  • c97ed4f63 test(factory): check.sh test runs from a subdirectory and names calls plainly — Check cycle 1

Files

  • factory/scripts/check.sh — the one check, run by people, the gate and CI
  • apps/server/src/factory/check.test.ts — pins order, step names, first-failure stop and exit code with a stub vp and stub seam script
  • .github/workflows/factory-ci.yml — the fork's own workflow; no upstream workflow touched (no new seam)
  • .dw/config.yml — gate is the script
  • factory/README.md — Checks section

@rawphp
rawphp marked this pull request as ready for review October 15, 2026 10:39
@rawphp

rawphp commented Oct 15, 2026

Copy link
Copy Markdown
Author

Factory gate: passed (attempt 1, run by the factory in a fresh checkout of the pull request's head c97ed4f merged with the base branch tip f1dba9a)

Command Exit Time
vp test run apps/server/src/factory 0 1.4 s
vp run --filter t3 typecheck 0 8.2 s

@tomkaczocha
tomkaczocha merged commit b679ddd into main Oct 15, 2026
@tomkaczocha tomkaczocha added door:two-way Review gate: a change a revert undoes risk:low Review gate: low risk score:5 Review gate score 5 of 5 labels Oct 15, 2026
uses: voidzero-dev/setup-vp@v1
with:
node-version-file: package.json
cache: true

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

factory-ci installs dependencies twice: setup-vp run-install plus a separate vp i step · nit

Scenario: On every factory-ci run, setup-vp installs dependencies (run-install: true), then the 'Install' step runs vp i again. This adds time to a job capped at 15 minutes and does nothing else. ci.yml's jobs only use run-install.

Fix: Drop the separate 'Install' step (or set run-install: false), as ci.yml does.

Also: .github/workflows/factory-ci.yml:38, .github/workflows/factory-ci.yml:40

@rawphp
rawphp deleted the t3/factory-issue-2 branch October 28, 2026 00:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

door:two-way Review gate: a change a revert undoes risk:low Review gate: low risk score:5 Review gate score 5 of 5

Projects

None yet

Development

Successfully merging this pull request may close these issues.

One check script, run by a factory-ci workflow and by the factory gate

2 participants