Fast check for working copy changes. Uses `StatusOptions::fast()` so turn-end recording sees both tracked changes and untracked files created by the agent. This intentionally includes the untracked filesystem walk: if we ignore untracked files here, a turn that only creates new files exits before `record_turn()` can auto-add and record them with provenance.
(&self)
| 410 | /// here, a turn that only creates new files exits before `record_turn()` |
| 411 | /// can auto-add and record them with provenance. |
| 412 | pub(crate) fn has_working_copy_changes(&self) -> bool { |
| 413 | let repo = match atomic_repository::Repository::open_readonly(&self.repo_root) { |
| 414 | Ok(r) => r, |
| 415 | Err(_) => return true, // can't check — assume changes |
| 416 | }; |
| 417 | |
| 418 | let opts = atomic_repository::status::StatusOptions::fast().with_untracked(true); |
| 419 | match repo.status(opts) { |
| 420 | Ok(status) => !status.is_clean() || status.has_untracked(), |
| 421 | Err(_) => true, // can't check — assume changes |
| 422 | } |
| 423 | } |
| 424 | } |
| 425 | |
| 426 | impl std::fmt::Debug for TurnOrchestrator { |
no test coverage detected