Skip to content

P6 Task 10a: Boundary Verification and Litmus Test #126

@Sam-Bolling

Description

@Sam-Bolling

Task

Run all 12 verification gates (4 boundary checks + 5 CI gates + litmus test + behavioral checks), review the diff, and push the phase-6 branch. This is the final quality gate before rebase and delivery. Only proceed to Task 10b when every gate is green.

ROADMAP Reference: Phase 6, Task 10a — Boundary Verification and Litmus Test (~0.5–1 hours, Medium complexity)
Implementation Branch: phase-6


Files to Create or Modify

File Action Purpose
(none) N/A This task creates no new files and modifies no source code — it runs verification commands and pushes the branch

This is a verification + git push task, not a code authoring task.

Blueprint Reference

Scope — What to Implement

Step 1: Boundary Verification (V1–V4)

# Command Expected
V1 git grep "from.*csapi" src/ogc-api/endpoint.ts 0 matches — no outward CSAPI imports from endpoint
V2 git grep "csapi|CSAPI" src/index.ts 0 matches — no CSAPI in root exports
V3 git grep "import.*from.*csapi" -- "src/" ":!src/ogc-api/csapi/" 0 matches — no outward imports (full scan)
V4 git grep "from.*csapi" -- "src/" ":!src/ogc-api/csapi/" ":!src/index.ts" 0 matches — no remaining cross-boundary imports

If any V1–V4 check returns matches, STOP — identify the source task and fix.

Step 2: CI Verification (C1–C5)

npm run format:check    # C1 — Prettier
npm run typecheck        # C2 — TypeScript
npm run lint             # C3 — ESLint
npm run test:browser     # C4 — Browser tests
npm run test:node        # C5 — Node tests

All 5 must exit 0. These should already pass from Task 9 — this is a re-verification.

Step 3: Litmus Test (A4)

Verify the one-way dependency — removing CSAPI entirely leaves core functional:

# Step 3a: Temporarily hide CSAPI module
mv src/ogc-api/csapi src/ogc-api/_csapi_backup

# Step 3b: Verify core compiles without CSAPI
npx tsc --noEmit
# endpoint.ts has 0 imports from csapi/ → should compile
# index.ts has 0 csapi/ references → should compile

# Step 3c: (Optional) Run non-CSAPI tests
# npm run test:browser -- --testPathIgnorePatterns csapi

# Step 3d: Restore
mv src/ogc-api/_csapi_backup src/ogc-api/csapi

# Step 3e: Verify restored state compiles
npx tsc --noEmit

Critical: Always restore CSAPI after the litmus test. Verify the restored state compiles.

Step 4: Behavioral Verification (B1–B3)

Confirmed by the test suite in Step 2 (C4/C5):

  • B1: hasConnectedSystems — existing endpoint test passes
  • B2: csapiCollections — existing endpoint test passes
  • B3: All non-CSAPI functionality unchanged — full test suite passes

Step 5: Diff Review

# Architecture-only diff (Commit 15 — what jahow reviews)
git diff --stat HEAD~1..HEAD

# Total diff (both commits 14 + 15)
git diff --stat HEAD~2..HEAD

# Full diff against upstream/main (all 15 PR commits)
# git diff --stat upstream/main..HEAD

Review the Commit 15 diff to confirm:

  • 3 files created (csapi/index.ts, csapi/factory.ts, csapi/factory.spec.ts)
  • 4 files modified (endpoint.ts, index.ts, endpoint.spec.ts, package.json)
  • Net architecture diff is ~+5 lines (excluding formatting)

Step 6: Push to phase-6

git push origin phase-6

Failure Protocol

If ANY verification gate fails:

  1. Do NOT push
  2. Identify which prior task introduced the failure
  3. Return to that task's issue and fix
  4. Re-run the full verification from Step 1

Testing Requirements

  • All verification is read-only (grep, compile, test) except the litmus test (mv/restore) and final push
  • The litmus test is fully reversible — always restore CSAPI at the end

