GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — 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) · Issue #5099 · developing-today/code

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

New issue
Copy link
New issue
Copy link
Closed
#5184
Closed
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
#5184
Copy link
Assignees
dezren39
Labels
app/pm-stackpm-stack (Pad/Grist) in developing-today/codeeffort/xsTrivial: expected under 30 minutes of workkind/bugSomething isn't working (prefixed form of the classic bug label)priority/normalOrdinary priority (the default)task/small-fixQueue packet kind: bounded fix with reproduction and targeted tests

Description

@dezren39
dezren39
opened on Nov 3, 2026
Issue body actions

Summary

pm-stack/opencode-usage-export/opencode-usage-export.mjs:383 still uses the pre-#2083 raw-path entry-point check:

if (process.argv[1] && import.meta.url === pathToFileURL(process.argv[1]).href) {
  const { exitCode, doc } = await run({ argv: process.argv.slice(2) });
  ...
}

This is the same bug class as #2083 / #2235 / #2350. process.argv[1] is the path as invoked; import.meta.url is the resolved module URL. Through a file symlink or a path through a symlinked directory (the fleet's own ~/code -> ~/git/code alias), they never match, so the CLI body never runs and the process exits 0 with no output and no files written.

It survived #4325 because that issue scoped itself to four named files (codedb bridge, Supabase and Cloudflare exporters, claimant installer). #4325 has since been fixed and closed by PR #4583 (merge b7d274c08), whose own acceptance grep therefore does not hold repo-wide: this instance is the only raw compare left in the repo after that merge.

Evidence (origin/main b7d274c08, laptop, 2026-11-03)

git grep -nE "pathToFileURL\(process\.argv\[1\]\)|resolve\(process\.argv\[1\]\)" origin/main returns exactly one hit:

origin/main:pm-stack/opencode-usage-export/opencode-usage-export.mjs:383

Live probe with a scratch HOME and --out-dir (no credentials needed):

  • Direct: node pm-stack/opencode-usage-export/opencode-usage-export.mjs --out-dir <scratch> → exit 3, stdout {"status":"store-missing","exitCode":3}, failure document written (latest.json, history.jsonl).
  • Via a file symlink: exit 0, no stdout, no stderr, out-dir empty.
  • Via a symlinked directory: exit 0, no stdout, no stderr, out-dir empty.

So the exporter's failure-visibility design (always write a store-missing / no-token document so consumers can tell "source down" from a reading) is defeated by symlinked invocation: a timer tick through a symlink leaves latest.json silently stale and the unit green.

