Skip to content

Narrow getControlStreamProcedures option type to ProcedureQueryOptions (F46) #112

Closed

Description

@Sam-Bolling

Task

Narrow getControlStreamProcedures() option type from QueryOptions to ProcedureQueryOptions for consistency with Issue #107's type narrowing across all nested builder methods.

Finding Reference: F46 from Phase 5.5 Code Review
Severity: Low
Category: Design gap (type consistency)
Ownership: Ours


Problem Statement

In Issue #104, getControlStreamProcedures() was added with the generic QueryOptions base type:

getControlStreamProcedures(id: string, options?: QueryOptions): string {

Issue #107 subsequently narrowed all 12 nested builder methods to resource-specific option types. Since getControlStreamProcedures() was added after #107, it missed the narrowing pass. All other nested methods that return procedures or accept procedure-related options use ProcedureQueryOptions:

// Example: existing pattern
getProcedureSystems(id: string, options?: SystemQueryOptions): string {

ProcedureQueryOptions currently extends QueryOptions without adding fields, so there's no functional gap — but future additions to ProcedureQueryOptions would not be available on this method.

Impact: Low — type-safety gap only. No runtime behavior difference.

Files to Create or Modify

File Action Est. Lines Purpose
src/ogc-api/csapi/url_builder.ts Modify ~1 Change options?: QueryOptions to options?: ProcedureQueryOptions

Proposed Fix

Change the method signature from:

getControlStreamProcedures(id: string, options?: QueryOptions): string {

to:

getControlStreamProcedures(id: string, options?: ProcedureQueryOptions): string {

The ProcedureQueryOptions import already exists in the file's import statement.

Scope — What NOT to Touch

  • ❌ Do NOT modify any other builder method signatures
  • ❌ Do NOT modify buildResourceUrl() internals
  • ❌ Do NOT modify test files (no behavioral change)
  • ❌ Do NOT modify files outside the "Files to Create or Modify" table above

Acceptance Criteria

  • getControlStreamProcedures() signature uses ProcedureQueryOptions instead of QueryOptions
  • All 1282 existing CSAPI tests still pass
  • tsc --noEmit compiles cleanly
  • No lint errors

Dependencies

Blocked by: Nothing
Blocks: Nothing


Operational Constraints

⚠️ MANDATORY: Before starting work on this issue, review docs/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 type, nothing more
  • Minimal diffs: One-word change in one method signature

References

# Document What It Provides
1 Phase 5.5 Code Review — F46 Finding description and context
2 src/ogc-api/csapi/url_builder.ts Affected source file — getControlStreamProcedures()
3 Issue #107 — Narrow nested builder method option types Precedent for this change

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