Deduplicate bounded-query runtime preflight checks behind a shared policy dispatcher - #6805
Conversation
There was a problem hiding this comment.
Pull request overview
Centralizes bounded-query runtime availability routing while preserving scope-specific probes and fail-closed errors.
Changes:
- Adds a shared runtime classifier and dispatcher.
- Refactors query and primary runtime preflight checks to use it.
- Covers explicit Docker primary-runtime routing.
Show a summary per file
| File | Description |
|---|---|
src/bounded-query/preflight.ts |
Consolidates runtime routing behind shared helpers. |
src/bounded-query/preflight.test.ts |
Tests explicit Docker registration routing. |
Review details
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Files reviewed: 2/2 changed files
- Comments generated: 0
- Review effort level: Balanced
|
✅ Copilot review passed with no inline comments. @copilot Add the |
|
📰 VERDICT: Smoke Docker Sbx has concluded. All systems operational. This is a developing story. 🎤 |
|
✅ Smoke Gemini completed. All facets verified. 💎 Smoke test complete. Results posted to PR #6805. |
|
✅ Smoke Claude passed |
|
📡 Smoke OTel Tracing completed. All tracing scenarios validated. ✅ |
|
📰 VERDICT: Smoke Copilot has concluded. All systems operational. This is a developing story. 🎤 |
|
🔌 Smoke Services — All services reachable! ✅ |
|
✅ Smoke Copilot BYOK AOAI (Entra) completed. Copilot AOAI BYOK (Entra) mode operational. 🔓 |
|
🛡️ Smoke Copilot Network Isolation confirmed the egress allowlist is enforced. ✅ |
|
🚀 Security Guard has started processing this pull request |
|
✅ Smoke Copilot BYOK AOAI (api-key) completed. Copilot AOAI BYOK (api-key) mode operational. 🔓 |
|
✅ Smoke Copilot BYOK completed. Copilot BYOK mode operational. 🔓 |
|
Chroot tests passed! Smoke Chroot - All security and functionality tests succeeded. |
|
✅ Contribution Check completed successfully! PR #6805 follows the CONTRIBUTING.md checklist: code changes are in src/, tests were added for the new runtime routing behavior, and the PR description is clear and references Fixes #6792. No contribution-guideline issues found. |
|
✅ Build Test Suite completed successfully! |
Smoke Test: Claude Engine Validation
Overall result: PASS
|
Smoke Test: Services Connectivity
Overall: FAIL All checks failed with
|
|
EGRESS_RESULT allow=pass deny=pass ✅ Allowed domain (github.com) reachable: Overall: PASS
Warning Firewall blocked 1 domainThe following domain was blocked by the firewall during workflow execution:
To allow these domains, add them to the network:
allowed:
- defaults
- "example.com"See Network Configuration for more information.
|
Smoke Test: Copilot BYOK (Direct) Mode ✅Running in direct BYOK mode via Results:
Status: PASS
|
|
Running in direct BYOK mode (COPILOT_PROVIDER_API_KEY + COPILOT_PROVIDER_BASE_URL) via api-proxy → Azure OpenAI (Foundry, o4-mini-aw) PASS
|
🔥 Smoke Test: Copilot Engine
Overall: PASS cc
|
Chroot Version Comparison Results
Overall result: FAILED — Node.js version mismatch between host and chroot environment. The
|
|
Running in direct BYOK mode (AWF_AUTH_TYPE=github-oidc + AWF_AUTH_AZURE_* + COPILOT_PROVIDER_BASE_URL) via api-proxy → Azure OpenAI (Foundry, o4-mini-aw) authenticated via Microsoft Entra
|
Discussion comment and label steps were requested, but the available write tools in this workflow do not expose discussion comments or labels. Warning Firewall blocked 1 domainThe following domain was blocked by the firewall during workflow execution:
To allow these domains, add them to the network:
allowed:
- defaults
- "registry.npmjs.org"See Network Configuration for more information.
|
📡 OTel Tracing Smoke Test Results
Overall: ✅ All scenarios pass. Note: the smoke workflow's Scenario 3 check greps
|
|
Docker Sbx Smoke Test
Overall: PASS cc
|
🏗️ Build Test Suite Results
Overall: 8/8 ecosystems passed — PASS Note: Java tests initially failed due to
|
Smoke Test Result: FAIL
|
The bounded-query preflight path had duplicated runtime-availability branching in
assertQueryRuntimeAvailableandassertPrimaryRuntimeAvailable, with parallel fail-closed logic that could drift. This change consolidates runtime selection into one internal dispatcher while keeping each scope’s probe behavior and error surface explicit.Runtime policy unification
classifyRuntimeAvailability(...)andassertRuntimeAvailability(...)insrc/bounded-query/preflight.ts.sbx,docker,gvisor/runsc, custom OCI runtime, default Docker) so both preflight entry points use the same control-flow table.Scope-specific enforcement preserved
assertQueryRuntimeAvailable(...)still enforces bounded-query runtime guarantees (including sbx capability proof and gVisorrunscrequirement).assertPrimaryRuntimeAvailable(...)still enforces primary-runtime availability before staging, with runtime-specific fail-closed errors.Coverage updates for edge routing
preflightunit coverage to include explicit"docker"primary runtime routing and ensure it follows runtime-registration checks.