Skip to content

chore(rules): enforce exhaustive CLI+MCP E2E tests and CI merge gate#41

Merged
bntvllnt merged 1 commit into
mainfrom
chore/testing-e2e-rules
Jun 3, 2026
Merged

chore(rules): enforce exhaustive CLI+MCP E2E tests and CI merge gate#41
bntvllnt merged 1 commit into
mainfrom
chore/testing-e2e-rules

Conversation

@bntvllnt

@bntvllnt bntvllnt commented Jun 3, 2026

Copy link
Copy Markdown
Owner

What

Strengthens the project testing rules in CLAUDE.md. Rules/docs only — no source or test changes.

Derived from real session history (a init command shipped broken, then E2E was added reactively). Codifies the practice as BLOCKING rules so it can't recur silently.

P1 — E2E (CLI + MCP) BLOCKING

Every CLI command and MCP tool must have an E2E test that exercises the real surface (spawn built binary / real MCP stdio), full lifecycle, no internal mocks. New command/flag/tool = new/updated E2E in the same change. Browser E2E (Playwright/Maestro) marked N/A — this package has no UI (overrides global ui-testing rule).

P2 — Coverage maps to E2E

Every command, flag, MCP tool, and metric maps to ≥1 E2E scenario; a surface with no E2E is an incomplete feature.

P3 — CI is the merge gate

Full pipeline (lint → typecheck → build → test incl. E2E → coverage) runs in .github/workflows/ci.yml; red blocks merge. Ban eslint-disable / @ts-ignore / skipped tests.

Coverage threshold gate was already present in vitest.config.ts (80/70/80/80) — no change needed.

Test

Docs only. Verified the existing suite stays green: 134 suites / 342 tests pass, build clean, coverage thresholds satisfied.

- E2E (CLI + MCP) BLOCKING: every command and MCP tool needs a real-process
  E2E (spawn built binary / real stdio), full lifecycle, no internal mocks;
  browser-E2E marked N/A (this package has no UI)
- Coverage policy: every command/flag/MCP tool/metric maps to >=1 E2E scenario
- Quality Gates: CI is the BLOCKING merge gate (full pipeline incl E2E + coverage);
  ban eslint-disable / @ts-ignore / skipped tests
@bntvllnt bntvllnt self-assigned this Jun 3, 2026
@bntvllnt bntvllnt merged commit 2e67941 into main Jun 3, 2026
2 checks passed
@bntvllnt bntvllnt deleted the chore/testing-e2e-rules branch June 3, 2026 19:28
bntvllnt added a commit that referenced this pull request Jun 10, 2026
#44)

## What

Docs only — brings `roadmap.md` back in line with shipped reality and
records the 2026-06-10 architecture sweep findings as a roadmap item.

- **Header**: `Last updated: 2026-06-10 · shipped through v2.4.1 + rules
engine (#42)`
- **§2 baseline sync**: `check` added to the command list; new *Shipped
since* block covering #36#42 (config + ESLint-style rules engine
foundation, `init` opt-in agent selection)
- **New §5.13 — Operation registry, one engine N surfaces (P1)**: the 15
analysis operations are exposed twice (CLI + MCP) with their lifecycle
(validation, error routing, hints, serialization, graph-load) smeared
across `cli.ts` / `mcp/index.ts` / `src/core`. Proposal: one
`Operation<TInput, TResult>` descriptor per op (zod schema feeding both
surfaces, result/error union, hints, formatter) with CLI/MCP as thin
adapters — the same registry shape `src/rules/` paved in #42.
- **§6 sequencing**: §5.13 slotted in P1 before §5.7, since output
formats (SARIF/CodeClimate/…) become formatters over the registry, and
the §5.12 LSP becomes a third thin adapter.

## Evidence (self-analysis, graph-backed)

| Signal | Value |
|---|---|
| `cli.ts` | 1205 LOC, fan-in 0 / fan-out 13, coupling 0.93 (top
hotspot) |
| `mcp/index.ts` | 446 LOC, cohesion 0.17 (JUNK_DRAWER) |
| Validation | duplicated: `parseInt`+`isNaN` guards (CLI) vs zod (MCP)
|
| Graph-load pipeline | duplicated verbatim: `loadGraph` vs `runMcpMode`
in `cli.ts` |
| Precedent | `src/rules/` registry: cohesion 0.71, COHESIVE |

## Why

The roadmap predates #41/#42, so it didn't answer "where are we" — and
the sweep's keystone finding belongs on the direction file, not in a
chat log.
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