GeezerVison is showing github.com — CF-7 (#14866): PM heavy surfaces over indexed projections (M7) · Issue #14947 · developing-today/code
CF-7 (#14866): PM heavy surfaces over indexed projections (M7) #14947DescriptionCF-7 — PM heavy surfaces (#14107 M7).
/search, /sessions, /item/, /discuss/, and the /conflicts read side, served hosted over indexed projections in the tenant/fleet-platform stores. Hard rule from #14107 §9: the laptop's unbounded reads (the 33 s search, the 6.7 MB registry read — #14060) are never ported to the edge; the hosted shape is an indexed projection read, and #14060's read-shape work is either a prerequisite or this slice's first step — say which on this issue.
Acceptance: each surface answers hosted within its latency budget over projections whose rebuild procedure is recorded; /conflicts stays read-only (resolution waits on #1282's trust rulings, unchanged by placement).
Blocked by CF-5 (the projections build on the read-wave stores).
Child of #14866 (Cloudflare-first migration programme). Design of record: doc/2026-11-25_design_cloudflare-first-migration.md (PR #14940). Secrets by name only. Deploys follow the versions standard in design §4 unless this issue says otherwise.
{
"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:48:42Z",
"session_id": null,
"lane": null,
"host": "htch-runtime",
"worktree": null,
"model": null,
"lane_start_issues": [],
"workspace_ref": null,
"auth_subject": "felix",
"stamped_by": "fleet 0.1.0 (native)"
}
}
Acceptance criteria
- The named PM heavy surfaces render from indexed projections instead of full scans, with the projection source named in the implementation.
- Surface response behaviour (ordering, filtering, totals) matches the pre-change behaviour on a recorded comparison.
- A measurement (query time or rows scanned, before/after) is recorded on this issue or its PR.
Activitydeveloping-today commented on Nov 25, 2026 dezren39 commented on Nov 25, 2026 Progress: I chose the #14060 search read-shape work as CF-7's first step, as #14947 explicitly requires that choice. PR #15036 adds in-process timings for the shared searchContext path and exposes them as Server-Timing on /search and /api/search.json. The source-read timings overlap because those reads run concurrently.
The hosted projection read remains downstream of CF-5d #14970: its M5 endpoints need the pm-service substrate from CF-5c #14969. The current searchContext in pm-stack/aggregator/src/server.ts still reads the laptop source adapter, so this PR records the per-stage costs without claiming the hosted surface is complete.
Fleet evidence: failing-first boot test developing-today-forks/fleet#45596698700 failed because the header was absent; developing-today-forks/fleet#45597936812 passed the fixture boot suite (19 pass). Typecheck run developing-today-forks/fleet#45597462931 stopped on the existing missing DashAction.clientToken fixture at test/store-remote-backends.test.ts:403.
After this PR, cd pm-stack/aggregator && bun test test/boot.test.ts shows 19 passing tests and verifies stage timings on both search routes; the next slice can implement one indexed /api/search.json read after the CF-5d projection substrate lands. dezren39 commented on Nov 25, 2026 Claim (queue task 23739, worker oc-code-07, lane IW-354): shepherding the recorded CF-7 first step — PR #15036 (search stage timings) — to merge with fresh verification at its head against current main, then parking this slice on its remaining gate (CF-5d #14970) with the wake recorded. No competing slice will be started while #14970 is open. dezren39 commented on Nov 25, 2026 CF-7 first step landed (queue task 23739, lane IW-354 shepherd):
- The choice recorded by the prior lane stands: pm-aggregator: search takes 33s and the registry twin ships 6.7 MB — bound the search + registry reads #14060 search read-shape work is CF-7's first step. PR aggregator: expose search stage timings for CF-7 first slice #15036 (search stage timings for the shared
searchContext path, exposed as Server-Timing on /search and /api/search.json) is MERGED, merge commit 36b8dae0b6fc4f385f8f0f425fde48342e7e6932.
- Fresh verification at the PR head merged with current main (laptop worktree, named fallback — the aggregator suites are bun-local by design):
bun test test/boot.test.ts 19 pass / 0 fail; bun test test/search-view.test.ts test/boot.test.ts 33 pass / 0 fail; bunx tsc --noEmit clean. The typecheck stop in the PR's earlier record was the pm-stack/aggregator: tsc --noEmit fails on main (store-remote-backends.test.ts DashAction clientToken) #14997 fixture defect, since fixed on main by PR fix(aggregator): give #14865 changed-rows fixtures their clientTokens (#14997) #15046. The full aggregator suite exceeded the run window in the fresh worktree and was not used as evidence; the PR's own named acceptance suites above are the verification.
- Remainder: the hosted projection reads stay gated on CF-5d CF-5d (#14945): M5 read waves over tenant-DB projections #14970 (M5 read waves over tenant-DB projections), which builds on the CF-5c pm-service substrate (CF-5c (#14945): pm-service serving substrate — async tenant store + Worker entry #14969, landed). Task 23739 is parked with wake = CF-5d (#14945): M5 read waves over tenant-DB projections #14970 closed. On wake: implement one indexed
/api/search.json read over the CF-5d projections first (per the PR aggregator: expose search stage timings for CF-7 first slice #15036 record), then the remaining surfaces (/sessions, /item, /discuss, /conflicts read side) within their latency budgets, recording each projection's rebuild procedure on this issue.
developing-today-fleet commented on Nov 25, 2026 ContributorAuthor More actions Intake review
🤖 Agent note · filed
- Agent: fleet monitor
- Session / ID: repo-fleet-monitor run 2026-11-25 07:14 CST
- Found via: monitor reconciliation — Duty 2 intake enrichment
- Task: Intake pass (protocol §5): verified the issue is still live, appended acceptance criteria where missing, normalized labels, added
meta/enriched
- Expectation: A worker or sweep can pick this up from the acceptance criteria without re-deriving scope
- Links: related merged PRs explicitly referencing this issue: none found
Notes: Still live — no merged PR explicitly resolves this issue (checked this run). Acceptance criteria were appended to the body (original text preserved verbatim above the new section).
Risks: Scope is as stated in the body; if the underlying surface has moved since filing, the picker should re-validate against current main before implementing.
Suggested approach: Work from the acceptance criteria top-down; verify each criterion with the cheapest decisive check (test, run, or read-back) and record the evidence on the closing PR.
dezren39 commented on Nov 26, 2026 agent-note:v1
state: blocked-on-gate — CF-7 remainder waits on CF-5d #14970 (itself waiting on CF-5c #14969); both confirmed OPEN this run
task: 14947 CF-7 · lane: xaltha (general lane) · 2026-11-25 hourly loop ~19:24 CST
Handed #14947 by fleet agent next (shortlist rung). Claim-check: the CF-7 first step already landed — PR #15036 merged (search stage timings), and lane IW-354 (queue task 23739) already shepherded it and parked this slice on its remaining gate with the wake recorded. No competing slice started.
Gate re-verified this run: #14970 (CF-5d, M5 read waves over tenant-DB projections) OPEN; its prerequisite #14969 (CF-5c, pm-service serving substrate) OPEN. The hosted indexed-projection read for the heavy surfaces cannot start until that substrate lands. Nothing startable on #14947 itself this run; the blocker work belongs to #14969/#14970. developing-today-fleet commented on Nov 26, 2026 ContributorAuthor More actions agent-note:v1 — felix lane (CF-7, #14866), 2026-11-26: supervised run under the owner ruling on #14866 (comment 7189808145 — D1 is the target for ALL fleet state, superseding design §2; PM board data and ledgers target D1 too). This note records (a) the #14060 choice this issue requires, (b) the per-surface projection design under the D1 ruling, and (c) the ROLLBACK NOTE, posted before any deploy or flip from this lane.
The required choice
#14060's read-shape work is CF-7's first step — already chosen and landed (PR #15036, merged 36b8dae: search stage timings as Server-Timing on /search and /api/search.json). This lane carries that choice forward: the hosted shape is an indexed projection read in pm-service, never a port of the laptop's unbounded reads. The projection substrate is the pm-service tenant store (CF-5c #14969, merged + Worker deployed); under the owner ruling its database target is D1 (SQLite — the existing DDL in pm-stack/pm-service/src/tenant-store/migrations/ is D1-compatible as written; the CF-5 lane owns the live D1 retarget/provisioning of pm-service).
Per-surface projection design (D1 target)
- /search — FTS5 full-text index over the item pool: migration
0002_pm_search_index.sql adds external-content FTS5 table pm_items_fts over pm_items(title, ref) kept in sync by triggers, plus the rebuild procedure recorded in the migration header (INSERT INTO pm_items_fts(pm_items_fts) VALUES('rebuild')). The hosted read is GET /api/search.json?q= in pm-service's async read API: a bounded FTS5 MATCH (bm25-ranked, LIMIT ≤ 200), never a pool scan. Bodies are not in the projection (the collector emits titles/refs, not issue bodies), so hosted search is title/ref search today; body search stays on the tunnel tier until the collector emits bodies — stated plainly, not papered over.
- /item/ — already an indexed point read shape:
pm_items_ref_idx on pm_items(ref). The current async handler loads the whole pool to find one ref (needed today for genealogy); the indexed point read is the follow-up once genealogy's ancestor walk is expressed over pm_links indexes (source/target indexes already exist). Not changed by this lane's PR.
- /sessions —
pm_item_metadata_session_idx covers items-by-session; the sessions surface itself reads the laptop's session store, which has NO hosted projection yet. Stays tunnel-served until a session projection exists (follow-up, not invented here).
- /discuss/ — discussion/comment bodies are not in the tenant schema at all. Needs a comments projection before any hosted read; stays tunnel-served. (CF-5b's hosted /comments reads the fleet-platform ledger's comment records — a different, smaller set than per-item discussion.)
- /conflicts (read side) — the projection already exists:
pm_reconcile_findings with pm_reconcile_findings_board_idx. Read-only, per the issue body (feat(aggregator): source-conflict inbox — one resolvable queue for Project-vs-derived and Kaneo-vs-GitHub disagreements, with per-class trust rulings #1282's trust rulings unchanged).
What this lane does on CF-7
One PR (left unmerged for Felix): migration 0002 (FTS5 index + triggers + rebuild note), searchItemsAsync in a new pm-stack/pm-service/src/read-api/search.ts, the GET /api/search.json route in the async read API, and pm-stack/pm-service/test/read-api-search.test.ts (hand-computed oracle: ranking, bounds, empty/garbage queries, index freshness after a re-landed snapshot). Verified remotely via the fleet-command workflow (never compiled on this seat).
Rollback (recorded before any deploy/flip)
- The PR changes no serving path at pm.security.cab: pm-service is not the front door's search source today, and no route flip is made by this lane. Deploy rollback for pm-service = its versions pipeline (promote the previous version id back, per design §4).
- Schema rollback: migration 0002 is additive (one virtual table + three triggers). Down-path:
DROP TRIGGER pm_items_fts_ai/ad/au; DROP TABLE pm_items_fts; and delete the version-2 row from pm_schema_migrations — recorded here because the migration runner is forward-only. No existing table is altered; no data copy is involved (the FTS table is a rebuildable projection of pm_items).
- Data-copy verification: none required for this PR (no data moves; the index derives from rows already in the store). When the CF-5 lane provisions the D1 tenant DB and copies the pool, counts must be recorded on CF-5c (#14945): pm-service serving substrate — async tenant store + Worker entry #14969/CF-5d (#14945): M5 read waves over tenant-DB projections #14970 before the pm-service cutover — that gate is theirs; this lane's search read must not be flipped to until their counts exist.
Still blocked (honest)
Live hosted /search at pm.security.cab waits on: CF-5c's tenant DB provisioning (today the pm-service read routes answer 503 — PM_TENANT_DB_URL/PM_TENANT_DB_TOKEN unprovisioned; under the ruling the CF-5 lane retargets this to D1) and CF-5d #14970 (PR #15154 still open). This lane does not touch CF-5 issues. The before/after measurement for the acceptance criteria: laptop /search's unbounded read is the 33 s / full-registry case from #14060 (stage timings now recorded by PR #15036); the hosted read's rows-scanned is bounded by the FTS index + LIMIT by construction, and the test suite asserts result bounds — the live latency number can only be recorded once the D1 tenant DB is provisioned and populated. developing-today-fleet commented on Nov 26, 2026 ContributorAuthor More actions agent-note:v1 — felix lane (CF-7), 2026-11-26: progress record for the design + rollback note above (comment 7190091044).
- PR pm-service: hosted search over an FTS5 projection of the pool (CF-7, #14947) #15547 opened (unmerged, for Felix): migration 0002 (FTS5 index over
pm_items(title, ref) + triggers + recorded rebuild/down-path), GET /api/search.json in pm-service's async read API (bounded, bm25-ranked), and test/read-api-search.test.ts with a hand-computed oracle. Branch felix/cf7-search-projection, head a495902.
- Remote verification dispatched (never compiled on this seat): fleet-command run 45806818328 on developing-today/fleet —
bun test test/read-api-search.test.ts test/read-api-async.test.ts test/tenant-store.test.ts in pm-stack/pm-service at the PR head. At the time of this note the run is still QUEUED behind a fleet-wide backlog. The terminal result will be recorded here when it lands; the PR is not verified until it does. One named risk the run settles: FTS5 must be compiled into the test runtime's SQLite (standard for bun:sqlite and for D1/libSQL; if the run says otherwise, the migration's fallback is a plain title index + LIKE-prefix read, recorded here before any change).
- Not done, by design: no deploy, no flip, no data copy (none is involved). Live hosted /search at pm.security.cab waits on the CF-5 lane's D1 tenant provisioning + copy counts (CF-5c (#14945): pm-service serving substrate — async tenant store + Worker entry #14969/CF-5d (#14945): M5 read waves over tenant-DB projections #14970) — this lane does not touch CF-5 issues.
dezren39 commented on Nov 26, 2026 agent-note:v1 — shepherd lane xaltha (queue task 24397): MERGED.
- Verification: fleet-command run 45900292068 (developing-today/fleet) completed SUCCESS at head b9fee08. Log shows real test output: all three previously failing migration tests now pass (
migrations > apply to an empty tenant DB…, migrations > create the full PM store schema…, migrations > the shipped migration files load in order…), final summary 33 pass / 0 fail / 95 expect() calls across the run's closing file group, run conclusion success.
- Mergeability re-checked immediately before merging: mergeable=true / clean, head unchanged at b9fee08….
- Merged 2026-11-26T22:04:25Z, merge commit 89fa429.
- Disposition of the linked issue: this PR says
Refs #14947 (no closing keyword), so CF-7 (#14866): PM heavy surfaces over indexed projections (M7) #14947 stays OPEN — correct, as CF-7's remaining per-surface work (/item, /sessions, /discuss, /conflicts) is still recorded there. The hosted FTS5 search projection (CF-7's /search surface) is now landed on main.
developing-today-fleet commented on Nov 26, 2026 ContributorAuthor More actions
Lane oc-code-07 — CF-7 premise re-check, 2026-11-26.
Fresh state: PR #15547 merged at 22:04Z, delivering the hosted /search FTS5 pool projection. PR #15036 is also merged. CF-5d #14970 remains open and blocked by CF-5c #14969. The design of record explicitly makes CF-7 dependent on CF-5's indexed read-wave stores.
Reviewed the remaining routes against the landed schema: pm_items and its ref index can support a bounded Project-pool lookup, but do not contain session registry rows, discussion/comment threads, or the orchestration/quota/ruling sources required for full item/conflicts behavior. Therefore none of /sessions, /item, /discuss, or /conflicts can safely move wholesale to the current projection. Adding a one-off item API optimization would not satisfy this slice's hosted-heavy-surfaces acceptance and would not be an honest result.
Decision: CF-7 remains blocked on the projection substrate, not on a person. #14060 read-shape work is a prerequisite/design input; this lane does not port its unbounded reads or invent missing projections. No code changed. Resume after CF-5d #14970 closes; then select a surface whose source projection is actually present and record its behavior and before/after measurement. developing-today-fleet commented on Nov 27, 2026 ContributorAuthor More actions agent-note:v1 — lane 2107-E (agent work loop ADVANCE/charlie, 2026-11-26): premise-check + stand-down, no competing slice started.
Premise verified from the full record (issue + all 8 comments): the #14060 first step landed (PR #15036, merged 36b8dae) and the hosted /search FTS5 projection landed (PR #15547, merged 2026-11-26T22:04Z, merge commit 89fa429, fleet-command run 45900292068 SUCCESS at head b9fee08). The remainder — /sessions, /item, /discuss, /conflicts over indexed projections — is gated exactly as the latest record (oc-code-07, 7204390868, state=parked, task 23739) states: the current pm_items projection lacks session-registry, discussion-thread, and orchestration/quota/ruling sources, and CF-5d #14970 is the recorded dependency.
Gate re-verified this run via gh api: #14970 OPEN, #14969 OPEN. Per the standing record on this issue ("No competing slice will be started while #14970 is open"), this lane starts nothing here. Wake: #14970 closes (or its projection sources land) → the remaining heavy surfaces become startable. — 2107-E dezren39 commented on Nov 27, 2026 agent-note:v1
state: blocked-on-gate — re-verified 2026-11-26 hourly loop ~21:41 CST, lane xaltha (general lane)
Handed #14947 again by fleet agent next (shortlist rung). Claim-check this run:
This run's self-find fallback was also claim-checked: #15883 (id-events ChainExt thread field) and #15900 (placement-load front door) were both taken by sibling xaltha lanes during this run (fresh locked worktrees code-15883 / code-15900 appeared mid-check), so no duplicate slice was started. Shortlist refilled to 19 entries for the next draw. developing-today-fleet commented on Nov 27, 2026 ContributorAuthor More actions
CF-7 recheck — task 23739: #14970 remains OPEN with status/blocked and queue/blocked; its CF-5c prerequisite #14969 is also OPEN, with the serving tenant credentials still unprovisioned. PR #15724 (program grouping route) and PR #15547 (hosted FTS5 /search) are merged. The latest #14947 note remains accurate: the current projections do not supply the session registry, discussion threads, or orchestration/quota/ruling data required for the remaining /sessions, /item, /discuss, and /conflicts surfaces. This pickup made no code, branch, or build changes.
Parked until CF-5d #14970 closes or records usable projection sources. Then recheck the projection shape and select a surface whose inputs exist, with the required behavior comparison and before/after measurement. developing-today-fleet commented on Nov 27, 2026 ContributorAuthor More actions
Lane code-j — CF-7 premise re-check, 2026-11-27 ~13:55Z. Handed #14947 by fleet agent next (shortlist rung).
Gate re-verified fresh via gh: CF-5d #14970 OPEN (status/blocked, queue/blocked, updated 12:04Z); its prerequisite CF-5c #14969 OPEN (status/in-progress, updated 11:21Z). Landed slices unchanged: #14060 read-shape (#15036 merged) and hosted /search FTS5 projection (#15547 merged). The remainder (/sessions, /item, /discuss, /conflicts over indexed projections) still lacks its substrate — no startable slice, no competing slice started, no code/branch/build changes this pickup. Standing down until #14970 closes or records usable projection sources. developing-today-fleet commented on Nov 27, 2026 ContributorAuthor More actions
Lane oc-code-04 — CF-7 premise re-check, 2026-11-27 ~18:47Z. Handed #14947 by fleet agent next (shortlist rung).
Gate re-verified fresh: CF-5d #14970 OPEN (status/blocked, queue/blocked, updated 12:04Z); CF-5c #14969 OPEN (status/in-progress, updated 15:33Z — new code-g verify note: D1 pm-service schema v1+v2 applied but every data table empty, snapshot sourcing/loading still blocking, versions-standard deploy path red). Landed slices unchanged: #15036 (read-shape timings) and #15547 (hosted /search FTS5; 0002 migration confirmed present on origin/main) merged. No new projection sources for /sessions, /item, /discuss, or /conflicts; D1 tenant store holds zero rows.
No startable slice, no competing slice started, no code/branch/build changes this pickup. Standing down until #14970 closes or records usable projection sources. developing-today-fleet commented on Nov 28, 2026 ContributorAuthor More actions
Lane oc-code-02 — CF-7 premise re-check, 2026-11-28 ~00:10Z. Handed #14947 by fleet agent next (shortlist rung). Verified each remaining surface against code on origin/main (42f0f6c; local checkout was stale, so all reads below are git show origin/main:... / git grep origin/main).
- /search: CHECKED. PR pm-service: hosted search over an FTS5 projection of the pool (CF-7, #14947) #15547 on main (
pm-service/src/read-api/search.ts, migration 0002_pm_search_index.sql, FTS5 + triggers + rebuild note).
- /item: UNCHECKED, not sliceable now.
itemJsonAsync (async-api.ts:42) loads the full pool (POOL_SQL, no WHERE) then pool.find(ref); deriveGenealogy builds a whole-pool byRef map for the ancestor walk. The indexed point read needs the ancestor walk expressed over the pm_links source/target indexes first — a genealogy-model change touching the dual-edition conformance surface, not a one-PR slice.
- /sessions, /discuss: UNCHECKED. No session-registry or comments projection exists in the tenant store (0001 tables + 0002 FTS only).
- /conflicts read side: UNCHECKED.
pm_reconcile_findings currently holds ingest findings only (recordIngestFinding kinds ingest-failure/ingest-deferred, collector/store.ts); the laptop inbox computes project-vs-derived + quota-records + rulings live over pool/orchestration/services. Serving findings rows would not satisfy the behavior-match criterion.
- Gate: CF-5d CF-5d (#14945): M5 read waves over tenant-DB projections #14970 still OPEN (
status/blocked, queue/blocked); CF-5c CF-5c (#14945): pm-service serving substrate — async tenant store + Worker entry #14969 OPEN (status/in-progress). CF-5d's first wave landed (PR feat(pm-service): CF-5d first read wave — overview + queue views over tenant projections (#14970) #15154: overview + queue + program), but none of the remaining CF-7 surfaces' projection inputs landed with it. No open PR touches CF-7 or the pm-service read-api for these surfaces.
No code changed; no competing slice started. Wake: #14970 closes or records usable projection sources for sessions/discuss/conflicts/item-genealogy. — oc-code-02 developing-today-fleet commented on Nov 28, 2026 ContributorAuthor More actions
Lane code-h — CF-7 premise re-check, 2026-11-28 ~04:25Z. Handed #14947 by fleet agent next (shortlist rung).
Gate re-verified fresh: CF-5d #14970 OPEN (updated 2026-11-27T12:04Z); CF-5c #14969 OPEN (updated 2026-11-27T15:33Z). No open PR references #14970 or CF-7; landed slices unchanged (#15036 read-shape timings, #15547 hosted /search FTS5). Remaining surfaces (/sessions, /item, /discuss, /conflicts) still lack projection sources — no startable slice, no competing slice started, no code/branch/build changes this pickup. Standing down until #14970 closes or records usable projection sources. developing-today-fleet commented on Nov 28, 2026 ContributorAuthor More actions
Lane 0422-F — CF-7 premise re-check, 2026-11-28 (delta PRESS queue lane). Handed #14947 by fleet agent next (queue task 23739); read the issue + ALL 17 comments.
dezren39 commented on Nov 28, 2026
Lane 1237-J (alpha DRIVE queue-draw, 2026-11-28 12:37 CST run) — queue task 23739 claimed 2026-11-28T18:54:46Z (re-served on park expiry), parked 24h. Gate re-verified firsthand this claim:
Wake / ready condition (non-person): #14970 closes or records usable projection sources — then select one surface supported by the actual projections and implement it. No code changed by this lane.
MetadataMetadataDevelopmentNo branches or pull requestsIssue actions
|