Repository navigation
Description
What
pkgs/id/worker-poc/compare/isolate-runner.mjs:86 guards its standalone mode with a raw template-literal entry-point check — a spelling no other file in the repo uses:
if (import.meta.url === `file://${process.argv[1]}`) {
for (const line of await runIsolateSequences()) console.log(JSON.stringify(line));
}process.argv[1] is the path exactly as invoked; import.meta.url is the resolved module URL. Through any symlink — a symlinked file, or a path through a symlinked directory (the fleet's own ~/code -> ~/git/code alias) — they never match, the standalone body never runs, and Node exits 0 with no output. The same spelling also breaks for any path needing percent-encoding (e.g. a space in the checkout path), where import.meta.url carries %20 and the template string carries the raw space.
This is the #2083/#2350 bug class, in the one spelling the class's own closure greps missed: open #5099's acceptance grep (pathToFileURL\(process\.argv\[1\]\)|resolve\(process\.argv\[1\]\)) does not match the template-literal form, and #6343 (meta-exporter) / #5099 (opencode-usage-export) cover the two pathToFileURL instances only. A repo-wide scan this run confirms this is the only remaining raw compare: every other entry point (bin/proxy-supervise.mjs:892, bin/record.mjs:243, bin/codedb-bridge.mjs:321, pm-stack/supabase-export/supabase-quota-export.mjs:403, pm-stack/cloudflare-export/cloudflare-quota-export.mjs:649, pm-stack/opencode-claimant/install.mjs:135, …) uses the guarded realpathSync form.
Verified this run (laptop primary @50237a7deb, HEAD == origin/main)
Probe: ~/git/fleet/probe-isolate-entry/ on the laptop, real runner, no credentials needed (checked-in example guests):
| Invocation | Result |
|---|---|
node pkgs/id/worker-poc/compare/isolate-runner.mjs |
exit 0, 13 JSON step lines on stdout (roc-counter 4 + tic-tac-toe 9) |
node <file-symlink to isolate-runner.mjs> |
exit 0, 0 lines, no output — standalone body never ran |
node <symlinked-dir>/compare/isolate-runner.mjs |
exit 0, 0 lines, no output |
The direct run proves the runner works; both symlinked runs prove the guard silently swallows it.
Why it matters
isolate-runner.mjs is the isolate half of the #2271 journal-equality harness: standalone, it emits the per-step JSON lines that compare/compare.mjs diffs against the native reference (pkgs/id/tests/worker_poc_reference.rs, 13 lines for the same sequences). The import path (compare.mjs imports runIsolateSequences()) is unaffected — but anyone running the runner standalone through a symlinked checkout or link (the documented fleet layout has ~/code as a symlink alias) gets an empty evidence file at exit 0: node <link> > isolate.jsonl succeeds and produces nothing, so the isolate side looks like it emitted zero steps rather than failing. Silent success with no output is the failure shape this bug class keeps being filed for; this instance survived two closure passes only because its spelling differs.
Acceptance criteria
- The entry-point check compares real paths (
fs.realpathSyncon both sides, the house shape atbin/proxy-supervise.mjs:885-892), or an equivalent that resolves symlinks and percent-encodes correctly — not the raw template-literal compare. - Direct, file-symlink, and directory-symlink standalone invocations all emit the same 13 JSON step lines.
- Importing the module (as
compare/compare.mjsdoes) still does not run the standalone body. - The closure grep for this bug class is widened to catch this spelling too (e.g. also matches
`file://${process.argv[1]}`), and that widened grep is empty repo-wide after the fix (the twopathToFileURLinstances are meta-exporter: re-homed meta-quota-export (#6333) restored the pre-#2083 raw-path entry-point check — symlinked invocation silently no-ops with exit 0 (regression of #2350) #6343 / opencode-usage-export: the fifth raw-path entry-point check — symlinked invocation silently no-ops with exit 0 (survived #4325 due to its four-file scope) #5099, not this issue).
Dedup
- meta-exporter: re-homed meta-quota-export (#6333) restored the pre-#2083 raw-path entry-point check — symlinked invocation silently no-ops with exit 0 (regression of #2350) #6343 (OPEN) covers
pm-stack/meta-exporter/meta-quota-export.mjs:624only; opencode-usage-export: the fifth raw-path entry-point check — symlinked invocation silently no-ops with exit 0 (survived #4325 due to its four-file scope) #5099 (OPEN) coverspm-stack/opencode-usage-export/opencode-usage-export.mjs:383only — neither names this file, and opencode-usage-export: the fifth raw-path entry-point check — symlinked invocation silently no-ops with exit 0 (survived #4325 due to its four-file scope) #5099's acceptance grep cannot match this spelling. - bin+pm-stack: four entry points still use the pre-#2083 raw-path entry-point check — codedb-bridge, supabase/cloudflare exporters and the claimant installer silently no-op via any symlink #4325 (CLOSED) fixed four named files; this file was not among them.
- Searched open + closed for
isolate-runneron 2026-11-05: no issue covers its entry-point guard.
Activity
developing-today commentedon Nov 5, 2026
CODE-1885
dezren39 commentedon Nov 5, 2026
🤖 Agent note · filed
dezren39 commentedon Nov 5, 2026
🤖 Agent note · picked up
fix(id/worker-poc): #6358 realpath entry-point guard for isolate-runn…
dezren39 commentedon Nov 5, 2026
🤖 Agent note · done
node compare/compare.mjsPASS (13 steps equal, cold starts included). PR fix(id/worker-poc): #6358 realpath entry-point guard for isolate-runner standalone mode #6361 squash-merged as 6f4e4e3; issue auto-closed by the Fixes marker. Queue task 10711 was cancelled as self-assigned at pickup.