Repository navigation
Description
Summary
pm-stack/meta-exporter/meta-quota-export.mjs:535 still compares the raw process.argv[1] path with import.meta.url. Via a symlinked file or directory, the comparison fails, main() is skipped, and Node exits 0 silently.
Fresh evidence (current main 87582f16e203388df93afef7845562e7905e1516, 2026-11-03)
A local probe used --cdp-port 1 and separate scratch output directories:
- Direct invocation: exit 4, reports
cdp-unavailable, and writeslatest.jsonplushistory.jsonl. - Symlinked-file invocation: exit 0, no output, no files.
- Symlinked-directory invocation: exit 0, no output, no files.
The direct result proves main() ran; both symlink paths silently bypass it. bin/proxy-supervise.mjs:884-896 contains the established guarded realpathSync comparison pattern.
Scope correction
This issue should fix only the meta-exporter entry point and its regression coverage. The former repo-wide grep acceptance criterion is not a valid gate for this one-file fix: other entry-point instances belong to separate scopes (including #4325, whose PR #4583 is open and explicitly excludes this meta-exporter, and other remaining files). Do not expand this task into a repository-wide sweep or block this fix on unrelated matches.
A prior canceled task left uncommitted guard and test changes in /home/user/git/fleet/task-5248 on branch queue/5248-2350-meta-exporter-symlink-entry. Preserve that work; the follow-up must inspect it and reconcile it with fresh main rather than discard it or open a competing PR.
Acceptance criteria
- The meta-exporter runs for direct, symlinked-file, and symlinked-directory invocation, using a guarded realpath comparison or equivalent.
- Importing the module as a library still does not run
main(). - Regression coverage verifies direct failure-document behavior, both symlink forms, and inert library import.
- Run
node --test pm-stack/meta-exporter/meta-quota-export.test.mjs. - Keep changes limited to the meta-exporter and its tests; global entry-point inventory is explicitly out of scope.
Related: #2083 (proven fix pattern), #4325 (separate set; explicitly excludes this file), #4694 (separate issue, now closed).
Activity
developing-today commentedon Oct 29, 2026
CODE-1194
dezren39 commentedon Oct 29, 2026
🤖 Agent note · filed
import.meta.url === pathToFileURL(process.argv[1]).href): invoked via a symlinked file or a symlinked directory it silently no-ops with exit 0 — no failure document, defeating the exporter's failure-visibility design. Verified this run (sandbox Node probe, main 5a34fa7, dead CDP port): direct → exit 4 + cdp-unavailable document written; file-symlink → exit 0, out-dir empty; dir-symlink → exit 0, out-dir empty. bin: provider-catalog-sync and record still use the pre-#2083 raw-path entry-point check — invoked via any symlink they silently no-op with exit 0 #2235 covers the two bin/ instances; its grep criterion is scoped to bin/, so this pm-stack instance is separate.48 remaining items
developing-today commentedon Nov 3, 2026
agent-note:v1
state: triaged (coverage pass)
Coverage pass 2026-11-03: reviewed in the fleet-wide per-issue pass (drift / overlap / already-handled / stale / blockers / ordering). Verdict: still live; queued in repo-health-code-pilot as small_fix at priority 50 (priority/normal). If this is already handled at current main, the triage closes it with evidence; if it needs splitting, the triage files the split.
Found via: coverage pass 2026-11-03
dezren39 commentedon Nov 4, 2026
🤖 Agent note · picked up
user/reviewreviewed by me first per protocol: the diff is exactly the issue meta-exporter: meta-quota-export still uses the pre-#2083 raw-path entry-point check — invoked via any symlink it silently no-ops with exit 0 #2350 fix (realpath-based entry-point check inpm-stack/meta-exporter/meta-quota-export.mjs) plus its tests (direct, file-symlink, directory-symlink, and import-inert cases).bf5c66f8:node --test pm-stack/meta-exporter/meta-quota-export.test.mjs— 25 passed, 0 failed. No PR-tier CI exists for this path (the pm-stack workflows run on pushes tomainonly, per the earlier CI coverage note on PR fix(meta-exporter): detect symlinked CLI entry points (#2350) #4838); main-push CI is the post-merge check.dezren39 commentedon Nov 4, 2026
🤖 Agent note · done (superseded)
1d0944333("retire the Meta console-scrape exporter (superseded by quota: gather meta + opendesign by asking OpenCode #5040)", 2026-11-03) deletedpm-stack/meta-exporter/(includingmeta-quota-export.mjs) and its Nix unit frommain, following Drew's 2026-11-03 ruling that quota is gathered by asking the OpenCode quota module (PR quota: gather meta + opendesign by asking OpenCode #5040). Nothing ingests the exporter's output anymore. The fix that had been prepared, PR fix(meta-exporter): detect symlinked CLI entry points (#2350) #4838, was verified sound (targeted tests 25/25 on the laptop, diff matched intent) but is being closed unmerged — merging it would resurrect retired code. Its realpath entry-point pattern already lives onmainin both surviving sibling exporters (cloudflare-quota-export.mjsline 646,supabase-quota-export.mjsline 400), so nothing is lost.1d0944333