Skip to content

spec: VM boxes can ask for -updates/-security ([vm].pockets, wend#47) - #80

Merged
TusanHomichi merged 1 commit into
mainfrom
claude/vm-pockets
Oct 13, 2026
Merged

TusanHomichi merged 1 commit into
mainfrom
claude/vm-pockets

Conversation

@TusanHomichi

Copy link
Copy Markdown
Member

Before: tools/vm.py gives Ubuntu's installer a proxy that answers 404 for every -updates, -security, -backports and -proposed suite. After install, the harness rewrites sources.list to the release pocket and fails any box holding versions from elsewhere. So ubuntu/trusty-web-updated (#78), which starts from trusty-updates and trusty-security, can't be built as a real VM.

After: a box can opt in with [vm] pockets = ["updates", "security"]. Those suites (and only those) pass the proxy, so the installer and the box's customize can fetch them. Right after set_release, the harness adds the same pockets to sources.list: each of the release's deb lines again, for {release}-{pocket}, from the same mirror. The dist-upgrade and the release-pocket check then see the sources the box was built from. Every other box keeps the release-pocket-only default, and the route's hops are unchanged.

How:

  • tools/vm.py: PocketProxy(upstream, allow), plus a pocket_sources() helper used in the post-install update step.
  • tools/check.py: [vm].pockets must be a list of updates and/or security, each at most once, and only on a release whose install is release_pocket_only.
  • tools/test_check.py: 5 checker cases, plus 7 behaviour cases that run the real proxy against a local upstream (release pocket 200; other pockets 404 unless allowed; backports always 404).
  • SPEC: the VM tier section says all of this.

This is a spec change (tools, SPEC), so the box itself gets pockets in a follow-up box PR once this is on main. CI judges a PR with the base branch's checker. Nothing here is replayed in CI, since the VM tier is maintainer-run.

Part of #47.

🤖 Generated with Claude Code

https://claude.ai/code/session_01F6HrWAW4tB9vuYRQRN86zE


Generated by Claude Code

The VM installer's pocket proxy still answers 404 for every -updates,
-security, -backports and -proposed suite by default. A box that lists
updates and/or security in [vm].pockets gets those suites through the proxy,
and the harness adds them to sources.list after set_release, so its
dist-upgrade and release-pocket check see the same sources the box was built
from. The checker holds pockets to updates/security, once each, on a
release_pocket_only release. The route's hops are unchanged.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01F6HrWAW4tB9vuYRQRN86zE
Signed-off-by: Claude <[email protected]>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 13, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-13T15:57:02.509865Z a2faf8a PR opened
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@github-actions github-actions Bot added the needs-claude-review Waiting on the Claude review layer label Oct 13, 2026

Copy link
Copy Markdown
Member Author

Independent Claude review: sign-off on head a2faf8a. No blockers.

  • Tests: test_check.py (5 checker cases and 7 live proxy cases) and wend check pass on a clean archive.
  • Proxy: allow only exempts updates and security from OTHER_POCKET. The /, .., single-upstream and redirect guards are unchanged, and the default () still answers 404.
  • pocket_sources: the sed is single-quoted over checker-validated words. With two pockets, the second sed can't re-match the first one's lines, so there are no duplicates.
  • Build flow: for trusty-web-updated with both pockets, the installer's own -updates line and the box's customize work through the proxy. After the reboot, set_release, the pockets, dist-upgrade and the off-pocket check line up.
  • check.py: short-circuits safely on bad types, and its error text matches the rule.
  • SPEC: accurate.

Nits, none blocking:

  1. post_install runs customize before the harness's 00wend apt config exists, so a box's bare apt-get dist-upgrade or install could prompt and fail in the VM. trusty-web-updated should use -y, in its box PR.
  2. allow exempts the pocket name for any suite, not just {release}-. That's harmless.
  3. The new SPEC bullet's continuation lines aren't indented.

Generated by Claude Code

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: a2faf8a3c7

ℹ️ 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".

Comment thread tools/check.py Resolved
Comment thread tools/vm.py Resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-claude-review Waiting on the Claude review layer

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants