Skip to content

Close test-coverage gaps: living-graph e2e, perf budgets, real-Neo4j MCP contract#41

Merged
mvalancy merged 2 commits into
developfrom
feature/test-coverage-gaps
Jun 13, 2026
Merged

Close test-coverage gaps: living-graph e2e, perf budgets, real-Neo4j MCP contract#41
mvalancy merged 2 commits into
developfrom
feature/test-coverage-gaps

Conversation

@mvalancy

Copy link
Copy Markdown
Member

Acts on the test-sequence gap analysis. Closes the four highest-priority gaps and caught + fixed a real MCP bug in the process.

1. Living-graph e2e (tests/e2e/living-graph.spec.ts)

The product differentiator had no rendered coverage — only helper unit tests. Now a self-seeding fixture (completed / in-progress / blocked nodes + an edge out of completed work) asserts the effects actually render: breathing, priority glow, energy-flow, blocked-ache, 1-hop hover illumination, and prefers-reduced-motion suppression. Quality pinned to ULTRA. Gated in the smoke job.

2. Performance budgets (tests/perf/, ADAPT-8)

There were zero perf tests. Added a gzip bundle budget (≤450kB; currently 374kB, gated in build) and a runtime budget spec (settle-to-rest, avg tick ≤8ms, layout drift ≤25px, query p95 ≤800ms — from the real PerfMeter/DriftMeter, gated in smoke).

3. Real-Neo4j MCP contract (packages/mcp-server/tests/neo4j-contract.test.ts)

Unit suites use a mock driver and can't catch real-DB/Cypher drift. New gated CI job runs the MCP GraphService against a live Neo4j.

It immediately caught a real bug: getNodeDetails crashed on any node with no relationships (OPTIONAL MATCH returns a null row the mock never produced). Any agent calling get_node_details on a fresh node would have hit it. Fixed by filtering null rows.

4. Reconciled USER_STORIES / SYSTEMS

Removed phantom test refs (simulation.bench.ts never existed; context.test.tsgraph-context.test.ts), corrected now-covered statuses (ADAPT-8, FLOW-3 → ✅), documented the new gates.

Verified locally: living-graph 3/3, perf 3/3, contract 3/3, mock mcp 39, lint 0, types clean. ci-success now also requires the MCP contract job.

🤖 Generated with Claude Code

…MCP contract (+ a real bug it caught)

Closes the four highest gaps from the test-sequence audit.

1. tests/e2e/living-graph.spec.ts — the product differentiator finally
   has rendered coverage. Self-seeds a deterministic fixture (completed/
   in-progress/blocked nodes + an edge from completed work) so it's
   reproducible in fresh CI, then asserts the effects actually appear:
   breathing, priority glow, energy-flow, blocked-ache, 1-hop hover
   illumination, and prefers-reduced-motion suppression. Quality pinned
   to ULTRA. Gated in the smoke job.

2. tests/perf/ + ADAPT-8 budgets — there were ZERO perf tests despite
   it being a core epic. Added:
   - check-bundle-size.mjs: gzip budget ≤450kB (currently 374kB), gated
     in the build job.
   - graph-perf.spec.ts: settle-to-rest, avg-tick ≤8ms, layout-drift
     ≤25px (snapshot fidelity), query p95 ≤800ms — from the real
     PerfMeter/DriftMeter. Gated in the smoke job.

3. packages/mcp-server/tests/neo4j-contract.test.ts — MCP Cypher against
   a LIVE Neo4j (node/edge lifecycle, browse), gated in a new CI job with
   a Neo4j service. The unit suites use a mock driver and can't catch
   real-DB drift.

   ** It immediately caught a real bug ** — getNodeDetails crashed
   () on any node with
   no relationships, because OPTIONAL MATCH returns a null row that the
   mock never produced. Fixed by filtering null rows. Any AI agent
   calling get_node_details on a fresh node would have hit this.

4. USER_STORIES + SYSTEMS reconciled: removed phantom test references
   (simulation.bench.ts never existed; context.test.ts → graph-context.
   test.ts), corrected statuses now genuinely covered (ADAPT-8, FLOW-3 →
   ✅), and documented the new gates.

ci-success now also requires the MCP contract job. Verified locally:
living-graph 3/3, perf 3/3, contract 3/3, mock mcp 39, lint 0, types ok.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown

🧪 Comprehensive Test Suite

  • Unit suites (Node 18.x & 20.x) — core, web, server, mcp-server: ✅ passed
  • Installer & deploy config: ✅ passed

Full-stack smoke gate runs in the CI workflow.

The LIVE-7 hover test flaked in CI (raw mouse.move onto an SVG <g> is
unreliable headless). Dispatch mouseenter/mouseleave directly on the
node group that carries the handler — tests the exact handler->dim
wiring without depending on cursor physics. 3/3 locally.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown

🧪 Comprehensive Test Suite

  • Unit suites (Node 18.x & 20.x) — core, web, server, mcp-server: ✅ passed
  • Installer & deploy config: ✅ passed

Full-stack smoke gate runs in the CI workflow.

@mvalancy mvalancy merged commit 5b0e0de into develop Jun 13, 2026
16 checks passed
@mvalancy mvalancy deleted the feature/test-coverage-gaps branch June 17, 2026 07:00
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