Repository navigation
feat: baseline_vc_preflight に baseline-expect:fail escape hatch を追加する - #2516
Merged
Merged
Conversation
…file missing node-id existing_file_missing_node_id_noncanonical (Issue #1285/#1347/PR #1305) always forced needs_fix for a pytest VC referencing a not-yet-created node-id (class or function) inside an EXISTING allowed file, with the only fix_hint being "move to a not-yet-created file". That has no resolution when the OWNER has explicitly required the new test to live in the existing file (Issue #2152), since vc_baseline_shape_compiler.py's autofix only covers top-level function node-ids and only proposes not-yet-created files already in Allowed Paths. An explicit author-declared `# baseline-expect: fail` annotation now overrides this ambiguity heuristic and classifies the VC as expected_fail/go instead, for both class and function node-ids. Without the annotation, prior behavior is unchanged. Closes #2515. Co-Authored-By: Claude Sonnet 5 <[email protected]>
Contributor
Preview URL✅ verified live assets: https://squne121.github.io/loop-protocol/pr-2516/ The preview will be removed when this PR is closed. |
5 tasks
PR Body Japanese Check's "Check changed Markdown files" step scans every changed *.md file (not just the PR body) for Japanese prose ratio, with no exemption for test fixtures. The 3 new fixtures had zero prose outside the bash fence, causing an aggregate_ratio: 0.000 failure. Adds one Japanese sentence describing each fixture's purpose above the Verification Commands heading, matching the existing fixture convention in this test suite. Co-Authored-By: Claude Sonnet 5 <[email protected]>
squne121
deleted the
worktree-issue-2515-baseline-expect-escape-hatch
branch
September 6, 2026 01:23
This was referenced Sep 6, 2026
This was referenced Sep 15, 2026
4 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
baseline_vc_preflight.pyのexisting_file_missing_node_id_noncanonical分類(Issue 実装: VC baseline-fail 用 pytest command を canonical form に正規化して contract-review 往復を削減する #1285 / 実装: baseline_vc_preflight.py が既存ファイル::新規テスト関数名 形式の pytest VC を expected_baseline_fail に分類できないバグを修正する #1347 / PR feat: VC baseline-fail pytest command を canonical form に正規化する compiler を追加 #1305)は、既存の allowed ファイルへ新規 class/function node-id を参照する pytest VC を常にneeds_fixにし、唯一の fix_hint「まだ存在しないファイルへ書き換えよ」を返していた。OWNER が明示的に「既存ファイルへの新規テストクラス追加」を要求するケース(Issue 実装: reviewer transport の command_registry.py に --validate サブコマンドを追加する #2152)では、この fix_hint に従うと新規ファイル追加(Allowed Paths 拡張)が必須になり、OWNER 自身が明示した scope 制約と衝突して解消不能になっていた。# baseline-expect: failinline annotation 機構(Issue 実装: baseline-expect VC annotation と deterministic repair pass で issue-refinement-loop 反復失敗を防ぐ #889)を、この分類に対する author の明示宣言による override として拡張した。annotation が無い場合の既存挙動は変更しない。受け入れ条件の達成状況
Issue #2515 が定めた受け入れ条件それぞれの達成状況は次のとおりです。
# baseline-expect: failが付与されている場合、expected_baseline_fail(go 相当)に分類されることを新規テストtest_baseline_expect_fail_existing_file_missing_class_node_id_is_expected_failで検証済み(PASS)。existing_file_missing_node_id_noncanonical/needs_fixを維持することを新規テストtest_existing_file_missing_class_node_id_without_annotation_still_blockedで回帰確認済み(PASS)。test_baseline_expect_fail_existing_file_missing_function_node_id_is_expected_failで確認済み(PASS)。contract_readiness_check.run_baseline_vc_preflight()(実 subprocess 実行)+map_preflight_result_to_errors()を通した production-shaped E2E で readiness status がneeds_fix/human_judgmentにならないことを新規テストtest_baseline_expect_fail_existing_file_missing_node_id_e2e_readiness_is_goで検証済み(PASS)。.claude/skills/issue-contract-review/scripts/tests/test_baseline_vc_preflight.py全体(143 passed, 1 skipped)で既存回帰が無いことを確認済み。検証コマンド結果
(後者は downstream consumer の非破壊確認として追加実行。Issue #2515 の Allowed Paths には含まれない read-only 検証。)
Allowed Paths 遵守
.claude/skills/issue-contract-review/scripts/baseline_vc_preflight.py(コア修正).claude/skills/issue-contract-review/scripts/tests/test_baseline_vc_preflight.py(新規テスト4件追加).claude/skills/issue-contract-review/scripts/tests/fixtures/baseline_expect_fail_existing_file_class_node_id.md(新規).claude/skills/issue-contract-review/scripts/tests/fixtures/baseline_expect_fail_existing_file_function_node_id.md(新規).claude/skills/issue-contract-review/scripts/tests/fixtures/existing_file_missing_class_node_id_no_annotation.md(新規)上記3件の fixture ファイルは Issue #2515 本文の Scope Delta で Allowed Paths に追加済み(既存の
run_preflight()E2E テスト慣例に従う test data ファイルであり、実装ロジックの変更ではない)。Checks
pnpm typecheckpnpm lintpnpm testpnpm buildSchema Change Applicability
not_schema_changebaseline_vc_preflight.py内部の分類ロジック(既存の per-VC 結果 dict のcategory/decision/classificationフィールドの値の一つを、既存の# baseline-expect: failannotation 経由でのみ変更する)であり、producer-consumer 境界をまたぐ新しい machine-readable schema の追加・変更ではない。既存のannotations.baseline_expectフィールドの意味も変更しない。Schema Consumer Inventory
N/A(
not_schema_changeのため)。Safety Claim Matrix
# baseline-expect: failannotation が無い既存 VC の分類挙動を一切変更しない(回帰なし)test_existing_file_missing_class_node_id_without_annotation_still_blockedPASS、test_baseline_vc_preflight.py全体 143 passed, 1 skippedexisting_file_missing_node_id_noncanonical以外の category・decision == "blocked"以外の分岐は本 PR の対象外で無変更baseline_vc_preflight.pyの diff 参照)category/decisionの完全一致条件のみで判定し、任意の category を許可しないif (_category == "existing_file_missing_node_id_noncanonical" and _decision == "blocked"):条件Notes