Context
Surfaced during PR #477 round-8 blind review by round8-tester. Task #89 / review round 8, #401 teachback gate.
Finding (HIGH, Phase-2 scope)
The existing TestMainBlockingMode test suite mocks _check_tool_allowed, so the end-to-end path of:
submit-only teachback_submit → real scanner → classify → template → exit-2 block
is NOT integration-tested with real metadata. The unit-level pieces are well-covered, but the full pipeline under _TEACHBACK_MODE = "blocking" has no integration assertion.
Matters for: issue #481 Phase-2 flip. Before flipping advisory → blocking, this integration test must exist or the first real-world blocking-mode call could trip a latent state-machine bug that structure-only unit tests wouldn't catch.
Proposal
Add test_blocking_submit_only_real_scan_exits_2 to pact-plugin/tests/test_teachback_gate.py as a Phase-2 prerequisite.
- Mode:
_TEACHBACK_MODE = "blocking" (monkeypatch)
- Input: a task with
teachback_submit metadata but no teachback_approved
- Assert: scanner runs for real (not mocked), classifier produces awaiting-approval reason_code, template renders the blocking-mode denial, hook exits with code 2
Non-goals
Background
Priority: HIGH for Phase-2, not urgent.
Context
Surfaced during PR #477 round-8 blind review by round8-tester. Task #89 / review round 8, #401 teachback gate.
Finding (HIGH, Phase-2 scope)
The existing
TestMainBlockingModetest suite mocks_check_tool_allowed, so the end-to-end path of:is NOT integration-tested with real metadata. The unit-level pieces are well-covered, but the full pipeline under
_TEACHBACK_MODE = "blocking"has no integration assertion.Matters for: issue #481 Phase-2 flip. Before flipping advisory → blocking, this integration test must exist or the first real-world blocking-mode call could trip a latent state-machine bug that structure-only unit tests wouldn't catch.
Proposal
Add
test_blocking_submit_only_real_scan_exits_2topact-plugin/tests/test_teachback_gate.pyas a Phase-2 prerequisite._TEACHBACK_MODE = "blocking"(monkeypatch)teachback_submitmetadata but noteachback_approvedNon-goals
Background
Priority: HIGH for Phase-2, not urgent.