Repository navigation
Description
Task
Add three missing ControlStream nested navigation methods (getControlStreamSystems, getControlStreamProcedures, getControlStreamHistory) to CSAPIQueryBuilder to match the DataStream equivalents, per OGC 23-002 Tables 5 and 10.
Finding Reference: Demo app finding from ogc-csapi-explorer#34 — ControlStream detail views could not display Systems/Procedures relationship cards because the URL builder methods don't exist.
Severity: Moderate
Category: Design gap
Ownership: Ours
Problem Statement
The CSAPIQueryBuilder provides five sub-resource navigation methods for DataStream but only three for ControlStream:
| Navigation | DataStream | ControlStream |
|---|---|---|
| Schema | getDataStreamSchema ✅ |
getControlStreamSchema ✅ |
| Child resources | getDataStreamObservations ✅ |
getControlStreamCommands ✅ |
| Systems | getDataStreamSystems ✅ |
MISSING ❌ |
| Procedures | getDataStreamProcedures ✅ |
MISSING ❌ |
| History | getDataStreamHistory ✅ |
MISSING ❌ |
OGC 23-002 Tables 5 (DataStream Associations, §9.2.2) and 10 (ControlStream Associations, §10.2.2) define identical association structures — both have system, procedure, deployment, samplingFeatures, and featuresOfInterest. There is no specification basis for this asymmetry.
Additionally, history is implemented for every other resource type — ControlStream is the only gap:
getSystemHistory✅ •getDeploymentHistory✅ •getProcedureHistory✅ •getSamplingFeatureHistory✅ •getPropertyHistory✅ •getDataStreamHistory✅ •getObservationHistory✅ •getControlStreamHistory❌
Impact: ControlStream detail views in the explorer demo cannot display "Systems" and "Procedures" relationship cards. History navigation is unavailable for ControlStream resources.
Findings Report
📄 Issue #104 Findings Report — Full risk assessment, spec analysis, and recommendation (FIX — purely additive, zero backward compatibility risk).
Files to Create or Modify
| File | Action | Est. Lines | Purpose |
|---|---|---|---|
src/ogc-api/csapi/url_builder.ts |
Modify | ~+60 | Add 3 methods with JSDoc |
src/ogc-api/csapi/url_builder.spec.ts |
Modify | ~+30 | Add 6 test cases (3 happy-path + 3 EndpointError guards) |
Proposed Fix
Add three methods to CSAPIQueryBuilder, following the exact same buildResourceUrl pattern as the DataStream equivalents:
getControlStreamSystems(id: string, options?: QueryOptions): string {
this.assertResourceAvailable('controlStreams');
return this.buildResourceUrl('controlStreams', id, 'systems', options);
}
getControlStreamProcedures(id: string, options?: QueryOptions): string {
this.assertResourceAvailable('controlStreams');
return this.buildResourceUrl('controlStreams', id, 'procedures', options);
}
getControlStreamHistory(id: string, options?: QueryOptions): string {
this.assertResourceAvailable('controlStreams');
return this.buildResourceUrl('controlStreams', id, 'history', options);
}All three follow the existing pattern — no changes to URL assembly logic, types, or infrastructure.
Scope — What NOT to Touch
- ❌ Do NOT modify
CommandQueryOptionsor any query parameter types — that belongs to Issue [DEFERRED] URL builder: command/observation CRUD methods require top-level endpoints, fail on nested-only servers #102 - ❌ Do NOT modify Part 2 parsers — that belongs to Issue Parsed Part 2 models discard all cross-reference fields — parent resource navigation impossible without raw JSON #103
- ❌ Do NOT modify
model.tsor any interfaces - ❌ Do NOT modify files outside the "Files to Create or Modify" table above
- ❌ Do NOT refactor existing code unless required to complete this task
- ❌ Do NOT add server-specific hardcoded branches
Acceptance Criteria
-
getControlStreamSystems(id, options?)method exists and generatescontrolStreams/{id}/systemsURLs -
getControlStreamProcedures(id, options?)method exists and generatescontrolStreams/{id}/proceduresURLs -
getControlStreamHistory(id, options?)method exists and generatescontrolStreams/{id}/historyURLs - All new methods have complete JSDoc documentation with
@seelinks to OGC 23-002 - 3 happy-path URL generation tests pass
- 3 EndpointError guard tests pass
- Existing tests still pass (
npm test) - No lint errors
Dependencies
Blocked by: Nothing
Blocks: ogc-csapi-explorer#34 — relationship cards for ControlStream detail views
Operational Constraints
⚠️ MANDATORY: Before starting work on this issue, reviewdocs/governance/AI_OPERATIONAL_CONSTRAINTS.md.
Key constraints:
- Precedence: OGC specifications → AI Collaboration Agreement → This issue description → Existing code → Conversational context
- No scope expansion: Fix the finding, nothing more
- No server-specific branches: Fixes must be general-purpose, not "if OSH" / "if 52N"
- Minimal diffs: Prefer the smallest change that satisfies the acceptance criteria
References
| # | Document | What It Provides |
|---|---|---|
| 1 | Issue #104 Findings Report | Full risk assessment and FIX recommendation |
| 2 | OGC 23-002 §9.2.2 Table 5 | DataStream associations (system, procedure, deployment, etc.) |
| 3 | OGC 23-002 §10.2.2 Table 10 | ControlStream associations (identical structure) |
| 4 | AI_OPERATIONAL_CONSTRAINTS.md |
Authority precedence and stop conditions |
| 5 | src/ogc-api/csapi/url_builder.ts L1615–1670 |
DataStream blueprint (Systems, Procedures, History methods) |
| 6 | src/ogc-api/csapi/url_builder.spec.ts L1896–1961 |
DataStream test blueprint |
Related Issues
- #102 — ControlStream query parameter model incomplete (DEFERRED)
- #103 — Cross-reference fields not extracted in Part 2 parsers (FIXED)
- ogc-csapi-explorer#34 — Add related-resource cards (blocked by this issue)
Activity
docs: add findings report for Issue #104 — ControlStream missing navi…
feat: add ControlStream systems, procedures, and history navigation m…
docs: add Phase 5.5 code review (Issues #99-#110 post-smoke-test)
merge: sync with upstream ogc-client-CSAPI_2 (Phase 5.5/5.6)