Scope — What NOT to Touch

  • ❌ Do NOT modify any source files — if verification fails, return to the appropriate prior task
  • ❌ Do NOT fix failures inline — they must be fixed in their originating task
  • ❌ Do NOT begin rebase operations — that belongs to Task 10b
  • ❌ Do NOT push to clean-pr or clean-fork — that belongs to Task 10b
  • ❌ Do NOT update PR D-1: Resolve SystemTypeUris name collision between model.ts and constants.ts #136 — that belongs to Task 10b
  • ❌ Do NOT change any CSAPI business logic
  • ❌ Do NOT forget to restore CSAPI after the litmus test

Acceptance Criteria

  • V1: git grep "from.*csapi" src/ogc-api/endpoint.ts → 0 matches
  • V2: git grep "csapi\|CSAPI" src/index.ts → 0 matches
  • V3: git grep "import.*from.*csapi" -- "src/" ":!src/ogc-api/csapi/" → 0 matches
  • V4: git grep "from.*csapi" -- "src/" ":!src/ogc-api/csapi/" ":!src/index.ts" → 0 matches
  • C1: npm run format:check → exit 0
  • C2: npm run typecheck → exit 0
  • C3: npm run lint → exit 0
  • C4: npm run test:browser → all pass
  • C5: npm run test:node → all pass
  • A4: Litmus test — core compiles with CSAPI removed, CSAPI restored afterward
  • B1/B2/B3: Behavioral tests pass (hasConnectedSystems, csapiCollections, non-CSAPI)
  • Diff review confirms 7 files changed in Commit 15 (3 created, 4 modified)
  • phase-6 branch pushed to origin

Dependencies

Blocked by: Task 9 — Run CI Gates and Commit (Commit 15 must be recorded)
Blocks: Task 10b — Rebase to clean-pr and Push to Upstream


Operational Constraints

⚠️ MANDATORY: Before starting work on this issue, review docs/governance/AI_OPERATIONAL_CONSTRAINTS.md.

For Phase 6 issues: Review the P6 Implementation Guide §9 for the complete 12-gate verification plan. Also review the Architecture Verification Test template.

Key constraints for this task:

  • Precedence: OGC specifications → AI Collaboration Agreement → This issue description → Existing code → Conversational context
  • No inline fixes: If verification fails, return to the appropriate prior task — do NOT fix in this task
  • Litmus test safety: Always restore CSAPI after the litmus test
  • Push only phase-6: Do NOT push to clean-pr or upstream fork — that belongs to Task 10b

Phase 6 Task-Specific Scope Boundaries

  • Task 10a (this task) must NOT push to any remote other than origin phase-6 — verification only (plus phase-6 push)
  • Task 10b must NOT modify code files — git operations only
  • Split rationale: Verification is fully local and reversible; rebase/push modifies remote state visible to the upstream reviewer. See Task Granularity Review.

References

Primary References (must read)

# Document What It Provides
1 P6 Implementation Guide §9 12-gate verification plan (V1–V4, C1–C5, litmus, diff)
2 P6 Contribution Goal — Acceptance Criteria A1–A4, C1–C5, B1–B3 criteria definitions
3 P6 ROADMAP Task 10a Task definition, deliverables, dependencies
4 Architecture Verification Test template 12-step verification sequence template
5 Task Granularity Review 10a/10b split rationale at verify/deliver boundary

12-Gate Quick Reference

# Category Gate Command
A1 Architecture Zero CSAPI in index.ts git grep "csapi|CSAPI" src/index.ts → 0
A2 Architecture ./csapi sub-path in exports Inspect package.json
A3 Architecture Zero outward CSAPI imports git grep "from.*csapi" -- "src/" ":!src/ogc-api/csapi/" → 0
A4 Architecture Core compiles without CSAPI Litmus test
C1 CI Prettier npm run format:check
C2 CI TypeScript npm run typecheck
C3 CI ESLint npm run lint
C4 CI Browser tests npm run test:browser
C5 CI Node tests npm run test:node
B1 Behavioral hasConnectedSystems Existing test
B2 Behavioral csapiCollections Existing test
B3 Behavioral Non-CSAPI unchanged Full suite

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