Outcome
Allow users to enforce selected budgets and apply selected optimization remediations with preview, explicit consent, an audit journal, and reliable undo—without weakening Odometer's default read-only posture.
Security boundary
This issue introduces configuration writes and possibly agent hooks. Nothing in it may run merely because Odometer scanned a session or detected a finding. Implementation requires a focused security review before mutation paths are enabled.
Scope
- Define a small allowlisted action contract with target type, preconditions, preview, expected change, backup/restore plan, and postcondition verification.
- Support dry-run first; interactive apply requires per-action confirmation unless the user explicitly selects a bounded batch.
- Record a local audit journal with action version, redacted target identity, before/after hashes, result, and undo state.
- Implement undo using exact backups or validated inverse operations; refuse when the target changed externally.
- Add provider-specific budget guard adapters only where the agent supports documented hooks/statusline controls. Include a visible per-session override and emergency disable.
- Measure realized savings/outcomes through the workflow/correlation system rather than declaring an applied fix successful from configuration change alone.
DRY boundary
- Findings propose typed actions; they do not write files directly.
- One backend action executor owns validation, atomic writes, journaling, and undo.
- No generic shell-command action and no new broad Tauri filesystem/shell capability.
Acceptance criteria
- Preview is default and malformed/unknown action fields fail closed.
- Targets are resolved and revalidated immediately before mutation; symlink/path traversal and concurrent-change cases are covered.
- Declined elevation/confirmation changes nothing.
- Interrupted writes recover atomically and undo never overwrites unrelated user edits.
- Guard hooks expose exact install locations, active caps, overrides, and removal status.
- Neutral fixtures cover apply, batch, partial failure, rollback, external edits, stale findings, and full uninstall.
Dependency and ordering
Outcome
Allow users to enforce selected budgets and apply selected optimization remediations with preview, explicit consent, an audit journal, and reliable undo—without weakening Odometer's default read-only posture.
Security boundary
This issue introduces configuration writes and possibly agent hooks. Nothing in it may run merely because Odometer scanned a session or detected a finding. Implementation requires a focused security review before mutation paths are enabled.
Scope
DRY boundary
Acceptance criteria
Dependency and ordering