test(pipeline): Phase 4 task 9 — scan-pipeline integrity & serialization

9.1 — end-to-end fallback parity: a requested-but-unavailable HarnessX standard
scan (models set, extra absent) produces byte-identical findings to the plain
deterministic path, differing only by the recorded hunter_pool/verify degradations;
quick mode is unaffected by the extra (identical findings present-or-absent, never a
degradation).

9.2 — per-slot serialization round-trip: StaticFinding / RankingScore / FileTarget /
VerificationResult / ScoreArtifact round-trip through JSON without loss, plus the real
findings.json reload path preserves nested slots (reachability evidence/conditions,
tags) rather than restoring them empty. Covers the current artifact-persistence model;
the HarnessX processor slot-contract variant stays deferred with task 6.3.

tests/test_scan_pipeline_integrity.py (8 tests). 145 passed, 3 skipped; ruff + mypy
clean; detection gate PASS.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
This commit is contained in:
Marius Ciepluch
2026-06-22 18:20:57 +02:00
co-authored by Claude Opus 4.8
parent e255eb264f
commit bebfc72cf7
3 changed files with 177 additions and 4 deletions
@@ -1,7 +1,7 @@
{
"feature_name": "harnessx-self-improving-rulesets",
"created_at": "2026-06-22T10:07:18Z",
"updated_at": "2026-06-22T15:10:00Z",
"updated_at": "2026-06-22T16:20:00Z",
"language": "en",
"phase": "implementation",
"approvals": {
@@ -259,17 +259,18 @@ This plan splits the fused regex layer into three governed owners (rules detect,
- _Boundary: CI Pipeline_
- _Depends: 8.1_
- [ ] 9. Validate scan-pipeline integrity and serialization
- [ ] 9.1 (P) Verify capability fallback and unchanged sync-driver behavior
- [x] 9. Validate scan-pipeline integrity and serialization
- [x] 9.1 (P) Verify capability fallback and unchanged sync-driver behavior
- Confirm that with the extra absent, quick and standard scans execute through the existing sync driver with behavior unchanged from the pre-adoption baseline, and that a requested-but-unavailable HarnessX stage records a degradation.
- Observable completion: an extra-absent scan matches the pre-adoption baseline and a missing-capability request records a manifest degradation, proven by an end-to-end fallback test.
- _Requirements: 1.3, 1.8_
- _Boundary: HxScanOrchestrator, CI Pipeline_
- _Depends: 6.5_
- [ ] 9.2 (P) Verify slot serialization round-trips on resume
- [x] 9.2 (P) Verify slot serialization round-trips on resume
- Confirm each scan slot type serializes and restores without loss after a resume, guarding against non-serializable slots restoring as empty.
- Observable completion: a per-slot-type round-trip test passes for every scan slot after a resume cycle.
- Done for the current artifact-persistence model (findings/ranking/file-target/verification/score round-trip + the real findings.json reload path in `tests/test_scan_pipeline_integrity.py`). The HarnessX processor slot-contract serialization variant remains deferred with task 6.3.
- _Requirements: 1.5_
- _Boundary: HxScanOrchestrator_
- _Depends: 6.3_