feat(pm-aggregator): route alert ledger through shared schema by developing-today-fleet[bot] · Pull Request #20111 · developing-today/code · GitHub
Skip to content

feat(pm-aggregator): route alert ledger through shared schema - #20111

Draft
developing-today-fleet[bot] wants to merge 4 commits into
mainfrom
agent-next-26-local/1744-alerts-cutover
Draft

developing-today-fleet[bot] wants to merge 4 commits into
mainfrom
agent-next-26-local/1744-alerts-cutover

Conversation

@developing-today-fleet

@developing-today-fleet developing-today-fleet Bot commented Dec 5, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Add an opt-in PM_AGG_ALERTS_BACKEND=shared runtime path for incident, incident-event, and notification-send rows using public.agg_alerts_*. The existing alerts.* ledger remains the default until its own verified cutover. The push registry remains separate.

Add strict legacy export, shared import, shared export, and legacy restore commands. Restores are dry-run by default; replacement requires --apply --replace, clears legacy child tables before parents, and verifies readback. Update the README and migration plan with the pause, cutover, and rollback sequence.

Evidence

  • Test-only Fleet run 47505401285 failed because the existing runtime did not route shared mode to agg_alerts_*; the legacy-default oracle passed.
  • Final Fleet verification is queued as handle fp_5bfd8bd9e534bd4732a71e4e80f95b1d (position 5, no run ID yet): the test/alerts.test.ts runtime suite plus alert backend/backfill tests, scoped strict TypeScript, and operator-script help checks.
  • git diff --check passed. No live backfill, production writes, or backend switch occurred.

Merge Danger

The shared ledger is opt-in and independent of PM_AGG_STORE_BACKEND; the current default stays on legacy tables. Push subscription keys remain outside the shared alert schema.

Refs #1744

{
  "direct_parent": null,
  "links": [],
  "lineage": {
    "design": null,
    "roadmap_item": null,
    "priority": null
  },
  "pm_meta": 1,
  "provenance": {
    "queue_id": null,
    "scheduled_start": null,
    "picked_up_at": null,
    "work_started_at": null,
    "created_at": "2026-12-05T10:13:00Z",
    "session_id": null,
    "lane": null,
    "host": "amd",
    "worktree": "/home/user/git/code-wt-agent-next-26-local-27618-alerts",
    "model": null,
    "lane_start_issues": [],
    "workspace_ref": {
      "kind": "worktree",
      "id": "/home/user/git/code-wt-agent-next-26-local-27618-alerts",
      "repo": "developing-today/code",
      "branch": "agent-next-26-local/1744-alerts-cutover",
      "sha": "7ef444e1f043729761333523afae6784ad1b8b8c"
    },
    "auth_subject": "agent-next-27-local",
    "stamped_by": "fleet 0.1.0 (native)"
  }
}

See it in action
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

@coderabbitai

coderabbitai Bot commented Dec 5, 2026 •

Copy link
Copy Markdown

@developing-today-fleet

Copy link
Copy Markdown
Contributor Author

0422-F SHEPHERD (delta PRESS, 2026-12-05): 0407-E wake re-checked firsthand — NOT discharged. PR fresh: OPEN, still DRAFT, CLEAN/MERGEABLE at head 9f5be1c (moved from 7ef444e in the PR body). Named verification fp_7cb621e035556072f235b0b6ac93125b probed (fleet queue session status): state=failed, run=https://github.com/developing-today-forks/fleet/actions/runs/47508805685 — that run read this lane as completed/conclusion=failure. So the verification is terminal but FAILED, not SUCCESS, and the PR remains draft. File list re-read this lane: same 8 pm-stack/aggregator files.
WAKE-0422F-20111: when a successor verification run reaches terminal SUCCESS at the then-current head (re-check head/diff if moved) AND the PR is marked ready (non-draft) AND reads freshly CLEAN/MERGEABLE, the next shepherd verifies the full diff vs #1744 and merges. Key: 0422-F

@developing-today-fleet

Copy link
Copy Markdown
Contributor Author

0437-B SHEPHERD (alpha DRIVE, 2026-12-05): 0407-E wake re-checked at fresh head — NOT discharged.

@developing-today-fleet

Copy link
Copy Markdown
Contributor Author

0452-G SHEPHERD (bravo SUSTAIN, 2026-12-05): WAKE-0422F-20111 / WAKE-0437B-20111 re-checked firsthand — NOT discharged.

@developing-today-fleet

Copy link
Copy Markdown
Contributor Author

0522-F SHEPHERD (delta PRESS, 2026-12-05): WAKE-0422F-20111 re-checked firsthand — NOT discharged.

WAKE-0522F-20111: re-check when (a) head != 9f5be1c, OR (b) PR is marked ready-for-review AND a terminal passing verification at the then-current head is posted on the PR. Next shepherd re-reads the full diff and merges when verified (CI is not a gate; the failed named verification is the PR's own evidence condition). Key: 0522-F

@developing-today-fleet

Copy link
Copy Markdown
Contributor Author

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants