Skip to content

fix(sidecar): non-interactive-safe frozen filtered install (confirmModulesPurge=false) - #824

Merged
danshapiro merged 1 commit into
mainfrom
the-usual/sidecar-filtered-install-confirm
Sep 23, 2026
Merged

danshapiro merged 1 commit into
mainfrom
the-usual/sidecar-filtered-install-confirm

Conversation

@danshapiro

Copy link
Copy Markdown
Owner

Summary

The first pnpm-era base-gate.sh test from main exposed a latent wall in fresh checkouts: the start script's prestart chain died because pnpm 10.34.5 stops a FILTERED install to ask about module state outside the filter ("If you are running pnpm in CI … set confirmModulesPurge to 'false'"), and the non-interactive child refuses with exit 1 — the source-runtime start-script lane then timed out its 30s health window.

--config.confirmModulesPurge=false means "proceed WITHOUT purging modules outside the filter" — exactly the bootstrap's intent (it never prunes the root tree).

Verification

  • Reproduced at origin/main in a fresh checkout: the start-script test timed out at 30.1s; prepare:rust-runtime alone failed in 2s with the purge prompt.
  • With the flag: cold filtered install completes in 16.4s with the root node_modules intact (no purge); the start-script lane passes warm in 3.1s and from a fully cold readiness state (record + sidecar tree deleted) in 22.6s — inside the 30s window.
  • Warm checkouts were never affected (verify-only prestart; main checkout green before and after).
  • Red/green: the ensure-claude-sidecar argv contract updated first (6 failures against old args), then the code change; 7/7 green; typecheck green.
  • No Rust changes (rust-gate will show the pre-existing main-red in_tui_fork_rebinds_the_pane_identity — kata freshell#b46d, not addressed by this PR).

… under pnpm 10.34.5

The pnpm-era base-gate from main exposed a latent wall in fresh checkouts:
the start script's prestart chain died because pnpm 10.34.5 stops a
FILTERED install to ask about module state outside the filter ('If you
are running pnpm in CI ... set confirmModulesPurge to false'), and the
non-interactive child refuses with exit 1 — the source-runtime start-script
lane then timed out its 30s health window (reproduced: 30.1s fail in a
fresh checkout; the prestart alone fails in 2s with the purge prompt).

--config.confirmModulesPurge=false means 'proceed WITHOUT purging modules
outside the filter' — exactly the bootstrap's intent (it never prunes the
root tree). Proof, fresh checkout at origin/main: with the flag the cold
filtered install completes (16.4s) and the root node_modules stays intact;
the start-script lane passes warm in 3.1s and from a fully cold readiness
state (record + sidecar tree deleted) in 22.6s, inside the 30s window.
The warm main checkout was never affected (verify-only prestart).

Red/green: the ensure-claude-sidecar argv contract was updated first and
failed 6 tests against the old args; green 7/7 after the change.
@danshapiro
danshapiro merged commit d76ddd6 into main Sep 23, 2026
7 checks passed
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.

1 participant