Skip to content

codex auto-commit: the mail gate handles a repository with no commits yet #835

Closed

Description

@tps-flint

Found by CodeRabbit on #810 (pre-existing; the gate fails safe today by skipping). When the mail auto-commit repository has no commits yet (unborn HEAD), the baseline git rev-parse HEAD probe fails, so the gate skips the task's first commit — and every later task skips too while HEAD stays unborn.

What the fix does: the gate distinguishes an unborn HEAD (git symbolic-ref -q HEAD names a branch and git rev-parse --verify -q HEAD finds no commit) from a failed probe, at both the baseline and the final HEAD check. Unborn at baseline with a non-empty git status at the end commits as a new repository's first commit; unborn with an empty status is clean; any other probe failure stays an indeterminate skip naming the probe. Real-git tests: an unborn repo where the task writes files (committed), an unborn repo with no changes (clean), and a corrupted HEAD (indeterminate skip).

Refs #800, #810

Activity

  1. moved this to Triage in Office queueon Nov 7, 2026
  2. self-assigned this
    on Nov 9, 2026
  3. moved this from Triage to In review in Office queueon Nov 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions