fix(proxy): self-renew GitHub access - #8
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This PR moves GitHub proxy-capability renewal from the short-lived interactive devbox process into the long-lived host proxy daemon, adds a manifest-independent devbox proxy refresh command, and hardens gh routing under --proxy by ensuring Homebrew’s public gh entry point goes through the managed wrapper.
Changes:
- Add daemon-side GitHub capability renewal based on host-owned box registrations, plus a
--refresh-gh-proxy-boxescontrol path anddevbox proxy refreshCLI plumbing. - Route Homebrew’s public
bin/ghto the managed wrapper under--proxy, while keeping a privategh-realfor the wrapper; restore Homebrew’s link under--no-auth. - Update docs/tests and bump version to
v1.2.1.
Reviewed changes
Copilot reviewed 9 out of 10 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| VERSION | Bump version to 1.2.1. |
| test/proxy_test.py | Add unit tests for daemon renewal, capability delivery stdin usage, NDJSON parsing, and wrapper real-binary preference. |
| test/devbox.bats | Update proxy wiring assertions; add test ensuring proxy refresh bypasses project resolution. |
| README.md | Document devbox proxy refresh and new daemon-driven renewal + gh routing behavior. |
| proxy/README.md | Expand proxy design docs for daemon renewal and Homebrew gh routing changes. |
| proxy/gh-wrapper.py | Prefer managed private gh-real if present/executable. |
| proxy/devbox-ai-proxy.py | Implement registered-box scanning, renewal scheduling, refresh command, and health marker update. |
| docs/agent-capabilities-security.md | Document renewal + gh routing and clarify non-boundary properties. |
| CHANGELOG.md | Add v1.2.1 release notes. |
| bin/devbox | Remove interactive renewal loop; add proxy self-renewal detection/restart, proxy refresh, and Homebrew gh link management. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+762
to
+766
| with open(entry.path, encoding="utf-8") as endpoint_file: | ||
| endpoint = endpoint_file.read(4096).strip() | ||
| parsed = urlsplit(endpoint) | ||
| endpoint_port = parsed.port or 4141 | ||
| except (OSError, ValueError): |
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.
Summary
devbox proxy refresh, independent of project manifest and image resolutionghpath through the managed wrapper under--proxyghlink under--no-authv1.2.1patch releaseRoot cause
Capability renewal was owned by the interactive
devboxprocess, so it stopped when that terminal exited. Homebrew's publicghpath also remained directly executable, allowing an agent that selected the absolute path to bypass the wrapper accidentally.Impact
Registered running boxes now receive renewed proxy capabilities from the host daemon every seven hours, with one-minute checks after suspend or idle. Refreshes do not parse
.devbox.toml, build an image, start a stopped box, or restart a running VM. Under--proxy, the normal Homebrewghentry point resolves to the managed wrapper.Validation
make test— 88 Bats tests and 38 Python testsmake lintgit diff --check