Skip to content

Commit 203aafc

Browse files
authored
feat(lint): SAFETY-comment assertion ratchet + repo deslop skill (#124359)
* feat(lint): add SAFETY-comment assertion ratchet * feat(skills): add repo deslop skill * fix(lint): refresh initial assertion baseline * chore(lint): align assertion baseline with main * chore(lint): sync baseline with current assertion ledger * test(ui): stabilize Control UI E2E waits * chore(lint): sync narrowed assertion ledger * chore(lint): sync fully drained assertion ledger * fix(lint): close assertion ratchet bypasses
1 parent f1ca5e2 commit 203aafc

12 files changed

Lines changed: 5354 additions & 201 deletions

‎.agents/skills/deslop/SKILL.md‎

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
---
2+
name: deslop
3+
description: "Diff-scoped AI-slop cleanup pass: strip comment slop, defensive-check slop, type-laundering, and style drift from the current branch diff before autoreview."
4+
---
5+
6+
# Deslop
7+
8+
Clean only the current branch diff before review. Preserve behavior absolutely.
9+
10+
## Checklist
11+
12+
1. Scope the pass to `git diff` against `origin/main`, or the branch merge base when it differs. Never run a repo-wide cleanup.
13+
2. Inspect every changed hunk for:
14+
- comments a human maintainer would not write, including narration, syntax explanation, and prose that merely restates the code;
15+
- defensive checks or `try`/`catch` blocks that are abnormal for the surrounding module or protect only imagined states;
16+
- casts that launder types, especially `as any`, `as unknown as T`, and widen-then-assert flows. Oxlint already rejects the latter two patterns in governed code;
17+
- redundant intermediate variables or one-use helpers that do not add domain meaning, reduce duplication, or simplify control flow;
18+
- compatibility shims, aliases, retries, and fallback branches without a named shipped contract and removal plan;
19+
- naming, control flow, imports, formatting, and other style that conflicts with the surrounding file.
20+
3. Make no functional edits. If cleanup could change behavior, leave it alone and report it instead.
21+
4. Fix a finding inline only when the cleanup is trivial and behavior-neutral. Otherwise note it for the author.
22+
5. Report the result in 1–3 sentences, including whether anything changed and any non-trivial item left for review.
23+
24+
Run `$deslop` before `$autoreview`, never instead of it. Autoreview remains the required correctness and safety review gate.

‎config/assertion-safety-baseline.txt‎

Lines changed: 4442 additions & 0 deletions
Large diffs are not rendered by default.

‎package.json‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1512,6 +1512,7 @@
15121512
"changed:lanes": "node scripts/changed-lanes.mjs",
15131513
"check": "node --import tsx scripts/check.mts",
15141514
"check:architecture": "pnpm check:import-cycles && pnpm check:madge-import-cycles && pnpm check:deprecated-api-usage && pnpm check:wrapper-shadowing && pnpm check:deprecated-jsdoc && pnpm db:kysely:check && pnpm lint:kysely && pnpm check:database-first-legacy-stores",
1515+
"check:assertion-safety": "node --import tsx scripts/check-assertion-safety-ratchet.mts",
15151516
"check:base-config-schema": "node --import tsx scripts/generate-base-config-schema.ts --check",
15161517
"check:bundled-channel-config-metadata": "node --import tsx scripts/generate-bundled-channel-config-metadata.ts --check",
15171518
"check:changed": "node scripts/check-changed.mjs",

0 commit comments

Comments
 (0)