Skip to content

pm-stack: sync-decision-events silently ignores an unreadable --outbox-dir (PR #9341 Codex P2) #9615

Closed

Description

@dezren39

Finding (from PR review)

PR #9341 (merged, feat(pm-stack): decision-set event pipeline — Turso sync + Cloudflare Worker/D1/DO (#9335)) adds the sync-decision-events.ts operator script. Codex's P2 finding: a failure to read the explicitly requested --outbox-dir is silently converted into an empty directory. If the supplied directory is unreadable, missing, or a regular file, the script continues with the default outbox file and can exit 0 reporting zero pending — while the requested source was never read at all, leaving its events unsynchronized with no diagnostic.

"If the directory supplied through --outbox-dir is unreadable, missing, or actually a regular file, this catch converts the read failure into an empty directory without any diagnostic. The script then continues with the default outbox and can exit successfully with zero pending events while leaving the requested source completely unsynchronized. Propagate directory-read failures or report them and return a non-zero exit status so operators can distinguish a broken source from an empty outbox."

No-response evidence

Still-live evidence (verified 2026-11-14 on current main)

  • pm-stack/aggregator/scripts/sync-decision-events.ts:107-110: const entries = await readdir(opts.outboxDir).catch(() => [] as string[]); — every read failure becomes an empty listing, with no log line and no effect on the exit status; the run proceeds with the default outbox file only (line 106).

Acceptance criteria

  • An unreadable/missing/non-directory --outbox-dir produces a diagnostic and a non-zero exit (or the failure is propagated), so a broken source is distinguishable from an empty outbox.
  • A regression test (or scripted check) covers the missing-directory and regular-file cases.
  • Or: a documented decision on this issue that this behavior is accepted, with the reasoning recorded.

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
    priority/normalOrdinary priority (the default)
    app/pm-stackpm-stack (Pad/Grist) in developing-today/code
    on Nov 14, 2026
  2. dezren39 commented on Nov 14, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · filed

  3. dezren39 commented on Nov 14, 2026

    @dezren39
    MemberAuthor

    Picked up by repo-worker-any-a — working this now. (Fleet queue fallback mode: the queue backend is down, so this issue's comments carry the claim. The claim stays live while repo-worker-any-a posts progress markers; after 30 minutes of silence any other worker may pick this up.)

  4. added
    queue/claimedQueue worker lifecycle state
    work/assignedQueue worker lifecycle state
    task/small-fixQueue packet kind: bounded fix with reproduction and targeted tests
    and removed
    task/triageQueue packet kind: verify, reproduce, and route this item
    on Nov 14, 2026
  5. 87 remaining items

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

    @dezren39
    MemberAuthor

    agent-note:v1
    worker: repo-worker-code
    lane: code-h
    task_id: 16163
    state: claimed
    note: Picked up small_fix for #9615. Creating worktree and inspecting pm-stack/aggregator/scripts/sync-decision-events.ts.

  8. dezren39 commented on Nov 14, 2026

    @dezren39
    MemberAuthor

    agent-note:v1
    worker: repo-worker-code
    lane: code-h
    task_id: 16163
    state: done
    note: Opened PR #9636 (#9636) failing non-zero on unreadable --outbox-dir with regression tests. bun test: 2 pass, 0 fail.

  9. added a commit that references this issue on Nov 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

app/pm-stackpm-stack (Pad/Grist) in developing-today/codeeffort/sSmall: expected under 2 hours of workkind/bugSomething isn't working (prefixed form of the classic bug label)priority/normalOrdinary priority (the default)source/pr-comment-reviewFiled by the pr-comment-review jobtask/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