Enforce exact values from managed config requirements (#34597)

## What changed

- Apply managed values for `sqlite_home`, `log_dir`, `model_catalog_json`,
  `check_for_update_on_startup`, `allow_login_shell`, the report-submission
  opt-in, and `windows.sandbox_private_desktop` to the runtime configuration,
  with source-aware warnings when they override configured values.
- Expose these values through `configRequirements/read`, return them from
  `config/read`, include them in session config locks, and show their sources in
  the TUI config debug view.
- Reject app-server writes that overlap an exact managed requirement with
  `configRequirementReadonly` while leaving unrelated sibling keys writable.

## Testing

- Cover runtime overrides, requirement API mapping, config reads and writes,
  session lock serialization, cross-platform path URIs, and debug output.

GitOrigin-RevId: d4e23b6fd7775c1a6dfe2eab313cdcee50b07081
This commit is contained in:
Abhinav authored and copyberry committed 2026-07-21 19:08:58 +00:00
1 parent 7442f5f932
commit ee71c4a90f
34 files changed
+1566 -71

No files matched your search

+12 -12
View File
@@ -1419,21 +1419,21 @@ mod tests {
.expect("session flags layer stack");
assert_eq!(app.resume_model_settings(), expected);
app.config.config_layer_stack = ConfigLayerStack::default().with_user_config_profile(
&profile_path,
Some(&profile),
config,
);
app.config.config_layer_stack = ConfigLayerStack::default()
.with_user_config_profile(&profile_path, Some(&profile), config)
.expect("user config profile layer stack");
assert_eq!(app.resume_model_settings(), expected);
}
app.config.config_layer_stack = ConfigLayerStack::default().with_user_config(
&profile_path,
TomlValue::Table(toml::map::Map::from_iter([(
"model_reasoning_effort".to_string(),
TomlValue::String("high".to_string()),
)])),
);
app.config.config_layer_stack = ConfigLayerStack::default()
.with_user_config(
&profile_path,
TomlValue::Table(toml::map::Map::from_iter([(
"model_reasoning_effort".to_string(),
TomlValue::String("high".to_string()),
)])),
)
.expect("user config layer stack");
assert_eq!(
app.resume_model_settings(),
crate::app_server_session::ResumeModelSettings::RestoreFromThread