Skip to content

fix(ci): nineteen components ran no tests, build or typecheck; they run all three now - #124

Draft
ruehowl wants to merge 8 commits into
mainfrom
claude/tender-bell-gunxyb
Draft

ruehowl wants to merge 8 commits into
mainfrom
claude/tender-bell-gunxyb

Conversation

@ruehowl

@ruehowl ruehowl commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

What was wrong: two problems stacked

1. The profile. Nineteen components were on quick-check, which runs setup, install and a structure check. No tests, no build, no typecheck. The lane was still titled · Verify and went green.

capability quick-check verify
setup-node, setup-pnpm, install, verify-structure ✓ ✓
pre-build (where every suite keeps its tests) — ✓
build — ✓
typecheck — ✓

2. The composition. Flipping to verify (5ae250a) went green, and the log showed the tests still didn't run:

✓  04 pre-build          0.0s  ·  Skipping pre-build.

Every stack-tectonic release from 0.18.1 through 0.20.0 guarded turbo-package's pre-build, build and typecheck on keys orun's template context doesn't have ({{if .preBuildCommand}} where the value is .parameters.preBuildCommand). Pre-build skipped itself on every component.

The fix

  • profile: verify on dev for the 17 tests/* suites plus cli and sdk. cli and sdk keep quick-check on stage/prod, because a package doesn't deploy.
  • stack-tectonic 0.20.1, released for this. sourceplane/stack-tectonic#20 fixed the three guards and added two checks to its verify.sh that would have caught the bug. #21 added a Run workflow button to its release, which cut v0.20.1. lumen's pin moves 0.20.0 → 0.20.1, and intent.yaml differs from main by that one line.

Before the release, this branch carried an in-tree copy of the fixed composition (b23e69d). f7abecb removes it, along with its blueprint module, contract test and docs.

Does 0.20.1 change any other repo?

No. Every baseline in orun-cloud's registry was planned with its own pin, once as published and once with only the guard fix:

  • 22 repos with turbo-package jobs: 181 jobs, all on quick-check. Not one step differs.
  • 3 repos have no turbo-package jobs.

quick-check plans none of the three fixed steps, and no repo declares a custom build or typecheck command. Each repo pins an exact version, so nothing moves until it bumps its pin.

The suites, made ready to run

Fourteen suites passed as they were. Five failed, and in each one the test was right and its harness had drifted:

suite what it hit fix
api-edge-tests 12 tests read wrangler.jsonc, now wrangler.template.jsonc (BF6) read the template
membership-worker-tests same file, read at describe time, so the suite failed to load same
db-tests tsconfig maps thirteen @saas/db/* subpaths but not integrations add the path
integrations-worker-tests tsconfig's @saas/db/* doesn't match bare @saas/db add the path
web-console-next-tests the console imports @saas/sdk; the suite mapped only @saas/contracts map @saas/sdk (a9104de)

Eighteen test files also faked the database as postgres://fake, which made each test do a real DNS lookup that a CI runner can stall on for 5s. That's jest's limit, so config-worker-tests timed out once. The fake URL is now postgres://fake@127.0.0.1:1/fake, which is refused immediately (b272021).

Suites that couldn't load had been hiding tests: membership-worker-tests went from 85 to 269, db-tests from 552 to 578, integrations-worker-tests from 70 to 77, and web-console-next-tests from 215 to 258.

Cost to a bootstrap: none

The 19 suites verify on dev only, and a bootstrap runs no dev lane. Each landing's PR runs only plan, and 01-scaffold defers dev's push-to-main trigger until 08-docs restores it. The 18 measured minutes stand. The suites run from the product's first PR on.

Verified

  • CI on b272021, read from the lane logs: every one of the 19 lanes ran its tests. 3,088 passed, 0 failed.
  • On the published 0.20.1: orun plan --all-envs matches that CI-proven plan exactly, with 92 jobs and 610 steps, and all 19 pre-builds run pnpm exec turbo run test --filter=./.
  • All eleven testing/*.sh suites pass (leak and placement included), and so does orun validate.

🤖 Generated with Claude Code

https://claude.ai/code/session_01BfmHkwWeA1oPJGBNF3QSQH

stack-tectonic 0.20.0's `turbo-package` profiles, read from the published
artifact rather than inferred:

  quick-check   setup-node, setup-pnpm, install, verify-structure
  verify        the same, plus pre-build, build and typecheck

Every suite here keeps its tests in `preBuildCommand`, which is pre-build. So
on `quick-check` they skipped not only the tests but the build and the
typecheck — and the lane was still titled "· Verify" and went green, which is
why it lasted. lumen#123's own CI showed it: db-tests ran four steps and
reported "4 passed, 0 failed, 0 skipped" with no test among them.

NINETEEN, not sixteen. The seventeen tests/* suites — an earlier count of
sixteen was the overviews that read `None`, and platform-limits-tests is a
seventeenth with a real one — plus packages/cli and packages/sdk, which carry
their own tests in preBuildCommand too. All nineteen now say `verify` on `dev`,
the environment the suites subscribe to and the one a pull request plans. cli
and sdk keep `quick-check` on stage and prod: a package does not deploy, so
those rows are its seat in each environment's graph, not a reason to run the
same tests three times. That is how lumen's workers already subscribe.

RUN BEFORE FLIPPED. All nineteen were run locally exactly as verify's pre-build
runs them. Fifteen passed. Four did not, and each time the test was right about
what it guards and its harness had drifted from the code beneath it:

  api-edge-tests            12 tests read apps/api-edge/wrangler.jsonc, which
                            no longer exists: each worker commits
                            wrangler.template.jsonc and render.mjs produces the
                            deployable file (BF6). The template carries exactly
                            the bindings asserted.
  membership-worker-tests   the same file, read at describe time, so the whole
                            suite failed to load
  db-tests                  tsconfig enumerates thirteen @saas/db/* subpaths and
                            not `integrations`; jest resolved it through its
                            (.*) catch-all and ts-jest's type-check did not
  integrations-worker-tests tsconfig maps @saas/db/*, which does not match bare
                            @saas/db

The suites that failed to LOAD were hiding more than their failure counts:
membership-worker-tests 85 → 269 tests, db-tests 552 → 578,
integrations-worker-tests 70 → 77. About 2,900 tests now run that did not.

The repointed binding tests were checked by breaking what they guard: pointing
stage's IDENTITY_WORKER at lumen-identity-worker-prod fails exactly the two
tests written for it. A cross-environment binding would route stage traffic
into prod's workers, and that check had been dead.

Not every wrangler.jsonc reference was rot: config-worker-tests renders the
template itself, platform-limits-tests tries the template first, and
policy-worker binds nothing so its wrangler.jsonc is real. None of those passes
was vacuous.

LEFT ON quick-check: the seven packages with no preBuildCommand. Their tests
are the matching tests/* suite, which now builds and typechecks them.

WHAT IT COSTS A BUILD, stated rather than guessed: the 18 measured minutes
predate this. The suites now run inside the merge convergences of 02-foundation
(6), 04-workers (11), 05-edge (2) and 06-console (1). Each is its own lane, so
the cost should land near the slowest suite rather than the sum; the next
measured build is the answer, and docs/phases/TIMINGS.md says so.

The sixteen overview notes reading "This suite does not run in CI today" are
removed, since this makes them false.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BfmHkwWeA1oPJGBNF3QSQH
The previous commit said nineteen components "run them now". They do not. Its
own CI went green and the db-tests lane reported seven steps instead of four,
and neither of those is evidence a test ran. The log is:

  ✓  04 pre-build          0.0s  ·  Skipping pre-build.
  ✓  06 build-package      3.8s
  ✓  07 typecheck-package  2.3s

stack-tectonic 0.20.0's turbo-package verify job guards pre-build with
`{{if .preBuildCommand}}` — a top-level key nothing sets — while the command it
would run reads `.parameters.preBuildCommand`. The guard is always false, so
pre-build always skips. `buildCommand` and `typecheckCommand` carry the same
mistake and only appear to work, because their `else` defaults are the commands
every component here declares.

So the profile flip is real and necessary, and it bought build and typecheck
for nineteen components that ran neither; the suites themselves wait on a
three-token fix in sourceplane/stack-tectonic, a release, and this repository
moving its pin. orun-cloud's in-tree copy already reads `.parameters.*`, which is
why its suites run — and stack-tectonic's own main is still 0.20.0 with the
broken guards.

REVIEW.md and TIMINGS.md now say what is true.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BfmHkwWeA1oPJGBNF3QSQH
@ruehowl ruehowl changed the title fix(ci): nineteen components ran no tests; they run them now fix(ci): nineteen components ran no build, typecheck or tests — build and typecheck run now; tests wait on stack-tectonic Oct 26, 2026
…in-tree

stack-tectonic 0.20.0's turbo-package guards pre-build on
`{{if .preBuildCommand}}`, a key orun's template context never has (it
has .orun, .parameters and .env), so pre-build skipped itself on every
component and no suite's tests ran even on `verify`. build and typecheck
carry the same mistake and only worked because their defaults match.

The fix belongs upstream and could not be released from here, so
stack-tectonic-fixes/ carries 0.20.0's turbo-package with the three
guards reading `.parameters.*` and nothing else, and intent.yaml binds
that one type to it. Every other composition is still the OCI artifact.

- testing/composition-fixes.test.sh undoes the fixes and requires the
  published hashes, fails on any pin but 0.20.0 while the copy exists,
  and requires the module to land with intent.yaml (01-scaffold)
- orun plan --all-envs before/after: 92 jobs, 610 steps, exactly the 19
  pre-build steps differ, now `pnpm exec turbo run test --filter=./`
- a placed, branded product receives the copy byte for byte and plans
  the same command

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BfmHkwWeA1oPJGBNF3QSQH
@ruehowl ruehowl changed the title fix(ci): nineteen components ran no build, typecheck or tests — build and typecheck run now; tests wait on stack-tectonic fix(ci): nineteen components ran no tests, build or typecheck; they run all three now Oct 26, 2026
The console's sources import `@saas/sdk`, and the suite compiles them,
but its tsconfig and jest mapper named only `@saas/contracts`. ts-jest
then could not resolve the package and four suites failed to load in
CI (`TS2307: Cannot find module '@saas/sdk'`, plus knock-on errors).
Locally they passed only from jest's transform cache. Map it to the
sdk's source, as contracts already is.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BfmHkwWeA1oPJGBNF3QSQH
web-console-next-tests passed locally only from jest's transform cache;
its first lane could not load four files. Recorded with the other four,
and the local re-run is now uncached in an orun-style staged tree.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BfmHkwWeA1oPJGBNF3QSQH
Eighteen test files faked PLATFORM_DB as `postgres://fake`. The list
handlers start the database read alongside the membership call and wait
for both, so each such request did a real DNS lookup of `fake`: a few ms
locally, but up to glibc's 5s resolver timeout on a runner, which is
jest's 5s test timeout. config-worker-tests failed that way in CI after
passing on the previous run.

Use `postgres://fake@127.0.0.1:1/fake`, a closed loopback port the
kernel refuses with no lookup. With every non-localhost lookup delayed
6s, the old URL times out 17 config-worker tests; with this change all
19 suites (and webhooks/events) pass with none.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BfmHkwWeA1oPJGBNF3QSQH
TIMINGS.md and REVIEW.md said the nineteen suites would add a build,
a typecheck and the tests to four phases' merge convergences. They do
not: the suites verify on dev only, a landing's PR runs `plan` alone,
and 01-scaffold defers dev's push-to-main trigger until 08-docs
restores it (tooling/bootstrap/dev-lanes.mjs). The 18 minutes stand.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BfmHkwWeA1oPJGBNF3QSQH
stack-tectonic 0.20.1 (sourceplane/stack-tectonic#20) carries the fix
this branch had been patching in-tree: turbo-package's pre-build, build
and typecheck guards read .parameters.*, so a component's
preBuildCommand runs. The pin moves 0.20.0 -> 0.20.1, and the in-tree
copy goes with everything that existed to fence it: the
stack-tectonic-fixes source and binding, its blueprint module, its
contract test and the doc lines that called it an exception.
intent.yaml now differs from main by the pin alone.

orun plan --all-envs on the published 0.20.1 against the in-tree copy
CI already ran green: 92 jobs and 610 steps either way, no step
differs, and the 19 pre-builds run their tests. All eleven contract
suites (leak and placement included) and orun validate pass.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BfmHkwWeA1oPJGBNF3QSQH

ruehowl commented Oct 27, 2026

Copy link
Copy Markdown
Contributor Author

Red on f7abecb, and not from this change. Three jobs failed in run 40465024370. None of them got as far as running a step:

  • dev · membership-worker-tests and stage · cli both died during orun's start-up, before any job step:
    ✕ remote state auth (oidc exchange): requesting OIDC exchange: Post "https://api-edge-prod.oruncloud.workers.dev/v1/auth/oidc/exchange": context deadline exceeded (after 4 attempts)
    
    That's the orun platform's API timing out. The other 16 lanes in the same run authenticated and passed, including all 18 other test suites.
  • prod · cli, sdk: sdk passed. cli.prod.verify waits for cli in stage, which never ran, so it hit orun's one-hour upstream wait timeout.

There's nothing to fix in this PR's code. The only change since the last green run is the stack-tectonic pin (0.20.0 → 0.20.1), and the plan is unchanged by it: the same 92 jobs and 610 steps.

The fix is the one re-run of the failed jobs. GitHub's API refused it twice just now (HTTP 502, then 500), so it hasn't run yet. I'll retry it shortly and keep watching the PR until it's green.


Generated by Claude Code

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.

2 participants