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
chore(lint): add eslint-plugin-sonarjs (core) — Sonar-grade rules in normal lint, free + local
Brings Sonar's bug/smell detection into ESLint so it runs everywhere — including PRO — with
zero cloud cost and no leak (a private SonarCloud project is paid-by-LOC; core stays on free
public Automatic Analysis, pro is scanned locally by these rules).
- extends plugin:sonarjs/recommended-legacy; most rules at the recommended `error` (forward
guard on new code). no-duplicate-string OFF (fights RN style literals); five already-tripped
legacy rules at `warn` with a burn-down + ratchet plan (GAPS_BACKLOG). ESLint v8 has no
native suppression baseline, hence warn-then-ratchet.
- test override: no-identical-functions + cognitive-complexity off for tests (duplicate
arrange/act is fine); real-bug rules stay ON for tests.
Real bugs the plugin caught on day one and we FIXED (not warned):
- openAICompatibleProvider.test.ts: `expect(....length >= 0).toBe(true)` tautology (always true)
→ assert the terminal outcome (onComplete fired, no abort).
- streamingStateMachine.test.ts: dead `releasers` collection (declared+reset, never used) → removed.
- pro/ui/McpServerModal.tsx: `borderRadius: open ? 8 : 8` no-op ternary → fixed in the pro repo
(branch fix/sonarjs-redundant-ternary; pointer bump via pro's own PR).
Also removes the redundant SonarCloud CI job: core uses Automatic Analysis + Codecov (a CI scan
would only duplicate Codecov's coverage). sonar-project.properties already points at the off-grid-ai
org for Automatic Analysis.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: docs/GAPS_BACKLOG.md
+49-6Lines changed: 49 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -15,25 +15,68 @@ Verdict legend:
15
15
16
16
Added dependency-cruiser as the STANDING GATE for the architectural boundaries we kept
17
17
re-establishing by hand (`.dependency-cruiser.js`; `npm run depcruise`; CI `architecture`
18
-
job + pre-push). Rules are at `error`; the existing debt is captured in
19
-
`.dependency-cruiser-known-violations.json` (68 violations) so the gate PASSES on current
18
+
job + pre-push). AGGRESSIVE ruleset, all at `error`; existing debt captured in
19
+
`.dependency-cruiser-known-violations.json` (66 violations) so the gate PASSES on current
20
20
debt but FAILS on anything NEW. This is the honest register of that baselined debt - burn it
21
21
down, never regenerate the baseline to hide a new violation.
22
22
23
23
| Rule | Count | Verdict | Note |
24
24
|---|---|---|---|
25
25
| no-circular | 61 | fix-the-guard (own PR) | Mostly cycles routed through barrel `index.ts` files (`services/index`, `stores/index`) + intra-screen hook cycles (HomeScreen hooks ⇄ useHomeScreen). Break by importing the concrete module, not the barrel, and extracting shared hook state down a layer. Large - dedicated PR(s). |
26
26
| utils-stay-pure | 3 | fix-the-guard |`utils/proPrompt→stores/appStore`, `utils/imageModelIntegrity→services/modelLoadErrors`, `utils/downloadAggregate→stores/downloadStore`. A "pure" util reaching into a store/service - move the impure bit up or the shared data down. |
27
-
| no-backward-layering-utils| 1 | fix-the-guard |`services/loadModelWithOverride→components/CustomAlert`: a service imports a UI component to show an alert. Service should return a decision; the caller renders the alert (SoC §A). |
28
-
|no-orphans (warn) | 3|instrument-and-revisit|`screens/ChatScreen/toolUsage.ts`, `config/revenueCatKeys.ts`, `bootstrap/proStub.js` - grep-verify each is truly unreferenced (proStub is likely a pro-gating shell) before delete. |
27
+
| no-backward-layering-core| 1 | fix-the-guard |`services/loadModelWithOverride→components/CustomAlert`: a service imports a UI component to show an alert. Service should return a decision; the caller renders the alert (SoC §A). |
28
+
|components-are-leaf-ui | 1|fix-the-guard|`components/models/VoiceModelsSheet→screens/ModelsScreen/VoiceModelsUpsell`: a reusable component imports a screen. Move VoiceModelsUpsell into components/ (or pass it as a prop). |
29
29
30
-
Engine-DIP violations found by the gate on day one (screens importing concrete `litert`)
31
-
were FIXED in this PR, not baselined (see the Engine DIP section) - the gate proving its value.
30
+
Resolved by the gate on day one (NOT baselined):
31
+
- Engine-DIP: screens importing concrete `litert` → routed through services/engines (see Engine DIP section).
32
+
- Dead code: `screens/ChatScreen/toolUsage.ts` (shouldUseToolsForMessage, zero prod callers) deleted with its test.
0 commit comments