GeezerVison is showing github.com — feat(pm-service): async serving substrate + Worker entry (CF-5c, #14969) by developing-today-fleet[bot] · Pull Request #15043 · developing-today/code
Conversation
Refs #14969 (CF-5c — pm-service serving substrate; child of #14945, programme #14866).
What this lands
The read API (#12828) existed only as a handler factory over the synchronous SqlDb, whose only adapter is bun:sqlite — so no M5 surface could serve hosted. This PR adds the async substrate the issue scopes:
src/tenant-store/libsql-http.ts — AsyncSqlDb (the one method the read path needs) + libsqlHttpDb, an adapter over the libSQL server protocol (Hrana v3 pipeline over plain fetch — runs unchanged in a Worker). Tenant URL/token live only in the adapter's closure, supplied from Worker secrets; nothing on the read path reads, logs, or persists a token (E §2.3).
src/read-api/async-store.ts / async-api.ts — the four loads and four routes, awaited. All SQL strings and row→shape mappings are imported from read-api/store.ts and collector/store.ts (whose mappings were extracted — registryFromRows, poolFromRows, boardSummaryFromRow, roadmapRowsFromRows, releaseSnapshotsFromRows — for exactly this sharing), so the pm stack: multi-board hierarchy + full task genealogy #9060 §6 shapes cannot drift between store layers. The synchronous tenant-store is untouched in behaviour and stays the migrations/tests path.
src/worker.ts + wrangler.toml — the Worker entry. /health answers { ok, service, version } with the VERSION var stamped per deploy (the §4 gate). Until the PM_TENANT_DB_URL / PM_TENANT_DB_TOKEN Worker secrets are provisioned, the API routes answer a structured 503 — an unconfigured store is an honest state, never invented data (pm-aggregator: fixture fallbacks render invented data when sources die — fail visibly instead #14065).
.github/workflows/pm-service-deploy.yml — the design §4 versions standard, following the decision-events/pm-console-edge pattern: test + typecheck, wrangler versions upload stamped with the full commit SHA, health gate against the version's preview URL (pm-stack/pm-service/scripts/check-health.mjs), versions deploy promotion, a post-promotion health re-check, and rollback by promoting a previous version id via the rollback_version dispatch input.
pm-stack/platform/workers.json gains the pm-service entry (state: not deployed); the pm-service README documents the slice.
Verification
bun test in pm-stack/pm-service: 63 pass / 0 fail across 5 files, including the new test/read-api-async.test.ts (13 tests): every route's status and body byte-identical between the async and synchronous handlers over the same seeded fixture (the §8 crate-split chain, stored + computed release snapshots, roadmap overlay), worker-entry health/503 behaviour, and the Hrana adapter's request shape + value decoding against a stub fetch.
bun run typecheck: clean.
bunx wrangler deploy --dry-run: bundles cleanly (21.56 KiB), wrangler config valid.
- Test route: laptop worktree (named fallback — the package suite is bun-local by design; the deploy workflow re-runs the same suite in Actions before any upload, and main CI runs on the merge).
What remains for #14969's acceptance
The live half: provision the PM_TENANT_DB_URL / PM_TENANT_DB_TOKEN Worker secrets from the tenant plane (no pm-tenant Turso credential exists in the secrets broker under that name yet — checked by name, 2026-11-25), then the first workflow run deploys and the four routes' live reads + deploy/rollback record go on the issue. The issue stays open for that; this PR is the substrate it was blocked on, and it unblocks CF-5d (#14970).
{
"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-25T11:11:26Z",
"session_id": null,
"lane": null,
"host": "htch-runtime",
"worktree": null,
"model": null,
"lane_start_issues": [],
"workspace_ref": null,
"auth_subject": "archer",
"stamped_by": "fleet 0.1.0 (native)"
}
}
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
The hosted read API (#12828) was bound to the synchronous SqlDb
surface, whose only adapter is bun:sqlite; the tenant plane is
Turso/libSQL over HTTP, which a synchronous interface cannot
drive, and pm-service had no Worker entry or wrangler config.
- tenant-store/libsql-http.ts: AsyncSqlDb + libsqlHttpDb, an
adapter over the libSQL server protocol (Hrana v3 pipeline,
plain fetch). Credentials live only in the adapter closure.
- read-api/async-store.ts + async-api.ts: the four loads and the
four routes, awaited. All SQL and row->shape mappings are
imported from read-api/store.ts and collector/store.ts (their
mappings were extracted for this sharing), so the served #9060
section 6 shapes cannot drift; test/read-api-async.test.ts pins
every route byte-identical to the synchronous handler.
- src/worker.ts + wrangler.toml: the Worker entry. /health
reports the VERSION var; API routes answer a structured 503
until the PM_TENANT_DB_URL / PM_TENANT_DB_TOKEN secrets are
provisioned (honest state, never invented data).
- .github/workflows/pm-service-deploy.yml: the design section 4
versions standard - test, versions upload stamped with the
full commit SHA, health gate on the version preview URL,
versions deploy promotion, rollback by promoting a previous
version id via the rollback_version dispatch input.
- workers.json gains the pm-service entry; the pm-service README
documents the slice.
coderabbitai
Bot
commented
Nov 25, 2026
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
Important
Review skipped
Bot user detected.
To trigger a single review, invoke the @coderabbitai review command.
Run configuration
-
- Source mode: Auto
- Repository: Unavailable
- Branch: Unavailable
- File: No configuration file from this repository applied
- Commit: Unavailable
- Layers: defaults
- Review profile: CHILL
- Plan: Advanced
- Run ID:
c429727f-16d8-415f-9cb3-96c60aea11f6
You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.
Use the checkbox below for a quick retry:
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
Share
-
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
This was referenced Nov 25, 2026
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
Milestone
No milestone
Development
Successfully merging this pull request may close these issues.
Uh oh!
There was an error while loading. Please reload this page.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
|