You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Move declaratively expressible built-in lint rules to a first-party package embedded at build time #845
Part of #616. Decisions: see the owner comments there.
Desired behavior
Wright's built-in lint rules that the current declarative vocabulary can express live in a first-party package repository and are embedded in the Wright binary at build time, so official rules can change without a Wright release.
Scope
Inventory the built-in rules in registry.rs and classify each as expressible in the SPEC-309 vocabulary or native-only; record the result in the PR. Native-only rules stay in the binary. The vocabulary is not widened.
Move each expressible rule into the first-party package, keeping its bare ID, default severity, and behavior.
The first-party package may declare evidence class and default severity in its metadata; community packages still cannot.
Record a full commit SHA for the package in this repository and embed that revision at build time; a clean install works offline.
Amend ADR-0015 and SPEC-309 for bare IDs in the first-party package, the official-only evidence declaration, and replace-on-override.
Non-goals
Widening the declarative vocabulary, moving native-only rules, renaming rule IDs.
Acceptance criteria
For each moved rule, findings on the existing lint fixtures are identical before and after the move.
A build with network access disabled still loads the embedded rules.
--disable-rule <existing bare id> and config entries keep working unchanged.
A project entry for the first-party repository with a SHA replaces the embedded default.
A community package declaring evidence class or default severity is refused.
ADR-0015 and SPEC-309 are amended in the same change.
Dependencies
The store and fetch, and project pinning sub-issues. The first-party package repository must exist; creating it and choosing its name is an owner action, which blocks this issue until done.
Blocked on: the first-party package repository does not exist yet; creating it and choosing its name is an owner action. Also sequenced after #842 and #843. Unblocks when that repository exists.
Inventory result (step 0 of this issue): none of the 7 built-in rules in crates/wright-analyzer/src/registry.rs can move to a first-party package with identical findings and the SPEC-309 vocabulary unchanged. Per the owner addendum on #616, the vocabulary is not widened, so nothing moves and this issue closes as not planned.
Rule
What it needs that the declarative matcher lacks
min-wait-loop
One scope covering while, for-global-variable and for-player-variable (RuleMatcher.scope is a single value); fixed message text; StaticIndicator evidence
duplicate-condition
Equality between conditions of an If/Else If chain; a dead-branch fix
expensive-loop-check
A call at any depth in any argument; one finding per value
ongoing-condition-hot-path
Condition order, short-circuit gates, and a finding payload
repeated-value
Grouping of structurally identical sub-expressions, an occurrence count, an Evaluate Once fix
while-without-wait
Severity derived from boundedness evidence (the missing wait itself is expressible)
nested-binder-lambda
Ancestor/descendant value pattern
min-wait-loop is the only borderline rule. Its number match is expressible (wait first argument <= 0.016). It fails on the single scope (three scopes need three rules, so three IDs, which renames the rule), on the fixed message text, and on the hard-coded Exact evidence. The first two need vocabulary or output changes, which this issue forbids.
State after #857, #858 and #861: the first-party identity, replacement of a native rule with the same ID, and project override by SHA already exist. A rule moves to wrightkit/wright-lint-rules when it is expressible. Widening the vocabulary needs its own decision backed by real rules.
Activity
e54-bot commentedon Oct 20, 2026
Blocked on: the first-party package repository does not exist yet; creating it and choosing its name is an owner action. Also sequenced after #842 and #843. Unblocks when that repository exists.
feat: pin lint rule packages per project by commit SHA
feat: pin lint rule packages per project by commit SHA
feat: pin lint rule packages per project by commit SHA
e54-bot commentedon Oct 20, 2026
Inventory result (step 0 of this issue): none of the 7 built-in rules in
crates/wright-analyzer/src/registry.rscan move to a first-party package with identical findings and the SPEC-309 vocabulary unchanged. Per the owner addendum on #616, the vocabulary is not widened, so nothing moves and this issue closes as not planned.min-wait-loopwhile,for-global-variableandfor-player-variable(RuleMatcher.scopeis a single value); fixed message text;StaticIndicatorevidenceduplicate-conditionexpensive-loop-checkongoing-condition-hot-pathrepeated-valuewhile-without-waitwaititself is expressible)nested-binder-lambdamin-wait-loopis the only borderline rule. Its number match is expressible (waitfirst argument<= 0.016). It fails on the single scope (three scopes need three rules, so three IDs, which renames the rule), on the fixed message text, and on the hard-codedExactevidence. The first two need vocabulary or output changes, which this issue forbids.State after #857, #858 and #861: the first-party identity, replacement of a native rule with the same ID, and project override by SHA already exist. A rule moves to
wrightkit/wright-lint-ruleswhen it is expressible. Widening the vocabulary needs its own decision backed by real rules.