You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Upstream added openshell policy lint <file> (ai-openshell/openshell#5358, merged Nov 17 UTC). It validates an authored policy offline, without a gateway, reporting all file-only semantic violations together. It is not in v0.1.9; it first ships in v0.1.10-pre.3.
annotate already validates offline: openshell-policy-schema parsing plus openshell_policy::validate_and_canonicalize_sandbox_policy (validate::gateway_violations), and its own lint adds source-level checks (unannotated calls, directive locations, v0.1.8/v0.1.9 pitfalls).
To decide (evaluation only, no implementation yet):
Does policy lint catch anything gateway_violations misses (ambiguity diagnostics, built-in middleware config, encoded-size limit)? Compare on examples/ and the goldens once openshell-next builds against a tag that has it.
Should annotate call the upstream crate function behind policy lint (if public) instead of, or in addition to, gateway_violations?
Should flow.sh / docs recommend running openshell policy lint on generated policies, or stay complementary and say so in the README?
Overlap and wording of messages, so users don't see the same problem twice.
Evaluated against OpenShell v0.1.10 (the first stable tag with openshell policy lint, upstream crates/openshell-cli/src/run.rs::sandbox_policy_lint). The command runs:
parse_sandbox_policy_file (schema, plus the new rejection of endpoint_settings in YAML files);
the encoded size limit (MAX_AUTHORED_POLICY_SIZE, 256 KiB);
find_endpoint_ambiguities: endpoints that can match the same request but disagree on connection or parsing metadata (protocol, TLS, enforcement and so on);
config validation for built-in openshell/* middlewares (openshell-supervisor-middleware-builtins);
validate_and_canonicalize_authored_policy: the gateway validator, reserved _provider_ keys and credential-binding structure.
What annotate's gateway_violations missed before: steps 2, 3, 4 and part of 5. Step 3 was a real gap. Two directives on one host:port with different protocol= (split with rule=) produced a policy that annotate accepted but the gateway and policy lint reject ("conflicting metadata: protocol"). This matters more since #5274: only the selected route's protocol can authorize a request.
#115 makes gateway_violations call steps 1, 3 and 5, which are public in openshell-policy. 5 already covers the size limit (2). Step 4 is left out because it needs the supervisor middleware crate, and annotate generates no middlewares. Messages are OpenShell's own text. annotate's duplicate _provider_ check was removed, so nothing is reported twice. README now suggests running openshell policy lint on generated policies when the CLI is installed.
Open question: whether annotate should also run openshell policy lint itself in scripts/flow.sh, or whether that stays a docs recommendation.
Activity
ilanh commentedon Nov 30, 2026
Evaluated against OpenShell v0.1.10 (the first stable tag with
openshell policy lint, upstreamcrates/openshell-cli/src/run.rs::sandbox_policy_lint). The command runs:parse_sandbox_policy_file(schema, plus the new rejection ofendpoint_settingsin YAML files);MAX_AUTHORED_POLICY_SIZE, 256 KiB);find_endpoint_ambiguities: endpoints that can match the same request but disagree on connection or parsing metadata (protocol, TLS, enforcement and so on);openshell/*middlewares (openshell-supervisor-middleware-builtins);validate_and_canonicalize_authored_policy: the gateway validator, reserved_provider_keys and credential-binding structure.What annotate's
gateway_violationsmissed before: steps 2, 3, 4 and part of 5. Step 3 was a real gap. Two directives on one host:port with differentprotocol=(split withrule=) produced a policy that annotate accepted but the gateway andpolicy lintreject ("conflicting metadata: protocol"). This matters more since #5274: only the selected route's protocol can authorize a request.#115 makes
gateway_violationscall steps 1, 3 and 5, which are public inopenshell-policy. 5 already covers the size limit (2). Step 4 is left out because it needs the supervisor middleware crate, and annotate generates no middlewares. Messages are OpenShell's own text. annotate's duplicate_provider_check was removed, so nothing is reported twice. README now suggests runningopenshell policy linton generated policies when the CLI is installed.Open question: whether annotate should also run
openshell policy lintitself inscripts/flow.sh, or whether that stays a docs recommendation.