Repository navigation
Description
Finding (from PR review)
PR #9341 (merged, feat(pm-stack): decision-set event pipeline — Turso sync + Cloudflare Worker/D1/DO (#9335)) adds the decision-event sync leg. Codex's P2 finding: the sync client acknowledges every pending event after a webhook batch, without checking how many the Worker actually accepted — and the two sides validate timestamps differently, so a real event shape crosses the gap: an outbox event with ts: "2026-11-12" passes the aggregator's isIsoDate validation but is rejected by the Worker's timestamp validator, which requires a T. The Worker returns HTTP 200 with the event in its per-event errors; the client marks it acknowledged anyway, so it is never stored in D1 and never retried — silent event loss.
- Source PR: feat(pm-stack): decision-set event pipeline — Turso sync + Cloudflare Worker/D1/DO (#9335) #9341
- Review comment: feat(pm-stack): decision-set event pipeline — Turso sync + Cloudflare Worker/D1/DO (#9335) #9341 (comment)
- Reviewer:
chatgpt-codex-connector[bot], 2026-11-13T05:34:08Z (P2) - Flagged location:
pm-stack/aggregator/src/decision-events.ts:310at review time; the sync code now lives atpm-stack/aggregator/src/decision-events-sync.ts(renamed in the same PR's reconciliation with Track A)
"The Worker returns HTTP 200 even when individual events fail validation, but this client checks only
insertedand thensyncDecisionEventsmarks every pending event acknowledged. This occurs with the current implementations: an outbox event withts: \"2026-11-12\"passes the aggregator'sisIsoDatevalidation but is rejected by the Worker's timestamp validator, which requiresT. The event is consequently never stored in D1 and never retried. Check the response's acceptance count and per-event errors before advancing acknowledgment state, and align the two validators."
No-response evidence
- The review thread contains only the Codex comment — no replies (verified 2026-11-14 via the PR comments API and a GraphQL
reviewThreadsread:isResolved=false, 1 comment). - PR feat(pm-stack): decision-set event pipeline — Turso sync + Cloudflare Worker/D1/DO (#9335) #9341's only commit after the comment is
66940fb15f(2026-11-13T05:40:26Z), a merge oforigin/maininto the branch — it does not touch the flagged logic. The PR merged at 2026-11-13T05:45:31Z (merge commitaad1d3602a) with the finding unaddressed; the only later main commit touching these files is a treefmt style pass (d451641c31). - Dedupe: open/closed issue searches by comment id, file path, and keywords (fan-out, pagination cursor, outbox-dir, webhook acknowledgement) found no issue covering this finding; parent issue pm-stack decision sets v2: rich questions, event log, submit API + activity webhook/hook #9335 is closed and does not track it.
Still-live evidence (verified 2026-11-14 on current main)
pm-stack/aggregator/src/decision-events-sync.ts:344-347(postDecisionEventsWebhook): on HTTP 200 it checks only thatout.insertedis a number —acceptedanderrorsare never compared against the batch.pm-stack/aggregator/src/decision-events-sync.ts:462(syncDecisionEvents):markAcked(opts.state, leg, pending)acknowledges all pending events for the leg, regardless of per-event rejection.- Validator mismatch intact: aggregator
validateDecisionEvent(line 164) usesisIsoDatefromsrc/validate.ts, which accepts a date-only string; the Worker'sisIsoTimestampinpm-stack/decision-events-worker/src/events.tsreturns false when the value contains noT.
Acceptance criteria
- The webhook leg advances acknowledgment only for events the Worker accepted (compare
accepted/errors, or ack per-event), and rejected events stay pending with the rejection surfaced in the leg report. - The aggregator and Worker timestamp validators accept the same shapes (or the mismatch is otherwise closed), with a test using a date-only
tsevent. - Or: a documented decision on this issue that this loss mode is accepted, with the reasoning recorded.
Activity
dezren39 commentedon Nov 14, 2026
🤖 Agent note · filed
dezren39 commentedon Nov 14, 2026
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 whilerepo-worker-any-aposts progress markers; after 30 minutes of silence any other worker may pick this up.)97 remaining items
dezren39 commentedon Nov 14, 2026
Triage complete (task 16158): confirmed live on
origin/main(d4f6a03c):pm-stack/aggregator/src/decision-events-sync.ts:344-347only checkstypeof out.inserted !== "number"and:462unconditionally callsmarkAcked(opts.state, leg, pending).small_fixtask16162(repo-health:v1:fix:developing-today/code:issue:9613).dezren39 commentedon Nov 14, 2026
Picked up task
16162(lanecode-j,openchamber-scheduled-lane) to fix #9613.dezren39 commentedon Nov 14, 2026
Opened PR #9633 (
queue/16162-9613-decision-events-sync) to fix #9613. Targeted tests pass (bun test test/decision-events.test.ts: 15 pass, 0 fail).Merge pull request #9633 from developing-today/queue/16162-9613-decis…