Repository navigation
Description
CF-5c — pm-service serving substrate: async tenant store + Worker entry (child of #14945, programme #14866). Blocks CF-5d.
Why this exists (premise evidence: #14945 comment 7157705797): pm-service's read API (#12828, createReadApiHandler) exists only as a handler factory over the synchronous SqlDb interface (exec/run/all/transaction in pm-stack/pm-service/src/tenant-store/migrate.ts), whose only adapter is bun:sqlite for tests. There is no wrangler config and no Worker entry. The tenant plane is Turso/libSQL (async HTTP), which a synchronous interface cannot drive — so no M5 surface can serve hosted until this lands.
Scope:
- An async store layer for the read path (read-api store functions over a libSQL/Turso HTTP adapter), keeping the pm stack: multi-board hierarchy + full task genealogy #9060 §6 response shapes byte-identical; the synchronous tenant-store stays as-is for migrations/tests unless the async rework proves it should be shared.
- A Worker entry + wrangler config for pm-service mounting the read API, with credentials by name only (tenant DB URL/token as Worker secrets; no token read or persisted on the read path itself, per the read API's existing invariant).
- Versions deploy per design §4: versions upload stamped with the commit SHA, commit-stamped health gate, versions deploy, rollback by version promotion; a deploy workflow following the decision-events/pm-console-edge pattern.
Acceptance: the four existing read routes (projects/item/roadmap/releases) serve from a deployed pm-service Worker against the real tenant DB; parity evidence = the existing read-api test suite passing against the async adapter (run remotely) + a live read of each route recorded on this issue; deploy/rollback record on this issue.
Design of record: doc/2026-11-25_design_cloudflare-first-migration.md (PR #14940). Owned paths: pm-stack/pm-service/.
{
"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-11-25T08:58:46Z",
"session_id": null,
"lane": null,
"host": "htch-runtime",
"worktree": "/home/hatch",
"model": null,
"lane_start_issues": [],
"workspace_ref": {
"kind": "worktree",
"id": "/home/hatch",
"repo": "developing-today/code",
"branch": "main",
"sha": "c11f41086f57d626be7eb582763b721f8f557408"
},
"auth_subject": "felix",
"stamped_by": "fleet 0.1.0 (native)"
}
}Acceptance criteria
- An async store layer drives the pm-service read path over the Turso/libSQL tenant plane (no synchronous SqlDb interface on the hosted path), with the existing read API handler served from a real Worker entry with wrangler config.
- Read-path behaviour matches the existing bun:sqlite test expectations, re-proven against the async layer.
- This slice unblocks CF-5d: a hosted M5 surface can call the serving substrate end to end.
Activity
developing-today commentedon Nov 25, 2026
CODE-5452
developing-today-fleet commentedon Nov 25, 2026
agent-note:v1
Agent: item-work-319 (Archer item lane, Muse seat)
State: claimed — CF-5c implementation slice
Premise check (fresh reads, 2026-11-25): issue OPEN, no live claim, no implementing PR. Premise verified against origin/main: the read API (#12828, closed) exists at
pm-stack/pm-service/src/read-api/api.tsas a handler factory over the synchronousSqlDb; the only adapter is bun:sqlite (tenant-store/sqlite.ts); pm-service has no wrangler config and no Worker entry. Scope as written in the issue: async store layer for the read path over a libSQL/Turso HTTP adapter (response shapes byte-identical), Worker entry + wrangler config, versions deploy workflow per design §4. The synchronous tenant-store stays as-is for migrations/tests.Working in a laptop worktree off origin/main; PR + record to follow here.
Merge pull request #15043 from developing-today/iw319/14969-pm-servic…
Merge pull request #15052 from developing-today/iw319/14969-deploy-st…
developing-today-fleet commentedon Nov 25, 2026
agent-note:v1
Agent: item-work-319 (Archer item lane, Muse seat)
State: slice landed — async substrate merged; live deploy in flight; tenant secrets remain
What landed
PR #15043 — MERGED
c75c37aaf4b6(CF-5c substrate):src/tenant-store/libsql-http.ts—AsyncSqlDb+libsqlHttpDb(Hrana v3 pipeline over fetch; credentials only in the adapter closure, from Worker secrets).src/read-api/async-store.ts+async-api.ts— the four loads and four routes awaited. All SQL and row→shape mappings are shared with the synchronous store (extractedregistryFromRows/poolFromRows/boardSummaryFromRow/roadmapRowsFromRows/releaseSnapshotsFromRows), so the §6 shapes cannot drift; the sync tenant-store is behaviourally untouched.src/worker.ts+wrangler.toml— Worker entry;/healthreports the VERSION stamp; API routes answer a structured 503 until the tenant secrets exist (honest state, no invented data)..github/workflows/pm-service-deploy.yml— design §4 versions standard (upload SHA-stamped → preview health gate → promote → post-check;rollback_versiondispatch input promotes a previous version back).workers.jsongains the pm-service entry (state: not deployed); README documents the slice.Verification:
bun test63 pass / 0 fail (newtest/read-api-async.test.ts: 13 tests — every route's status+body byte-identical async vs sync over the seeded §8 fixture; Hrana request/encoding/decoding pinned against a stub fetch);bun run typecheckclean;wrangler deploy --dry-runbundles (21.56 KiB). Route: laptop worktree (the suite is bun-local by design; the workflow re-runs it in Actions pre-upload).PR #15052 — MERGED
672bf65d51cf(first-deploy fix): the first deploy run (45602454798) failed at upload —wrangler versions uploadrefuses a Worker that does not exist yet. The workflow now stands the Worker up with a plain VERSION-stamped deploy when the Workers API reports the script 404 (the pm-console-edge stand-up shape); later deploys take the versions path.What remains (issue stays open)
672bf65d51cf) — queued behind an estate-wide Actions runner backlog at record time (every recent run on the repo is queued). When it runs: stand-up deploy → health re-check must report the merge SHA. If it fails, its log is the next step.PM_TENANT_DB_URL/PM_TENANT_DB_TOKENWorker secrets from the tenant plane (checked 2026-11-25: no pm-tenant Turso credential exists in the secrets broker under that name). Until then the deployed Worker serves/healthand honest 503s.developing-today-fleet commentedon Nov 25, 2026
agent-note:v1 — addendum (item-work-319): first deploy completed green after the record above was posted.
672bf65d51cf: success. The stand-up step deployed the Worker (upload/promote correctly skipped on first deploy); the final health gate passed.GET https://pm-service.developing-today.workers.dev/health→{"ok":true,"service":"pm-service","version":"672bf65d51cfc302f19544f3211405096ad0a122"}— the exact merge SHA.GET /api/projects.json→ HTTP 503{"error":"pm-service tenant store is not configured"}— the designed honest state until the tenant secrets are provisioned.Remaining for acceptance is unchanged: provision
PM_TENANT_DB_URL/PM_TENANT_DB_TOKEN, then the four routes' live reads + a rollback record. The workers.json entry'sstateis being corrected to "in service" in a follow-up PR (its merge also exercises the versions upload → gate → promote path for the first time).Merge pull request #15060 from developing-today/iw319/14969-workers-s…
developing-today-fleet commentedon Nov 25, 2026
Intake review
Related: parent issue #14945, programme issue #14866; read API from issue #12828. Blocks CF-5d.
Notes: Issue verified still open and live at intake (no merged PR found in the body evidence resolving it; the body scope stands). Acceptance criteria appended to the body by the fleet monitor (original body preserved verbatim above the new section); labels normalised per the taxonomy.
Risks: Scope creep beyond the slice as written; dependencies named in the body (parent/design/gate issues) may gate the start. For claimed slices, the holding lane's own plan governs sequencing.
Suggested approach: Work the slice exactly as scoped in the body, prove each acceptance bullet with a test, drill record or live read-back as its wording requires, and post the evidence on the issue before closing.
🤖 Agent note · filed
13 remaining items
developing-today-fleet commentedon Nov 26, 2026
agent-note:v1 — ruling impact (recorded by a CF-5 lane, 2026-11-26): the owner ruling on #14866 (comment 7189808145) supersedes design §2's data placements. For this slice that means the async store layer's target is no longer only the tenant Turso plane: D1 is now the programme's store target, so the async adapter work here should be scoped against D1 (and the per-tenant D1 shape settled by #15482/#15494) rather than a libSQL-only adapter, or the slice should record explicitly why its read path still lands on Turso as an interim. State unchanged: still status/blocked as recorded; this note only retargets the design input. Refs #14866 ruling; sibling record on #14968 (D1 ledger retarget, PR #15544).
developing-today-fleet commentedon Nov 27, 2026
Decided: Make the next #14969 PM read-path slice consume a D1 binding; treat the merged Turso adapter as transitional and do not make the missing Turso URL/token a prerequisite for hosted reads.
Why: The current programme direction recorded on #14866 comment 7189808145 retargets PM board data to D1. #14969's live read requirement remains unmet because its old Turso store is unconfigured and returns 503.
Undo: If a later recorded direction restores Turso for PM reads, switch the selected adapter back and migrate data under that direction.
By: agent-next-27-local
Next slice: after the D1 adapter PR, the pm-service worker tests show that a D1 binding serves the same async read API while the absence of either store continues to return an honest 503.
developing-today-fleet commentedon Nov 27, 2026
CF-5c progress — D1 read adapter
Following the D1 direction recorded in the decision above, PR #16120 is merged as
dd5d39c93bb012035ffdf103666bf065f60dc707. It adds a D1 binding adapter for the existing async read path; the D1 binding takes precedence when configured, while the old Turso adapter remains only for the data-copy transition. No D1 binding was deployed in this slice, so an empty database cannot replace the current read source.Evidence:
bun test test/read-api-async.test.ts test/d1-store.test.tspassed (20 passed, 0 failed);bun run typecheckandgit diff --checkpassed./healthreports mergedd5d39c93bb012035ffdf103666bf065f60dc707and a deployment age. This does not prove live tenant reads;/api/projects.jsonremains unverified against D1.The former blocker on a Turso endpoint/token is superseded by the D1 decision. Next: provision the PM D1 database, apply the schema, copy and verify the current data, then bind it and verify all four live read routes plus rollback-by-promotion. This issue remains open until those checks pass.
developing-today-fleet commentedon Nov 27, 2026
code-g CF-5c verify 15:35Z (task 23746, attempt 5): D1
pm-service(62ba1f0d) readback — schema migrations v1+v2 applied 2026-11-27T11:35:14Z, all 16 tables present, but every data table is empty (0 items, 0 snapshots, 0 boards, 0 releases). So schema is done; the blocking step is still snapshot sourcing/loading per the 11:12Z D1 decision, then binding + versions deploy. Live: unauthenticated /health and /api/projects.json both 302 to Access login, so authed read state still unverifiable without an owner session. Note: pm-console-edge-deploy failed twice on main today (14:57Z/15:04Z), so the versions-standard deploy path is currently red. Re-parking.dezren39 commentedon Nov 28, 2026
1637-E disposition — parked on the D1 data-load step, 2026-11-28.
Premise + ownership check: issue + all 15 comments read. Fresh verification this lane: PR #16120 (D1 read adapter) MERGED 2026-11-27T11:19:12Z
dd5d39c93bb012035ffdf103666bf065f60dc707(gh readback), on top of the already-merged/deployed substrate PRs #15043/#15052/#15060/#15065.What remains is not a code slice: per the 2026-11-27T15:33:59Z code-g verification on this issue, the D1
pm-serviceschema (v1+v2, 16 tables) is applied but every data table is empty — the blocking step is snapshot sourcing/loading into D1, then binding + versions deploy, then an authenticated read check (live routes 302 to Access login, so authed state is unverifiable without an owner session), and the pm-console-edge-deploy path was red on main at that check. None of that is landable from this lane's Git-API/no-live-config route.Queue task 23746 parked by this lane with ready condition: D1 pm-service data tables loaded from the snapshot source AND pm-console-edge-deploy green on main — then bind the D1 binding, run the versions deploy, and verify an authenticated read.
dezren39 commentedon Nov 29, 2026
🤖 Census — lane CEN-C15, 2026-11-29 (full-census pass: body + all comments re-read firsthand; this comment is the current-state record for a cold pickup).
Verdict: blocked — substrate done; the data-load step is the gate. Merged/deployed: the substrate PRs #15043/#15052/#15060/#15065 and the D1 read adapter PR #16120 (merged 2026-11-27). Verified state of the tenant plane: the D1
pm-serviceschema (v1+v2, 16 tables) is applied but every data table is empty.Remaining, in order: (1) source and load the snapshot data into D1 pm-service; (2) bind the D1 binding and run the versions deploy (the pm-console-edge-deploy path was red on main at last check — re-verify); (3) an authenticated read of each of the four routes (projects/item/roadmap/releases) recorded here — live routes 302 to Access login, so the authed check needs an owner session. This issue gates CF-5d #14970 and, through it, CF-7 #14947. Queue task 23746 is parked on exactly conditions (1)+(deploy green).
Priority: high — confirmed. Labels sane; no change.
developing-today-fleet commentedon Nov 29, 2026
Census 2026-11-29 (Felix): rechecked in full (body, labels, comments, edges).
STRENGTHS: The premise is evidenced from the code (the read API exists only as a handler factory over a synchronous SqlDb whose only adapter is bun:sqlite for tests; no wrangler config, no Worker entry), and the response-shape contract (#9060 §6 byte-identical) is pinned. kind/infrastructure + priority/high already set. The direction was re-decided mid-flight and recorded: the async adapter targets D1 (per Drewry's 2026-11-26 ruling), and the D1 read adapter LANDED (PR #16120 merged 2026-11-27).
GAPS: The substrate exists but serves nothing yet: the D1 pm-service database has schema v1+v2 applied with all 16 tables present and every data table EMPTY (verified 2026-11-27). The blocking step is snapshot sourcing/loading into D1, then binding the Worker entry to it. Lane 1637-E parked it on exactly that step (2026-11-28).
FIXES I APPLIED: None — labels and priority verified correct.
REMAINS: Nothing for Drewry. Next slice: the snapshot load; CF-5d (#14970) unblocks behind it.
developing-today-fleet commentedon Nov 29, 2026
Issue census — 2026-11-29
Gaps found
## Acceptance criteriasection present.Strengths
Blocker recorded
Actions taken by this census
developing-today-fleet commentedon Dec 1, 2026
🤖 Agent note · stale-claim takeover — lane 2007-G (charlie ADVANCE 2026-11-30 20:07 CST)
Claim-scan firsthand this lane: body + all 19 comments re-read live. Last disposition was lane 1637-E's park on 2026-11-28T22:52Z; last activity 2026-11-29T15:44:53Z is census-only (>24h, no live lane, no open PR for the remainder). Lane 2007-G takes over ownership of the record from the stale park.
State confirmed: substrate done — PRs #15043/#15052/#15060/#15065 merged/deployed and the D1 read adapter PR #16120 merged 2026-11-27. Remaining, in order: (1) source and load the snapshot data into D1
pm-service(schema v1+v2 applied, all 16 data tables EMPTY at last verification 2026-11-27); (2) bind + versions deploy (pm-console-edge-deploy path was red on main at last check — re-verify); (3) authenticated read of the four routes (live routes 302 to Access login; needs an owner session). Queue task 23746 is parked on exactly (1)+(deploy green).Wake (machine-checkable): D1
pm-servicedata tables loaded from the snapshot source AND the deploy path green — then steps (2)–(3) proceed and this issue's live-route evidence closes it. This gates CF-5d #14970 and, through it, CF-7 #14947.