Skip to content

fix(lint): close the Rust and TypeScript items of #196 - #259

Merged
furedea merged 4 commits into
mainfrom
fix/196-rust-ts-rules
Nov 20, 2026
Merged

furedea merged 4 commits into
mainfrom
fix/196-rust-ts-rules

Conversation

@furedea-agent

@furedea-agent furedea-agent Bot commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

#196 の Rust / TypeScript の項目(lane rsts)を片付ける.template の linter だけが強制する文章を戻し,Jev の Rust / TS 規則の matcher を #196 で見逃した書き方まで広げ,新しい baseline で cutoff を当て直した.規則はすべて advisory のまま(ADR-0027).

Refs #196

変更

区分 変更前 変更後
文章 template の lint が覆うとして削除 template 以外のプロジェクト向けに戻す(ユーザー決定 2026-11-19)
Rust matcher turbofish・構造体リテラル・&'a mut・let のクロージャ・trait のメソッド宣言・block comment 後の serde 型・関数直前のコメント・呼び出しで終わらないフィールド連鎖を選ばない 選ぶ
TS matcher ReadonlyArray などを選ぶ.戻り値型のないメソッド・関数直前のコメント・呼び出しで終わらないプロパティ連鎖を選ばない readonly / Readonly* は選ばない.残りは選ぶ
no-comment(Rust / TS) state: local(直前のコメントがモデルに見えない) state: located,ask / criteria に「直前のコメント」を追加
TS no-exposed state: local state: located(戻り値型がないときは field の型をファイルから読む)

項目ごとの状態

項目 状態
rust-style errors.md の unwrap_used / expect_used / indexing_slicing,# Panics(helper 経由を含む),todo! / unimplemented! 修正(文章を戻した)
typescript-style errors.md の promise lint の 1 文 修正
tooling.md の package-level guard,types.md の to_owned() と網羅的 match,package_design.md の pub 修正(同じ方針で戻した)
construction-separate-from-execution:turbofish,構造体リテラル 修正
no-exposed-mutable-collection:Rust &'a mut,TS Readonly* の除外,TS 戻り値型の省略 修正
function-single-purpose:Rust の let クロージャ 修正
conversion-and-query-names-follow-rust-convention:trait のメソッド宣言 修正
serde-types-follow-config-conventions:block comment,複数行 derive 修正(block comment)/済(複数行は既存の (?s))
no-comment-restating-code:関数直前のコメント(Rust / TS 分) 修正
no-reaching-through-collaborators:呼び出しで終わらない連鎖(Rust / TS 分) 修正
paths-are-joined-not-formatted:raw string,std::format! / alloc::format!,エスケープ,入れ子の replace の fixture 修正(criteria も更新)
public-types-protect-invariants:tuple struct・スカラーの fixture 済(#241)
domain-states-are-enums の文章 修正(types.md の網羅的 match を戻した)
TS jev 規則 11 項目(suite,it.concurrent,Date(),getRandomValues,pair / export default / Promise.reject,クラスのフィールド,state: located 各種,同名ヘルパー) 済(#242)
rs_no_mocking_library:automock,pub use,グループ use,cfg_attr 済(#216)
rs_no_follow_links:import 別名,途中で型を変える連鎖 済(#216 で Limits に記録)
rs_fs_call_needs_context,rs_no_get_prefix(extern "C",コメントを挟む属性),ts_* / tsx_* の ast-grep 規則すべて 不要(規則を削除済み)

検証

  • matcher テスト 12 件(tests/test_model_rule_files.py::test_rule_selects_each_form_recorded_for_it):実装前に 12 件失敗,実装後に通過
  • 変更した 11 suite の fixture で subject 数とラベル数が一致
  • jev-lint eval --accept(ユーザー実行,2026-11-19 11:35Z と no-comment 2 suite の 12:19Z).cutoff は fitted midpoint に合わせた
  • jev-lint eval --replay:74 suite すべて as shipped
  • uv run pytest:6184 passed,2 skipped

cutoff

規則 旧 → 新 宣言
rust/construction-separate-from-execution 0.62 → 0.63 blind
rust/no-exposed-mutable-collection 0.51 → 0.44 blind
rust/function-single-purpose 0.48 → 0.52
rust/conversion-and-query-names-follow-rust-convention 0.28 → 0.29
rust/serde-types-follow-config-conventions 0.21 → 0.24 unstable を削除(stale)
rust/no-comment-restating-code 0.58 → 0.56 blind を削除(stale)
rust/no-reaching-through-collaborators 0.62 → 0.63
rust/paths-are-joined-not-formatted 0.55 → 0.75 blind を削除(境界の例が 0.52)
typescript/no-exposed-mutable-collection 0.93 unstable(violating.ts:12 が 0.92〜0.96)
typescript/no-comment-restating-code 0.53 → 0.54 blind
typescript/no-reaching-through-collaborators 0.65 → 0.69
範囲・前提・制限
  • 範囲:fix(lint): address review findings deferred from the #74 migration PRs #196 の Rust / TS 項目と文章 2 件(lane brief の rsts).Go / Python / 共有ファイルは他の lane.fix(lint): address review findings deferred from the #74 migration PRs #196 は閉じない.
  • 文章の方針:template から作ったプロジェクトでだけ有効な linter が覆う規則は文章を残す(ユーザー決定 2026-11-19).fix(lint): close blocking ast-grep rule gaps recorded in #196 #216 の「戻さない」はこれで置き換わる.
  • 制限:TS no-exposed の cutoff は,criteria のプレーンなデータレコードの例外を絞って fit し直すまで当てにできない(inconclusive に記録).state: located にした 3 規則は 1 subject ごとにファイル全体を渡すので,入力 token が増える.
  • レビューで出た制限(直さずに記録.再 fit には eval がもう 1 回要る):
    • rust/serde-types-follow-config-conventions:violating.rs:26 が 0.29〜0.43 と揺れる.cutoff 0.24 との差は平均で 0.14 で,jev-lint は inconclusive: Unstable を stale として拒否する.
    • rust/no-comment-restating-code:clean の doc comment(conforming.rs:30,0.44〜0.50)と bad(0.62〜0.66)の間が狭い./// の付いた関数もすべて subject になるので,公開 API の doc comment で誤検出がありうる.
    • typescript/no-exposed-mutable-collection:戻り値型のない scalar の getter(getName() { return this.name; })も subject になり,ファイル全体を渡す.入力 token と誤検出が増えうる.
  • 後続(見逃し):rust/construction-separate-from-execution は,型引数がネストした turbofish(ApiClient::<Wrapper<T>>::new)と ApiClient<Wrapper<T>>::new を選ばない.正規表現の <[^>]*> が内側の > で止まるため.次に Rust 規則を fit し直すときに AST 条件で直す.
  • eval の費用:2 回で約 $0.0095(見積もり).
  • Decisions needed:なし.

🤖 Generated with Claude Code

furedea and others added 4 commits November 19, 2026 20:13
…rs enforce

The lints that replaced these lines are enabled only in projects created
from the templates, so other projects lost the guidance. Restore the
unwrap/expect/indexing, panics documentation, todo!/unimplemented!, pub,
exhaustive match and to_owned lines, the package-level lint guard, and
the promise lint sentence.

Refs #196

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Widen the matchers recorded in #196: a turbofish or struct-literal
collaborator, a `&'a mut` collection, a closure bound by `let`, a trait
method declaration, a serde type after a block comment, a comment just
before a function, and a field or property chain that ends without a
call. The TypeScript collection rule skips `readonly` and `Readonly*`
return types and selects a method without a return type, with the file
as context. New fixtures cover each form; the paths rule gains raw
string, qualified format! and escape cases.

The changed suites need a new eval baseline.

Refs #196

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ew baselines

Accept the 2026-11-19 eval baselines of the eleven suites whose matchers
changed, move each cutoff to the fitted midpoint, and restate the fit
in the comments. Drop the inconclusive exemptions the new fixtures made
stale and declare the TypeScript collection rule unstable on its
weakest violation.

The comment rules could not see a comment written before a function
under `state: local`: send the file and ask about that comment too.
Those two suites need one more eval.

Refs #196

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Accept the 2026-11-19 baselines of the Rust and TypeScript comment
rules, which now see a comment written before a function, and move both
cutoffs to the fitted midpoint. The TypeScript fixtures sit far from the
cutoff, so that rule declares itself blind.

Refs #196

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@furedea

furedea commented Nov 19, 2026

Copy link
Copy Markdown
Owner

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 19, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-19T12:28:14.035126Z 5451e37 Manual request
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@github-actions

Copy link
Copy Markdown

Review summary

This PR restores the Rust and TypeScript style text, widens the matchers, and refits the cutoffs. I read the rule, fixture, expect and test changes. I did not run jev-lint eval or the test suite, and I did not recompute the baselines. Nothing blocks the merge (no P0 or P1). The rules stay advisory, so the impact of what I found is limited to noise.

Findings

  • P2 rust/serde-types-follow-config-conventions/rule.yml: the inconclusive: Unstable marker was removed, but violating.rs:26 now spreads 0.29 to 0.43 against a 0.05 margin over the cutoff. That is worse than before, when the margin was 0.11.
  • P3 rust/no-comment-restating-code/rule.yml: the margin is thin (about 0.06 on each side) and the inconclusive marker is gone. The new follows branch also selects every documented function.
  • P3 typescript/no-exposed-mutable-collection/rule.yml: unannotated return this.$F getters are now selected, including getters of scalar fields. There is no negative test or fixture for that case.

Looks fine

  • The matcher regexes and kind choices are consistent with the new fixtures and the parametrized MATCHER_CASES test.
  • The baseline at values record the old cutoff, which is expected, since the new cutoffs are fitted from those scores.
  • The restored skill text matches the PR description.

🤖 Generated with Claude Code

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 5451e37c70

ℹ️ 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".

@furedea
furedea merged commit 1d2a81e into main Nov 20, 2026
29 checks passed
@furedea
furedea deleted the fix/196-rust-ts-rules branch November 20, 2026 06:07
furedea pushed a commit that referenced this pull request Nov 20, 2026
🤖 I have created a release *beep* *boop*
---


##
[0.3.1](v0.3.0...v0.3.1)
(2026-11-20)


### Bug Fixes

* **hooks:** do not count a printf whose format holds %n as writing
nothing ([#262](#262))
([f3a4543](f3a4543))
* **hooks:** judge gh beside commands that write nothing as gh alone
([#256](#256))
([540bbad](540bbad))
* **hooks:** stop asking for gh calls whose target and arguments are
known at hook time
([#254](#254))
([f4aa355](f4aa355))
* **lint:** close the Rust and TypeScript items of
[#196](#196)
([#259](#259))
([1d2a81e](1d2a81e))
* **lint:** select the Go model-rule forms deferred in
[#196](#196)
([#257](#257))
([8c347fe](8c347fe))
* **lint:** widen three Python model-rule selectors deferred in
[#196](#196)
([#258](#258))
([b3fc801](b3fc801))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: furedea-release[bot] <353651101+furedea-release[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant