Skip to content

design(pm-stack): event-driven freshness — replace the 5-minute polling feed with push (webhooks + SSE/WebSocket), polling as reconciliation only #1252

Open

Description

@dezren39

Part of epic #1184 (PM stack coherence — ideal-system design series, 2026-10-26).

Why

Today the aggregator learns about the world from a fleet feed a sandbox collector republishes roughly every 5 minutes, and a stale feed renders indefinitely — freshness is bounded by the poll, and failures are silent until someone notices. An ideal stack is event-driven: GitHub webhooks and local service events push state changes to the aggregator, which pushes them to open browsers in seconds; polling survives only as a reconciliation backstop that proves the push path hasn't missed anything.

Design questions to answer

  • Which event sources are in scope v1 (GitHub webhooks via the existing App/tunnel, Kaneo webhooks, collector-local events, orchestration publishes) and what is the delivery path for each?
  • Transport to the browser: SSE vs WebSocket, per-page subscriptions, and how the machine-first JSON twins expose the same stream?
  • Ordering, dedupe, and replay: how does a reconnecting client catch up, and how does reconciliation detect a missed event?
  • Failure posture: when push is down, how is that surfaced (health page, freshness chips) and what poll interval is the fallback?
  • Auth: how are webhook signatures and browser subscriptions authenticated under the single-URL/Access model (design(pm-stack): one public URL for the dashboard behind Cloudflare Access (settled access model, not yet implemented) #1182)?

Acceptance

Acceptance criteria

Activity

  1. added
    kind/featureNew feature or capability request
    app/pm-stackpm-stack (Pad/Grist) in developing-today/code
    on Oct 27, 2026
  2. developing-today commented on Oct 27, 2026

    @developing-today
    Contributor
  3. added
    priority/normalOrdinary priority (the default)
    effort/mMedium: expected under 1 day of work
    source/humanFiled directly by a human
    meta/enrichedIntake review done: acceptance criteria, links, and normalized labels added
    on Oct 28, 2026
  4. dezren39 commented on Oct 28, 2026

    @dezren39
    MemberAuthor

    Intake review

    Related: epic #1184 (parent) · #1182 (Access model — webhook and subscription auth answers depend on it) · #1110 (the orchestration-section rejection, part of the freshness-honesty problem this redesigns).

    Notes: Still live — verified this run: no merged PR introduces webhooks/SSE freshness; merged-PR searches return only unrelated number coincidences. The issue arrived with a ## Acceptance section; the appended ## Acceptance criteria formalizes it. effort/m for the design pass (implementation is separate follow-up work).

    Risks / suggested approach: Design-only deliverable in this issue: the acceptance bar is the landed design note plus filed, linked implementation issues — per the standing rule, a design with no implementation link is not finished work. The reconciliation design is the load-bearing part — push without a missed-event detector recreates today's silent-staleness failure with better latency.

    — repo-fleet-monitor intake pass, 2026-10-28T03:55Z

  5. added
    work/assignedQueue worker lifecycle state
    queue/claimedQueue worker lifecycle state
    and removed on Nov 1, 2026
  6. 16 remaining items

  7. dezren39 commented on Nov 3, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · picked up

  8. dezren39 commented on Nov 3, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · done — triage verdict: CONFIRMED, resumed via requeued task 4942 (already picked up by a sibling lane)

    Findings

    • The cancellation was correct, and the resume is exact. Task 4942's packet required native sub-issue links under epic(dashboard): PM stack coherence - single-URL, fresh data, triage-able, hierarchical #1184, which GitHub rejects (HTTP 422, 100-child cap) — defective premise. Its last_error preserved the full blocker detail, and the 17 KB design draft plus branch queue/4942-1252-event-driven-freshness survived intact in laptop worktree ~/git/fleet/4942.
    • The gap is still live at HEAD. pm-stack/aggregator/src/feed.ts renders the feed as-is with age stated in provenance; no event ingestion path into the aggregator. No design note landed in doc/; no PR was ever opened from the 4942 branch.
    • The Drew decision is still outstanding. epic(dashboard): PM stack coherence - single-URL, fresh data, triage-able, hierarchical #1184 remains at the cap, so the alternate-parent-vs-restructuring choice is still Drew's (user/escalated stays).
    • No duplicate follow-up. Re-enqueueing with the same dedupe key requeued task 4942 with a corrected packet (Drew gate first; park/block escalated-to-user if undecided; never move epic children, never retry the 422 add). A sibling lane claimed it within seconds — that lane owns it now.

    Route

    Resume-from-implementation_complete small-fix, gated on Drew's hierarchy decision. Task 6834 completes as triaged with follow_up_task_ids=[4942]. Labels synced to mirror the live claimed follow-up + the open escalation.

  9. added
    queue/claimedQueue worker lifecycle state
    work/assignedQueue worker lifecycle state
    and removed
    status/blockedQueue or user escalation state
    queue/blockedQueue or user escalation state
    on Nov 3, 2026
  10. dezren39 commented on Nov 3, 2026

    @dezren39
    MemberAuthor

    agent-note:v1
    event: picked_up
    task: 4942 (repo-health-code-pilot; worker repo-worker-code; OpenChamber scheduled lane 335a5d1f-bfc1-4831-99ea-850c8939a727)
    state: claimed; resuming from saved implementation_complete checkpoint.
    verified: #1252 OPEN; #1184 remains at 100 native sub-issues. Fresh comments contain no hierarchy decision from Drew; #1252 is still marked user/escalated. Existing branch queue/4942-1252-event-driven-freshness and worktree /home/user/git/fleet/4942 remain untouched, with only the saved untracked design-note directory.
    next: block escalated-to-user pending Drew deciding alternate parent vs authorizing restructuring; do not move children or retry the 422 add.

  11. added
    queue/blockedQueue or user escalation state
    status/blockedQueue or user escalation state
    and removed
    queue/claimedQueue worker lifecycle state
    work/assignedQueue worker lifecycle state
    on Nov 3, 2026
  12. dezren39 commented on Nov 3, 2026

    @dezren39
    MemberAuthor

    agent-note:v1
    event: blocked
    task: 4942 (repo-health-code-pilot; worker repo-worker-code; OpenChamber scheduled lane 335a5d1f-bfc1-4831-99ea-850c8939a727)
    state: blocked; reason_class=escalated-to-user.
    verified: #1252 remains OPEN and user/escalated. Epic #1184 currently has exactly 100 native sub-issues; prior adds for #3976-#3978 returned HTTP 422. No hierarchy decision from Drew is present in the fresh issue history.
    Drew decision required: choose an alternate parent/hierarchy for #3976-#3978, or explicitly authorize restructuring an existing child relationship under #1184 to free a slot. Do not move children or retry the 422 add.
    resume: after Drew records the hierarchy decision, resume from implementation_complete in branch queue/4942-1252-event-driven-freshness, worktree /home/user/git/fleet/4942; revalidate fresh. Saved draft left untouched.
    labels: queue/blocked + status/blocked; user/escalated retained.

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/mMedium: expected under 1 day of workkind/featureNew feature or capability requestmeta/enrichedIntake review done: acceptance criteria, links, and normalized labels addedpriority/normalOrdinary priority (the default)queue/blockedQueue or user escalation statequeue/queuedHas a queued task in the Supabase agent queuesource/humanFiled directly by a humanstatus/blockedQueue or user escalation stateuser/escalatedQueue or user escalation state

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions