From 3729b38150fef68702d1567bfb54fd4cfd12e50d Mon Sep 17 00:00:00 2001 From: tzhouam Date: Tue, 25 Aug 2026 13:09:14 +0800 Subject: [PATCH] imreview: state the preflight-failure behavior explicitly The skill mandates an import/version compatibility preflight before pytest but never said what happens when it fails on a non-docs change. Say it: skip tests, keep reviewing source, and record the skipped validation as an explicit verification gap in the final report. Both prompt copies updated, and the output-contract test pins the sentence. Closes #53. Co-Authored-By: Claude Fable 5 Claude-Session: https://claude.ai/code/session_0165QsXAeLVPrKfj8Yk5zns3 --- integrations/cursor/imreview.md | 4 +++- plugins/infermatrix-copilot/skills/imreview/SKILL.md | 4 +++- test/test_imreview_output_contract.py | 4 ++++ 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/integrations/cursor/imreview.md b/integrations/cursor/imreview.md index 8031a84e..814a3b8b 100644 --- a/integrations/cursor/imreview.md +++ b/integrations/cursor/imreview.md @@ -30,7 +30,9 @@ Before pytest, run a short import/version compatibility preflight. Bind every validation command and result to the head SHA and an environment fingerprint; reuse an environment only when its dependency fingerprint matches. After the preflight passes, run targeted tests and low-cost static checks alongside the -source review. +source review. If the preflight fails, skip tests, continue the source review, +and record the skipped validation as an explicit verification gap in the final +report. Stop when every changed semantic path has a supported finding or an explicit no-issue conclusion; do not add searches only for confidence. After source review independently verifies and freezes its candidate findings, diff --git a/plugins/infermatrix-copilot/skills/imreview/SKILL.md b/plugins/infermatrix-copilot/skills/imreview/SKILL.md index 517744c9..32c4bd00 100644 --- a/plugins/infermatrix-copilot/skills/imreview/SKILL.md +++ b/plugins/infermatrix-copilot/skills/imreview/SKILL.md @@ -33,7 +33,9 @@ Before pytest, run a short import/version compatibility preflight. Bind every validation command and result to the head SHA and an environment fingerprint; reuse an environment only when its dependency fingerprint matches. After the preflight passes, run targeted tests and low-cost static checks alongside the -source review. +source review. If the preflight fails, skip tests, continue the source review, +and record the skipped validation as an explicit verification gap in the final +report. Stop when every changed semantic path has a supported finding or an explicit no-issue conclusion; do not add searches only for confidence. After source review independently verifies and freezes its candidate findings, diff --git a/test/test_imreview_output_contract.py b/test/test_imreview_output_contract.py index 1715745c..5dad779f 100644 --- a/test/test_imreview_output_contract.py +++ b/test/test_imreview_output_contract.py @@ -35,6 +35,10 @@ def test_imreview_returns_github_style_findings(prompt_path: Path) -> None: assert "before reading knowledge, searching source, or running tests" in prompt assert "bounded `rg` searches" in prompt assert "import/version compatibility preflight" in prompt + assert ( + "If the preflight fails, skip tests, continue the source review, " + "and record the skipped validation as an explicit verification gap" + ) in prompt assert "head SHA and an environment fingerprint" in prompt assert "at the pinned head SHA" in prompt assert "fetch the PR head ref" in prompt