Skip to content

Adopt external performance, testing, and MCP evidence integrations #200

Description

@sarthakagrawal927

Why

CodeVetter already reuses strong external foundations such as Playwright, axe-core, MSW, c8, Biome, Gitleaks, OSV-Scanner, StrykerJS, and rmcp, but its external-tool adoption is concentrated in scanning. Performance review, test-result interoperability, and maintainer MCP connections still rely on custom or disconnected paths.

The owner wants CodeVetter to build thin, evidence-preserving adapters on maintained outside projects even where the underlying operation is simple enough to rebuild. The goal is broader executable evidence and better dogfooding, not more scanners or a transfer of verdict authority.

What

In scope

  • Qualify and connect pinned Chrome DevTools MCP, Playwright MCP, and GitHub MCP for maintainer use with bounded privacy and read-only controls.
  • Connect the repository-scoped CodeVetter evidence, runtime, and verification-receipt MCP servers where their current authorization contracts permit it.
  • Add producer-native ingestion for Playwright JSON, JUnit XML, LCOV, Cobertura XML, Lighthouse JSON, and Chrome trace metadata without executing arbitrary producer commands.
  • Reuse upstream parsers/reporters where they are maintained and materially reduce custom parsing risk.
  • Replace or complement the handwritten frontend bundle-budget implementation with a qualified Size Limit lane if it preserves CodeVetter's Tauri-specific entry/Home closure contract.
  • Add fixtures, normalization, attribution, bounds, redaction, and CLI/MCP parity tests.
  • Update canonical tooling, testing, performance, MCP, and current-status documentation with exact wired/trialled boundaries.

Out of scope

  • No hosted customer-source upload, production monitoring, authenticated browser journey, arbitrary MCP command execution, deployment, release, or automatic remediation.
  • No external tool output directly becomes the CodeVetter verdict.
  • No rebuilding Lighthouse, Chrome tracing, Playwright, JUnit XML parsing, coverage formats, or package-size analysis unless an upstream option fails qualification.
  • The unresolved owner term sizeform is not treated as an identified dependency; the candidate interpretation is the maintained Size Limit bundle-size project and must be qualified before adoption.

Design

flowchart LR
    A[Upstream tools and reporters] --> B[Bounded CodeVetter adapters]
    A1[Chrome DevTools and Lighthouse] --> B
    A2[Playwright JUnit and coverage] --> B
    A3[Size Limit] --> B
    B --> C[Versioned attributed evidence]
    C --> D[CodeVetter policy and verdict]
    E[Maintainer MCP clients] --> F[Read-only or explicitly executing scoped servers]
    F --> C
Loading

Adapters ingest repository-contained artifacts with exact source hashes, size limits, schema/version checks, path containment, secret rejection, and explicit missing fields. Maintainer MCP configuration stays outside the product runtime and uses pinned commands, isolated browser state, disabled telemetry where supported, and GitHub read-only toolsets. Executing runtime MCP remains visibly distinct from read-only evidence MCP.

There is no deploy impact. New npm packages, if any, are development/tooling dependencies only and require license/advisory/size review before addition.

Specs

Requirement: Reuse maintained evidence producers

CodeVetter SHALL prefer maintained upstream reporters, parsers, and measurement tools for commodity formats while retaining its own normalization and verdict policy.

Scenario: A supported producer artifact is ingested

  • WHEN a repository-contained Playwright, JUnit, LCOV, Cobertura, Lighthouse, or Chrome trace artifact passes bounds and identity checks
  • THEN CodeVetter emits attributed normalized evidence with the raw SHA-256 and explicit limitations
  • AND does not upgrade missing producer evidence.

Requirement: Performance evidence remains reproducible

Performance adapters SHALL separate observed metrics from inferred diagnosis and SHALL require same-scope evidence for regression or improvement claims.

