Skip to content

Prune subsumed tests in strategy package#1077

Merged
georg merged 1 commit intomainfrom
prune-subsumed-strategy-tests
Apr 29, 2026
Merged

Prune subsumed tests in strategy package#1077
georg merged 1 commit intomainfrom
prune-subsumed-strategy-tests

Conversation

@georg
Copy link
Copy Markdown
Contributor

@georg georg commented Apr 29, 2026

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

Summary

  • Delete TestCheckpointInfo_JSONRoundTrip and TestSessionState_JSONRoundTrip — pure stdlib JSON round-trip tautologies. The same struct shape is exercised end-to-end by TestShadow_SessionStateLocation and any test that runs a real session through .git/entire-sessions/.
  • Delete TestOpenRepository and TestOpenRepositoryError — smoke tests of go-git itself. Every strategy method called from integration tests runs OpenRepository implicitly; failure surfaces as a setup error immediately.
  • Net: 4 tests, 138 LOC removed. No production code touched.

Coverage that stays:

  • CheckpointInfo / SessionState round-tripping → TestShadow_SessionStateLocation and the broader TestShadow_* integration suite.
  • OpenRepository → exercised implicitly by every strategy method in integration_test/.

Test plan

  • mise run fmt — clean
  • mise run lint — 0 issues (no stranded imports)
  • go test ./cmd/entire/cli/strategy/... — adjacent strategy tests pass
  • go test -tags integration -run TestShadow ./cmd/entire/cli/integration_test/ — subsuming integration tests pass

🤖 Generated with Claude Code

Delete four tests that don't earn their keep:

- TestCheckpointInfo_JSONRoundTrip and TestSessionState_JSONRoundTrip
  are pure stdlib JSON round-trips. The same struct shape is exercised
  end-to-end by TestShadow_SessionStateLocation and any test that runs
  a real session through .git/entire-sessions/.

- TestOpenRepository and TestOpenRepositoryError smoke-test go-git
  itself. Every strategy method called from integration tests runs
  OpenRepository implicitly; failure surfaces as a setup error
  immediately.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Entire-Checkpoint: 8f1c6f452ed9
Copilot AI review requested due to automatic review settings April 29, 2026 12:47
@georg georg requested a review from a team as a code owner April 29, 2026 12:47
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR reduces redundant/unit “tautology” coverage in the strategy package by removing tests that primarily re-validate stdlib JSON behavior and go-git smoke behavior already exercised by higher-level integration tests.

Changes:

  • Removed JSON round-trip tests for CheckpointInfo and SessionState from manual_commit_test.go.
  • Removed OpenRepository smoke tests from common_test.go.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
cmd/entire/cli/strategy/manual_commit_test.go Deletes JSON marshal/unmarshal round-trip tests that are covered end-to-end elsewhere.
cmd/entire/cli/strategy/common_test.go Deletes go-git/OpenRepository smoke tests that are exercised implicitly by integration strategy flows.

@georg georg merged commit 6368942 into main Apr 29, 2026
13 checks passed
@georg georg deleted the prune-subsumed-strategy-tests branch April 29, 2026 20:24
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