Skip to content

Guard human recovery by commit author - #2062

Open
svarlamov wants to merge 1 commit into
mainfrom
agent/guard-human-recovery-author
Open

Guard human recovery by commit author#2062
svarlamov wants to merge 1 commit into
mainfrom
agent/guard-human-recovery-author

Conversation

@svarlamov

@svarlamov svarlamov commented Jul 31, 2026

Copy link
Copy Markdown
Member

Summary

  • guard terminal known-human recovery so it only applies when the commit author matches the local human identity
  • accept either the configured git-ai identity or the already-cached raw Git identity, comparing email case-insensitively
  • reuse commit metadata already read by the commit-metadata recovery solver and consult identity cache without initialization, adding no Git calls or I/O
  • cover remote fast-forward attribution and git-ai author overrides with TestRepo regressions

Why

A fast-forward ref update can finalize attribution for a pulled commit while passing the local user as human_author. When that remote commit had no AI attribution, terminal recovery could previously record its unknown lines as typed by the local user. The fallback now fails closed for other-authored commits while still recognizing locally authored commits when a git-ai author override or email casing makes the display identity differ.

Validation

  • task test
  • task test TEST_FILTER=test_fast_forward_update_ref_does_not_attribute_remote_commit_to_local_user
  • task test TEST_FILTER=terminal_recovery
  • task test TEST_FILTER=test_commit_metadata_recovery_ignores_freeform_message_agent_mentions
  • task test TEST_FILTER=test_cherry_pick_conflict_ai_rewrite_resolution_is_attributed (5 consecutive runs)
  • task lint
  • task fmt
  • git diff --check

Copy link
Copy Markdown
Member Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

@svarlamov
svarlamov marked this pull request as ready for review July 31, 2026 20:39
devin-ai-integration[bot]

This comment was marked as resolved.

@svarlamov
svarlamov force-pushed the agent/guard-human-recovery-author branch 3 times, most recently from 920e945 to a458e7c Compare July 31, 2026 22:51
@svarlamov
svarlamov force-pushed the agent/guard-human-recovery-author branch from a458e7c to ac39ad7 Compare July 31, 2026 23:32
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