Scenario: Lighthouse or Chrome evidence is supplied

  • WHEN the artifact lacks a compatible baseline, exact URL/revision identity, or repeated samples
  • THEN the result remains observational or no-confidence
  • AND no composite score alone authorizes an optimization claim.

Requirement: Test interoperability is fail closed

Test adapters SHALL reject malformed, oversized, path-escaping, credential-shaped, duplicate, or internally inconsistent reports.

Scenario: A JUnit report contains retries or failures

  • WHEN those outcomes are normalized
  • THEN attempts, terminal status, retry/flaky evidence, and bounded failure signatures remain separate.

Requirement: MCP connections preserve authority

Maintainer MCP connections SHALL be pinned and scoped. Read-only servers SHALL expose no write tools; executing servers SHALL remain explicit and repository-fixed.

Scenario: GitHub MCP is connected

  • WHEN the server lists tools
  • THEN only the approved read-only repository, pull-request, Actions, and code-security capabilities are available.

Scenario: CodeVetter MCP is dogfooded

  • WHEN a local client connects to the generated repository scope
  • THEN the packaged evidence server remains read-only and prepare_review suggestions remain non-executing leads.

Requirement: Existing special-purpose gates are preserved

Upstream replacement SHALL match the meaningful behavior of the existing gate before the handwritten implementation is retired.

Scenario: Size Limit is qualified

  • WHEN Size Limit measures the built frontend
  • THEN it preserves entry/Home closure, largest-chunk, and full lazy-distribution budgets or runs additively
  • AND the existing Tauri-specific gate is not removed merely because total bytes can be measured elsewhere.

Tasks

  • 1. Record current MCP, test, performance, bundle-budget, dependency, and receipt-adapter baselines.
  • 2. Qualify exact versions, licenses, advisories, telemetry/network behavior, and command schemas for Chrome DevTools MCP, Playwright MCP, GitHub MCP, Size Limit, and any parser dependencies.
  • 3. Add bounded producer-native Playwright JSON and JUnit XML adapters with fixtures and failure/retry normalization.
  • 4. Add bounded LCOV and Cobertura coverage adapters with aggregate producer attribution and explicit changed-file missing-data limitations.
  • 5. Add bounded Lighthouse JSON and Chrome trace metadata adapters with observational versus comparable performance semantics.
  • 6. Add or qualify Size Limit additively against the existing Tauri entry/Home and lazy-route bundle budgets; retire custom logic only on parity.
  • 7. Configure and verify pinned maintainer Chrome DevTools, isolated Playwright, and read-only GitHub MCP connections without exposing secrets.
  • 8. Connect and protocol-smoke the allowed CodeVetter evidence/runtime/receipt MCP servers; record any app-generated scope or restart prerequisite explicitly.
  • 9. Run focused adapter tests, MCP protocol tests, lint, typecheck, docs validation, dependency/license/security gates, and relevant builds.
  • 10. Update canonical docs and PROJECT_STATUS with only proven wired capabilities; leave deployment/release and unresolved external prerequisites claim-closed.
  • 11. Dogfood Playwright JSON, JUnit XML, LCOV, and Cobertura through their built-in producers and the CodeVetter ingestion path.
  • 12. Reconcile the active browser-test inventory with retired Work/Board surfaces and fix integration defects exposed by the full producer run.
  • 13. Replace the PAT-dependent remote GitHub registration with the checksum-verified GitHub MCP Server 1.11.0 local OAuth path, strict read-only mode, narrow scopes, and bounded toolsets.

Boundaries

  • No production dependency without a separate justification.
  • No secrets in arguments, logs, repository files, fixtures, or issue updates.
  • No commit, push, merge, deploy, migration, or release under this issue without separate authorization.
  • MCP configuration changes may require a new Codex session before tools are callable; configuration is not current-session proof.

Spec-driven tracking issue. All active design and task state lives here.

Metadata

Metadata

Labels

openspecOpenSpec feature change

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions