Repository navigation
mirror shim: reuse a running shim only if it is this checkout's tools/mirror.py - #126
Conversation
…/mirror.py A shim left on the port by another checkout serves with its own allow-list: after #123, an older one answers 403 for deb.debian.org and Ubuntu's archives mid-route. The shim now names its source's sha256 at /.wend-shim, and ensure_mirror refuses any other (an older shim answers 403 there), saying to stop it with vm.py shim-stop. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EQ9ijFk8JWP18n4iscLJXi Signed-off-by: Claude <noreply@anthropic.com>
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 8ed097fc8e
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
Claude sign-off for head 8ed097f.
Merging under the project's merge policy. Generated by Claude Code |
What this adds
This PR changes the harness and the spec. It adds no route, so the template's route lines don't apply. It is the follow-up to Codex's stale-shim finding on #123, which Peter chose to handle separately.
Before:
ensure_mirrorreused any shim already listening on the port. One started by an older checkout, say one that doesn't allow the new https archive hosts or that caches livedists/metadata, would keep serving with the old rules, and a run would fail or pin stale data with no hint as to why.After: the shim answers
/.wend-shimwith the sha256 of its owntools/mirror.py.ensure_mirrorcompares that with this checkout's file:python3 tools/vm.py shim-stop PIDand run again.How:
tools/mirror.py: computesVERSIONfrom its own file and serves it on/.wend-shimahead of the host check.tools/sandbox.py: checks the version before reusing a shim.tools/test_fetched.py: three new checks cover the version endpoint, reuse of a matching shim, and refusal of an old one.Model
None: written by hand.
Evidence
./wend check, everytools/test_*.py, cargo fmt, clippy and test, andclient/parity.pyall pass, with both engines identical.Self-review
🤖 Generated with Claude Code
https://claude.ai/code/session_01EQ9ijFk8JWP18n4iscLJXi
Generated by Claude Code