Repository navigation
feat: add min-wait-loop, expensive-loop-check, and nested-binder-lambda - #2
Conversation
Move the three built-in Wright rules that the SPEC-309 matcher can express into this package, with fixtures, a CI job, and the package maintenance contract in AGENTS.md. Fixes #1
|
Verdict: CHANGES REQUESTED Reviewed head Findings1. Failure scenario: a contributor or user on Wright 0.39.x follows the README ( Evidence (verified release archives, Fix: state "Wright 0.41.0 or later" in the README 2.
Fix: in the README, say that a pin replaces Wright's built-in rules with the same IDs, and that Wright embeds this package from Decision for the orchestrator (not a finding)Issue #1 scope item 3 and acceptance criterion 1 say CI runs "against one pinned Wright release". The PR uses VerificationIndependent reference: native rules in Wright 0.41.8 (
Limitations: the JSON envelope exposes only the start |
|
Addressed the review in ea82ef8. Please re-review.
CI pin vs. latest: kept |
|
Verdict: LGTM Re-reviewed head
The fix commit The CI |
Fixes #1
Adds
min-wait-loop,expensive-loop-check, andnested-binder-lambdawith their native bare IDs, native metadata, evidence, and default severity. The matchers are the parity rules fromwrightkit/wrightcrates/wright-analyzer/tests/yaml_contract.rs(#970 there). Also adds fixtures, a CI job, and the maintenance contract inAGENTS.md.Verification
Independent reference: the native rules in Wright 0.41.8. For each rule, I ran
wright lint -f json --all --rule-id <id>once with the native rule and once with this package pinned by SHA. I compared the sorted{location, severity, evidence}sets:wrighttests/fixtures/workshop/real-world/reproducer-bastion-prophet.wstests/run.shpasses against Wright 0.41.8. It fails when a matcher changes (checked by setting theWaitthreshold to 0.001). It also fails when a finding does not come from this package, because the native message format has no(matched N nodes)suffix.Deviations from the issue
.github/docs/rust-ci.mditem 8 says to follow the latest release of a fast-moving upstream rather than an old pin.AGENTS.mdsays the same.expensive-loop-checkdocumentation namesdistanceandisInLoSonly. The native text also namesraycast, which matches no canonical element, so the native rule never reported it. Behavior is unchanged.tests/run.shchecks each fixture rule by name. The previous harness allowed only one finding per fixture file. Now every rule namedflagged…must report exactly one finding and every rule namedclean…none, so one fixture covers all three loop scopes and the documented exclusions.Not covered
<summary> (matched N nodes); the owner approved this inwrightkit/wright#970.unknown field evidence). One unsupported field refuses the package, not one rule. This is input forwrightkit/wright#1080.feat/initial-rulesare not part of this PR.