-
Notifications
You must be signed in to change notification settings - Fork 0
fix(review): keep gateway bearer out of step environments #1369
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 13 commits
Commits
Show all changes
27 commits
Select commit
Hold shift + click to select a range
e95fed3
ci(strix): bootstrap orchestrator gateway patch
seonghobae e98d08e
fix(ci): make Strix bootstrap workflow parseable
seonghobae f73486e
ci(strix): bootstrap orchestrator gateway patch
seonghobae 2e1db52
ci(strix): rerun orchestrator gateway patch
seonghobae 3af96b4
ci(strix): rerun orchestrator gateway patch
seonghobae 6a2eddb
fix(strix): route default scans through contextual-orchestrator
seonghobae 2a904b1
fix(strix): hash-lock orchestrator sidecar dependencies
seonghobae 198db58
fix(strix): preserve dispatch and private-source routing boundaries
seonghobae 5ff0e96
fix(strix): exclude the requested NVIDIA diagnostic model
seonghobae 5b37c9b
fix(strix): restore exact quick-gate source bytes
seonghobae 48f893b
fix(strix): correct diagnostic fallback warning
seonghobae 6beae6b
fix(strix): mask gateway token before sidecar startup
seonghobae 4c2bdcb
fix(strix): syntax-check every required smoke script
seonghobae 5f1c1da
Merge main into Strix remediation branch
seonghobae 2ef49da
Merge protected main and retain Strix gateway hardening
seonghobae 30540d2
Merge branch 'main' into feat/strix-orchestrator-free-zdr
seonghobae cc6bb05
test(strix): bind syntax regression to sidecar check
seonghobae 4a694d5
docs(strix): record integrated catalog fix state
seonghobae 4112970
fix(review): keep orchestrator bearer out of step env
seonghobae dd46e76
fix(strix): qualify gateway child model
seonghobae 0dabda5
fix(ci): restore complete Strix gate fixture
seonghobae d9ecfaf
test(strix): isolate malformed-sidecar smoke failure
seonghobae 986cfc2
Merge protected main into gateway credential repair
seonghobae 7d24923
fix(review): isolate token loader shell state
seonghobae dc03010
fix(review): mask gateway tokens only on Actions
seonghobae 7b3c3b2
test(review): isolate non-Actions mask fixture
seonghobae 2c9588e
Merge branch 'main' into feat/strix-orchestrator-free-zdr
seonghobae File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
|
devin-ai-integration[bot] marked this conversation as resolved.
seonghobae marked this conversation as resolved.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,67 @@ | ||
| # ADR-0004: contextual-orchestrator owns normal Strix provider routing | ||
|
|
||
| - Status: Proposed | ||
| - Date: 2026-08-28 | ||
| - Owners: ContextualWisdomLab central CI maintainers | ||
| - Figma File ID: N/A (workflow/control-plane change; no customer UI) | ||
|
|
||
| ## Context | ||
|
|
||
| Required Strix scans were serialized per repository, but each scan still owned a | ||
| hard-coded direct provider chain. A live DiskSage exact-head scan exhausted four | ||
| independent paths in one run: NVIDIA rate limiting, an unavailable NVIDIA model, | ||
| an OpenRouter upstream error, and exhausted direct OpenAI credit. No authoritative | ||
| vulnerability report existed, so the required check correctly failed closed, but | ||
| consumer product PRs could not repair the shared authority boundary. | ||
|
|
||
| The central repository already vendors a pinned contextual-orchestrator sidecar. | ||
| It registers the five organization provider credentials in a process-local KV, | ||
| performs live discovery, applies the reviewed zero-cost/ZDR policy, and exposes | ||
| `orchestrator/free` through an authenticated OpenAI-compatible loopback API. | ||
|
|
||
| ## Decision | ||
|
|
||
| Normal Strix scans SHALL provision that sidecar and call | ||
| `openai/orchestrator/free` through exact IPv4 loopback. The sidecar owns | ||
| provider/model discovery and fallback. Strix SHALL NOT add a second direct | ||
| fallback chain for the gateway-backed route. | ||
|
|
||
| Private-repository source SHALL be routed only through exact ZDR-attested free | ||
| routes. If the live endpoint evidence is absent or no eligible route remains, | ||
| the sidecar fails closed before any source is sent. Public-repository scans may | ||
| use the documented non-ZDR free fallback tier after ZDR routes are exhausted. | ||
|
|
||
| A caller MAY use `repository_dispatch.strix_llm` to select an existing direct | ||
| provider model for bounded diagnosis. That override is explicit, auditable, and | ||
| does not change the normal default. | ||
|
|
||
| The sidecar dependency tree SHALL be installed from the exact vendored commit's | ||
| hash lock, with binary-only distributions, into an isolated `--target` directory | ||
| so it cannot rewrite the hash-locked Strix runtime. Its generated | ||
| bearer token SHALL be line-safe, masked before export, and passed to Strix only | ||
| through a mode-specific file. Missing credentials, unhealthy startup, non-loopback | ||
| base URLs, invalid ports, and missing tokens fail closed. | ||
|
|
||
| ## Consequences | ||
|
|
||
| - Shared provider outages are handled by one routing authority instead of nested | ||
| retry/fallback loops. | ||
| - Provider credentials remain inside the gateway process; the scanner sees only | ||
| a short-lived loopback credential. | ||
| - A gateway outage remains non-passing security evidence. | ||
| - Existing direct-provider diagnostic contracts and their tests remain supported. | ||
| - After merge, consumer PRs require a fresh exact-head Strix run; predecessor | ||
| outage evidence is not transferred. | ||
|
|
||
| ## Verification | ||
|
|
||
| - RED/GREEN static contract for the workflow, model namespace, loopback and token. | ||
| - Bounded required-workflow smoke contract. | ||
| - Bash syntax and YAML parse. | ||
| - Existing full organization Checks, independent review, and protected merge. | ||
|
|
||
| ## Rollback | ||
|
|
||
| Revert this ADR and its workflow commit. Do not partially restore a direct default | ||
| while leaving gateway key/base files active. Re-run the complete required Strix | ||
| contract and affected consumer exact heads after rollback. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,54 @@ | ||
| # Strix contextual-orchestrator gateway doctoring | ||
|
|
||
| ## Failure evidence | ||
|
|
||
| The triggering consumer scan produced no vulnerability artifact. Its terminal | ||
| log recorded provider infrastructure failures across NVIDIA NIM, OpenRouter, and | ||
| direct OpenAI, followed by the existing fail-closed | ||
| `STRIX_PROVIDER_UNAVAILABLE` classification. Repository Test, Release, SAST, and | ||
| Security workflows were independently successful on the same consumer head. | ||
|
|
||
| ## Causal boundary | ||
|
|
||
| The defect is not in the consumer product tree. It is the duplicated routing | ||
| authority in central Strix: the scanner selected and retried direct providers even | ||
| though the organization already had a pinned contextual-orchestrator gateway with | ||
| model discovery, ZDR policy, and provider-family diversity. | ||
|
|
||
| ## Corrective control | ||
|
|
||
| ```text | ||
| five provider credentials | ||
| → process-local contextual-orchestrator KV | ||
| → live discovery + ZDR-first zero-cost catalog | ||
| → authenticated 127.0.0.1 OpenAI-compatible API | ||
| → Strix openai/orchestrator/free | ||
| → authoritative report or fail-closed required check | ||
| ``` | ||
|
|
||
| Direct providers are retained only for an explicit diagnostic override. The | ||
| normal gateway route has no scanner-owned fallback list. | ||
|
|
||
| ## Security and operability | ||
|
|
||
| - The sidecar is pinned by commit SHA. | ||
| - Provider credentials never become Strix key files in gateway mode. | ||
| - The bearer token is generated per job, rejects line breaks, and is masked. | ||
| - The base URL must be exact IPv4 loopback with a valid port. | ||
| - Sidecar packages use the exact vendored commit's `requirements.lock` with | ||
| `--require-hashes`, binary-only distributions, and an isolated target directory | ||
| rather than the scanner's hash-locked environment. | ||
| - Private repositories admit only exact ZDR-attested gateway routes and fail | ||
| closed before source transmission when that evidence is absent. | ||
| - Health failure, empty discovery, missing credentials, and provider exhaustion | ||
| remain non-passing. | ||
| - Consumer PRs are rechecked on unchanged exact heads after the central fix. | ||
|
|
||
| ## Traceability | ||
|
|
||
| - ADR: `docs/adr/0004-strix-contextual-orchestrator-authority.md` | ||
| - Workflow: `.github/workflows/strix.yml` | ||
| - Sidecar: `scripts/ci/contextual_orchestrator_review_sidecar.sh` | ||
| - Required smoke: `scripts/ci/strix_required_workflow_smoke.sh` | ||
| - Contract: `tests/test_strix_contextual_orchestrator_contract.py` | ||
| - Predecessor gateway ADR: `docs/adr/0003-contextual-orchestrator-vendored-free-zdr.md` |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.