Fix Squid egress-proxy crash from conflicting allowlist domains#30
Merged
Conversation
Pier enforces the copilot-cli agent's NetworkAllowlist with a Squid egress proxy. The allowlist listed three domains both bare and as a ".domain" wildcard (github.com/.github.com, etc.). Squid's dstdomain ACL treats that overlap as fatal ("'.github.com' is a subdomain of 'github.com'"), so the proxy container exited(1), the main container's service_healthy dependency failed, and every DeepSWE trial died with a misleading "model.patch not found" symptom.
Use dotted wildcards only; a leading-dot entry already matches the apex domain and all subdomains. Add a regression guard asserting no domain is listed both bare and dotted, plus ADR 0021 documenting the constraint.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
origin/main introduced its own ADR 0021 (interactive HTML dashboards). Renumber the copilot-cli egress-allowlist ADR to 0022 and add the dashboards row to the index so ADR numbers stay unique and ordered. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
The per-task 'Task suite coverage' table in report.summary_markdown read task['task_slug'], but _aggregate_task stores the slug under 'task'. Any summary with more than one task (e.g. a DeepSWE run) raised KeyError: 'task_slug' when rendering summary.md via list/show. Use task['task'] to match the data contract and add a regression test that renders a two-task summary end to end through write_pier_summary. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Why
Every DeepSWE (air-gapped) trial was failing at environment startup with a confusing
Could not find the file /logs/artifacts/model.patcherror. The real cause was thecopilot-cliagent's network allowlist crashing Pier's egress proxy before any agent could run.Root cause
Pier enforces the agent
NetworkAllowlistwith a Squid egress proxy, rendering each domain into adstdomainACL entry. Our allowlist listed three domains both bare and as a.domainwildcard (github.com+.github.com, and the same forgithubcopilot.comandgithubusercontent.com). Squid treats that overlap as fatal:The proxy container exits(1), the
mainagent container'sservice_healthydependency fails, and Pier surfaces the misleadingmodel.patch not foundsymptom downstream. I reproduced this deterministically in a standalone Squid container and confirmed the fix keeps the proxy running (Accepting HTTP Socket connections ... 0.0.0.0:8080).The fix
Use dotted wildcards only:
[".github.com", ".githubcopilot.com", ".githubusercontent.com", "gh.io"]. In Squid a leading-dot entry already matches the apex domain and all subdomains, so the bare entries were both redundant and fatal.gh.iostays bare (single redirector host with no subdomains we contact; its install redirect targets*.githubusercontent.com, already covered).The test now asserts the wildcard forms are present and adds a regression guard that no domain may appear both bare and dotted, so this exact Squid conflict cannot be reintroduced silently. ADR 0022 records the constraint.
Notes for reviewers
origin/main(the interactive HTML dashboards feature). The net PR diff is only the 4 files below; the merge itself was conflict-free.origin/mainindependently added an ADR 0021, so this ADR was renumbered to 0022 and the index updated to keep numbers unique and ordered..example.com), never the bare domain when subdomains are needed. A code comment and the test enforce this.Validation
uv run ruff check .clean;uv run pytest -qall 187 pass.