Add scenario overlays#111
Conversation
6258c41 to
ee23246
Compare
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: baae808e74
ℹ️ 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".
| ResolvedPolicyEndpoint::Provide { decl, .. } | ||
| if decl.kind == CapabilityKind::Http | ||
| && decl.profile.as_deref() == Some("policy") => {} |
There was a problem hiding this comment.
Reject policy exports that use non-HTTP endpoint protocols
This validation only checks capability kind/profile, so a policy export can pass linking even if its endpoint protocol is tcp. The CLI governance runtime then builds a tcp://... URL and calls reqwest::Client::post, which only supports HTTP(S), causing policy invocation to fail at compile time after an apparently valid policy ref. Please also validate the resolved endpoint protocol here (or otherwise enforce HTTP transport) so invalid policy manifests fail deterministically during linking.
Useful? React with 👍 / 👎.
| Ok(Err(err)) => { | ||
| return Err(GovernanceRuntimeError::message(format!( | ||
| "governance export proxy failed: {err}" | ||
| ))); |
There was a problem hiding this comment.
Always stop the run before returning proxy-task errors
If proxy_task.await returns Ok(Err(_)) or a non-cancelled join error, this function returns immediately and skips mixed_run::stop_run, leaving governance processes/state behind. That creates leaked runtime state on proxy failures (e.g., repeated compiles can accumulate orphaned runs) instead of guaranteed cleanup. stop_run should run in all exit paths, even when reporting proxy errors.
Useful? React with 👍 / 👎.
d2443d9 to
da8cfcf
Compare
da8cfcf to
05e1087
Compare
There was a problem hiding this comment.
LGTM. Please address the review comments from codex Also this is a great feature that is not just for governance. Could you do a rename pass to make it something more appropriately general of your choosing? Otherwise no other comments. Please merge when ready.
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f7f9acd1ff
ℹ️ 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".
| let provide_decl = interposition | ||
| .interposer | ||
| .provides | ||
| .get(&attachment.interposer_provide) | ||
| .ok_or_else(|| ValidationError::UnknownInterposerProvide { | ||
| provide: attachment.interposer_provide.clone(), | ||
| })?; | ||
| if provide_decl.decl != *target_capability { |
There was a problem hiding this comment.
Validate attached interposer provide endpoints
When a policy attaches an interposer, this only checks that interposer_provide exists and has the right capability; it does not require the provide to name a valid program endpoint. For any HTTP/TCP target where the policy returns provides: { out: { kind: "http" } } or an endpoint name not present in the interposer program, the rewritten Scenario IR is accepted, but runtime planning later fails in resolve_provide_endpoint because every non-storage binding source provide must resolve to an endpoint. Please reject these policy outputs during policy validation so governance failures are attributed to the policy response instead of surfacing late during direct/compose/vm export generation.
Useful? React with 👍 / 👎.
edit: renamed governance to scenario overlays