Repository navigation
Conversation
Five (lint, file) keys in mordant-baseline.toml accept more findings than main has. Lower each count to the number of findings that the pinned mordant reports on the three targets, and remove the lines that reach zero. The [bun_lint_driver] section is empty after that, so its header goes too. 198 lines and 495 accepted findings become 195 lines and 488.
|
Status: ready for review.
|
|
Updated 7:22 PM PT - Oct 20th, 2026
✅ @robobun, your commit 88232c5602628c06dbbd218af71851bbfc6b5bf4 passed in 🧪 To try this PR locally: bunx bun-pr 46244That installs a local version of the PR into your bun-46244 --bun |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
WalkthroughThe Mordant analyzer baselines were updated for the WebSocket and MySQL entries. The bun_lint_driver baseline entry was removed. ChangesAnalyzer baseline updates
Suggested reviewers: Priority: ⬇️ Low Merge Risk: ⚪ Minimal · up to
|
There was a problem hiding this comment.
LGTM — a baseline-only tightening where every hunk lowers or removes a count, so the ratchet can only get stricter.
What was reviewed:
- Checked each of the five entries against history:
MySQLConnection.rs,JSMySQLConnection.rs,DecodeBinaryValue.rsandlint/driver/lint.rswere all rewritten substantially after the baseline was last regenerated (f0c6cbc), which accounts for the dropped findings. WebSocketUpgradeClient.rshas not changed since f0c6cbc, so its 2 -> 1 drop rests on the PR's own mordant runs rather than a traceable source edit; themordantjob runs all three targets with--keep-goingon this PR, so a too-low count would show as a red check here rather than merging unseen.- Confirmed the file still matches the generator's format (sorted sections and keys, no empty section left behind after
[bun_lint_driver]was removed).
Extended reasoning...
The change edits only mordant-baseline.toml, the per-(lint, file) ratchet for the Rust lint pack, lowering four counts and deleting one now-empty section with no Rust source changes. It touches no security-sensitive surface. Every hunk reduces an accepted-finding count, so the only failure mode is a count that is too low, and scripts/rust-mordant.ts shows the CI job runs the same three targets and would fail this PR directly in that case. Four of the five drops are corroborated by large rewrites of the named files since the last regeneration; the fifth is unverifiable from history in this shallow clone but is covered by the PR's own check. Small, mechanical, and self-verifying by CI, so it meets the bar for approval.
|
The note about The |
Problem
mordant-baseline.tomlaccepts more findings thanmainhas for five(lint, file)keys. Themordantjob tolerates an over-count, so a new finding of the same lint in one of these files passes unseen until the count is used up.mainnow has fewer findings in them. The fifth,WebSocketUpgradeClient.rs, has not changed since WebSocket: real closing handshake, one failure path,wsrewritten on native transports (consolidates the open WebSocket PRs) #45223 set its count to 2, and mordant reports one finding there. Nothing regenerated the baseline.Fix
mainhas:"generic_body_not_generic:src/http_jsc/websocket_client/WebSocketUpgradeClient.rs": 2 to 1"generic_body_not_generic:src/sql_jsc/mysql/JSMySQLConnection.rs" = 1: removed"generic_body_not_generic:src/sql_jsc/mysql/MySQLConnection.rs": 4 to 1"generic_body_not_generic:src/sql_jsc/mysql/protocol/DecodeBinaryValue.rs" = 1: removed"options_as_enum:src/lint/driver/lint.rs" = 1: removed, with the[bun_lint_driver]header of its now empty sectionbun run rust:mordantexits 0 with the new file (three targets, pinnedMORDANT_REV).Background
mordant-baseline.tomlis a ratchet. Each line is"<lint>:<file>" = <count>. Themordantjob hides that many findings of the lint in the file and fails only when the file has more.unused_pubis the exception: one run over all three targets counts it (scripts/rust-mordant.ts).unused_pubincluded.Notes
Findings per target for the five keys:
generic_body_not_generic:src/http_jsc/websocket_client/WebSocketUpgradeClient.rsgeneric_body_not_generic:src/sql_jsc/mysql/JSMySQLConnection.rsgeneric_body_not_generic:src/sql_jsc/mysql/MySQLConnection.rsgeneric_body_not_generic:src/sql_jsc/mysql/protocol/DecodeBinaryValue.rsoptions_as_enum:src/lint/driver/lint.rsHow the counts were taken:
cargo +nightly-2026-09-01 mordant --workspace --target <triple> --keep-goingfor each ofx86_64-unknown-linux-gnu,x86_64-pc-windows-msvcandaarch64-apple-darwin, withMORDANT_TOMLset to the text ofmordant.tomlwith itsbaselinekey pointed at an empty file, so that every finding prints. Then one run with all three--targetflags forunused_pub(160 findings in 22 files, the same as the baseline).The finding that remains in
MySQLConnection.rsisMySQLConnection::process_split_packet(generic overC). The finding that remains inWebSocketUpgradeClient.rsisHTTPClient::<SSL>::connect.When each count was recorded:
MySQLConnection.rs,JSMySQLConnection.rsandDecodeBinaryValue.rs: in ci: bump mordant to cbeefdb #43669. sql: consolidate the open Bun.sql, bun:sqlite and node:sqlite pull requests #45304 changed all three files after that.lint/driver/lint.rs: in ci: bump mordant to 564c8da #45478.bun check: 1.4x to 7.8x faster on large projects. Fixes forbun check,bun lintandbun fmt#45800 andbun check: fix errors lost since #45800, and 9 to 37% faster #46001 changed the file after that.WebSocketUpgradeClient.rs: in WebSocket: real closing handshake, one failure path,wsrewritten on native transports (consolidates the open WebSocket PRs) #45223, which is also the last change to that file. WebSocket client: follow-up fixes to #45223 #45720 later changed two other files of the same crate (websocket_client.rsandWebSocketProxyTunnel.rs).