Skip to content

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

Closed

Description

@dezren39

What

pm-stack/meta-exporter/meta-quota-export.mjs:624 (landed today in #6333, the re-home of the retired Meta exporter) guards main() with the pre-#2083 raw-path entry-point check:

if (process.argv[1] && import.meta.url === pathToFileURL(process.argv[1]).href) {
  await main();
}

Invoked through any symlink (a symlinked file, or a path through a symlinked directory), the raw process.argv[1] string never equals import.meta.url, main() is skipped, and Node exits 0 with no output and no files written — a silent no-op that looks like a successful export.

This is the exact bug #2350 reported, fixed, and closed for this same file before the exporter was retired in 1d0944333f ("retire the Meta console-scrape exporter"). The re-homed copy in #6333 (commit b4cf60a2db) carries the old guard again. The sibling exporters kept the fix: pm-stack/supabase-export/supabase-quota-export.mjs:403 and pm-stack/cloudflare-export/cloudflare-quota-export.mjs:649 both use the established guarded form fs.realpathSync(process.argv[1]) === fs.realpathSync(fileURLToPath(import.meta.url)) (pattern also at bin/proxy-supervise.mjs:892). Meta is now the only exporter with the raw-path form.

Verified this run (laptop primary @560febee0d, HEAD == origin/main)

Probe: ~/git/fleet/probe-meta-entry/ on the laptop, real exporter, --cdp-port 1 (loopback-refused, so a run must produce the cdp-unavailable failure document):

Invocation Result
node pm-stack/meta-exporter/meta-quota-export.mjs --cdp-port 1 --out-dir <scratch>/out-direct exit 4, stderr meta-quota-export: cdp-unavailable: CDP http://127.0.0.1:1/json/list unreachable, wrote latest.json + history.jsonl
node <symlink-to-the-same-file> --cdp-port 1 --out-dir <scratch>/out-symlink exit 0, no output, output directory empty — main() never ran

The direct run proves the exporter works; the symlinked run proves the guard silently swallows it. (The installed systemd path is not affected today — install-laptop.sh copies the file to ~/atlas/meta-quota-export/ and the unit runs that real path — but any symlinked invocation, e.g. a ~/bin link or a checkout reached through a symlinked directory, silently produces no export and no failure document, which for a quota exporter means the gatherer reads stale data with no error anywhere.)

Why it matters

A quota exporter that exits 0 while doing nothing is the worst failure shape for this subsystem: no failure document, no log line, and downstream consumers (pm-dashboard backup requires meta-quota-export/latest.json + history.jsonl, nixos/home/pm-dashboard-backup.sh:341-342) see only staleness. #2350 already established both the bug and the house fix; the re-home regressed it.

Acceptance criteria

Dedup

Activity

  1. added
    kind/bugSomething isn't working (prefixed form of the classic bug label)
    task/triageQueue packet kind: verify, reproduce, and route this item
    on Nov 5, 2026
  2. developing-today commented on Nov 5, 2026

    @developing-today
    Contributor
  3. added
    source/creatorFiled by the new-issue-creator job
    priority/normalOrdinary priority (the default)
    app/pm-stackpm-stack (Pad/Grist) in developing-today/code
    on Nov 5, 2026
  4. dezren39 commented on Nov 5, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · filed

  5. added
    work/assignedQueue worker lifecycle state
    queue/claimedQueue worker lifecycle state
    and removed on Nov 5, 2026
  6. dezren39 commented on Nov 5, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · picked up

  7. 16 remaining items

  8. added
    status/parkedDeliberately paused with a recorded resume condition
    queue/claimedQueue worker lifecycle state
    and removed
    queue/claimedQueue worker lifecycle state
    on Nov 5, 2026
  9. added a commit that references this issue on Nov 5, 2026
  10. dezren39 commented on Nov 5, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · done

  11. removed
    status/parkedDeliberately paused with a recorded resume condition
    queue/claimedQueue worker lifecycle state
    queue/parkedQueue task is parked (waiting on CI, time, or an event)
    work/assignedQueue worker lifecycle state
    on Nov 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    app/pm-stackpm-stack (Pad/Grist) in developing-today/codekind/bugSomething isn't working (prefixed form of the classic bug label)priority/normalOrdinary priority (the default)source/creatorFiled by the new-issue-creator jobstatus:donetask/small-fixQueue packet kind: bounded fix with reproduction and targeted tests

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions