Repository navigation
fix(canon): the entry guard of the six scripts without a template copy is one text, and org-health-watch asks the ruled shape (28m, queue row UMB4-115 part (a)) - #266
Draft
HetCreep wants to merge 1 commit into
Conversation
…y is one text, and org-health-watch asks the ruled shape instead of a pattern on its name (28m, queue row UMB4-115 part (a)) - One byte-equal block between `// ENTRY GUARD` and `// END ENTRY GUARD` in the three deploy-payload.mjs, update-readme.mjs, verify-landing.mjs and org-health-watch.mjs: realpath.native on both sides; if that throws, file identity; last, the plain paths. It is a copy, not a module: a script that must stay import-free at its top (node/runtime.md section 1) cannot share one, and the comment says so. update-readme.mjs and verify-landing.mjs gain the `fs` and `path` default imports so the text can be spelled once. - org-health-watch.mjs (item 4, kept in the class, not as a divergence): its guard was a pattern on the NAME in argv[1] (/org-health-watch\.mjs$/), a third shape. An import with an argv path that ends in that name and names no file ran the whole watcher against the API. It takes the ruled text, because the reason for a divergence (a different job) does not exist here, and the ruled text fails closed. - A file that has a template copy is not edited (parts (b) and (c) are separate orders). Tests: - scripts/overlay-entry-guards.test.mjs holds the six blocks equal and checks the shape (two realpath.native calls, the file-identity and plain-path fallbacks, no catch that answers the entry). The six scripts' own import tests from e0eba02 stay. - scripts/org-health-watch.test.mjs: imported with an argv path that ends in the script's name and names no file, the watcher asks no API, writes no report and prints nothing. A fetch stub is preloaded, so a wrong guard meets no network. Red: 2 of 80 fail on 8a5b621 (the watcher ran on import; no guard between the markers). Green: 152 pass, 0 fail, 3 skipped (the overlay file's own pending skips). Mutation table, 18 of 18 killed: for each of the six scripts, a fail-open catch, the file-identity fallback dropped, and the guard never firing. Each mutant ran under a heap cap and a kill-timeout and the restore was checked byte-equal. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: true
|
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.
Order 28m, queue row UMB4-115, part (a). A draft for the auditor; it is not merged without main's word.
What changed
deploy-payload.mjs,update-readme.mjs,verify-landing.mjsandorg-health-watch.mjs. The block sits between// ENTRY GUARDand// END ENTRY GUARDand is the same by bytes in all six. It is a copy, not a module, because a script that must stay import-free at its top (node/runtime.mdsection 1) cannot share one; the comment in the block says so.update-readme.mjsandverify-landing.mjsgain thefsandpathdefault imports so the text can be spelled once.org-health-watch.mjs(item 4): moved to the ruled text, not kept as a divergence. Its guard was a pattern on the NAME inargv[1](/org-health-watch\.mjs$/), a third shape. An import with an argv path that ends in that name and names no file ran the whole watcher against the API. A divergence needs a reason a different job gives, and there is none here; the ruled text also fails closed.Tests
scripts/overlay-entry-guards.test.mjs: the six blocks are equal, and the shape is the ruled one (tworealpath.nativecalls, the file-identity and plain-path fallbacks, no catch that answers "the entry").scripts/org-health-watch.test.mjs: imported with an argv path that ends in the script's name and names no file, the watcher asks no API, writes no report and prints nothing. A fetch stub is preloaded, so a wrong guard meets no network.e0eba02(an argv path that names no file;-ewith no argv; realpath refused; no file id).Red: 2 of 80 fail on
8a5b621(the watcher ran on import; no guard between the markers). Green: 152 pass, 0 fail, 3 skipped (the overlay file's own pending skips); pre-commit 2082 tests, 0 failures.Mutation table, 18 of 18 killed: for each of the six scripts, (A) a fail-open catch, (B) the file-identity fallback dropped, (C) the guard never firing. A and B are killed by the equality test and, for A, by that script's own import test too. Each mutant ran under a heap cap and a kill-timeout; the restore was checked byte-equal.
The class table (16 sites)
scripts/front-door-links.mjs: 126-141templates/published-code/scripts/front-door-links.mjs: 126-141scripts/inbox/deploy-payload.mjs: 150-162scripts/mirror/deploy-payload.mjs: 117-129scripts/watcher/deploy-payload.mjs: 141-153scripts/update-readme.mjs: 179-191scripts/verify-landing.mjs: 182-194templates/overlay-coal-skill/scripts/build-claude-ai-zips.mjs: 189-207isMainModule)templates/overlay-coal-skill/scripts/lib/machine-reading.mjs: 208-226isMainModule)templates/overlay-coal-skill/scripts/lib/wave-run.mjs: 341-359isMainModule)templates/overlay-coal-skill/scripts/prune-release-zips.mjs: 83-101isMainModule)scripts/watcher/cold-read.mjs: 85catch { return true; }templates/article/scripts/release-notes.mjs: 220catch { return true; }templates/overlay-coal-skill/scripts/release-notes.mjs: 220catch { return true; }scripts/org-health-watch.mjs: 524-537 (was 524)templates/published-code/.github/scripts/lcov-to-cobertura.mjs: 149-153Not in the class:
benchmarks/CoalTipple/score.mjs:26,192readsprocess.argv[1]inside a child-process code string, which is a parameter, not an entry test.Rows 8 to 11 spell the same logic as
isMainModule(url)rather thanisEntry(); the overlay already holds those four equal by a test of its own (overlay-entry-guards.test.mjs, "ONE text"). One text across the two spellings is not asked in this part.Not in this pull request
Parts (b) and (c): the three
catch { return true; }sites, the four pins of the copied fallback (i7, i1, i2, i3), theunlinkFolderLinkcheck and the fourth shape inlcov-to-cobertura.mjs.🤖 Generated with Claude Code