You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Four symlink-blind entry guards live outside scripts/, where #10086's class-closing gate cannot see them — three are the file://${argv[1]} template that also breaks on percent-encoding #10269
Measured while implementing #10086 (PR for claude/issue-10086-invoked-directly-entry-guard). Not repaired there: that card's file surface is scripts/**, and the gate it lands (check:entry-guard) deliberately scans scripts/ only. Filed unassigned, severity for triage.
The measurement
#10086 removed every hand-typed invokedDirectly guard from scripts/ — 11 distinct spellings across 33 files — and closed the class with a gate that allows only scripts/invoked-as.mjs to read process.argv[1].
Sweeping the rest of the tree with the same predicate finds four more sites the gate's scope does not reach:
Both shapes are on the measured-broken list from #10086:
The template form (three sites) is spelling S11 in that card's census. It goes inert through a symlink, and it bypasses the encoder pathToFileURL applies, so it also goes inert on any checkout path containing a character needing percent-encoding — measured on a synthetic probe, a # in any parent directory name is enough, with no symlink involved. (A space is not enough: URL normalises that one. So the failure is sporadic in exactly the way that makes it hard to attribute.)
The regex-basename form (dry-run-hash-compat.ts) is the S3/S10 family: it survives a symlink that keeps the basename, but it answers true for any entry script whose path ends in that name, so it can fire on import as well as go inert.
Why it is not just "examples"
packages/objectql/scripts/dry-run-hash-compat.ts is a compatibility checker, not a demo — the failure direction there is the same silent one #10086 documents: reached the wrong way it does nothing, exits 0, and a caller holding the status reads a pass.
The three template-form sites are example/demo entry points, so the severity is genuinely lower — but they are also the files a reader copies from, which is how a spelling that was removed 33 times comes back.
Note on the sibling predicate
packages/cli/src/utils/invocation.ts already exports isProcessEntry, the symlink-correct predicate for package code, and its header cites #10086. So the fix for at least the packages/** sites likely needs no new code — it is isProcessEntry, or the example equivalent. What is missing is anything that makes them use it.
Two directions for whoever takes this, in ascending cost:
point the four sites at an existing correct predicate;
Also worth correcting while someone is in that file: invocation.ts's header says #10086 measured the guard "in ~8 spellings". The census on origin/main at 923c424 is 11 distinct spellings across 33 files; ~8 was the estimate in the card body, not the measurement.
Dedupe
search_issues for "entry guard process.argv[1] symlink inert in packages and examples, isProcessEntry, file:// template literal guard outside scripts" returns 0 results. #10086 covers scripts/** only and its dispatch fenced the surface explicitly.
Measured while implementing #10086 (PR for
claude/issue-10086-invoked-directly-entry-guard). Not repaired there: that card's file surface isscripts/**, and the gate it lands (check:entry-guard) deliberately scansscripts/only. Filed unassigned, severity for triage.The measurement
#10086 removed every hand-typed
invokedDirectlyguard fromscripts/— 11 distinct spellings across 33 files — and closed the class with a gate that allows onlyscripts/invoked-as.mjsto readprocess.argv[1].Sweeping the rest of the tree with the same predicate finds four more sites the gate's scope does not reach:
Both shapes are on the measured-broken list from #10086:
pathToFileURLapplies, so it also goes inert on any checkout path containing a character needing percent-encoding — measured on a synthetic probe, a#in any parent directory name is enough, with no symlink involved. (A space is not enough:URLnormalises that one. So the failure is sporadic in exactly the way that makes it hard to attribute.)dry-run-hash-compat.ts) is the S3/S10 family: it survives a symlink that keeps the basename, but it answers true for any entry script whose path ends in that name, so it can fire on import as well as go inert.Why it is not just "examples"
packages/objectql/scripts/dry-run-hash-compat.tsis a compatibility checker, not a demo — the failure direction there is the same silent one #10086 documents: reached the wrong way it does nothing, exits 0, and a caller holding the status reads a pass.The three template-form sites are example/demo entry points, so the severity is genuinely lower — but they are also the files a reader copies from, which is how a spelling that was removed 33 times comes back.
Note on the sibling predicate
packages/cli/src/utils/invocation.tsalready exportsisProcessEntry, the symlink-correct predicate for package code, and its header cites #10086. So the fix for at least thepackages/**sites likely needs no new code — it isisProcessEntry, or the example equivalent. What is missing is anything that makes them use it.Two directions for whoever takes this, in ascending cost:
scripts/check-entry-guard.mjs's population beyondscripts/— it already exportsscanFile(rel, source, opts)and takes the roster from a directory walk, so the scope is one constant. The blocker is thatpackages/**cannot importscripts/invoked-as.mjs, so the gate would need to acceptisProcessEntryas a second legal spelling — which is a real design question, not a mechanical widening, and is why TheinvokedDirectlyentry guard is spelled ~8 ways acrossscripts/, and every one of them makes its script silently inert (exit 0, no output) when reached through a symlink — includingcheck-governed-merges.mjs, the governed-surface register #10086 did not just do it.Also worth correcting while someone is in that file:
invocation.ts's header says #10086 measured the guard "in ~8 spellings". The census onorigin/mainat 923c424 is 11 distinct spellings across 33 files; ~8 was the estimate in the card body, not the measurement.Dedupe
search_issuesfor "entry guard process.argv[1] symlink inert in packages and examples, isProcessEntry, file:// template literal guard outside scripts" returns 0 results. #10086 coversscripts/**only and its dispatch fenced the surface explicitly.