You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Sub-task of #179. Reconnaissance pass for the D1 coordinated refactor (Findings 018 + 024). No code changes — read-only mapping pass that produces a fact sheet committed to session memory.
Goal
Eliminate every guess before D1b–D1d touch code. Document the current shape of the public API surface and every consumer that depends on it.
Deliverables
A short fact sheet (committed to session memory under /memories/session/d1-recon.md) covering:
Visibility audit — current public/private status of:
OgcApiEndpoint.root
OgcApiEndpoint.getCollectionDocument
Any other accessor exposed for the CSAPI factory's benefit
External consumer map — every endpoint.root / endpoint.getCollectionDocument reference in:
src/** (non-OgcApiEndpoint source)
src/**/*.spec.ts (tests)
app/** (demo app, if any)
endpoint.edr(id) template — exact signature, return type, dynamic-import pattern, and error-wrapping style. This is the mirror for endpoint.csapi(id).
isCollectionInfo cast inventory — every call site, its purpose, and what removing it forces.
CSAPI factory entry shape — current createCSAPIQueryBuilder (or equivalent) signature, what it accepts (root doc + collection doc), and how it's currently called.
D1a recon complete. Read-only fact-finding pass committed to session memory at /memories/session/d1-recon.md. No source files modified (git status clean at HEAD ca1157c).
Findings summary:
Visibility audit — root is public get (endpoint.ts:67); getCollectionDocument is public (endpoint.ts:357). Both targeted for re-privatization in D1c.
External consumer map — Only TWO external callers of root/getCollectionDocument across the entire src/** tree:
src/ogc-api/csapi/factory.ts:75-76 (will be eliminated by D1b's value-shaped factory reshape)
src/ogc-api/endpoint.spec.ts:2868 (migrates to getCollectionInfo in D1c)
Zero references in app/**. STAC's this.root is internal to a separate class (out of scope).
edr() template captured — uses static import (deliberate divergence from D1b's required dynamic import per P6 Task 6: Modify endpoint.ts — Remove CSAPI Coupling #122). Also has a missing-await bug on its capability gate; D1b's csapi() must NOT propagate the bug — implementation-guide §4.6 has the corrected if (!(await this.hasConnectedSystems)).
isCollectionInfo cast inventory — defined and used exactly once, both in factory.ts. Disappears entirely after D1c when factory reshape routes through typed getCollectionInfo().
Factory entry shape — current async createCSAPIBuilder(endpoint, collectionId) reshapes to pure createCSAPIBuilder(collection: CSAPICollectionRef, resourceUrls: ReadonlyMap<string,string>): CSAPIQueryBuilder. CSAPICollectionRef already exists at src/ogc-api/csapi/model.ts:129.
Issue P6 Task 6: Modify endpoint.ts — Remove CSAPI Coupling #122 dependency-edge contract — preserved by dynamic await import(''./csapi/factory.js'') and await import(''./csapi/helpers.js'') inside endpoint.csapi(). No automated test enforces this; review-discipline-only. Pattern precedent: src/wmts/endpoint.ts:184,198 (ol-tilegrid.js).
Test impact — 2 spec files modified, 0 new, 0 deleted. Net factory.spec.ts simplifies by ~60 LOC (no more fake OgcApiEndpoint); endpoint.spec.ts gains ~80 LOC of new csapi() tests + migrates one block to getCollectionInfo.
Sequencing refinement (recorded, not a decision change): D1b is not strictly purely "additive" — to add endpoint.csapi() cleanly, createCSAPIBuilder''s signature must reshape in the same commit (otherwise we''d carry two factory variants). D1c remains the subtractive cut: re-privatize root/getCollectionDocument, delete isCollectionInfo, migrate the one test caller. Full rationale in /memories/session/d1-recon.md §8.
Activity
Sam-Bolling commentedon Apr 30, 2026
D1a recon complete. Read-only fact-finding pass committed to session memory at
/memories/session/d1-recon.md. No source files modified (git statusclean at HEADca1157c).Findings summary:
rootispublic get(endpoint.ts:67);getCollectionDocumentispublic(endpoint.ts:357). Both targeted for re-privatization in D1c.root/getCollectionDocumentacross the entiresrc/**tree:src/ogc-api/csapi/factory.ts:75-76(will be eliminated by D1b's value-shaped factory reshape)src/ogc-api/endpoint.spec.ts:2868(migrates togetCollectionInfoin D1c)app/**. STAC'sthis.rootis internal to a separate class (out of scope).edr()template captured — uses static import (deliberate divergence from D1b's required dynamic import per P6 Task 6: Modify endpoint.ts — Remove CSAPI Coupling #122). Also has a missing-awaitbug on its capability gate; D1b'scsapi()must NOT propagate the bug — implementation-guide §4.6 has the correctedif (!(await this.hasConnectedSystems)).isCollectionInfocast inventory — defined and used exactly once, both infactory.ts. Disappears entirely after D1c when factory reshape routes through typedgetCollectionInfo().createCSAPIBuilder(endpoint, collectionId)reshapes to purecreateCSAPIBuilder(collection: CSAPICollectionRef, resourceUrls: ReadonlyMap<string,string>): CSAPIQueryBuilder.CSAPICollectionRefalready exists atsrc/ogc-api/csapi/model.ts:129.await import(''./csapi/factory.js'')andawait import(''./csapi/helpers.js'')insideendpoint.csapi(). No automated test enforces this; review-discipline-only. Pattern precedent:src/wmts/endpoint.ts:184,198(ol-tilegrid.js).factory.spec.tssimplifies by ~60 LOC (no more fakeOgcApiEndpoint);endpoint.spec.tsgains ~80 LOC of newcsapi()tests + migrates one block togetCollectionInfo.Sequencing refinement (recorded, not a decision change): D1b is not strictly purely "additive" — to add
endpoint.csapi()cleanly,createCSAPIBuilder''s signature must reshape in the same commit (otherwise we''d carry two factory variants). D1c remains the subtractive cut: re-privatizeroot/getCollectionDocument, deleteisCollectionInfo, migrate the one test caller. Full rationale in/memories/session/d1-recon.md§8.Closing as completed. Proceeding to D1b/#183.