Skip to content

fix(repository): enforce Git mutation deadline - #96

Merged
Qiyuanqiii merged 1 commit into
mainfrom
codex/fix-git-mutation-timeout
Aug 18, 2026
Merged

Qiyuanqiii merged 1 commit into
mainfrom
codex/fix-git-mutation-timeout

Conversation

@Qiyuanqiii

Copy link
Copy Markdown
Member

Summary

  • enforce the documented two-minute Git mutation ceiling with a real child-process context deadline
  • remove the ineffective post-exit elapsed-time check and kill attempt
  • preserve a shorter caller cancellation/deadline instead of misclassifying the killed process as an ordinary Git failure
  • surface the executor-owned limit as DEADLINE_EXCEEDED
  • add fast injected-process tests for timeout, caller cancellation, and service-visible error classification

Root cause

runGit called command.Run() with the unbounded caller context and only compared elapsed time after the process had already exited. A hung Git process could therefore run forever; calling Process.Kill() after Run returned had no effect.

Verification

  • go test -count=1 -v -timeout 60s ./internal/repository -run "TestMutationRunGit|TestMutationExecuteReportsDurationDeadline|TestMutationGitHelperProcess"
  • normal mutation lifecycle regression
  • go test -count=1 ./internal/application
  • go vet ./internal/repository
  • git diff --check

@Qiyuanqiii
Qiyuanqiii marked this pull request as ready for review August 18, 2026 07:38
@Qiyuanqiii
Qiyuanqiii merged commit a113094 into main Aug 18, 2026
5 checks passed
@NanaseInori
NanaseInori deleted the codex/fix-git-mutation-timeout branch September 16, 2026 09:09
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