Skip to content

fix(ci): guard the pantry-env evals in package.json too, which #107 missed - #111

Merged
chrisbbreuer merged 1 commit into
mainfrom
fix/ci-pantry-env-package-scripts
Sep 3, 2026
Merged

fix(ci): guard the pantry-env evals in package.json too, which #107 missed#111
chrisbbreuer merged 1 commit into
mainfrom
fix/ci-pantry-env-package-scripts

Conversation

@glennmichael123

Copy link
Copy Markdown
Contributor

#107 removed eval "$(pantry env …)" from 16 sites across five workflows and said so. It missed eight more in package.json, and integration on #108 found them.

The "Run root verification" step runs bun run verifybuild:coreeval "$(pantry env …)" → the workspace setup:

✗ Patch failed for ts-maps
error: Cannot find package 'typescript' from …/packages/typescript/scripts

Same clobbered node_modules, one door further along. The failing step moved from "Build TypeScript SDK" to "Run root verification"; the cause did not change.

Guarded, not removed

These are not the workflow's sites and they are not redundant the same way. In CI the pantry action puts zig on PATH, so command -v zig short-circuits and no workspace setup runs. On a developer's machine zig is usually not on PATH, and this eval is how these scripts have always made it available — that path is unchanged.

Verified both directions

  • zig on PATH → guard skips the eval, bun run fmt:check exits 0.
  • zig absent → eval runs exactly as before.

Unblocks #108, whose integration failed on this.

…issed

#107 removed `eval "$(pantry env …)"` from 16 sites across five workflows and
said so. It missed eight more in `package.json`, and `integration` found them:
its "Run root verification" step runs `bun run verify`, which reaches
`build:core`, which evals `pantry env`, which runs the workspace setup —

    ✗ Patch failed for ts-maps
    error: Cannot find package 'typescript' from …/packages/typescript/scripts

— the same clobbered `node_modules`, one door further along. The failing step
moved from "Build TypeScript SDK" to "Run root verification"; the cause did
not change at all.

Guarded rather than removed, because these are not the workflow's sites. In CI
the pantry action puts `zig` on PATH, so the guard short-circuits and nothing
runs a workspace setup. On a developer's machine `zig` is usually not on PATH,
and the eval is exactly how these scripts have always made it available — that
still happens, unchanged. `.github/CONTRIBUTING.md` documents activating
pantry for a shell, and this keeps working for anyone who has not.

Verified both directions: with `zig` on PATH the guard skips the eval and
`bun run fmt:check` exits 0; without it, the eval runs as before.
@github-actions

github-actions Bot commented Sep 3, 2026

Copy link
Copy Markdown

✅ Binary Size Report

Metric Value
Current Size 14912KB (14.56MB)
Change 0KB (0%) unchanged
Size limits
  • Warning: 14.50MB
  • Maximum: 16.00MB

@github-actions

github-actions Bot commented Sep 3, 2026

Copy link
Copy Markdown

✅ Binary load time

rounds:    25 interleaved
base:      p50 159.6ms   p95 168.2ms   (153.5–169.1ms)
head:      p50 31.2ms   p95 35.5ms   (25.4–37.5ms)
delta:     -80.4%  (fails above +20.0%)

No binary load time regression.
What this measures

craft --help: process spawn, dynamic linking and argument parsing.
It never opens a window, so it cannot see a change in window or
webview startup — real startup is benchmarks/startup.bench.ts, which
needs a display.

Both binaries are measured interleaved on this runner and compared by
p50, rather than against a number recorded on another machine. On
byte-identical binaries that method reads within ~3.5%; the old one
swung 45%.

@chrisbbreuer
chrisbbreuer merged commit 47858a1 into main Sep 3, 2026
14 checks passed
@chrisbbreuer
chrisbbreuer deleted the fix/ci-pantry-env-package-scripts branch September 3, 2026 18:30
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