File tree Expand file tree Collapse file tree
crates/openshell-server/src/grpc Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1848,12 +1848,14 @@ async fn handle_update_config_inner(
18481848 validate_no_reserved_provider_policy_keys ( & new_policy) ?;
18491849 }
18501850
1851+ if let Some ( baseline_policy) = spec. policy . as_ref ( ) {
1852+ validate_static_fields_unchanged ( baseline_policy, & new_policy) ?;
1853+ }
1854+
18511855 validate_policy_safety ( & new_policy) ?;
18521856 crate :: middleware:: validate_policy ( state. middleware_registry . as_ref ( ) , & new_policy) . await ?;
18531857
1854- if let Some ( baseline_policy) = spec. policy . as_ref ( ) {
1855- validate_static_fields_unchanged ( baseline_policy, & new_policy) ?;
1856- } else {
1858+ if spec. policy . is_none ( ) {
18571859 // Backfill spec.policy using CAS (first-time policy discovery)
18581860 let _sandbox_sync_guard = state. compute . sandbox_sync_guard ( ) . await ;
18591861 let sandbox_id = sandbox. object_id ( ) . to_string ( ) ;
You can’t perform that action at this time.
0 commit comments