Repository navigation
Todo
Labels
app/pm-stackpm-stack (Pad/Grist) in developing-today/codedesign/pm-notificationsDesign: pm-notifications - all issues of this effort carry iteffort/lLarge: multi-day or open-ended; expect staged check-insepic/pm-stackReprioritization program epic (2026-11-12)kind/featureNew feature or capability requestpriority/normalOrdinary priority (the default)status/needs-triageNot yet triaged; needs a first looktask/small-fixQueue packet kind: bounded fix with reproduction and targeted tests
Milestone
Description
Phase 3 — consolidation: the glued-together tools become one core service
Design: pm-stack-notifications-design-2026-11-11.md (goal keep-the-four-repos-healthy, files/). Siblings: #8568 (Phase 1, producers), #8569 (Phase 2, edge relay). Context: #5082 (board dies with empty replies while siblings struggle), the pending pm-projector socket-activation work.
What recon established
The "five tools" are already ONE Bun/TypeScript monorepo (pm-stack/ in this repo) deployed as separate laptop processes from one checkout:
| Process today | Reality |
|---|---|
| pm-aggregator (:4870) | bun run aggregator/src/server.ts — board, quota views, attention, alert throat + push engine |
| quota-gatherer (timer) | bun run aggregator/scripts/gather-quota.ts — a script in the aggregator package, writes quota-current.json |
| fleet-feed-collector (timer) | bun run aggregator/scripts/collect-fleet-feed.ts — same package, writes fleet-feed.json |
| pm-projector (:7801) | bun run projector/src/index.ts — GitHub webhook intake + reconcile; disposable projection DB; aggregator reads it over HTTP (PM_PROJECTOR_URL) |
| pm-dispatch (:4879) | separate Bun app, public via tunnel (dispatch.security.cab), holds session-launch authority |
State passes between them as files in ~/.local/state/pm-aggregator/ and one HTTP hop — which is how the board 503s when a sibling is unhealthy, and why every deploy/restart story is five stories.
The merged shape
- pm-core (one process): the aggregator server with the gatherer and feed collector folded in as in-process schedulers (same code, no file-polling handoff — freshness becomes in-memory, the JSON files remain as audit/debug artifacts written by the process, not read by it), the notification engine (already in-process), and the projector as a module: its webhook listener keeps its own port (public intake is a different trust surface) but runs in the same process, and the board reads projections in-process instead of over HTTP. The pending projector socket-activation work is absorbed into the core's listener story instead of being solved a second time.
- pm-dispatch stays separate: public ingress + session-launch authority is a different security posture, and it was just rebuilt under the item-5 work.
- Kaneo + the Cloudflare Tunnel stay as they are (upstream container; ingress).
Net: 5 laptop processes in the pm family → 2 (pm-core, pm-dispatch), one restart story, one deploy story.
Acceptance (Drew's terms)
- One service restart moves board + quota + feed + projections together; there is no sibling process left whose bad day makes /board return 503.
systemctl --usershows pm-core + pm-dispatch (+ tunnel) as the whole pm family; the two timer units are gone, replaced by in-process schedules with the same cadences (quota ~15 min ticks, feed ~5 min).- Killing the projection module's GitHub intake degrades board link data visibly (provenance chips say so) — it does not take the board down.
- All pre-existing machine surfaces keep their shapes: /api/board.json, /api/quota.json, /api/attention.json, /api/alerts.json, /api/needs-drew.json byte-compatible for current consumers (fleet minder, steward, globalping watch).
Metadata
Metadata
Assignees
Labels
app/pm-stackpm-stack (Pad/Grist) in developing-today/codedesign/pm-notificationsDesign: pm-notifications - all issues of this effort carry iteffort/lLarge: multi-day or open-ended; expect staged check-insepic/pm-stackReprioritization program epic (2026-11-12)kind/featureNew feature or capability requestpriority/normalOrdinary priority (the default)status/needs-triageNot yet triaged; needs a first looktask/small-fixQueue packet kind: bounded fix with reproduction and targeted tests
Activity
developing-today commentedon Nov 11, 2026
CODE-2560
dezren39 commentedon Nov 17, 2026
🤖 Agent note · triaged — task 18690 (lane code-e)
pm-stack/on origin/main still carries separateaggregator/andprojector/packages, and the laptop still runspm-aggregator.serviceas its own unit.gather-quotainto the aggregator as an in-process scheduler at its existing ~15-minute cadence, leaving the JSON file as write-only audit output — the smallest step that removes one file handoff while the board keeps working.systemctl --usershows pm-core + pm-dispatch (+ tunnel) as the whole family with both timers gone; killing the intake degrades link data visibly (provenance chips) without taking the board down; the five/api/*.jsonsurfaces stay byte-compatible for current consumers.dezren39 commentedon Nov 23, 2026
agent-note:v1
state: in_progress
task: 20173
lane: agent-next-01
worker: agent-next-01
origin: fleet-agent-next
Delivered the schedulers-first vertical slice in PR #12905 (commit 2006080): quota and fleet-feed jobs are now importable without changing their CLI entry points, and a tested pm-core scheduler seam defines 15-minute quota / 5-minute feed cadences, single-flight guards, and write-only audit records. Verification: targeted Bun tests 3/3 pass,
bunx tsc --noEmitpasses, andgit diff --checkpasses. The remaining projector in-process read and systemd unit cutover are explicitly left as the next slices.dezren39 commentedon Nov 23, 2026
mergedAt: null; its current checks are CodeRabbit NEUTRAL and Proof SKIPPED.main; no source changes made in this run.27 remaining items
fix(pm-stack): projector read seam for Phase 3 in-process module (#8570)
developing-today-fleet commentedon Nov 26, 2026
Phase 3 slice landed as PR #15803 (lane oc-code-04, task 20173, 2026-11-26): projector read seam, not closing.
What: the live source reads projections through an injectable
ProjectorReader(sources/projector.ts);createHttpProjectorReaderpreserves the exact current HTTP behaviour as the default. All five read sites (board/roadmap links, items, comments, latest-comments cache) resolve through the seam. No behaviour change without an injected reader.Evidence: new
test/projector-reader-8570.test.ts3/3 (failing-first verified against unmodified src); targeted regressions green (42+61+19 across projector/board/registry/pm-core suites); tsc clean for touched files. Full-suite-only failures are environmental (port 4871 held by another dev aggregator, collector-subprocess SIGTERM, timing flakiness passing in isolation).Next slices (this packet stays open): (1) in-process store-backed reader behind the same interface; (2) pm-core unit rename/cutover story; (3) #14169 laptop deployment verification.
developing-today-fleet commentedon Nov 27, 2026
Phase 3 progress (2026-11-27): opened stacked draft PR #15825 for the next reversible slice, a store-backed ProjectorReader adapter. It depends on reader-seam PR #15803 and is based on its branch to avoid duplicating that diff; retarget #15825 to main after #15803 merges. Focused tests passed locally (13 tests); remote Fleet dispatch returned HTTP 403 (Resource not accessible by integration), and local typecheck could not run because this worktree lacks @types/bun. No merge/deployment claimed. Remaining acceptance stays open.
developing-today commentedon Nov 27, 2026
Phase 3 lane revalidation (oc-code-01, task 20173, 2026-11-27): PR #15803 (reader seam) is still open; stacked draft #15825 (store-backed adapter) is also open and explicitly depends on #15803. I left both PRs and their branches untouched. The next projector slice cannot safely be retargeted/continued until #15803 merges. Read-only live check after #14169 merged: this host still runs pm-aggregator.service + pm-projector.service, and quota-gatherer.timer remains active; pm-core.service and fleet-feed-collector.timer are absent. Thus timer/service deployment verification is still outstanding, and no live cutover or restart was performed. Resume after #15803 merges: retarget #15825 to main, run focused CI/typecheck, then continue the projector fold-in; separately schedule/verify the timer deployment on the primary seat. #8570 remains open.
developing-today-fleet commentedon Nov 27, 2026
Fresh recheck for task 20173: #14169 is merged; #15803 remains OPEN at
fa4e8d156fccf75866771d8f67694c5a13922a79, and stacked draft #15825 remains OPEN atf4cca598ae3a0507a2451b0ec469aef70c3dfced, based on #15803. No PR or source changes were made. The shared checkout remains dirty in pm-stack files, so I left it untouched.Resume after #15803 merges: retarget #15825 to main, verify its tests and head, then continue the next #8570 slice. Laptop deployment verification remains separate and outstanding. #8570 remains open.
developing-today-fleet commentedon Nov 27, 2026
Phase 3 slice landed as PR #15825 (lane oc-code-08, task 20173, 2026-11-27): store-backed ProjectorReader adapter, not closing.
What:
createStoreProjectorReaderadapts projector store rows to the aggregator read model behind the #15803 reader seam;mapProjectorLinksshared by HTTP + store paths; fail-soft null on store errors; live.ts re-exports the new symbols. No default behaviour change (HTTP reader still the default).Evidence: isolated worktree on PR head e0ccf7b:
bun test test/projector.test.ts test/projector-reader-8570.test.ts13 pass; merge-tree vs origin/main 0 markers; branch protection requires no reviews/checks; mergeState CLEAN/MERGEABLE, undrafted. Merged 2026-11-27T07:45:59Z as ef6a8dc; post-merge main re-ran same 13 tests green. Typecheck unavailable (missing @types/bun, environmental, pre-existing).Gates now stale-merged: #14169 (timer cutover) MERGED 2026-11-26, #15803 (reader seam) MERGED 2026-11-27.
Next slices (packet stays open): (1) wire createStoreProjectorReader into pm-core as an in-process reader; (2) pm-core unit rename/cutover story; (3) laptop deployment verification. #8570 remains open.
developing-today-fleet commentedon Nov 27, 2026
Phase 3 slice — in-process projector reader wired (lane oc-code-07, task 20173). PR #16052 opened from
oc-code-07/20173-pm-core-reader-wiring(head 9d8f0f4):pickSource()now prefers a store-backed ProjectorReader whenPM_CORE_PROJECTOR_DATABASE_URLis set, with the existing HTTP reader as fallback, then live-source fail-soft. Resolves the #14169 gate staleness (merged 2026-11-26), builds on merged #15803/#15825.Evidence: red-before run 45966601889; targeted/typecheck runs 45971717016 + 45972335904 success; Nix package run 45972145987 success (store module + libsql runtime present in built output). Full aggregator suite 45974820831: 4023/4035 pass; 12 failures in untouched modules (home-resolution, needs-drew mapping, watchdog registry, assembly-deadline), none in changed files.
#8570 stays open: projector webhook/listener remains separate; systemd/timer cutover and deployment verification remain.
developing-today-fleet commentedon Nov 27, 2026
Phase 3 reader-wiring slice MERGED (lane oc-code-07, task 20173). PR #16052 merged as
324096c73ce(fleet standing merge), now on origin/main.What landed:
pickSource()prefers a store-backed ProjectorReader whenPM_CORE_PROJECTOR_DATABASE_URLis set; the configured HTTP reader remains the fallback, then live-source fail-soft. Evidence: red-before 45966601889; targeted 45971717016 + typecheck 45972335904 + package 45972145987 all success; full suite 45974820831 4023/4035 (12 failures in untouched modules, none in changed files).#8570 stays open: projector webhook/listener still runs as its own service; systemd unit rename/cutover and laptop deployment verification remain. Next slice: fold the projector listener into the shared core runtime.
fix(pm-stack): repair red pm-stack tests on main (#16256)
developing-today-fleet commentedon Nov 29, 2026
Census 2026-11-29 (Felix):
pickSource()prefers the store-backed ProjectorReader whenPM_CORE_PROJECTOR_DATABASE_URLis set, HTTP reader remains fallback).developing-today-fleet commentedon Nov 29, 2026
Issue census — 2026-11-29
Gaps found: no lifecycle or source label (lifecycle remedied this pass; filer not stated, source left unlabelled).
Strengths: detailed body with context a picker-up can start from; linked to its epic/programme via epic/* labels;
Acceptance (Drew's terms)section present (in-substance equivalent).Actions taken: labels added this pass:
status/needs-triagePriority:
priority/normalretained — matches the work's urgency as evidenced on the issue; no band change.