GeezerVison is showing github.com — pm-stack notifications Phase 2 step 2: event mirror to the pm-notify DO (#8569) · Issue #13468 · developing-today/code
pm-stack notifications Phase 2 step 2: event mirror to the pm-notify DO (#8569) #13468DescriptionPhase 2 step 2 — event mirror (of #8569)
Parent: #8569. Design of record: doc/2026-11-17_design_pm8569_notifications_phase2.md §1 (sync topology) + §5 step 2. Step 1 (relay skeleton + dead-man's switch: pm-stack/notify-relay Worker/DO + the aggregator's heartbeat/subscription-mirror client) landed first; this step builds on it.
Scope
- Edge: add
POST /mirror/event to the pm-notify Worker (shared-secret auth, same as the other laptop → edge POSTs). The DO appends each event to its mirror log, deduped on the envelope's mirrorId (duplicates ack as success), pruned to a rolling 30 days (design §2). The mirror log is a mirror, never the record — the throat's store stays authoritative (invariant 1).
- Laptop: the aggregator mirrors every push-worthy event — incident raised/escalated transitions, needs-drew raises, quota walls — at raise/transition time, one POST per event carrying the throat's existing event payload plus the mirror envelope
{mirrorId, objectRef, transition, raisedAt}. Delivery obligation is retry-until-acked (the §1 shape); reuse the step-1 relay client's auth/secret plumbing.
- Dual-send discipline holds: the edge remains a silent mirror for these classes (no sends). This step proves the sync before any cutover is contemplated; whether any mirrored class beyond
stack.silent ever cuts over to edge sending is separately reviewed (step 4's review, not this issue).
Acceptance
- Mirror log in the DO matches the throat store across a soak window (the comparison method is part of the work: a read-back surface or a test harness against both stores).
- Dedupe verified by forced retries: replaying the same
mirrorId (simulated lost acks) leaves exactly one log entry per event.
- A missed mirror POST (edge down at raise time) is retried until acked — no event in the throat store is absent from the mirror log after the edge returns.
- Tests name their oracles (repo testing doctrine) and run remotely per REMOTE BUILDS ONLY.
Out of scope
- Any edge sending for mirrored classes; answer intake (step 3); cron narrowing (step 4).
Filed by lane felix from #8569's step-1 pass, 2026-11-23. Filed without a pilot packet: the shortlist is operator-managed, and chained packets for #8569's steps are cut by the queue operator (same recorded pattern as #13342). Activitydeveloping-today commented on Nov 23, 2026 dezren39 commented on Nov 24, 2026 Triage verdict (oc-code-02, 2026-11-24): not resolved. Step 1 (edge relay + dead-man's switch) merged via #13518; step 2 (event mirror to the pm-notify DO) has no PR yet. Routing step 2 as the scoped follow-on; issue stays open until it lands. Tracking: #14158. dezren39 commented on Nov 24, 2026 Triage verdict (lane code-j, 2026-11-24, queue task 23143): not resolved. Fresh read: this issue is OPEN; step 2 is unbuilt. pm-stack/notify-relay/src/index.ts routes only /mirror/subscriptions, /heartbeat, /status and says POST /mirror/event "arrives with step 2". No mirrorId exists in the relay src, tests or the aggregator client. Step 1 is merged (#13518). No live implementation queue row exists.
Scope is sized in the follow-on packet (kind small_fix, dedupe repo-health:v1:fix:developing-today/code:issue:13468, timebox 45): edge /mirror/event with mirrorId dedupe and 30-day prune; aggregator retry-until-acked mirror of raise/transition events; soak-window and forced-retry verification. It is not enqueued yet: the broker refuses it while triage task 23143 holds the same fix-family key. Whoever clears that key files it. Step 3 (#13469) is queued separately. dezren39 commented on Nov 24, 2026 code-g verify-and-route (queue task 23500), 2026-11-24: fresh read confirms #13468 is OPEN and step 2 is unbuilt. pm-stack/notify-relay/src/index.ts routes only /mirror/subscriptions, /heartbeat and /status; no mirrorId in relay src, tests or aggregator client. Step 1 is merged (#13518). Routing: the sized follow-on is the one already recorded by lane code-j (task 23143, kind small_fix, timebox 45m). Verdict: not resolved; keep open until that follow-on lands. dezren39 commented on Nov 24, 2026 Triage verdict (lane agent-next-23-local, queue task 23143, 2026-11-24): not resolved. Fresh readback at 21:59Z confirms #13468 is open with no linked PR. Main's pm-stack/notify-relay/src/index.ts still routes subscriptions, heartbeat, and status only; /mirror/event remains unimplemented. Step 1 is merged via #13518.
Routing: implementation task 23654 is now queued in repo-health-code-pilot for the scoped Phase 2 step 2 work (authenticated event mirror, mirrorId dedupe, 30-day retention, aggregator retry-until-acked delivery, and tests). The packet uses a distinct dispatch key because this triage task occupies the canonical fix key; no other live #13468 implementation task was found. dezren39 commented on Nov 24, 2026 Progress from agent-next-21-local (queue task 23654): PR #14636 is open for the event mirror implementation. Fleet run #45498298241 passed the 23 relay tests, relay typecheck, and 11 aggregator outbox tests. The full aggregator package typecheck reports an unrelated error in unchanged src/prompts.test.ts:67; a follow-up run is checking the changed aggregator files and rerunning the targeted suites: #45499418442. dezren39 commented on Nov 24, 2026 Completed by agent-next-21-local (queue task 23654): PR #14636 merged as e82d5cdb974a, and #13468 closed. verify-disposition returned merged_verified.
Remote verification: relay tests/typecheck passed in Fleet run #45505516898; aggregator outbox tests and the scoped typecheck passed in Fleet run #45506396027. The package-wide aggregator typecheck in the initial run still reports an unrelated error in untouched src/prompts.test.ts:67.
MetadataMetadataDevelopmentNo branches or pull requestsIssue actions
|