Skip to content

test(hooks): cover ended→idle prepare-commit-msg (#411)#1826

Open
suhaanthayyil wants to merge 4 commits into
mainfrom
fix/411-ended-idle-prepare-commit
Open

test(hooks): cover ended→idle prepare-commit-msg (#411)#1826
suhaanthayyil wants to merge 4 commits into
mainfrom
fix/411-ended-idle-prepare-commit

Conversation

@suhaanthayyil

@suhaanthayyil suhaanthayyil commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

https://entire.io/gh/entireio/cli/trails/917

Summary

  • Adds an integration regression for #411: session-endsession-start (ENDED→IDLE) → new turn → git commit.
  • Confirms prepare-commit-msg still attaches Entire-Checkpoint on current main (natural repro does not fail).

Test plan

  • go test -tags=integration ./cmd/entire/cli/integration_test/ -run TestIssue411_EndedToIdle_PrepareCommitMsgAddsTrailer

Made with Cursor

Regression for the reported session-end → session-start → commit path;
prepare-commit-msg still attaches Entire-Checkpoint on current main.

Co-authored-by: Cursor <cursoragent@cursor.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds an integration regression test to cover issue #411, validating that the prepare-commit-msg hook still appends an Entire-Checkpoint trailer after a Claude Code session transitions ended → idle and then proceeds with a new turn and a user git commit.

Changes:

  • Introduces a new integration test that reproduces the ENDED→IDLE restart sequence and asserts Entire-Checkpoint trailer attachment.
  • Verifies session phase transitions (idle → ended → idle) and ensures EndedAt is cleared on restart.

Comment thread cmd/entire/cli/integration_test/issue_411_ended_idle_test.go
Comment thread cmd/entire/cli/integration_test/issue_411_ended_idle_test.go
Comment thread cmd/entire/cli/integration_test/issue_411_ended_idle_test.go
suhaanthayyil and others added 3 commits July 22, 2026 08:41
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
"github.com/stretchr/testify/require"
)

// TestIssue411_EndedToIdle_PrepareCommitMsgAddsTrailer is the natural

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we not reference issue numbers in the code? I reckon it would be better if we described what this is testing, instead of referencing the issue that describes what the test covers.
Thaaanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants