1) Outcome
Harness and CI reliably catch exception-path cleanup + session-load atomicity regressions before review.
2) Current vs Desired
Current: Semantic state-integrity regressions (exception-path cleanup gaps; load_session() partial mutation on failure) can land in PRs without any harness or CI gate failing, and are only caught by review/CodeRabbit.
Desired: The local harness and CI fail deterministically for these regressions (via targeted tests and/or running the pre-push stage in CI).
3) Scope
Allowed to change:
- CI workflows under .github/workflows/ (harness parity)
- HARNESS.md (documentation parity)
- Tests under tests/ (add failure-path regression coverage)
- Pre-commit wiring if needed to align stages
NOT allowed to change:
- Product behavior unrelated to harness enforcement
- Broad refactors unrelated to these failure-path invariants
4) Acceptance Criteria (Definition of Done)
5) Verification
Automated:
uv run pre-commit run --hook-stage pre-push --all-files
uv run pytest tests/unit/ui/test_request_threading.py tests/unit/core/test_session_usage_schema.py
Manual:
- Step 1: Open a PR and confirm CI includes a job that executes the pre-push-equivalent checks.
- Step 2: Introduce a small intentional regression locally (e.g., break one of the new failure-path tests) and confirm the check fails.
- Expected: CI blocks merge until the relevant check passes.
Evidence required:
- Test command output
- Short manual verification log (what PR/run, expected vs actual)
6) Bug-only (if applicable; otherwise N/A)
N/A
7) Links
1) Outcome
Harness and CI reliably catch exception-path cleanup + session-load atomicity regressions before review.
2) Current vs Desired
Current: Semantic state-integrity regressions (exception-path cleanup gaps; load_session() partial mutation on failure) can land in PRs without any harness or CI gate failing, and are only caught by review/CodeRabbit.
Desired: The local harness and CI fail deterministically for these regressions (via targeted tests and/or running the pre-push stage in CI).
3) Scope
Allowed to change:
NOT allowed to change:
4) Acceptance Criteria (Definition of Done)
5) Verification
Automated:
uv run pre-commit run --hook-stage pre-push --all-filesuv run pytest tests/unit/ui/test_request_threading.py tests/unit/core/test_session_usage_schema.pyManual:
Evidence required:
6) Bug-only (if applicable; otherwise N/A)
N/A
7) Links