Skip to content

fix(turbo-package): pre-build, build and typecheck read their parameters (0.20.1) - #20

Merged
ruehowl merged 1 commit into
mainfrom
claude/tender-bell-gunxyb
Oct 27, 2026
Merged

ruehowl merged 1 commit into
mainfrom
claude/tender-bell-gunxyb

Conversation

@ruehowl

@ruehowl ruehowl commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

The bug

turbo-package's verify job guarded each optional step on a key the template context doesn't have:

{{if .preBuildCommand}}            ← always empty
{{.parameters.preBuildCommand}}    ← where the value is
{{else}}
echo "Skipping pre-build."

orun renders job templates with only .orun, .parameters and .env. So from 0.18.1 through 0.20.0:

  • pre-build printed Skipping pre-build. on every component. That's where consumers keep their tests, so no consumer's tests ever ran in this step.
  • build and typecheck ignored a declared buildCommand or typecheckCommand and always ran the default. Nobody noticed, because every consumer declares the default anyway.

Found on sourceplane/lumen#124. Its lanes switched to verify went green while printing Skipping pre-build.

The fix

The three guards now read .parameters.preBuildCommand, .parameters.buildCommand and .parameters.typecheckCommand. stack.yaml moves to 0.20.1. It's byte-identical to the patched copy whose CI on lumen#124 ran 3,088 tests across 19 lanes, all green.

The checks that would have caught it

scripts/verify.sh passed every affected release, because it only checks structure. It gains two stages, documented in docs/verification.md:

  1. Every {{if}} / {{with}} in compositions/ must read .orun, .parameters or .env. The catalog has exactly three guards that don't, and they're this bug.
  2. turbo-package is planned through the packed artifact using two fixture components on verify. The one that declares commands must render them. The one that declares none must skip pre-build and use the default build and typecheck.

I restored the 0.20.0 template in a scratch copy and ran both. The guard rule names all three lines. With that rule disabled, the render check fails on the skipped pre-build.

Does it break any other repo?

No. Consumers pin exact versions, so a release changes nobody until they move their pin. I also checked what changes when they do.

I took every baseline in orun-cloud's registry: 27 repos, 26 of them on stack-tectonic. For each, I rendered the full plan twice with its own pinned version (0.18.1, 0.18.2, 0.19.0 or 0.20.0): once as published, and once with only these three guards patched.

repos turbo-package jobs steps that differ
cirrus, cirrus-baseline, multi-tenant-saas, virga, turso-starter and 17 Cloudflare starters 22 181, all on quick-check 0
astro, nuxt and sveltekit boilerplates 3 none 0
lumen main (baseline-v32) 1 all on quick-check 0
lumen#124 (moves its suites to verify) 1 19, each a pre-build changing from Skipping pre-build. to its test command

quick-check plans none of the three steps, so the guards never render. No consumer declares a custom buildCommand or typecheckCommand, so nothing changes for build or typecheck anywhere. The lumen#124 row is the control: the same comparison does catch a change when one exists. stratus uses stack-basalt, and orun-cloud keeps an in-tree copy that already reads .parameters.*.

An earlier version of this table said 23 repos and 164 jobs. I'd mis-tallied: it's 22 and 181. The zero-difference result is unchanged.

A consumer that moves its components to verify will start running whatever its preBuildCommand says, which is the point. lumen#124 shows what that took for its suites: five harness fixes.

Release

The session that merged this couldn't push tags (HTTP 403). So #21 added a Run workflow button to release.yml, and that run cut v0.20.1 on e62730c. ghcr.io/sourceplane/stack-tectonic:0.20.1 is published, and I fetched it back: its guards read .parameters.* and its compositions match main.


🤖 Generated with Claude Code

https://claude.ai/code/session_01BfmHkwWeA1oPJGBNF3QSQH

…ers (0.20.1)

The verify job guarded each optional step on a key the template context
does not have:

    {{if .preBuildCommand}}          <- always empty
    {{.parameters.preBuildCommand}}  <- where the value is

orun renders job templates with .orun, .parameters and .env only, so
every guard was false from 0.18.1 through 0.20.0. Pre-build printed
"Skipping pre-build." on every component, which is where consumers keep
their tests, and a declared buildCommand or typecheckCommand was ignored
in favour of the default. The three guards now read .parameters.*.

verify.sh gains the two checks that would have caught it:
- every {{if}} / {{with}} in compositions/ must read .orun, .parameters
  or .env;
- turbo-package is planned through the packed artifact with two fixture
  components, and the rendered steps must run the declared commands, or
  skip pre-build and use the defaults when none are declared.
Each fails on its own against the 0.20.0 template.

Consumers pin exact versions, so this changes nobody until they move
their pin. Of the 26 baselines on stack-tectonic, every turbo-package
job except lumen's is on quick-check, which plans none of the three
steps: their plans are identical with and without this fix.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BfmHkwWeA1oPJGBNF3QSQH
@ruehowl
ruehowl marked this pull request as ready for review October 27, 2026 06:01
@ruehowl
ruehowl merged commit 781542a into main Oct 27, 2026
3 checks passed
ruehowl pushed a commit to sourceplane/lumen that referenced this pull request Oct 27, 2026
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
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