Skip to content

Implementation Plan: P3 Fleet Crash-Recovery and Resume Test Coverage#1563

Merged
Trecek merged 5 commits intointegrationfrom
p3-fleet-crash-recovery-and-resume-test-coverage/1541
Apr 30, 2026
Merged

Implementation Plan: P3 Fleet Crash-Recovery and Resume Test Coverage#1563
Trecek merged 5 commits intointegrationfrom
p3-fleet-crash-recovery-and-resume-test-coverage/1541

Conversation

@Trecek
Copy link
Copy Markdown
Collaborator

@Trecek Trecek commented Apr 30, 2026

Summary

Add ~15 test methods across 3 existing test files (test_state.py, test_fleet_semaphore.py, test_sidecar.py) covering fleet crash-recovery paths, lock correctness, state transition guards, resume algorithm edge cases, and sidecar I/O. Pure test additions — no source files modified.

Closes #1541

Implementation Plan

Plan file: /home/talon/projects/autoskillit-runs/impl-20260430-081120-253210/.autoskillit/temp/make-plan/p3_fleet_crash_recovery_resume_test_coverage_plan_2026-04-30_081500.md

🤖 Generated with Claude Code via AutoSkillit

Token Usage Summary

Step uncached output cache_read cache_write count time
plan 3.1k 10.9k 387.3k 64.3k 1 6m 46s
verify 2.6k 26.2k 2.1M 76.1k 1 10m 54s
implement 308 19.7k 2.4M 75.6k 1 6m 36s
prepare_pr 68 4.0k 255.2k 29.3k 1 1m 12s
compose_pr 59 1.9k 189.5k 18.6k 1 37s
review_pr 308 72.0k 2.2M 157.9k 2 16m 32s
resolve_review 682 36.7k 4.5M 131.3k 2 16m 29s
Total 7.1k 171.3k 12.0M 553.0k 59m 9s

Trecek and others added 2 commits April 30, 2026 08:36
… (P3)

Add 15 test methods across 3 files covering WP1-WP9:
- test_state.py: TOCTOU sidecar OSError→INTERRUPTED, _write_pid exception
  swallow, illegal state transitions, REFUSED/RELEASED resume skip, corrupt
  state no-op, mixed success/failure captures
- test_fleet_semaphore.py: constructor guard (max_concurrent≤0), CancelledError
  propagates and releases semaphore lock
- test_sidecar.py: read_sidecar_from_path with missing dir and valid JSONL

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Copy link
Copy Markdown
Collaborator Author

@Trecek Trecek left a comment

Choose a reason for hiding this comment

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

AutoSkillit PR Review — Verdict: changes_requested

Comment thread tests/fleet/test_state.py Outdated
Comment thread tests/fleet/test_state.py Outdated
Comment thread tests/fleet/test_state.py Outdated
Copy link
Copy Markdown
Collaborator Author

@Trecek Trecek left a comment

Choose a reason for hiding this comment

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

AutoSkillit review: blocking issues found. See inline comments — changes are required before merging.

1 critical finding (NameError: bogus undefined in TestWritePidExceptionSwallow.test_nonexistent_state_logs_warning), 1 warning (cohesion: test placement), 1 warning (arch: private import in test).

Trecek added 2 commits April 30, 2026 09:09
Adds _write_pid to fleet/__init__.py so tests can import from the public
package path (autoskillit.fleet) instead of the private sub-module
(autoskillit.fleet._api). Consolidates the import in test_state.py.
…i.py

TestWritePidExceptionSwallow tests _write_pid from fleet/_api.py.
Moving it from test_state.py to a dedicated test_api.py keeps coverage
for _api.py co-located with its source module.
Comment thread src/autoskillit/fleet/_api.py
Comment thread tests/fleet/test_fleet_semaphore.py Outdated
Comment thread tests/fleet/test_fleet_semaphore.py Outdated
Comment thread src/autoskillit/fleet/__init__.py
Copy link
Copy Markdown
Collaborator Author

@Trecek Trecek left a comment

Choose a reason for hiding this comment

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

AutoSkillit review: warning-only findings detected. See inline comments — no blocking changes required.

Verdict: approved_with_comments

4 findings posted as inline comments (all warnings, no blocking criticals):

  • src/autoskillit/fleet/__init__.py — private symbol _write_pid in __all__
  • src/autoskillit/fleet/_api.py — latent circular import via package gateway
  • tests/fleet/test_fleet_semaphore.pyTestExecuteDispatchCancelledErrorLockRelease cohesion placement (requires human decision)
  • tests/fleet/test_fleet_semaphore.py — CancelledError lock release assertion incompleteness

1 info finding (no inline comment): tests/fleet/test_sidecar.py — missing malformed JSONL edge case in TestReadSidecarFromPath.

…t_api.py with strengthened lock assertion

Moved TestExecuteDispatchCancelledErrorLockRelease from test_fleet_semaphore.py
to test_api.py for cohesion (it tests execute_dispatch, not FleetSemaphore).

Added side-effect counter inside _raise_cancelled to prove the semaphore was
actually held when cancellation fired, distinguishing lock-acquired-then-released
from lock-never-acquired.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@Trecek Trecek added this pull request to the merge queue Apr 30, 2026
Merged via the queue into integration with commit bce0012 Apr 30, 2026
2 checks passed
@Trecek Trecek deleted the p3-fleet-crash-recovery-and-resume-test-coverage/1541 branch April 30, 2026 16:45
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