8000 feat(op,orchestrator): a spec's needs can decide its build's network outside a box by bryan-minimal · Pull Request #3745 · gominimal/minimal · GitHub
[go: up one dir, main page]

Skip to content

feat(op,orchestrator): a spec's needs can decide its build's network outside a box - #3745

Draft
bryan-minimal wants to merge 1 commit into
mainfrom
op-declared-network
Draft

bryan-minimal wants to merge 1 commit into
mainfrom
op-declared-network

Conversation

@bryan-minimal
@bryan-minimal bryan-minimal commented Nov 23, 2026 •
Copy link
Copy Markdown
Member

Summary

Outside a box, a build that is handed its dependencies (override_deps) has the network whatever its spec declares. The orchestrator's LocalBackend hands every build its dependencies, so every build it runs outside a box has the host's network. The package build service (build-servers' res-server) is such a caller: all of its builds run with the host network, including the ones whose specs declare no needs.

Measured on the registry at pkgs db9d2fdc (597 packages, two architectures, 1100 observed builds): 642 builds neither declare the network nor inherit a declaration from a build tool. All 642 had it anyway, and 26 of them used it (13 packages on both architectures, each a pip call that reaches PyPI).

This adds an opt-in, LocalBackend::needs_decide, which sets a new SpecBuild::needs_decide. With it, a boxless build with override_deps gets what declared_needs says, the same rule a build in a box already follows, and a build that declares nothing runs in an empty network namespace.

  • Nothing changes for a caller that does not ask: mip and min keep today's behaviour.
  • A patched build keeps the network either way.
  • In a box nothing changes: needs_decide is only read when there is no build box.

The alternative I considered is for the build service to implement BuildBoxes and run its builds in build boxes on a host-plan network. That also moves each source fetch into a fetch process, which the build service is not ready for, so this is the smaller step. If you would rather the build service go straight to build boxes, say so and I will close this.

Testing

Not compiled or run locally; CI is the test. One new unit test, override_deps_needs_follow_the_spec_when_the_caller_says_so: a spec that declares nothing gets the isolated plan, a patched build keeps the network, and a spec that declares dns gets the host plan.

Checklist

  • Docs updated if behavior changed
  • BREAKING CHANGE: footer present if this is a breaking change

🤖 Generated with Claude Code

…outside a box

Outside a box, a build that is handed its dependencies has the network
whatever its spec declares. The orchestrator's local backend hands every
build its dependencies, so every build it runs has the host's network.

LocalBackend::needs_decide makes each spec's own needs decide instead,
as they already do in a box. Nothing changes for a caller that does not
ask. A patched build keeps the network either way.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
@coderabbitai
coderabbitai Bot commented Nov 23, 2026
Copy link
Copy Markdown
Contributor

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

0