Skip to content

Cover broken job command paths with integration tests#146

Merged
CoreyRDean merged 1 commit into
mainfrom
refactor/tombstone-command-coverage
May 21, 2026
Merged

Cover broken job command paths with integration tests#146
CoreyRDean merged 1 commit into
mainfrom
refactor/tombstone-command-coverage

Conversation

@CoreyRDean
Copy link
Copy Markdown
Owner

Non-technical summary

This closes the remaining test gap around clauck's broken-job recovery commands. clauck broken, clauck revive, and clauck discard now have direct command-level coverage, so future changes to the tombstone flow are less likely to regress silently.

Why this matters now: issue #124 is still open on main, and the repo has already needed follow-up fixes in these revive paths. The helper-level tests were no longer enough proof for the user-facing command surface.

The system is better afterward because the recovery flow now has a stronger safety net across happy paths, DAG resume behavior, and operator-facing failures.

Technical summary

  • Expanded tests/test_clauck.py to cover:
    • cmd_broken empty output
    • cmd_broken table output with stale markers and stable ordering proof
    • cmd_discard removal counts and missing-tombstone behavior
  • Expanded tests/test_clauck_revive.py to cover:
    • DAG resume dispatch through dag-runner.py --resume
    • revive override contents on the DAG path
    • missing tombstone, stale tombstone, and missing-session-id error exits
  • Kept the increment test-only: no runtime behavior changes, only stronger verification around the existing command contract.

Relevant intent: this advances clauck's inspectability and trust-via-proof contract by ensuring the user-facing recovery commands have observable, durable regression coverage.

Tests:

  • python3 -m unittest -v tests.test_clauck tests.test_clauck_revive
  • python3 -m unittest discover tests -v

Breaking changes: none.

Additional notes

Trade-off: this does not add end-to-end subprocess execution for revive; it stays at the command boundary with subprocess.Popen mocked so the suite remains fast and isolated.

Deferred follow-up: issue #124 mentioned broader integration coverage for these command flows. This PR covers the command branches directly, but does not add real spawned-job fixtures beyond the existing run-job.sh resume-precedence test.

Remaining gap: if the repo later wants deeper end-to-end proof for revive side effects, that should be a separate increment rather than broadening this bounded test-only change.

@CoreyRDean CoreyRDean marked this pull request as ready for review May 21, 2026 13:12
@CoreyRDean CoreyRDean merged commit c40be7c into main May 21, 2026
2 checks passed
@CoreyRDean CoreyRDean deleted the refactor/tombstone-command-coverage branch May 21, 2026 13:12
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