Env: macOS arm64, perry binary rebuilt 2026-08-24 from source, ~/.local/lib/libperry_*.a dated 2026-01-30.
What happened: perry doctor reported
[OK] runtime library: /Users/amlug/.local/lib/libperry_runtime.a
while that lib was ~7 months older than the binary. Every compile then died at link with undefined symbols (_perry_macos_bundle_chdir, _js_set_process_entry_path, …) — two stages away from the cause, with nothing pointing at the stale archive.
check_runtime_library (crates/perry/src/commands/doctor.rs, ~line 265) only checks that find_library finds a runtime archive, not that it matches the binary. The auto-optimize driver already documents this exact class internally (optimized_libs/driver.rs ~622: version-keyed cache dirs so "a newer compiler … stale libperry_runtime.a … undefined symbol link failure"), and at wt-accept HEAD the ext mismatch produces a beautiful diagnostic — the prebuilt-lib path deserves the same.
Proposal: embed a version/commit stamp in the shipped archives (or a sidecar manifest) and have both doctor and the pre-link check compare it against the binary, erroring with "your libperry_runtime.a is from X, this perry is Y — refresh with …".
Env: macOS arm64, perry binary rebuilt 2026-08-24 from source,
~/.local/lib/libperry_*.adated 2026-01-30.What happened:
perry doctorreportedwhile that lib was ~7 months older than the binary. Every compile then died at link with undefined symbols (
_perry_macos_bundle_chdir,_js_set_process_entry_path, …) — two stages away from the cause, with nothing pointing at the stale archive.check_runtime_library(crates/perry/src/commands/doctor.rs, ~line 265) only checks thatfind_libraryfinds a runtime archive, not that it matches the binary. The auto-optimize driver already documents this exact class internally (optimized_libs/driver.rs ~622: version-keyed cache dirs so "a newer compiler … stalelibperry_runtime.a… undefined symbol link failure"), and at wt-accept HEAD the ext mismatch produces a beautiful diagnostic — the prebuilt-lib path deserves the same.Proposal: embed a version/commit stamp in the shipped archives (or a sidecar manifest) and have both
doctorand the pre-link check compare it against the binary, erroring with "your libperry_runtime.a is from X, this perry is Y — refresh with …".