chore(rules): enforce exhaustive CLI+MCP E2E tests and CI merge gate#41
Merged
Conversation
- 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
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Strengthens the project testing rules in
CLAUDE.md. Rules/docs only — no source or test changes.Derived from real session history (a
initcommand 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. Baneslint-disable/@ts-ignore/ skipped tests.Test
Docs only. Verified the existing suite stays green: 134 suites / 342 tests pass, build clean, coverage thresholds satisfied.