Skip to content

refactor(packages): fix anti-slop findings in packages and tests - #43

Merged
nixuuu merged 5 commits into
devfrom
refactor/quality-area-f
Nov 4, 2026
Merged

nixuuu merged 5 commits into
devfrom
refactor/quality-area-f

Conversation

@nixuuu

@nixuuu nixuuu commented Nov 4, 2026

Copy link
Copy Markdown
Member

Code-quality phase 2, area F (docs/code-quality.md): packages/** (generated code and the vendored plugin excluded) and tests/**. 213 non-size lint findings → 0: agent-bus lookups return Effect Result instead of thread-or-string; Match/exhaustive tables instead of ternary chains; stored answers decoded with Schema; the updater decodes manifests, GitHub releases and supervisor IPC with named guards; grok-acp gets its own JSON-RPC wire types; tests use real types (JsonObject/JsonValue, SqlConnection.Row, protobuf init shapes) with no module mocking and no weakened assertions. Two justified disables (file-name control-char sanitizer; the load-bearing triple-slash *.sql reference).

Exported API changes typecheck for every consumer without edits elsewhere (new isJsonObject/isJsonArray and a @canopy/domain/json subpath, grok-acp wire types, parseManifest(JsonValue)). Behaviour edges only for invalid input (the updater rejects wrongly typed manifest/release fields with a clear error; lookup tables ignore prototype keys). Size findings (4) are phase 3.

Checks: install, gen:check, typecheck, format:check, web build. Full check:tmp locally hit the known flaky linked-computer suites (flaky on the base commit too; fixed separately).

@nixuuu
nixuuu merged commit cac7b64 into dev Nov 4, 2026
2 checks passed
@nixuuu
nixuuu deleted the refactor/quality-area-f branch November 4, 2026 07:36
nixuuu added a commit that referenced this pull request Nov 4, 2026
Phase 4 of the code-quality refactor (docs/code-quality.md); phases 1–3
are merged (#29, #39–#43, #46, #47–#52) and the whole repo passes `bun
run lint` and `bun run format:check`.

- CI: "Lint" (`bun run lint`: oxlint + anti-slop + size limits) and
"Formatting" (`bun run format:check`: oxfmt) right after the typecheck.
- Root `check` script runs them too.
- AGENTS.md: lint + format in the hand-over checklist and a short "Code
quality" section (boundary parsing over casts, `// SAFETY:` for
remaining assertions, 400/120 size limits never disabled, no repo-wide
`oxlint --fix`).
- docs/code-quality.md: status — all phases done.
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