Repository navigation
test(model-rules): add boundary clean fixtures to the Go M-05 and M-60 suites - #178
Conversation
…0 suites Refs #164 Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…ir inconclusive Refs #164 Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
|
@codex review |
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
| @@ -10,7 +10,6 @@ subject: node | |||
| # The comment sits above the call statement, outside the call, so the arm that sends the file is used. | |||
| state: located | |||
| threshold: 0.5 | |||
There was a problem hiding this comment.
P2 — The inconclusive: line came out, but the condition it described is still there. The removed note said replay flips between blind and not blind because the top clean score sits near 0.25 (a 0.25 margin from the 0.5 cutoff). In the new baseline, the top clean is still the old conforming_test.go:31 (TestAfterRewrite), which scored 0.30, 0.23 and 0.29 across the three runs. The 0.23 run is below 0.25. None of the four new boundary fixtures scored above 0.14, so they don't move the margin. The PR body says as much: the boundary still depends on line 31, whose spread is 0.16. So this suite can still flip to blind on a later re-record, and the note that warned about it is gone. Either keep inconclusive: until a clean case reliably scores well above 0.25, or add a fixture that does.
There was a problem hiding this comment.
Kept on purpose. The user decided to drop it because jev-lint eval --replay no longer calls the suite blind (FN-margin 0.33 with spread 0.02, FP-margin 0.19 with spread 0.16), and the replay test in tests/test_model_rule_files.py would fail if it did. The 0.16 spread of conforming_test.go:31 is now recorded in the rule.yml header and in the PR body, so a later flip has a stated cause. None of the four new M-60 clean cases reached the boundary (0.03 to 0.20) and I did not bend the rule prose to make one.
| # The cutoff is the 0.5 starting value, not fitted: on this folder's fixtures the highest conforming case scored 0.25 | ||
| # and the fit would be 0.61, so the eval separates them with a wide margin. | ||
| # The cutoff is the 0.5 starting value, not fitted: on this folder's fixtures the highest conforming case scored 0.45 | ||
| # and the fit would be 0.71, so the eval separates them with a margin. |
There was a problem hiding this comment.
P2 — The top clean case (0.45) is conforming.go:67, which is the unlabeled helper reload. It is not either of the new boundary fixtures: FindLargest scored 0.08–0.12 and Refresh scored 0.07–0.09. Across the three baseline runs reload scored 0.40, 0.48 and 0.46, which leaves only 0.02 below the 0.5 cutoff. A small drift on a re-record or a model bump would turn it into a false positive, so this suite went from blind-flapping to FP-flapping. Two options: soften the helper so it sits around 0.3–0.4, or add it to expect.yml explicitly so the boundary is intentional, and record the thin margin in this comment.
There was a problem hiding this comment.
Checked. The top clean case is the unlabelled helper reload at conforming.go:67 (0.40 to 0.48), as you say. I tried labelling it in expect.yml: replay then reports command-query-naming as unstable on the FP side (FP-margin 0.05 below the clean spread 0.08), so a label would add a failing check without a better fixture. I reverted it and recorded the numbers and the reason in the rule.yml header. FindLargest and Refresh (0.07 to 0.12) are honest cleans but low, so a quieter near-cutoff clean for M-05 remains a possible follow-up.
Review summaryNo P0/P1 findings. The fixture line numbers in both P2 (2):
🤖 Generated with Claude Code |
|
Codex Review: Didn't find any major issues. Can't wait for the next one! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
… in the Go rule headers Refs #164 Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
|
@codex review |
| return r.reload(path) | ||
| } | ||
|
|
||
| func (r *Review) reload(path string) error { |
There was a problem hiding this comment.
P2 — The new unlabelled helper reload has become the suite's highest-scoring clean case. Across the three recorded passes it scored 0.40, 0.48 and 0.46 against a 0.5 cutoff. Because default: clean applies, it is still judged as a clean subject. With a spread of about 0.08, a future replay or baseline refresh could push it over 0.5 and record a false positive.
That would bring back the run-to-run instability that removing inconclusive: was meant to fix. The cause is a different case: one that was added by accident rather than chosen as a boundary. The new rule.yml comment says labelling it makes replay report the FP side as unstable. That suggests the margin is really too thin, and leaving it unlabelled only hides the problem.
Possible fixes:
- Make the effect visible in
reload's name or shape, for exampleloadScores. - Inline it so that
Refreshitself is the boundary subject.
Either way, the boundary should be a case that expect.yml deliberately labels.
There was a problem hiding this comment.
Agreed, it was an accidental boundary. I inlined reload into Refresh so the boundary subject is a case that expect.yml labels on purpose. The scores change, so this needs a new eval and baseline from the user before the push; the rule prose stays as is.
Review summaryBlocking findings (P0/P1): 0 What I checked
Finding
Not flagged
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 12fa080b4d
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| # `reload` (conforming.go:67), which scored 0.40 to 0.48 across passes; labelling it makes replay report the FP side | ||
| # as unstable (margin 0.05, spread 0.08), so it stays a subject judged by default. |
There was a problem hiding this comment.
reload は各パスで 0.40/0.48/0.46 と閾値 0.5 の直下まで変動しており,このコメント自身も明示ラベルにすると FP 側が不安定になると認めています.一方,今回明示的に追加した境界例は FindLargest が 0.08~0.12,Refresh が 0.07~0.09 に留まり,境界の安定性を検証できていません.この状態で reload を既定ラベルにして inconclusive を削除すると,リプレイの安定性診断を回避したままスイートを確定的に見せるため,reload を明示して不安定性を解消するか,実際に閾値近傍で安定する明示フィクスチャが得られるまで inconclusive を残す必要があります.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Agreed on the cause: reload was an unlabelled accident. It is now inlined into Refresh, which expect.yml labels clean, and the rule.yml note about it is removed. A new eval and baseline follow; the inconclusive stays dropped only if replay then reports no instability for the labelled case.
| # is the 0.5 starting value, not fitted: on this folder's fixtures the highest conforming case scored 0.27 | ||
| # (conforming_test.go:31, whose score spread across passes is 0.16). |
There was a problem hiding this comment.
M-60 の境界が安定するまで inconclusive を維持してください
追加した4件の clean はベースライン上で最大でも 0.14 であり,閾値 0.5 近傍の境界例になっていません.最高値は既存の conforming_test.go:31 の 0.23~0.30 のままで,コメントにあるとおり spread は 0.16 です.したがって,従来 inconclusive が説明していた blind/not-blind の揺れを今回のフィクスチャは解消しておらず,このフィールドを削除すると不安定な評価結果を確定的なものとして扱ってしまいます.安定した境界フィクスチャを追加するまでは inconclusive を残してください.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Kept dropped by the user decision: replay no longer calls this suite blind (FN-margin 0.33 spread 0.02, FP-margin 0.19 spread 0.16), and the replay test fails if that changes. The 0.16 spread of conforming_test.go:31 is stated in the rule.yml header and the PR body. Four more clean cases scored 0.03 to 0.20 and I did not bend the rule prose to raise them.
…ase is a labelled one Refs #164 Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
|
@codex review |
| # Lines are the first line of each function; a window of 1 keeps neighbouring functions apart. | ||
| # violating.go: the verb promises a pure read or an effect and the body does the other. | ||
| # conforming.go: the explicit cleans are the hard ones, whose verb promises neither (check, judge, load). | ||
| # conforming.go: the explicit cleans are the hard ones, whose verb promises neither (check, judge, load), and the |
There was a problem hiding this comment.
P3: This comment is out of date. It says a boundary fixture is "an effect done by a helper", but the PR inlined the reload helper into Refresh, so conforming.go has no helper now. The why: on line 63 already gives the correct reason (the effect replaces the function's own field). Someone tuning this suite later could misread what the fixture is meant to test. Suggest rewording to something like "an effect-named method that reads a file but only replaces its own field".
There was a problem hiding this comment.
Fixed in fb8799f: the header now says an effect-named method that reads a file but only replaces its own field.
| # Lines are the t.Skip call. violating_test.go: a skip for a known defect with no removal condition. | ||
| # conforming_test.go: a condition in a comment or in the message, and skips that are not for a defect. | ||
| # conforming_test.go: a condition in a comment or in the message, and skips that are not for a defect; the last two | ||
| # are boundary cases that look like a violation (a toolchain gap with a version in the message, a comment that names |
There was a problem hiding this comment.
P3: The comment says "the last two are boundary cases", but this PR adds four boundary cleans (lines 41, 47, 52, 56). The dependency-bump case and the external-issue case aren't mentioned. Suggest "the last four" plus those two descriptions.
There was a problem hiding this comment.
Fixed in fb8799f: the header now says the last four and lists the dependency bump and external issue cases.
Review summaryNo blocking findings (0 × P0/P1). What I checked:
Two P3 inline comments: the 🤖 Generated with Claude Code |
|
Codex Review: Didn't find any major issues. Delightful! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
…fixtures Refs #164 Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
|
@codex review |
Review summaryNo blocking findings. Checked:
Note (not blocking): in the committed M-05 baseline, |
|
Codex Review: Didn't find any major issues. Swish! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
概要
Go の
command-query-naming(M-05)とknown-defect-marker-names-removal(M-60)に,違反に近い見た目の「本当に準拠している」境界フィクスチャを足し,inconclusive:を外しました.残っていたinconclusive:はこの 2 つだけで,これで 3 スイートすべてが外れます(Rust M-21 と Go M-21 は #158 / #175 で対応済み).Closes #164
変更
FindLargest(*Review).RefreshTestNeedsNewerToolchainTestUntilReleaseTestPinnedTransportTestUpstreamTicketルール文(criteria)は変えていません.フィクスチャの
importを 1 行足したため,既存 clean の行番号を +1 しました.評価(user が実行した eval,
--no-config)conforming_test.go:31)conforming_test.go:31に依存しており,このケースのスコアの揺れ(spread)は 0.16 です.今後 replay が blind と判定する場合は,この揺れが原因として疑われます.FindLargest,Refresh)は 0.07〜0.12 で境界には届いていません.なお,レビューの指摘を受けて,意図せず 0.40〜0.48 になっていた helperreloadはRefreshに inline しました.last.jsonは他のスイートと同様にコミットしていません.検証
uv run --frozen pytest:4718 passed,1 skippedjev-lint eval --replay --no-config agents/hooks/lint/model-rules/go:3 スイートすべて「same decisions」#164 の受け入れ条件
ok_or/ok_or_else/map_err,cfg_attrの属性ノード照合:PR feat(hooks): match Rust cfg_attr by attribute node and select ok_or and map_err messages #175 など,先行 PR で完了inconclusive:の削除:この PR で完了🤖 Generated with Claude Code