Skip to content

Property-based tests for _handle_subprocess_timeout and _terminate_pipeline_remaining_stages #75

Description

@coderabbitai

Overview

Add Hypothesis tests (and CrossHair on extracted transition data) for _handle_subprocess_timeout (cuprum/_subprocess_execution.py, line 263) and _terminate_pipeline_remaining_stages (cuprum/_process_lifecycle.py, line 235).

Justification

Timeout and cleanup paths are temporal and branch-heavy, with risk of inconsistent payloads, non-idempotent cleanup, and double-termination scheduling.

Benefit

  • Proves timeout payload consistency
  • Proves idempotent cleanup
  • Proves no double-termination scheduling

Cost Trade-Off

Medium-high. Requires fakes around process state.

Verifiability Improvements

Represent the process lifecycle as explicit enum/state records, then verify reducers independently.

Recommended Order

Phase 3 — state-machine work after refactors isolate pure transitions.


Raised from PR #62 by @leynos.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions