Skip to content

Preserve modes for trusted read-only sessions#213

Closed
liaowang11 wants to merge 1 commit intozed-industries:mainfrom
liaowang11:wip/issue-201-modes-response
Closed

Preserve modes for trusted read-only sessions#213
liaowang11 wants to merge 1 commit intozed-industries:mainfrom
liaowang11:wip/issue-201-modes-response

Conversation

@liaowang11
Copy link
Copy Markdown

@liaowang11 liaowang11 commented Mar 28, 2026

Summary

  • match approval presets by sandbox variant and network semantics instead of full sandbox struct equality
  • keep modes available for trusted default, trusted read-only, trusted workspace-write, full-access, external-sandbox, and untrusted fallback cases
  • add isolated regression coverage that loads config against temporary Git worktrees so trust-level behavior is exercised under real project roots

Testing

  • Added thread::tests::test_load_keeps_modes_for_untrusted_session.
  • Added thread::tests::test_load_keeps_modes_for_trusted_default_session.
  • Kept and validated thread::tests::test_load_keeps_modes_for_trusted_read_only_policy.
  • Added thread::tests::test_load_keeps_modes_for_trusted_workspace_write_policy.
  • Added thread::tests::test_load_keeps_modes_for_full_access_policy.
  • Added thread::tests::test_load_keeps_modes_for_external_sandbox_with_network_access.
  • Results: local Rust test suite passed with 27 passed, 0 failed for src/lib.rs and 0 passed, 0 failed for src/main.rs.

Closes #201

@liaowang11 liaowang11 force-pushed the wip/issue-201-modes-response branch from 5df5d89 to f09c573 Compare March 28, 2026 14:21
@benbrandt
Copy link
Copy Markdown
Member

thanks! I think solved in #200

@benbrandt benbrandt closed this Mar 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

session/new response omits modes config due to SandboxPolicy struct equality failure

2 participants