Skip to content

ast-grep + resolver v3 - #249

Merged
dpc merged 4 commits into
rustshop:masterfrom
dpc:dpc/jj-trsoytvzpwqy
Jul 28, 2026
Merged

ast-grep + resolver v3#249
dpc merged 4 commits into
rustshop:masterfrom
dpc:dpc/jj-trsoytvzpwqy

Conversation

@dpc

@dpc dpc commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

No description provided.

dpc added 4 commits July 24, 2026 21:59
### Summary

Replace production unwraps, discarded Results, and verbose control flow reported by the imported ast-grep rules. Preserve the timer exit-status behavior, make Git staging failures observable at debug level, and use a lossy info-default RUST_LOG filter.

### Details

Timer formatter tests now state why their operations must succeed. The docs command uses Option combinators, invalid TOML conversion retains its explicit invariant, and failed timer diagnostics remain non-fatal because stderr cannot report a write failure. `selfci check` passes lint and the code-level ast-grep scan; its ast-grep rule-test suite still fails in the parent rule-import change because four existing rule snapshots/expectations do not match rule behavior.
### Summary

Update ast-grep test expectations and snapshots to match the imported rules’ actual diagnostics. Align the production unwrap rule exclusions with the fixture coverage, so ignored test code remains exempt while production code still fails the check.

### Details

The unwrap-or-default test now flags only `unwrap_or_default`, which is the operation its rule matches. Regenerated snapshots remove obsolete condition labels and record the new unwrap-or-default diagnostic. The flake check now creates ignore fixtures at paths relative to the ast-grep project root, and `unwrap-in-prod` recognizes the same test path forms exercised by that check.

### Validation

- `nix develop -c selfci check`
Cargo resolver 3 is valid for edition-2024 workspaces, but the lint treated every resolver except 2 as stale and its automatic fix rewrote 3 to 2. Accept resolver values 2 and 3 after Cargo metadata has validated the manifest. Continue recommending resolver 2 for missing, legacy, or malformed values.

Add regression tests covering accepted resolver 2/3 values and rejected missing, v1, and non-string values.

Reviews:
- General review passed with no issues. The review covered correctness, test adequacy, Rust style, and Linked Specs consistency.
@dpc
dpc enabled auto-merge July 28, 2026 20:30
@dpc
dpc merged commit d2bd202 into rustshop:master Jul 28, 2026
4 checks passed
dpc added a commit to dpc/flakebox that referenced this pull request Jul 30, 2026
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