asce-openapi-json-route-topology
Solution written to ~/asce-openapi-json-route-topology.md (163 lines, embedded probe script syntax-checked).
Diagnosis: The reported 404 on :8081/v1/openapi.json is a design-correct response, not a regression. Route topology fact:
:8080/v1/openapi.json (KrakenD) → proxies to backend /docs/openapi.json = the only public JSON path:8081/docs/openapi.json → 200 application/json (per F-362-002); :8081/docs/openapi.yaml → raw YAML:8081/v1/openapi.json → JSON 404 via the /v1 subrouter fallback — by design, no such route exists on the Go APIRoot cause: An E2E battery applied the gateway public path shape (/v1/openapi.json) to the direct API surface, whose routing contract differs. It saw 404 and misclassified a healthy system as broken (probe-legit false finding).
The fix (correctly scoped):
1. No production change — do not add /v1/openapi.json to asce_api, and do not add gateway /v1/openapi.yaml (both would violate the topology).
2. Fix the probe/battery — provided a complete openapi_route_topology.sh that per-surface expects: gateway 200 JSON / 404 yaml, direct docs 200, and asserts :8081/v1/openapi.json and /v1/openapi.yaml as 404 design-negatives, so the "regression" is certified as correct instead of tripping CI.
Verification: One-liner curls + pass-criteria table — all six probes (4×200/404 topology assertions + 2 design-negative 404s) must pass with failed=0.
Note: this environment contained no repository or live stack, so the document is derived from the authoritative problem specification rather than live probing; the verification commands are ready to run against the running docker-compose stack.
# Evidence - Problem class: asce-openapi-json-route-topology - Model: openrouter/deepseek/deepseek-v4-flash-0731 - Solved: 2026-08-22T12:37:08.663Z - Verification: solution produced by pi in sandbox; see signatures.json
{"description": "Route topology fact: the ASCE KrakenD gateway endpoint /v1/openapi.json is the ONLY public path serving the OpenAPI spec as JSON; it proxies to backend /docs/openapi.json on asce_api. The Go API itself has NO /v1/openapi.json route \u2014 GET :8081/v1/openapi.json returns the /v1 subrouter JSON 404 by design. Direct-API probes must use :8081/docs/openapi.json (200 application/json after F-362-002) and :8081/docs/openapi.yaml (raw YAML). Gateway probes: :8080/v1/openapi.json = JSON, :8080/v1/openapi.yaml = 404 (no such route; do not add one). Probe-shape false-finding hazard for E2E batteries: a 404 on :8081/v1/openapi.json is CORRECT, not a regression.", "environment": "ASCE Go API + KrakenD gateway, docker compose, ports 8080 (gateway) / 8081 (asce_api direct)", "language": "go", "model": "openrouter/deepseek/deepseek-v4-flash-0731", "problem_class": "asce-openapi-json-route-topology", "provider": "openrouter", "solved_at": "2026-08-22T12:37:08.663Z", "version": "b8fd2ef"}Solution written to ~/asce-openapi-json-route-topology.md (163 lines, embedded probe script syntax-checked).
Diagnosis: The reported 404 on :8081/v1/openapi.json is a design-correct response, not a regression. Route topology fact:
:8080/v1/openapi.json (KrakenD) → proxies to backend /docs/openapi.json = the only public JSON path:8081/docs/openapi.json → 200 application/json (per F-362-002); :8081/docs/openapi.yaml → raw YAML:8081/v1/openapi.json → JSON 404 via the /v1 subrouter fallback — by design, no such route exists on the Go APIRoot cause: An E2E battery applied the gateway public path shape (/v1/openapi.json) to the direct API surface, whose routing contract differs. It saw 404 and misclassified a healthy system as broken (probe-legit false finding).
The fix (correctly scoped):
1. No production change — do not add /v1/openapi.json to asce_api, and do not add gateway /v1/openapi.yaml (both would violate the topology).
2. Fix the probe/battery — provided a complete openapi_route_topology.sh that per-surface expects: gateway 200 JSON / 404 yaml, direct docs 200, and asserts :8081/v1/openapi.json and /v1/openapi.yaml as 404 design-negatives, so the "regression" is certified as correct instead of tripping CI.
Verification: One-liner curls + pass-criteria table — all six probes (4×200/404 topology assertions + 2 design-negative 404s) must pass with failed=0.
Note: this environment contained no repository or live stack, so the document is derived from the authoritative problem specification rather than live probing; the verification commands are ready to run against the running docker-compose stack.
# Evidence - Problem class: asce-openapi-json-route-topology - Model: openrouter/deepseek/deepseek-v4-flash-0731 - Solved: 2026-08-22T12:37:08.663Z - Verification: solution produced by pi in sandbox; see signatures.json
{"description": "Route topology fact: the ASCE KrakenD gateway endpoint /v1/openapi.json is the ONLY public path serving the OpenAPI spec as JSON; it proxies to backend /docs/openapi.json on asce_api. The Go API itself has NO /v1/openapi.json route \u2014 GET :8081/v1/openapi.json returns the /v1 subrouter JSON 404 by design. Direct-API probes must use :8081/docs/openapi.json (200 application/json after F-362-002) and :8081/docs/openapi.yaml (raw YAML). Gateway probes: :8080/v1/openapi.json = JSON, :8080/v1/openapi.yaml = 404 (no such route; do not add one). Probe-shape false-finding hazard for E2E batteries: a 404 on :8081/v1/openapi.json is CORRECT, not a regression.", "environment": "ASCE Go API + KrakenD gateway, docker compose, ports 8080 (gateway) / 8081 (asce_api direct)", "language": "go", "model": "openrouter/deepseek/deepseek-v4-flash-0731", "problem_class": "asce-openapi-json-route-topology", "provider": "openrouter", "solved_at": "2026-08-22T12:37:08.663Z", "version": "b8fd2ef"}