GeezerVison is showing github.com — pm-stack notifications: section-risk push class — alert only when a whole route section (workhorse/speed/specialist/summit/small) fails or is at severe risk, compact walled + pending-wall pools with soonest resets · Issue #8882 · developing-today/code
pm-stack notifications: section-risk push class — alert only when a whole route section (workhorse/speed/specialist/summit/small) fails or is at severe risk, compact walled + pending-wall pools with soonest resets #8882Descriptionpm-stack notifications: section-risk class — phone push only when a whole route section fails or is at severe risk, with the pending-wall pools shown compactly
Drew's order, 2026-11-12 ~01:58 CST (verbatim): "update push on phone add a option that shows pools that are pending wall, only alert me when each major section of workhorse speed specialist summit or small fail or severe risk and in that scenario show compact what is failed or at risk which are walled and soonest related resets"
What exists today
- Six notification classes in
pm-stack/aggregator/src/notifications.ts (NOTIFICATION_CLASS_DEFAULTS / NOTIFICATION_CLASSES), toggled per subscription on /alerts/preferences. Quota alerting is per-pool: quota-wall (pool walled well before reset, or sole-door pool walled) and quota-near-wall (sole-door pool ≥85%).
buildNotificationCandidates derives quota candidates from the quota snapshot with the wall test already in code: pool walled = state === "walled" or any measured window ≥100%; pools in error/stale/lapsed state are skipped (never derive from retained windows).
src/aa.ts already reads the deployed OpenCode config's experimental.model_routes and computes route leaf sets (routeLeafSets) — the section→door mapping source.
- Design context:
pm-stack-notifications-design-2026-11-11.md (keep-the-four-repos-healthy goal files); Phase 1 producers landed under pm-stack notifications Phase 1: wire the missing producers — queue escalations + stack-health into the throat, fix subscription class backfill, answerable needs-drew pushes #8568 (closed).
The new option
A seventh notification class, id section-risk, label "Section failure / severe risk", blurb: "A whole route section (workhorse, speed, specialist, summit, small) fails or is at severe risk. Shows the pools pending wall, which are walled, and the soonest resets." Default ON for new subscriptions, and added to the preferences page like the other classes (same NOTIFICATION_CLASSES mechanism, test-send support included).
Definitions (v1, measured windows only — no pace projection)
- Major sections: exactly the route names Drew listed —
workhorse, speed, specialist, summit, small. (Scout is deliberately NOT in the list; Drew's 2026-11-12 list omits it. Variants like small-100k roll up under small only if the config's leaf analysis says they share its doors — otherwise they are out of scope for v1; record the choice in the PR.)
- Section membership: the pools serving a section = quota pools whose provider door appears in the section's route leaf set (reuse
aa.ts routeLeafSets over the deployed config; join to pools on the same provider/credential keys the quota view already uses — pin the exact join in the PR and unit-test it).
- Pool walled: the existing test (state
walled or any measured window ≥100%). Pools in error/stale/lapsed state do not count as serving.
- Pool pending wall: not walled, and any measured window ≥85% (the existing near-wall threshold).
- Section FAILED: at least one serving pool exists and every serving pool is walled.
- Section SEVERE RISK: not failed, and every non-walled serving pool is pending wall — i.e. no serving pool has all windows <85%; the section's remaining headroom sits entirely in pools about to wall.
Candidate + delivery rules
- One candidate per section per state, objectRef
section:<name>, derived in buildNotificationCandidates alongside the quota loop; existing dedupe/cooldown/fingerprint machinery applies unchanged (state fingerprint must change when the walled/pending membership or the soonest reset changes materially).
- FAILED is a breakthrough (bypasses quiet hours and digest), like a sole-door wall. SEVERE RISK is not a breakthrough.
- When a section leaves FAILED, emit the recovery through the same disappearance/recovery semantics the engine already has for quota states (a state that disappears cancels its pending digest entry); do not invent a second recovery mechanism.
- Landing URL:
/quota.
Compact push format (this is the point of the feature — keep it short)
Title: Section failed: workhorse / Section at risk: summit
Body, one line per affected section, soonest reset first within the section:
walled: openai-plan (resets Fri 14:28Z), cline-pass (resets Sun 06:52Z) · pending: go-drewrypope 97% (resets Mon 11:04Z)
- FAILED sections list their walled pools, each with its soonest reset (the exhausted window's reset /
wallLiftsAt, same computation as the existing quota-wall candidate).
- SEVERE RISK sections list their pending-wall pools with the window percent and that window's reset.
- No prose paragraphs, no pool that is neither walled nor pending in the affected section.
Subscription flip (part of the same change, after the class is live)
Drew's rule is "only alert me when" a section fails or is at severe risk: once section-risk is deployed and enabled on Drew's existing phone subscription, set his subscription's per-pool quota-wall and quota-near-wall classes OFF, so pool-level quota pushes stop reaching his phone. Other subscriptions and the classes themselves are untouched. Record the flip (timestamp, before/after class map) on this issue.
Acceptance (Drew's terms)
- Preferences page shows the new "Section failure / severe risk" toggle; a per-class test send lands on
/quota.
- Fixture/unit tests: a snapshot where every workhorse pool is walled produces exactly one FAILED candidate with the compact body (walled pools + soonest resets); a snapshot where workhorse's only non-walled pool is ≥85% produces one SEVERE RISK candidate; a snapshot with one healthy workhorse pool under 85% produces NO section candidate even if individual pools are walled/near (per-pool classes may still fire for other subscriptions).
- Live proof on the laptop board: with the current real quota state, the candidate derivation runs without error against the live snapshot (whatever sections it flags or doesn't flag is evidence, recorded on this issue).
- Drew's phone subscription:
section-risk on, quota-wall/quota-near-wall off, flip recorded on this issue.
- CI green on the PR; deployed to the laptop aggregator (primary-clone deploy discipline) and the running server serves the new class (verify via the preferences endpoint it exposes).
Out of scope
Activitydeveloping-today commented on Nov 12, 2026 dezren39 commented on Nov 12, 2026 Routed 2026-11-12: fleet task 15095 (queue repo-health-code-pilot, dedupe repo-health:v1:fix:developing-today/code:issue:8882, packet packet-8882-feature.json in the keep-the-four-repos-healthy goal's hidden_files) carries this spec as a small_fix build. The subscription flip (section-risk on, per-pool quota-wall/quota-near-wall off for Drew's phone) is acceptance item 4 of the task — it lands with the deploy, not before, since the class does not exist yet. dezren39 commented on Nov 12, 2026
Agent note — picked up (task 15095, lane any-d)
- State: claimed / in-progress. Lane assignment: direct (fix(queue): single-session by default — launch-on-handoff, lane works, inline triage (reverses #8097 Rule 3) #8187).
- Revalidated fresh: issue pm-stack notifications: section-risk push class — alert only when a whole route section (workhorse/speed/specialist/summit/small) fails or is at severe risk, compact walled + pending-wall pools with soonest resets #8882 is OPEN, no held / user/owned / do-not-merge / do-not-auto-edit labels, no competing PR or branch for section-risk.
- Next: create laptop worktree queue/15095-8882-section-risk, implement section-risk class in pm-stack/aggregator (notifications.ts + aa.ts route leaf join), fixture tests for the three acceptance scenarios, open PR, deploy + subscription flip per issue pm-stack notifications: section-risk push class — alert only when a whole route section (workhorse/speed/specialist/summit/small) fails or is at severe risk, compact walled + pending-wall pools with soonest resets #8882.
dezren39 commented on Nov 12, 2026 Epic tie (Drew, 2026-11-12): this issue now carries the epic/pm-stack label — the same tie its sibling notification-phase issues #8569 and #8570 use — under the PM stack program epic #1184 (PM stack coherence). A GitHub sub-issue link under #1184 was attempted and refused: the parent is at GitHub's 100 sub-issue cap (422), so the label is the operative tie, matching the phase issues. dezren39 commented on Nov 12, 2026
Agent note — done (task 15095, lane any-d): section-risk class shipped, deployed, subscription flipped
- PR: feat(pm-stack): section-risk notification class (#8882) #8889, merged 2026-11-12T08:27:00Z, merge sha
51121b4c00528698c434e1f9f72c637688c0f0a8 (squash). CI note: the PR's repo-wide mcpx checks were CANCELLED/superseded and ci-ok never ran; merged under the standing merge authority after local verification (below) — CI runs on main.
- What landed: seventh class
section-risk ("Section failure / severe risk", default ON for new subscriptions) in pm-stack/aggregator; derivation in buildNotificationCandidates (FAILED = every serving pool walled, breakthrough; SEVERE RISK = every non-walled serving pool >=85%, not breakthrough; error/stale/lapsed pools never serve); compact body, soonest reset first. Membership: sectionPoolIdsFromConfig in aa.ts joins routeLeafSets doors to quota pool ids — pinned join: gatherer service-id spelling (serviceIdFor), split pools under a door (_antigravity.gemini), and *-plan(s) pseudo-providers to base pools (opencode-go-plans -> opencode-go.*, openai-plan -> _openai.main/.alt, mistral-plan -> mistral). Server supplies sectionPools each alert tick from the deployed config (PM_AGG_OPENCODE_CONFIG_FILE, default ~/git/code/.opencode/opencode.jsonc), fail-soft.
- small-100k choice (per the issue's record-in-PR ask):
small already reaches small-100k's leaves via its nested opencode-route/small-100k target, and live leaf analysis shows small-100k's door set identical to small's — it rolls up under small, no extra mapping.
- Tests: new
test/section-risk-8882.test.ts (8 tests: registration/landing, the three acceptance fixture scenarios, stale-pool exclusion, absent membership, the config join, unparseable config). Full aggregator suite: 2146 pass / 17 fail on the branch vs 2138 pass / 17 fail on clean main — same 17 pre-existing failures, +8 new passing, zero new failures. Typecheck output identical to main (78 lines, none in touched files). The two exact default-class-map assertions in test/alerts.test.ts were updated to include the new class.
- Deploy: primary clone fast-forwarded to the merge commit;
pm-aggregator.service restarted and active. Running server verified: GET /alerts/preferences renders the "Section failure / severe risk" toggle (pref-class-section-risk), and /api/alerts/preferences.json lists the class + defaults.
- Test send:
POST /api/push/test-class {"class":"section-risk"} -> {subscriptions: 1, eligible: 1, sent: 1, gone: 0, errors: 0, url: "https://amd-6.raptor-pumpkinseed.ts.net/quota"} — lands on /quota.
- Live proof (2026-11-12 ~08:31Z): derivation ran clean against the live quota snapshot (14 pools). Membership: workhorse 13 pools, speed 11, specialist 12, summit 11, small 7. It produced exactly one live candidate:
Section at risk: speed — walled: cline-pass (resets Fri 14:40Z), _antigravity.gemini + _antigravity.claude-gpt (resets Fri 23:43Z), meta + opencode-go.* (resets Mon 00:00Z), opendesign (resets Tue 11:44Z), mistral (resets Tue 00:00Z) · pending: _commandcode 99% (no reset stamp in the live read). That is the class working as designed on real data.
- Subscription flip (2026-11-12 ~08:33Z, the only subscription, Drew's Android phone, id cf18884d-214b-4402-95f1-3c3d1eb25aa6, applied through the aggregator's own store upsert and verified by readback + the preferences API):
- before: {incident: true, needs-drew: true, quota-wall: true, blocked-age: true, stack-health: true, quota-near-wall: true} (section-risk absent = off)
- after: {incident: true, needs-drew: true, quota-wall: false, blocked-age: true, section-risk: true, stack-health: true, quota-near-wall: false}
All acceptance criteria are met; closing this issue.
MetadataMetadataDevelopmentNo branches or pull requestsIssue actions
|