feat(core): add network constraints schema to requirements.toml#10958
feat(core): add network constraints schema to requirements.toml#10958viyatb-oai wants to merge 5 commits intomainfrom
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 942e704e68
ℹ️ 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".
040e99f to
0a98c5e
Compare
| pub allowed_sandbox_modes: Option<Vec<SandboxMode>>, | ||
| pub allowed_web_search_modes: Option<Vec<WebSearchMode>>, | ||
| pub enforce_residency: Option<ResidencyRequirement>, | ||
| pub network: Option<NetworkRequirements>, |
There was a problem hiding this comment.
Perhaps this should get the #experimental annotation? See other examples in this file.
| pub mcp_servers: Option<Sourced<BTreeMap<String, McpServerRequirement>>>, | ||
| pub(crate) exec_policy: Option<Sourced<RequirementsExecPolicy>>, | ||
| pub enforce_residency: ConstrainedWithSource<Option<ResidencyRequirement>>, | ||
| pub network: Option<Sourced<NetworkRequirementsToml>>, |
There was a problem hiding this comment.
This should not contain a field like NetworkRequirementsToml. The on-disk TOML representation should be distinct from the type that defines constraints for a value (or in this case, a set of values).
One thing that is somewhat unclear is what this is the network policy for. Today, I think it is meant to govern shell commands, but would it ever have to govern local MCP servers, as well? I suppose that could be configured elsewhere...
Currently, this feels like this tries to define "a specific network policy" rather than "a range of acceptable values for a network policy."
Maybe we're not ready to commit to that sort of API, in which case, perhaps we should try to make it clear that this is experimental/unstable?
Summary
Add
requirements.tomlschema support for admin-defined network constraints in the requirements layer