Acceptance criteria

  • The entry-point check compares real paths (fs.realpathSync on both sides, as in bin/proxy-supervise.mjs and now the four files fixed by fix: handle symlinked entry points (#4325) #4583), or an equivalent. Do not use the raw-path compare.
  • Direct, file-symlink and directory-symlink invocations all run main() and write the same store-missing document with exit 3 in the no-store case.
  • Importing the module as a library still does not run main() (its test suite at pm-stack/opencode-usage-export/opencode-usage-export.test.mjs does this).
  • A regression test covers file-symlink and directory-symlink invocation plus inert import, so the check cannot regress again.
  • git grep -nE "pathToFileURL\(process\.argv\[1\]\)|resolve\(process\.argv\[1\]\)" on the fix branch is empty (meta-exporter instance, if it reappears, is 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, not this issue).

Related: #4325 + PR #4583 (the four sibling files, merged), #2083, #2235, #2350.

Merge Danger

Door: one-way. Blast Radius: narrow — entry-point detection only; imported-module behavior unchanged. No credential or token path is touched.

Found by repo-health queue triage task 8376 (openchamber scheduled lane).

Activity

Next
  1. dezren39
    added
    kind/bugSomething isn't working (prefixed form of the classic bug label)
    task/small-fixQueue packet kind: bounded fix with reproduction and targeted tests
    status/needs-triageNot yet triaged; needs a first look
    priority/normalOrdinary priority (the default)
    queue/queuedHas a queued queue task
    effort/xsTrivial: expected under 30 minutes of work
    app/pm-stackpm-stack (Pad/Grist) in developing-today/code
    on Nov 3, 2026
  2. dezren39 commented on Nov 3, 2026

    @dezren39
    dezren39
    on Nov 3, 2026
    MemberAuthor
    More actions

    agent-note:v1
    state: filed
    task: 8376 (repo-health-code-pilot, lane c8b9355e-319a-4640-8096-7ad19480d151)
    found via: triage of #4325 — its four-file scope left this instance behind; PR #4583 merged as b7d274c and closed #4325, and the issue's acceptance grep then still returned exactly this file.
    next: enqueued task 8765 (small_fix, repo-health-code-pilot) with pinned scope — realpathSync entry guard, file/directory symlink + inert-import regression tests, repo-wide grep clean.

  3. github-actions
    assigned
    dezren39
    on Nov 3, 2026
  4. dezren39
    added
    work/assignedQueue worker lifecycle state
    queue/claimedQueue worker lifecycle state
    status/in-progressQueue worker lifecycle state
    and removed
    status/needs-triageNot yet triaged; needs a first look
    queue/queuedHas a queued queue task
    on Nov 3, 2026
  5. dezren39 commented on Nov 3, 2026

    @dezren39
    dezren39
    on Nov 3, 2026
    MemberAuthor
    More actions

    agent-note:v1
    event: picked-up
    task: 8765 (repo-health-code-pilot; worker repo-worker-code; lane bf419306-c4ef-470f-a553-beabf93239de)
    state: claimed; revalidated
    verified: Fresh GitHub checks show #5099 OPEN; PR #4583 is MERGED at b7d274c; no PR currently matches #5099. No hard-stop labels are present. No competing PR or branch owner found in GitHub state.
    next: inspect/resume task worktree if present, otherwise fast-forward ~/git/code main and create ~/git/fleet/task-8765 on branch queue/8765-5099-usage-export-realpath; reproduce, fix the entry guard, add symlink/inert-import regression tests, then run the targeted test and repo-wide grep.
    expectation: effort/xs; complete with fresh issue/PR state and tests recorded.

  6. 3 remaining items

  7. dezren39 commented on Nov 3, 2026

    @dezren39
    dezren39
    on Nov 3, 2026
    MemberAuthor
    More actions

    agent-note:v1
    event: done
    task: 8765 (repo-health-code-pilot; worker repo-worker-code; lane bf419306-c4ef-470f-a553-beabf93239de)
    state: PR opened; queue task complete
    result: PR #5184 is OPEN from queue/8765-5099-usage-export-realpath at ef3ed8c. Replaced the raw-path entry-point check with realpathSync and added direct/file-symlink/directory-symlink execution plus inert-import regression coverage.
    verified: node --test pm-stack/opencode-usage-export/opencode-usage-export.test.mjs — 6 passed, 0 failed; repository-wide raw argv-path guard grep clean; git diff --check passed. Fresh PR state is OPEN; checks have not reported yet. Issue #5099 stays open for PR #5184 to close on merge.
    labels: removed the queue/claimed, status/in-progress and work/assigned labels set for this claim.

  8. developing-today commented on Nov 8, 2026

    @developing-today
    developing-todayBot
    on Nov 8, 2026 – with developing.today
    Contributor
    More actions

    🤖 Agent note · handed off

    • Agent: repo queue worker, lane code-q (repo-worker-code)
    • Session / ID: cron repo-queue-worker-shift-q run 2026-11-07; task 12202
    • Found via: claimed task 12202 this shift; execution-lane assignment returned opencode
    • Task: task 12202 for issue 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 (triage). Fresh check: issue 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 is OPEN, no hard-stop labels (held / user/owned / do-not-merge / do-not-auto-edit). Handed off to the opencode claimant — the claimant launches the bound opencode session; this lane does not work it directly.
    • Expectation: claimant session drives task 12202 to a terminal state.
    • Links: task 12202 · issue 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
  9. developing-today
    added
    queue/claimedQueue worker lifecycle state
    status/in-progressQueue worker lifecycle state
    work/assignedQueue worker lifecycle state
    queue/parkedQueue task is parked (waiting on CI, time, or an event)
    status/parkedDeliberately paused with a recorded resume condition
    and removed
    queue/claimedQueue worker lifecycle state
    status/in-progressQueue worker lifecycle state
    on Nov 8, 2026
  10. dezren39 commented on Nov 8, 2026

    @dezren39
    dezren39
    on Nov 8, 2026
    MemberAuthor
    More actions

    Partial verification — staying open (2026-11-07 done-task-only audit, tracking: #7016).

    Queue task(s) [8765] were marked done, and some work did land:

    • PR fix(id/worker-poc): #6358 realpath entry-point guard for isolate-runner standalone mode #6361 — fix(id/worker-poc): id(worker-poc): isolate-runner.mjs entry-point check is a raw template-literal compare — symlinked standalone invocation silently emits nothing at exit 0 (the spelling #5099's closure grep misses) #6358 realpath entry-point guard for isolate-runner standalone mode (merged 2026-11-05T18:53:04Z): fix(id/worker-poc): #6358 realpath entry-point guard for isolate-runner standalone mode #6361

    No merged change closes this issue's full scope, so the done status is not treated as completion. Remainder re-queued as triage task 11710.

  11. dezren39
    closed this as completedin #5184on Nov 8, 2026
  12. dezren39
    removed
    status/parkedDeliberately paused with a recorded resume condition
    queue/parkedQueue task is parked (waiting on CI, time, or an event)
    work/assignedQueue worker lifecycle state
    on Nov 8, 2026
  13. dezren39 commented on Nov 8, 2026

    @dezren39
    dezren39
    on Nov 8, 2026
    MemberAuthor
    More actions

    agent-note:v1
    event: done
    task: 12202 (repo-health-code-pilot; worker repo-worker-code; lane 262eb403-3347-4a7c-ba6b-e7bc263ca853; origin openchamber-scheduled-lane)
    state: triaged; remainder already implemented; PR merged; issue closed
    verdict: The "remainder" named in this task was mis-identified. The audit credited PR #6361 (id/worker-poc isolate-runner), which is unrelated to this issue. The actual fix was already authored under the original task 8765 as PR #5184, open and unmerged since 2026-11-04. No new code was written; the standing merge criteria were applied to that PR.
    verified before merge (fresh, 2026-11-08):

    • Bug still present on origin/main 6d14ebc: opencode-usage-export.mjs:431 still used the raw compare import.meta.url === pathToFileURL(process.argv[1]).href.
    • PR fix(pm-stack): handle symlinked usage-export entry points #5184 (head ef3ed8c) replaces it with a realpathSync comparison of both sides; 2 files, +68/-5.
    • Merged cleanly onto current main in a scratch worktree (auto-merge, no conflicts).
    • node --test pm-stack/opencode-usage-export/opencode-usage-export.test.mjs -> 12 passed, 0 failed, including the direct/file-symlink/directory-symlink CLI test and the inert-import test.
    • Live probe with scratch HOME and --out-dir: direct, file-symlink and directory-symlink invocations all exit 3 and write the same store-missing document (latest.json + history.jsonl).
    • Acceptance grep pathToFileURL(process.argv[1])|resolve(process.argv[1]) on the merged result is empty (the remaining meta-exporter/meta-quota-export.test.mjs:252 hit is a comment and belongs to 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, as the issue itself says).
      result: PR fix(pm-stack): handle symlinked usage-export entry points #5184 MERGED as aa167d3; issue 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 auto-closed on merge. origin/main verified at aa167d3 with the acceptance grep clean.
      labels: removed queue/parked, status/parked and work/assigned left over from the earlier claim; content labels untouched.
      next: none — issue fully satisfied by merged work.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @dezren39
    dezren39

Labels

app/pm-stackpm-stack (Pad/Grist) in developing-today/codeeffort/xsTrivial: expected under 30 minutes of workkind/bugSomething isn't working (prefixed form of the classic bug label)priority/normalOrdinary priority (the default)task/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

    You are visitor 01402775 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.