Skip to content

Phase 8 / D1a: Recon — visibility, consumer map, edr() template, isCollectionInfo inventory #182

Closed

Description

@Sam-Bolling

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:

  1. Visibility audit — current public/private status of:
    • OgcApiEndpoint.root
    • OgcApiEndpoint.getCollectionDocument
    • Any other accessor exposed for the CSAPI factory's benefit
  2. External consumer map — every endpoint.root / endpoint.getCollectionDocument reference in:
    • src/** (non-OgcApiEndpoint source)
    • src/**/*.spec.ts (tests)
    • app/** (demo app, if any)
  3. endpoint.edr(id) template — exact signature, return type, dynamic-import pattern, and error-wrapping style. This is the mirror for endpoint.csapi(id).
  4. isCollectionInfo cast inventory — every call site, its purpose, and what removing it forces.
  5. CSAPI factory entry shape — current createCSAPIQueryBuilder (or equivalent) signature, what it accepts (root doc + collection doc), and how it's currently called.
  6. Issue P6 Task 6: Modify endpoint.ts — Remove CSAPI Coupling #122 dependency edge — confirm the dynamic-import contract: which import is dynamic, why, and which test enforces it.
  7. Test impact estimate — count of spec files asserting on root / getCollectionDocument shape.

Acceptance

  • Fact sheet exists at /memories/session/d1-recon.md
  • Every numbered item above answered with file paths and line numbers
  • No source files modified (git status clean)

Out of scope

Any code change — including type-only edits. If a change feels obvious during recon, write it down for D1b/D1c instead of touching it.

Dependencies

Blocks: D1b, D1c, D1d
Blocked by: none

Parent

Refines #179.

Activity

  1. Sam-Bolling commented on Apr 30, 2026

    @Sam-Bolling
    Author

    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:

    1. Visibility audit — root is public get (endpoint.ts:67); getCollectionDocument is public (endpoint.ts:357). Both targeted for re-privatization in D1c.
    2. 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).
    3. 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)).
    4. isCollectionInfo cast inventory — defined and used exactly once, both in factory.ts. Disappears entirely after D1c when factory reshape routes through typed getCollectionInfo().
    5. 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.
    6. 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).
    7. 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.

    Closing as completed. Proceeding to D1b/#183.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions