(
repo: &atomic_repository::Repository,
repo_root: &Path,
options: &TurnRecordOptions<'_>,
start_git: &GitBoundaryCheckpoint,
end_git: &GitBoundaryCheckpoint,
operations: Vec<S
| 535 | /// authority. |
| 536 | #[allow(clippy::too_many_arguments)] |
| 537 | fn classify_git_transition( |
| 538 | repo: &atomic_repository::Repository, |
| 539 | repo_root: &Path, |
| 540 | options: &TurnRecordOptions<'_>, |
| 541 | start_git: &GitBoundaryCheckpoint, |
| 542 | end_git: &GitBoundaryCheckpoint, |
| 543 | operations: Vec<String>, |
| 544 | expected_working_copy: &str, |
| 545 | content_recorded: bool, |
| 546 | ) -> GitTransitionClassification { |
| 547 | let sessions_dir = sessions_dir_for(repo_root); |
| 548 | let capture = match crate::turn::capture::verify_capture( |
| 549 | &sessions_dir, |
| 550 | options.session, |
| 551 | options.turn_number, |
| 552 | expected_working_copy, |
| 553 | start_git.head_oid.as_deref(), |
| 554 | end_git.head_tree.as_deref(), |
| 555 | boundary_start_at(options), |
| 556 | ) { |
| 557 | Ok(Some(capture)) => { |
| 558 | let bytes = capture.to_json().unwrap_or_default(); |
| 559 | Some(atomic_core::types::Hash::of(&bytes)) |
| 560 | } |
| 561 | Ok(None) => None, |
| 562 | Err(error) => { |
| 563 | log::warn!( |
| 564 | "Commit-time capture failed authentication for session {} turn {}: {}", |
| 565 | options.session.session_id, |
| 566 | options.turn_number, |
| 567 | error |
| 568 | ); |
| 569 | None |
| 570 | } |
| 571 | }; |
| 572 | let capture_failed_authentication = capture.is_none() |
| 573 | && crate::turn::capture::has_capture( |
| 574 | &sessions_dir, |
| 575 | &options.session.session_id, |
| 576 | options.turn_number, |
| 577 | ); |
| 578 | |
| 579 | // A verified capture binds the move, but this is NOT the |
| 580 | // ManagedGitCommitCaptured classification: the exact baseline→index / |
| 581 | // index→worktree reassembly (RFC §10.3.2) is not implemented. Per the |
| 582 | // owner-APPROVED RFC §19 Q2 policy (2026-09-14, allow-as-incomplete): |
| 583 | // the commit is carried as synthesis with observed-operation-only |
| 584 | // attribution and a DURABLE incomplete status requiring review — never |
| 585 | // exact attribution, never an approximate path-level split. The capture |
| 586 | // hash is retained as recovery evidence. |
| 587 | if let Some(capture_hash) = capture { |
| 588 | log::info!( |
| 589 | "Verified commit-time capture binds the Git transition for session {} turn {}; \ |
| 590 | durable incomplete until the exact reassembly (RFC §10.3.2) attributes it \ |
| 591 | (RFC §19 Q2 approved allow-as-incomplete, 2026-09-14)", |
| 592 | options.session.session_id, |
| 593 | options.turn_number |
| 594 | ); |
no test coverage detected