Phase 6 of the M8 consolidation plan — completes the shared streaming-loop contract tests for ArgyllRunner and removes the last references to the removed per-tool error cases.
New suite: ArgyllRunnerStreamingLoopTests
Focused runStreamingTool contracts, each with a per-test temp dir, unique basenames, per-test mock scripts, and a fresh ProcessManager — no shared UI fixtures, no environment mutation:
Non-zero exit → exact ArgyllRunnerError.toolFailed(tool:code:logs:), retaining the exit code and both collected stdout and stderr lines.
Exit 0 without the expected artefact → exact .missingArtefact(path).
Immediate exit after one stdout line → the line is still delivered to onLogBatch and the run succeeds when the artefact exists.
colprof partial-line progress → an unterminated fragment is flushed to onLogBatch mid-run via the 500 ms flushPartialLine path, before artefact creation and exit.
Table-driven errorDescription coverage — chartread, average, colprof, printcal, applycal, iccgamut, profcheck, plus the generic fallback for unmapped tools and the empty-logs exited with code N detail.
Legacy error token elimination
All references to the removed per-tool error cases are gone:
ArgyllRunnerTargenTests / ArgyllRunnerPrinttargTests: renamed processFailed test titles and tightened assertions to exact toolFailed / missingArtefact values.
ArgyllRunnerCalibrationTests: printcalFailed test renamed and now asserts the exact toolFailed(tool: "printcal", code:logs:); the setenv("ICCERY_MOCK_PRINTCAL_EXIT") global environment mutation was replaced with a per-test mock printcal script and an isolated ProcessManager.
ArgyllRunnerColprofTests: ProcessManager.shared replaced with a fresh instance; new failure test asserts the exact toolFailed case.
## Summary
Phase 6 of the M8 consolidation plan — completes the shared streaming-loop contract tests for `ArgyllRunner` and removes the last references to the removed per-tool error cases.
### New suite: `ArgyllRunnerStreamingLoopTests`
Focused `runStreamingTool` contracts, each with a per-test temp dir, unique basenames, per-test mock scripts, and a fresh `ProcessManager` — no shared UI fixtures, no environment mutation:
- **Non-zero exit** → exact `ArgyllRunnerError.toolFailed(tool:code:logs:)`, retaining the exit code and both collected stdout and stderr lines.
- **Exit 0 without the expected artefact** → exact `.missingArtefact(path)`.
- **Immediate exit after one stdout line** → the line is still delivered to `onLogBatch` and the run succeeds when the artefact exists.
- **colprof partial-line progress** → an unterminated fragment is flushed to `onLogBatch` mid-run via the 500 ms `flushPartialLine` path, before artefact creation and exit.
- **Table-driven `errorDescription` coverage** — chartread, average, colprof, printcal, applycal, iccgamut, profcheck, plus the generic fallback for unmapped tools and the empty-logs `exited with code N` detail.
### Legacy error token elimination
All references to the removed per-tool error cases are gone:
- `ArgyllRunnerTargenTests` / `ArgyllRunnerPrinttargTests`: renamed `processFailed` test titles and tightened assertions to exact `toolFailed` / `missingArtefact` values.
- `ArgyllRunnerCalibrationTests`: `printcalFailed` test renamed and now asserts the exact `toolFailed(tool: "printcal", code:logs:)`; the `setenv("ICCERY_MOCK_PRINTCAL_EXIT")` global environment mutation was replaced with a per-test mock `printcal` script and an isolated `ProcessManager`.
- `ArgyllRunnerColprofTests`: `ProcessManager.shared` replaced with a fresh instance; new failure test asserts the exact `toolFailed` case.
Static check: `git grep -E "(processFailed|chartreadFailed|averageFailed|colprofFailed|printcalFailed|applycalFailed|iccgamutFailed|profcheckFailed)" Packages/ Tests/` returns no matches.
`ArgyllRunner.swift` needed no changes — no defect was exposed. Public `runX` signatures are unchanged.
### Gate
```
xcodegen generate --spec project.yml && xcodebuild test -scheme ICCery -destination 'platform=macOS' -derivedDataPath build/DerivedData-feat-79-runner-loop-contract-tests ARCHS='arm64 x86_64' ONLY_ACTIVE_ARCH=NO CODE_SIGNING_ALLOWED=YES CODE_SIGN_IDENTITY='-' -only-testing:ICCeryCoreTests/ArgyllRunnerStreamingLoopTests -only-testing:ICCeryCoreTests/ArgyllRunnerTargenTests -only-testing:ICCeryCoreTests/ArgyllRunnerPrinttargTests -only-testing:ICCeryCoreTests/ArgyllRunnerColprofTests -only-testing:ICCeryCoreTests/ArgyllRunnerCalibrationTests
```
**TEST SUCCEEDED** — 20 tests, 0 failures across 5 suites: StreamingLoop (13), Targen (3), Printtarg (5), Colprof (2), Calibration (4).
Refs #79
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Summary
Phase 6 of the M8 consolidation plan — completes the shared streaming-loop contract tests for
ArgyllRunnerand removes the last references to the removed per-tool error cases.New suite:
ArgyllRunnerStreamingLoopTestsFocused
runStreamingToolcontracts, each with a per-test temp dir, unique basenames, per-test mock scripts, and a freshProcessManager— no shared UI fixtures, no environment mutation:ArgyllRunnerError.toolFailed(tool:code:logs:), retaining the exit code and both collected stdout and stderr lines..missingArtefact(path).onLogBatchand the run succeeds when the artefact exists.onLogBatchmid-run via the 500 msflushPartialLinepath, before artefact creation and exit.errorDescriptioncoverage — chartread, average, colprof, printcal, applycal, iccgamut, profcheck, plus the generic fallback for unmapped tools and the empty-logsexited with code Ndetail.Legacy error token elimination
All references to the removed per-tool error cases are gone:
ArgyllRunnerTargenTests/ArgyllRunnerPrinttargTests: renamedprocessFailedtest titles and tightened assertions to exacttoolFailed/missingArtefactvalues.ArgyllRunnerCalibrationTests:printcalFailedtest renamed and now asserts the exacttoolFailed(tool: "printcal", code:logs:); thesetenv("ICCERY_MOCK_PRINTCAL_EXIT")global environment mutation was replaced with a per-test mockprintcalscript and an isolatedProcessManager.ArgyllRunnerColprofTests:ProcessManager.sharedreplaced with a fresh instance; new failure test asserts the exacttoolFailedcase.Static check:
git grep -E "(processFailed|chartreadFailed|averageFailed|colprofFailed|printcalFailed|applycalFailed|iccgamutFailed|profcheckFailed)" Packages/ Tests/returns no matches.ArgyllRunner.swiftneeded no changes — no defect was exposed. PublicrunXsignatures are unchanged.Gate
TEST SUCCEEDED — 20 tests, 0 failures across 5 suites: StreamingLoop (13), Targen (3), Printtarg (5), Colprof (2), Calibration (4).
Refs #79