GeezerVison is showing github.com — impl(pm-stack): publish durable freshness invalidations from verified sources · Issue #3977 · developing-today/code
impl(pm-stack): publish durable freshness invalidations from verified sources #3977DescriptionPart of epic #1184; design #1252. Design record: doc/2026-11-01T21-05-00Z_design_event_driven_freshness/2026-11-01T21-05-00Z_design_event_driven_freshness.md.
Implement the design's bounded freshness-invalidation outbox/journal and source publisher hooks. Reuse the GitHub receiver and coordinate with #3321's source adapters; do not add a second webhook receiver or duplicate the audit/activity river in #1739/#1261. The invalidation is only a hint to reread canonical source APIs, not an activity record or copied source payload.
Scope:
- Emit only after verified/durable GitHub and Kaneo source acceptance; reuse stable provider IDs where available and dedupe retries.
- Add post-atomic-publish notices for the laptop fleet-feed collector and orchestration snapshot publisher, with source generation/hash keys.
- Persist a bounded replay cursor and retryable outbox; never acknowledge a source delivery before durable acceptance. Keep secrets and raw webhook bodies out of the journal.
- Keep local publishers on same-user IPC or loopback; external routes remain gated by the design(pm-stack): one public URL for the dashboard behind Cloudflare Access (settled access model, not yet implemented) #1182 decision.
Acceptance:
- A versioned invalidation envelope has a monotonic sequence, stable idempotency key, source, affected scope, source time when known, observed time, and reason.
- Duplicate/retried deliveries create at most one effective invalidation; source ordering does not overwrite current canonical state.
- GitHub/Kaneo adapters, local collector, and orchestration publishers emit only after their source writes succeed; failures preserve retry/reconciliation state.
- Tests cover duplicate delivery, invalid signature, event-write failure/retry, collector generation/hash dedupe, and no sensitive payload in the journal.
- The implementation uses impl(aggregator): source coverage and gap-aware activity ingestion #3321's source adapter contract where available and documents any remaining source gap; no second audit stream is created.
Drew's #1182 go is required before enabling external production webhook routes or configuring live webhook secrets. Activitydezren39 commented on Nov 1, 2026 🤖 Agent note · state: filed / parent-link blocked
- Agent: queue worker (repo-worker-code), OpenChamber scheduled lane
- Session / ID: OpenCode session
ses_e5e671686ccffeQbtUrJqbsWZM, design task 4942
- Handoff: Replayable freshness SSE and JSON twin from design design(pm-stack): event-driven freshness — replace the 5-minute polling feed with push (webhooks + SSE/WebSocket), polling as reconciliation only #1252; intended under epic epic(dashboard): PM stack coherence - single-URL, fresh data, triage-able, hierarchical #1184.
- Blocker: GitHub rejects native child linkage because epic(dashboard): PM stack coherence - single-URL, fresh data, triage-able, hierarchical #1184 has 100 sub-issues (HTTP 422). The body references design(pm-stack): event-driven freshness — replace the 5-minute polling feed with push (webhooks + SSE/WebSocket), polling as reconciliation only #1252/epic(dashboard): PM stack coherence - single-URL, fresh data, triage-able, hierarchical #1184, but this issue is not yet a native child. No existing child was moved; resume linkage after Drew selects the hierarchy.
developing-today commented on Nov 3, 2026 agent-note:v1
state: triaged (coverage pass)
Coverage pass 2026-11-03: reviewed in the fleet-wide per-issue pass (drift / overlap / already-handled / stale / blockers / ordering). Verdict: still live; queued in repo-health-code-pilot as triage at priority 40 (priority/normal). If this is already handled at current main, the triage closes it with evidence; if it needs splitting, the triage files the split.
Found via: coverage pass 2026-11-03 dezren39 commented on Nov 8, 2026 🤖 Agent note · handed off
developing-today commented on Nov 8, 2026 🤖 Agent note · handed off
dezren39 commented on Nov 8, 2026 Triage verdict — REAL, in-repo scope delivered; one remainder already tracked (#5715)
🤖 Agent note · triaged / done
- Agent: queue worker (repo-worker-code) — OpenChamber scheduled lane
- Session / ID: task 12668 · lane 7b47536b-c162-444c-be8a-3a9538cc4cb5 (attempt 3/3 — previous lanes handed it off; this run triaged it)
- Found via: queue claim
Verdict: the acceptance is delivered in-repo by merged PR #5720; the one deferred producer is a separate open packet (#5715), so there is nothing to re-file here.
Evidence (fresh 2026-11-08, main @ 165b652488)
| Acceptance item |
Where it lives on main |
| Versioned envelope: monotonic sequence, stable idempotency key, source, scope, source time, observed time, reason |
pm-stack/aggregator/src/freshness.ts — FreshnessNotice (schemaVersion: 1, sequence, eventId, source, scope, occurredAt, observedAt, reason) with exact-shape validation that rejects extra/secret/body fields |
| At most one effective invalidation per duplicate/retried delivery |
freshness.test.ts — "assigns increasing sequences, deduplicates stable event ids, and serializes concurrent publishes" |
| Bounded replay cursor + retryable outbox; never acknowledge before durable acceptance |
freshness.ts journal (version, cursor, events, MAX_NOTICES/MAX_OUTBOX_ENTRIES/RETENTION_MS) + freshness-ipc.ts bounded POST; tests cover journal-write failure queueing, late recovery, cursor reset on retention eviction, restart recovery, and fail-closed on a corrupt journal |
| GitHub and Kaneo emit only after durable writes |
GitHub: pm-stack/projector/src/server.ts publishFreshness after applyEvent returns wrote (dedupe by github:<deliveryId>, ordering comment explains why it precedes recordDelivery). Kaneo: pm-stack/aggregator/src/sources/live.ts emitting source: "kaneo", asserted in activity-live-3321.test.ts |
| Local collector emits after atomic replacement, with generation/hash key |
pm-stack/aggregator/scripts/collect-fleet-feed.ts publishFleetFeedWithInvalidation(outPath, bytes, feed.generatedAt, …); covered by collect-fleet-feed-publication.test.ts |
| No sensitive payload in the journal |
freshness.test.ts — "rejects extra payload, secret, and body fields without writing them" |
| Reuses #3321's source adapter contract |
Kaneo/Fleet-feed notices are produced inside the #3321 live-source path (sources/live.ts), not a second adapter or a second audit stream |
Merge: PR #5720 feat(pm-stack): publish durable freshness invalidations (merged 2026-11-05), commit 21ecb0b41c.
The remainder, and why it is not a new packet
PR #5720's own body records the gap: "Keeps the orchestration-pass producer outside this repository; owner-specific follow-up is tracked in #5715". That follow-up exists and is open with its own blocker: #5715 feat(pm-stack): publish freshness notices from orchestration-pass after durable commits (also tied to the #2155 retirement of the hourly pass). The freshness journal already declares the orchestration source, so that producer needs no change here — it needs the pass to publish, which is #5715's scope.
Filing another packet would duplicate #5715; that is exactly the done-task-only churn this issue keeps collecting. Closing with the remainder cross-referenced.
Decision
Closing as delivered; #5715 carries the only remaining work. Reopen only if a specific acceptance item above is shown not to hold.
dezren39 commented on Nov 13, 2026
Link from #5715 (task 15877, lane any-b, 2026-11-13): the orchestration-pass producer for this issue's seam is built and re-verified — publish_freshness.py in the keep-the-four-repos-healthy goal workspace, 6/6 tests passing, envelope re-checked field-for-field against the merged freshness-ipc.ts/freshness.ts contract on current main (202 accept, 503 safe-retry, eventId dedupe). One step remains: inserting the emit step (step 2c, text recorded verbatim on #5715) into the live orchestration-pass schedule and verifying the next hourly run's journal. Task 15877 is parked on that integration step.
MetadataMetadataDevelopmentNo branches or pull requestsIssue actions
|