Skip to content

fix(routines): enforce saved read-only policy during debugging - #1468

Merged
NewtTheWolf merged 1 commit into
mainfrom
fix/routine-debug-read-only-policy
Nov 10, 2026
Merged

NewtTheWolf merged 1 commit into
mainfrom
fix/routine-debug-read-only-policy

Conversation

@NewtTheWolf

@NewtTheWolf NewtTheWolf commented Nov 10, 2026 •

Copy link
Copy Markdown
Collaborator

Routine debugging checks the driver's read-only capability when creating a preview, but a saved connection can become read-only while that preview remains cached. A later Start was still forwarded to the native driver.

Check the current saved connection policy before every debugger command that requires a writable connection. Reuse the protocol's existing Stop/Status exception so cleanup remains available after a policy change or connection removal. The regression changes the saved flag after creating a cached preview and asserts that Start is rejected before dispatch, then verifies Stop still releases the preview after the connection file is removed. Existing execution tests now use isolated saved-connection fixtures.

Related: #1460, #1463.

Validation:

  • New regression fails on unmodified main and passes with the guard.
  • Rust library: 2,517 passed, 19 ignored.
  • Debugger tests with and without desktop features: 18 passed in each mode.
  • cargo check --no-default-features and formatting checks pass.
  • GitNexus impact and staged change analysis completed.

Autofix with [code]smith
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

@kilo-code-bot

kilo-code-bot Bot commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

Code Review Summary

Status: No Issues Found | Recommendation: Merge

The fix checks the saved read-only policy before every debugger command except Stop and Status. Those two stay available for cleanup, which matches the protocol's existing exception. Preview now fails earlier with WRITE_BLOCKED on read-only connections, which is consistent with the other write paths. The new regression test covers the cached-preview case: Start is rejected before dispatch, and Stop still releases the preview after the connection file is removed. I did not run the tests.

Files Reviewed (3 files)
  • src-tauri/src/application/routine_debug.rs
  • src-tauri/src/application/routine_debug/tests.rs
  • src-tauri/src/routine_debug.rs

Reviewed by claude-sonnet-5.5 · Input: 242 · Output: 1.6K · Cached: 219K

Review guidance: REVIEW.md from base branch main

@NewtTheWolf
NewtTheWolf merged commit e8ff53b into main Nov 10, 2026
9 checks passed
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.

1 participant