Fix Crush harness sending chat-completions requests to unresolvable api-proxy host - #52895
Conversation
…host Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
|
@copilot apply to other definition based engine files |
|
/smoke-crush |
|
🎯 Smoke Crush Crush delivered. Warning Threat Detection Engine Failure — The analysis engine could not complete. This is a tooling failure, not a security finding. What happenedThe threat detection results could not be parsed. Review the workflow run logs for details. 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
- "proxy.golang.org"See Network Configuration for more information.
|
There was a problem hiding this comment.
Pull request overview
Fixes Crush endpoint resolution so chat-completions requests use the sandbox-reachable host bridge.
Changes:
- Adds and tests a shared base-URL derivation helper.
- Updates the Crush harness to use the helper.
- Recompiles affected workflows.
Show a summary per file
| File | Description |
|---|---|
actions/setup/js/awf_reflect.cjs |
Adds and exports the URL helper. |
actions/setup/js/awf_reflect.test.cjs |
Adds helper regression tests. |
.github/workflows/shared/crush.md |
Applies the helper in the Crush harness. |
.github/workflows/daily-arxiv-researcher.lock.yml |
Regenerates the imported harness. |
.github/workflows/daily-code-metrics.lock.yml |
Regenerates the imported harness. |
.github/workflows/smoke-crush.lock.yml |
Regenerates the imported harness. |
Review details
💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.
- Files reviewed: 6/6 changed files
- Comments generated: 2
- Review effort level: Balanced
| }); | ||
|
|
||
| it("defaults to process.env and fs.readFileSync when not provided, with no path prefix before /models", () => { | ||
| expect(deriveBaseUrlFromModelsURL("http://api-proxy:10002/models")).toBe("http://api-proxy:10002"); |
| // api-proxy -> host.docker.internal HOSTALIASES bridge rewrite, so the crush | ||
| // binary's own chat-completions request never targets the unresolvable | ||
| // "api-proxy" hostname. | ||
| baseUrl = deriveBaseUrlFromModelsURL(reflectedEndpoint.models_url); |
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Applied in |
|
🎉 This pull request is included in a new release. Release: |
The Crush harness correctly resolved its LLM endpoint
baseUrlvia the/reflectprobe (rewritingapi-proxytohost.docker.internalfor sandboxed runs), but then immediately overwrote that value with a base URL re-derived directly from the rawmodels_url, skipping the rewrite. Thecrushbinary's actual/chat/completionsrequest was thus sent to the bareapi-proxyhostname, which the sandbox's DNS cannot resolve, failing every run before the first turn completed.Changes
actions/setup/js/awf_reflect.cjs: addedderiveBaseUrlFromModelsURL(), which derives a base URL frommodels_url(stripping the trailing/modelspath segment) while applying the sameapi-proxy→host.docker.internalHOSTALIASES bridge rewrite used elsewhere in this module. Exported alongside the existing reflect helpers..github/workflows/shared/crush.md: harness-script now callsderiveBaseUrlFromModelsURL()instead of manually reconstructing the URL inline, so the rewrite can no longer be silently bypassed.actions/setup/js/awf_reflect.test.cjs: added unit tests for the new helper, including a regression case that reproduces the exact failure (models_urlpointing atapi-proxywithHOSTALIASESmapping it to localhost).shared/crush.md:daily-arxiv-researcher,daily-code-metrics,smoke-crush.