Three doc-example snippets are COMPILE_FAIL in doc-tests, which gates the release:
docs/examples/getting-started/npm_packages.ts
docs/examples/stdlib/http/fastify_json.ts
docs/examples/stdlib/overview/snippets.ts
All three import 'fastify', and all three fail with the same deliberate hard error:
error: `import 'fastify'` is not supported with PERRY_NO_AUTO_OPTIMIZE: the prebuilt stdlib is
not compiled with `external-fastify-pump`, so fastify requests would never drain (the request
loop hangs).
This is a harness/config incompatibility, not a compiler bug. scripts/run_doc_tests.sh sets PERRY_NO_AUTO_OPTIMIZE=1 for host runs — a large speed win (~30–200 s saved per test, ~80% of doc-tests wall time) — and the guard in optimized_libs/driver.rs correctly refuses to build a fastify binary that would hang at runtime.
Note the guard keys on the environment variable alone; it does not inspect the archive. I verified that building perry-stdlib-static --features perry-stdlib/external-fastify-pump does not satisfy it, so "just enable the feature in the prebuild" is not a fix on its own.
Interim (PR #8476): exclude the three snippets from the no-auto run, on the same terms as stdlib/http/snippets.ts which is already excluded for a sibling reason. This unblocks the release gate. It is an explicit coverage gap — those three snippets are no longer verified by CI at all, and this issue exists to close it.
Proper fix, pick one:
- Second pass — have
run_doc_tests.sh collect the fastify-importing snippets and run just those without PERRY_NO_AUTO_OPTIMIZE, paying the rebuild cost for three tests instead of losing coverage. Probably the best value.
- Self-describing skip — extend the harness's existing banner mechanism (
// platforms:) with something like // requires: auto-optimize, so the constraint lives in the file rather than in a workflow string, and shows up as a reported SKIP rather than silence.
- Make the guard evidence-based — have it inspect the stdlib archive for the pump symbols instead of assuming from the env var, so a prebuild that does include
external-fastify-pump is accepted. Combine with adding the feature to the doc-tests prebuild.
Option 2 also fixes a smaller wart: an exclusion in a workflow string is invisible to anyone reading the snippet, which is how this class stayed unnoticed while the full tier was dark.
Three doc-example snippets are
COMPILE_FAILindoc-tests, which gates the release:docs/examples/getting-started/npm_packages.tsdocs/examples/stdlib/http/fastify_json.tsdocs/examples/stdlib/overview/snippets.tsAll three
import 'fastify', and all three fail with the same deliberate hard error:This is a harness/config incompatibility, not a compiler bug.
scripts/run_doc_tests.shsetsPERRY_NO_AUTO_OPTIMIZE=1for host runs — a large speed win (~30–200 s saved per test, ~80% of doc-tests wall time) — and the guard inoptimized_libs/driver.rscorrectly refuses to build a fastify binary that would hang at runtime.Note the guard keys on the environment variable alone; it does not inspect the archive. I verified that building
perry-stdlib-static --features perry-stdlib/external-fastify-pumpdoes not satisfy it, so "just enable the feature in the prebuild" is not a fix on its own.Interim (PR #8476): exclude the three snippets from the no-auto run, on the same terms as
stdlib/http/snippets.tswhich is already excluded for a sibling reason. This unblocks the release gate. It is an explicit coverage gap — those three snippets are no longer verified by CI at all, and this issue exists to close it.Proper fix, pick one:
run_doc_tests.shcollect the fastify-importing snippets and run just those withoutPERRY_NO_AUTO_OPTIMIZE, paying the rebuild cost for three tests instead of losing coverage. Probably the best value.// platforms:) with something like// requires: auto-optimize, so the constraint lives in the file rather than in a workflow string, and shows up as a reported SKIP rather than silence.external-fastify-pumpis accepted. Combine with adding the feature to the doc-tests prebuild.Option 2 also fixes a smaller wart: an exclusion in a workflow string is invisible to anyone reading the snippet, which is how this class stayed unnoticed while the full tier was dark.