Skip to content

feat: comprehensive pipeline failure mode test coverage#128

Draft
nextlevelshit wants to merge 7 commits intomainfrom
114-pipeline-failure-tests
Draft

feat: comprehensive pipeline failure mode test coverage#128
nextlevelshit wants to merge 7 commits intomainfrom
114-pipeline-failure-tests

Conversation

@nextlevelshit
Copy link
Collaborator

Summary

Changes

Production Code

  • internal/pipeline/executor.go: Fixed silent artifact injection failures - now reports all missing artifacts with clear error messages

Test Coverage

  • Contract validation: JSON schema mismatch, type errors, missing required fields
  • Adapter failures: Non-zero exit codes, timeout handling, error classification
  • Pipeline failures: DAG cycle detection, permission denial, workspace corruption
  • Integration tests: End-to-end failure propagation and recovery scenarios

Artifacts

  • New validation schemas in .wave/contracts/
  • Test pipelines in .wave/pipelines/
  • Feature specification in specs/114-pipeline-failure-tests/

Spec

See specs/114-pipeline-failure-tests/spec.md for full specification covering 7 user stories and 10 functional requirements.

Test Plan

  • All existing tests pass with go test -race ./...
  • New contract validation tests cover schema mismatch scenarios
  • New adapter tests verify non-zero exit code handling
  • New pipeline tests cover DAG, permissions, and workspace failures
  • Integration tests validate end-to-end failure propagation

Known Limitations

  • Workspace corruption tests use mocked filesystem operations
  • Some timeout tests use accelerated durations for CI speed

Closes #114

Define comprehensive test coverage for all pipeline failure scenarios:
- Contract schema mismatch and validation failures
- Step timeout handling
- Missing artifact detection
- Permission denial enforcement
- Workspace corruption recovery
- Non-zero adapter exit codes
- Contract validator false-positive handling

Covers 7 user stories with 10 functional requirements.
Closes #114
Add proper error reporting when artifacts referenced by inject_artifacts
cannot be found. Previously silent failures are now detected and reported
with a descriptive message listing all missing artifacts.
Add tests for contract validation failure scenarios:
- JSON schema validation with invalid data
- Type mismatches, missing required fields, extra properties
- Test suite execution failures with non-zero exit codes
- Multi-error aggregation and clear error messages
- Edge cases for malformed schemas and circular refs
Add tests for adapter failure scenarios:
- Non-zero exit code detection and proper error propagation
- Timeout handling with context cancellation
- Error classification and recovery hints
- Process cleanup on adapter failures
Add comprehensive pipeline failure tests:
- DAG dependency resolution failures and cycle detection
- Permission denial enforcement with deny patterns
- Workspace validation and corruption detection
- Step timeout handling with proper cleanup
- Missing artifact injection failures
- Executor error propagation and state management
Add integration tests validating full pipeline failure scenarios:
- Contract validation failures with schema mismatch
- Step timeout with proper state recording
- Missing artifact detection across steps
- Permission enforcement at runtime
- Non-zero adapter exit handling
- Multi-step failure propagation and recovery
Add reusable contracts and pipelines for testing failure scenarios:
- artifact-verification.schema.json for artifact validation
- contract-validation-test.schema.json for validation testing
- failure-modes-validation.schema.json for failure mode output
- contract-validation-test.yaml pipeline for contract testing
- failure-modes-validation.yaml pipeline for comprehensive validation
@nextlevelshit
Copy link
Collaborator Author

Wrong folder: .wave -> internal/defaults

@nextlevelshit nextlevelshit marked this pull request as draft February 21, 2026 09:27
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.

Add integration tests covering pipeline failure modes and false-positive detection

1 participant