Repository navigation
fix(api-proxy): accept fenced classifier JSON replies - #9930
Conversation
Co-authored-by: lpcox <15877973+lpcox@users.noreply.github.com>
There was a problem hiding this comment.
🟢 Approval recommended
The focused implementation satisfies the stated strictness requirements with comprehensive regression coverage.
0 open findings
What changed in this PR
Adds strict normalization for Haiku classifier responses wrapped in Markdown fences while preserving existing schema validation and degraded-routing behavior.
Changes:
- Unwraps one complete
jsonor unlabelled code fence. - Rejects prose, multiple blocks, unsupported labels, malformed JSON, and invalid schemas.
- Adds contract and controller regression coverage.
| File | Description |
|---|---|
containers/api-proxy/routing-contract.js |
Normalizes fenced classifier output before parsing. |
containers/api-proxy/routing-contract.test.js |
Covers accepted and rejected fence variants. |
containers/api-proxy/routing-controller.test.js |
Verifies classification and degradation records. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
|
✅ Copilot review passed with no inline comments. @copilot Add the |
✅ Coverage Check PassedOverall Coverage
📁 Per-file Coverage Changes (1 files)
Coverage comparison generated by |
|
✨ The prophecy is fulfilled... Smoke Codex has completed its mystical journey. The stars align. 🌟
|
|
🪪 Smoke Copilot BYOK AOAI (Entra) is testing Azure OpenAI BYOK (Entra / GitHub OIDC) mode on this pull request... |
|
✅ Build Test Suite completed successfully!
|
|
✅ Smoke Claude passed
|
|
💎 Smoke Gemini is crystallizing results on this pull request... |
|
✅ Smoke Copilot BYOK completed. Copilot BYOK mode operational. 🔓
|
|
Smoke Cloud Hypervisor completed. Cloud Hypervisor + Copilot passed.
|
|
Chroot tests passed! Smoke Chroot - All security and functionality tests succeeded.
|
|
🛡️ Smoke Copilot Network Isolation confirmed the egress allowlist is enforced. ✅
|
|
🔌 Smoke Services — All services reachable! ✅
|
|
📰 VERDICT: Smoke Copilot has concluded. All systems operational. This is a developing story. 🎤
|
|
📡 Smoke OTel Tracing completed. All tracing scenarios validated. ✅
|
|
🔑 Smoke Copilot BYOK AOAI (api-key) is testing Azure OpenAI BYOK (api-key) mode on this pull request... |
|
✅ Security Guard completed successfully! Security GuardOutcome: The agent completed and reported no action. A no-op output alone does not verify that all required work was completed or that publication was possible. Agent messages are omitted from this comment. The category uses structured run status, not interpretation of agent prose.
|
|
EGRESS_RESULT allow=pass deny=pass
Overall: PASS. cc @lpcox
|
Smoke Test: Cloud Hypervisor + Copilot
All checks passed.
|
Smoke Test: Claude Engine Validation
Overall result: PASS
|
Smoke Test: Copilot BYOK (Direct Mode)✅ All tests passed — Direct BYOK mode active (COPILOT_PROVIDER_API_KEY → api-proxy → api.githubcopilot.com)
Status: PASS
|
|
Smoke Copilot: PASS
|
|
OTEL smoke test
|
|
Services smoke test: ✅ Redis PONG, ✅ pg_isready accepting connections, ✅ SELECT 1 = 1. PASS
|
Chroot Version Comparison
Result: Not all tests passed (Node.js version mismatch), so the
|
🏗️ Build Test Suite Results
Overall: 6/8 ecosystems passed — FAIL Failures
|
|
feat: add staged Phase 4 pilot tiers
|
Haiku wraps valid classifier JSON in Markdown fences, causing Haiku-only pools to route without classification and record
invalid_classifier_output.json, with surrounding whitespace. Apply the existing JSON parser and schema validation to its contents.The validator would accept: