Close test-coverage gaps: living-graph e2e, perf budgets, real-Neo4j MCP contract#41
Merged
Merged
Conversation
…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>
🧪 Comprehensive Test Suite
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>
🧪 Comprehensive Test Suite
Full-stack smoke gate runs in the CI workflow. |
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.
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-motionsuppression. 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:
getNodeDetailscrashed on any node with no relationships (OPTIONAL MATCHreturns a null row the mock never produced). Any agent callingget_node_detailson a fresh node would have hit it. Fixed by filtering null rows.4. Reconciled USER_STORIES / SYSTEMS
Removed phantom test refs (
simulation.bench.tsnever existed;context.test.ts→graph-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-successnow also requires the MCP contract job.🤖 Generated with Claude Code