fix: reject a system toolchain older than the revision's pin - #50
Merged
Conversation
`demo.sh --system typescript` used whatever `bun` PATH offered. Bun 1.3 cannot parse this repository's lockfileVersion 2 `bun.lock`, so it warned "Ignoring lockfile" and then failed the frozen install with "lockfile had changes, but lockfile is frozen" — a message about the repository, not about the caller's Bun. The launcher already reads each revision's pinned version out of mise.toml for `--mise`. In system mode it now also probes the resolved driver and compares, failing before any install or build with both versions and the `--mise` way out. A newer toolchain still passes. The hermetic updater tests gain the TypeScript path, which nothing covered, plus the version gate across all three probe shapes (`bun --version`, `go version`, Perl's `$^V`). The Python fixture now pins the caller's own python3, so those tests stay independent of how new the host interpreter is. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TbGYCRHZsZUsQwRCLafhMF
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Running the published launcher with an older Bun fails with a message about the repository rather than about the caller:
Bun 1.3 cannot parse our
lockfileVersion: 2bun.lock, drops it, and then fails the frozen install. Nothing was wrong with the repository; the caller had Bun 1.3.14 on PATH while this revision pins 1.4.0.Fix
demo.shalready reads each revision's pinned version frommise.tomlfor--mise. In--systemmode it now also probes the resolved driver and compares the two, failing before any install or build:A newer toolchain still passes, and
--miseis unaffected. The gate covers every language:bun/cargo/cmake/ruby --version,go/zig version,php -r 'echo PHP_VERSION;'and Perl's$^V. Comparison is field-wise numeric, so 3.14 beats 3.12 and Perl's three-field5.44.0satisfies the four-field pin5.44.0.0.Tests
apps/demo/scripts/test-updater.pygains:test_typescript_installs_and_builds_once_per_revision— the TypeScript path had no coverage in this harness at all, under either manager.test_system_tool_older_than_the_pin_fails_before_any_build— all three probe shapes, asserting nothing was installed or built, that a newer tool passes, and that--misestill works with an old tool on PATH.Both fail against the unfixed
demo.sh. The Python fixture now pins the caller's ownpython3so the update/caching tests do not depend on how new the host interpreter is, and the build counters match build invocations rather than tool names so version probes do not inflate them.Verified locally: 13/13 updater tests, 167 bun tests,
bun run typecheck,next build,shellcheck -s sh(only the pre-existing SC2016 at line 252), and a real end-to-end run of the launcher against both Bun 1.3.14 (now a clear failure) and Bun 1.4.0 (installs, builds, renders).🤖 Generated with Claude Code
https://claude.ai/code/session_01TbGYCRHZsZUsQwRCLafhMF