GeezerVison is showing github.com — impl(pm-stack): hosted read API parity — projects/item/roadmap/releases per #9060 §6 (component A slice 3, from #9079) · Issue #12828 · developing-today/code
impl(pm-stack): hosted read API parity — projects/item/roadmap/releases per #9060 §6 (component A slice 3, from #9079) #12828DescriptionDesign: doc/2026-11-23T03-22-03Z_design_pm-service-workers-edition/2026-11-23T03-22-03Z_design_pm-service-workers-edition.md (PR #12823, merged) — component A of epic #9078, under #9079.
Slice 3 — Read API parity
Per design §4 and #9060 §6: the hosted read API served from the tenant Turso DB — /api/projects.json (projects[] shape, per-board audit), /api/item/<id>.json with ancestors[] + release, /api/roadmap.json with priority/afterRefs/releaseRef, /api/releases.json serving milestone close-out snapshots. The genealogy derivation is #9070's read model ported (pure derivation over the pool + registry + roadmap rows), not redesigned.
Acceptance
Activitydeveloping-today commented on Nov 23, 2026 dezren39 commented on Nov 23, 2026 Pickup — xaltha lane, component A slice 3 (hosted read API parity).
Base: stacked on xaltha/12826-hosted-collector (slice 2, @ c63e360). Rationale: the read API serves the merged pool exactly as the collector lands it — pm_items.item_json is slice 2's ProjectPoolItem shape, and the genealogy derivation (#9070's read model, ported) operates over that shape via slice 2's pool.ts types. Slice 1 alone defines the tables but not the pool semantics the API reads, so a main- or slice-1-based branch could not build the endpoints against the landed data.
Scope: /api/projects.json (projects[] + per-board audit), /api/item/<id>.json (ancestors[] + release + genealogy sentence), /api/roadmap.json (priority/afterRefs/releaseRef), /api/releases.json (milestone close-out snapshots) — #9060 §6 shapes, derivation ported from the laptop's #9070 read model, not redesigned. Tests will cover the #9060 §8 worked example (crate-split chain) end-to-end plus honest chain-break rendering. dezren39 commented on Nov 23, 2026 Slice 3 landed — PR #13102 (stacked on xaltha/12826-hosted-collector, slice 2).
Base choice: slice 2's branch. The read API serves pm_items.item_json, which is slice 2's ProjectPoolItem shape, and the genealogy derivation runs over slice 2's pool.ts types; slice 1 defines the tables but not the pool semantics the API reads, so a main/slice-1 base could not build the endpoints against landed data.
Built (pm-stack/pm-service/src/read-api/): genealogy.ts (#9070's read model ported — ancestors/release/sentence + roadmap enrichment), releases.ts (#9067's close-out accounting ported + a stored-snapshot assembler), store.ts (tenant-DB reads: board summaries, merged pool, roadmap rows with stored-overlay-wins-per-field, release snapshots stored-first then computed), api.ts (the four endpoints + fetch handler). Read-only throughout; no token read/minted/persisted (E §2.3).
Evidence (sandbox, bun): bun test — 32 pass / 0 fail, 158 assertions (8 new), seeded through slice 2's real landSnapshot; the #9060 §8 crate-split chain renders end-to-end through /api/item/<id>.json (ancestors + release + exact sentence), chain breaks render honestly, unknown refs 404. bun run typecheck clean. Suite registry: new pm-service.read-api row; check shows only the 3 pre-existing #12230 violations.
Acceptance: all four endpoints serve the §6 shapes from tenant-DB data ✓ · genealogy sentence renders end-to-end on the §8 worked example with honest chain-break rendering ✓ · chain breaks/missing data honest, never fabricated ✓ (board without snapshot → null audit; orphan item → chain-break sentence; unknown ref → 404). PR says Closes #12828; it lands after #13054 and the slice-2 PR. dezren39 commented on Nov 24, 2026 Lane any-n triage verdict (queue task 22259, 2026-11-24). Fresh read: slice 3 landed as PR #13102 (read API: genealogy, /api/projects, /api/item, /api/roadmap, /api/releases). The issue is still open and the PR state is shown above; this lane verified the PR but did not build. Left open until #13102 is merged and the issue's acceptance is read back. No new follow-on packet: the remaining work is merge plus readback of #13102. Tracking: #14158. dezren39 commented on Nov 24, 2026
Slice 3 landed — PR #13102 merged to main as 2f51a35 (2026-11-24T13:12:45Z), shepherded by the Felix lane for task 23452.
How it unstacked: slice 1 (PR #13054) was already merged; slice 2 had no PR, so the shepherd lane opened PR #14343 for it, verified and merged it first (record on #12826), then retargeted #13102 from xaltha/12826-hosted-collector to main and merged current main in — zero conflicts; the final diff vs main was exactly the slice-3 change (+1139/−3, 9 files, identical to the original PR diff).
Verification: remote fleet-command run 45398994169 on the merged head (5a376f9): the Execute step ran the unmodified bun test in pm-stack/pm-service and concluded success on bun own exit code (no pipe masking). The same harness on slice 2 head, a strict subset of this suite, gave full log counts of 24 tests / BUN_RC=0 with every test named (pass). Acceptance read-back: the read-api suite (8 tests in test/read-api.test.ts, per the PR evidence: 32 pass / 0 fail / 158 assertions for the full pm-service suite at this code) covers the four endpoints in the #9060 §6 shapes, the §8 worked example end-to-end (step #4403 → epic #3447 → design #3195 → roadmap item #2056 with full ancestors, release, exact genealogy sentence), honest chain-break rendering, stored-vs-derived roadmap and release overlays, and the fetch handler (routes, 404s, POST rejection). Review state at merge: zero unresolved threads; Codex review completed with no findings.
Closing: acceptance items are covered by the landed, verified suite.
MetadataMetadataDevelopmentNo branches or pull requestsIssue actions
|