ci: E2E workflow, web typecheck job, pre-commit hook, test suite#486
Conversation
CI: - ci.yml consolidated to reference ci-tests.yml - ci-quality.yml: add typecheck-web job for gitnexus-web/ - ci-e2e.yml: E2E workflow with dorny/paths-filter (web changes only) - ci-report.yml: remove dead integration-reports references - CI gate allows skipped E2E status - .gitignore: playwright artifacts, eval test artifacts Pre-commit hook: - .githooks/pre-commit: typecheck + unit tests for both packages - Activated via git config core.hooksPath in prepare script Test infrastructure: - Vitest + React Testing Library: 58 unit tests (graph, server-connection, mermaid, settings, constants, utils, paths) - Playwright E2E: 5 tests + manual recording harness - vitest.config from vitest/config, engines.node >= 20 - Playwright artifacts retain-on-failure - wait-on in devDependencies - vitest/coverage-v8 aligned with vitest 4.x Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Reflects devDependency additions (vitest, playwright, wait-on, @testing-library, etc.) from package.json changes in this PR. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
@jreakin is attempting to deploy a commit to the NexusCore Team on Vercel. A member of the Team first needs to authorize it. |
|
Replaces closed #478 (couldn't reopen after force-push). Same branch, rebased on latest main. Full stack:
Original monolith: #303 (draft, superseded by this stack) |
There was a problem hiding this comment.
Pull request overview
This PR extends the repo’s CI and testing infrastructure to cover the gitnexus-web frontend, adding Playwright E2E coverage, Vitest configuration for unit tests, and CI reporting/gating updates.
Changes:
- Adds a reusable E2E workflow (
ci-e2e.yml) that runs Playwright only whengitnexus-web/**changes, and updates the CI gate to allow E2E to be skipped when not applicable. - Introduces
gitnexus-webVitest configuration plus a new unit test suite (graph, server connection, settings, constants, utils, path resolution, mermaid generation). - Updates CI reporting and project tooling (Playwright config, package scripts/deps,
.gitignore, and Vitest coverage config cleanup).
Reviewed changes
Copilot reviewed 20 out of 22 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
gitnexus/vitest.config.ts |
Removes coverage threshold auto-update configuration. |
gitnexus-web/vitest.config.ts |
Adds Vite React plugin integration, aliases, and coverage settings for frontend unit tests. |
gitnexus-web/test/setup.ts |
Adds jest-dom matchers and scopes storage reset to the LLM settings key. |
gitnexus-web/test/fixtures/graph.ts |
Adds shared graph factories for unit tests. |
gitnexus-web/test/unit/*.test.ts |
Adds new unit tests for utils, settings-service, server-connection, graph, constants, path-resolution, and mermaid generation. |
gitnexus-web/playwright.config.ts |
Adds Playwright configuration with optional insecure mode and artifact retention. |
gitnexus-web/e2e/server-connect.spec.ts |
Adds E2E tests for server connect, Nexus AI init, processes, highlighting, and clearing highlights. |
gitnexus-web/e2e/manual-record.spec.ts |
Adds a manual recording harness (ignored by default). |
gitnexus-web/e2e/debug-issues.spec.ts |
Adds opt-in debug harness tests (ignored by default). |
gitnexus-web/package.json |
Adds Node engine constraint, Playwright/Vitest scripts, and testing dependencies. |
gitnexus-web/package-lock.json |
Locks new/updated dependencies for the web testing stack. |
.gitignore |
Ignores Playwright outputs and Python test artifacts. |
.github/workflows/ci.yml |
Orchestrates reusable workflows, adds E2E job, updates PR metadata + CI gate logic. |
.github/workflows/ci-quality.yml |
Adds a typecheck-web job for gitnexus-web (tsc -b --noEmit). |
.github/workflows/ci-e2e.yml |
New reusable workflow to run Playwright E2E on web changes only. |
.github/workflows/ci-report.yml |
Refactors CI report generation and PR commenting to use sticky comments + artifacts. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Add data-testid="process-list-loaded" to ProcessesPanel (E2E tests were waiting for an element that didn't exist) - Increase server connect timeouts from 5s to 10s for slower CI Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Add gitnexus-web npm ci + vitest run to ci-tests.yml so web unit tests are gated by the CI status check (were only running locally) - Remove unused IS_PLAYWRIGHT_AUTOMATION variable from E2E spec Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
Both Copilot items addressed in
|
|
This PR replaces the closed #478. @magyargergo — as you commented on #478 asking if it was accidentally closed and noting the value in the work, this is the rebased continuation of that PR. |
- Add data-testid="process-row" to ProcessItem component (E2E tests referenced it but it didn't exist in the source) - Use waitUntil: 'networkidle' on page.goto to ensure Vite dev server is fully ready before interacting (fixes first-test timeout in CI) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
E2E tests referenced these data-testid attributes but they didn't exist in ProcessItem. All 6 E2E testids now have matching source elements: status-ready, process-list-loaded, process-row, process-view-button, process-highlight-button, server-url-input. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…solving networkidle waits for zero network activity for 500ms, but Vite's HMR WebSocket stays open permanently, causing page.goto to timeout at 60s on all tests after the first. The explicit toBeVisible waits on UI elements are sufficient and deterministic. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…s pass locally Root cause: test 1 clicked the Server button before React hydrated, so the tab content never rendered and the input wasn't found. Fixes: - Wait for Server button toBeVisible before clicking - Increase input wait to 15s - Remove networkidle (Vite HMR WebSocket prevents it from resolving) - Add retries: 1 in CI for transient cold-start flakiness Verified locally: all 5 E2E tests pass, 198 unit tests pass, typecheck clean. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 22 out of 24 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
gitnexus analyze can crash with "double free or corruption" (known issue abhigyanpatwari#273) during the LadybugDB native addon shutdown. The index is usually written successfully before the crash. The workflow now: 1. Allows analyze to exit non-zero with a warning 2. Verifies .gitnexus index was actually created 3. Only fails if no index exists (real failure) All tests verified locally: 198 unit, 5 E2E pass, typecheck clean. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
0ef70df to
a5822d6
Compare
The previous echo string had special characters that broke bash quoting in GitHub Actions. Simplified to: analyze || true, then check if .gitnexus exists. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
@claude deep review this pr focusing on the new playwright tests and additionally the new setup of the cursor and additional AI md files. |
|
Claude finished @magyargergo's task in 3m 18s —— View job Deep Review — PR #486: CI/E2E Test InfrastructureTasks:
Playwright Tests —
|
| # | Severity | Issue |
|---|---|---|
| 2 | 🔴 High | Silent pass in "Turn Off All Highlights" test |
| 4 | 🔴 High | Canvas visibility assertion proves nothing about highlight state |
| 1 | 🟡 Medium | test.skip() fall-through in beforeAll |
| 3 | 🟡 Medium | force: true clicks bypass actionability |
| 5 | 🟡 Medium | CSS class selector for modal — fragile |
| 15 | 🟡 Medium | gitnexus-web test results not in CI report |
| 11 | 🟡 Medium | serve process not cleaned up on retry |
| 6, 7 | 🟢 Low | Debug harness inconsistencies (hardcoded URL, networkidle) |
| 8 | 🟢 Low | No webServer config for local dev convenience |
| 10 | 🟢 Low | analyze working directory needs a comment explaining intent |
|
@jreakin could you please have a look at this? 🙏 |
The analyze step ran from gitnexus/ but wrote .gitnexus/ at repo root, so the directory check always failed. Run from repo root instead. E2E test improvements from review feedback: - Replace fragile CSS class selectors with data-testid attributes - Remove force:true clicks that bypassed Playwright actionability - Add return after test.skip() to prevent beforeAll fall-through - Replace vacuous canvas-visibility assertions with state checks (process row class for highlights, button title for toggle) - Fix "Turn Off All Highlights" test that could pass without testing - Use BACKEND_URL env var in debug harness for consistency - Replace networkidle waits with timeouts (Vite HMR prevents resolve) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
Pushed CI fix (root cause of E2E failure)
E2E test hardening
Also added All 198 unit tests pass, typecheck clean. E2E tests verified locally (5/5). |
The web unit tests ran in CI but only output to stdout — results weren't in the JSON artifact so they were missing from the PR report. Now emits web-test-results.json, uploads it, and the report sums both CLI and web test counts. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
Pushed Review item tracker
Why #8 (Playwright
|
…atwari#486 - AGENTS.md: update test counts (CLI ~2000 unit, ~1850 integration), add gitnexus-web testing section (198 unit, 5 E2E with commands) - RUNBOOK.md: fix Node requirement to >=20, fix E2E local repro command - TESTING.md: E2E uses data-testid selectors + real servers, not mocks - .cursor/rules/100-monorepo.mdc: add web test/E2E commands Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
@claude review the latest changes and evaluation it's readiness. |
|
Claude finished @magyargergo's task in 2m 9s —— View job Tasks:
Readiness Evaluation — PR #486CI: ✅ Passing (run 23468410633) Review of Latest Commits
|
| Issue | Code evidence | Status |
|---|---|---|
test.skip() fall-through |
server-connect.spec.ts:24-29 — return after each skip, !value.ok check for frontend |
✅ |
| "Turn Off All Highlights" silent pass | server-connect.spec.ts:150 — expect(fileItem).toBeVisible() with no if guard |
✅ |
force: true clicks |
Removed from viewBtn.click() and lightbulb.click() |
✅ |
| Canvas visibility assertions | server-connect.spec.ts:134 — toHaveClass(/bg-amber-950/) (process row state); lines:155,162 — toHaveAttribute('title', ...) (toggle state) |
✅ |
| Fragile CSS modal selector | ProcessFlowModal.tsx:214 — data-testid="process-modal" added; test uses [data-testid="process-modal"] |
✅ |
| Debug harness: hardcoded URL | debug-issues.spec.ts — uses BACKEND_URL env var |
✅ |
Debug harness: networkidle |
Replaced with waitForTimeout(500) |
✅ |
| Analyze working directory bug | ci-e2e.yml:55 — runs node gitnexus/dist/cli/index.js analyze from repo root |
✅ |
The toHaveClass(/bg-amber-950/) assertion correctly matches bg-amber-950/40 set in ProcessesPanel.tsx:459 when a process is focused — the regex is appropriately loose.
6705f88 — Web test results in CI report
ci-tests.yml:37-41 now emits --reporter=json --outputFile=web-test-results.json and uploads gitnexus-web/web-test-results.json alongside the CLI report artifact. ci-report.yml:244-263 reads both files, sums totals, and displays combined results in the PR comment. This correctly closes the gap where web test failures were invisible in the report.
One Remaining Open Item
Copilot: engines.node floor (package.json:6) — the declared >=20.0.0 is lower than what jsdom@29 actually requires (^20.19.0). Not a blocker (CI uses Node 20 via setup-node which will pull a compatible version), but it will cause misleading npm install warnings on Node 20.0–20.18. A one-line bump to >=20.19.0 would close this cleanly.
Verdict
Ready to merge. All review feedback from the prior deep review has been actioned. CI is green. The engines.node floor is a minor nit that can be addressed in a follow-up or squashed in before merge — it does not affect CI or runtime behavior.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 24 out of 26 changed files in this pull request and generated 4 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| cov_delta() { | ||
| local pct=$1 base=$2 | ||
| if [ "$pct" = "N/A" ] || [ "$base" = "N/A" ]; then echo "—"; return; fi | ||
| local diff | ||
| diff=$(awk "BEGIN { printf \"%.1f\", $pct - $base }") | ||
| if [ "$(awk "BEGIN { print ($pct > $base) ? 1 : 0 }")" = "1" ]; then | ||
| echo "📈 +${diff}" | ||
| elif [ "$(awk "BEGIN { print ($pct < $base) ? 1 : 0 }")" = "1" ]; then | ||
| echo "📉 ${diff}" |
There was a problem hiding this comment.
The coverage percentages used in cov_delta/cov_bar are sourced from CI artifacts (potentially untrusted for fork PRs) and are interpolated directly into awk programs. If a malicious/invalid coverage-summary.json is uploaded, this can lead to arbitrary awk code execution in the reporting workflow (which runs with a write-capable token). Please validate that pct/base match a strict numeric regex before using them in awk (or extract as numbers via jq with tonumber? and treat non-numeric values as N/A).
| - name: Extract artifacts | ||
| shell: bash | ||
| run: | | ||
| cd "$RUNNER_TEMP/dl" | ||
| # Extract each artifact into its own directory to avoid filename collisions | ||
| for z in *.zip; do | ||
| [ -f "$z" ] || continue | ||
| name="${z%.zip}" |
There was a problem hiding this comment.
Extract artifacts assumes $RUNNER_TEMP/dl exists, but the preceding download step only creates that directory when at least one artifact is found. If pr-meta (or both artifacts) are missing, this cd will fail and the workflow will error instead of skipping gracefully. Consider mkdir -p "$RUNNER_TEMP/dl" before downloads (or guard this step when no artifacts were downloaded) so CI reporting is resilient to missing artifacts.
| - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 | ||
| - uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4 | ||
| with: | ||
| node-version: 20 |
There was a problem hiding this comment.
The workflow pins node-version: 20, but gitnexus-web's current dependency tree (per package-lock.json, e.g. jsdom@29) requires Node ^20.19.0+. To avoid unexpected EBADENGINE warnings/failures as runner images change, consider pinning to 20.19.0 (or 22.x) here to match the actual minimum runtime required by the lockfile.
| node-version: 20 | |
| node-version: 20.19.0 |
|
|
||
| - uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4 | ||
| with: | ||
| node-version: 20 |
There was a problem hiding this comment.
Same as the typecheck workflow: this uses node-version: 20, but the gitnexus-web lockfile includes packages that require Node ^20.19.0+. Pinning to a specific patch (e.g. 20.19.0) or moving to 22 would make E2E runs more reproducible and aligned with the dependency engines.
| node-version: 20 | |
| node-version: 20.19.0 |
|
@claude can you please find out why there was no report from GHA workflows of the test report summary? |
|
Claude finished @magyargergo's task in 3m 35s —— View job Tasks:
Root Cause: Artifact Filename Schema MismatchThe CI report comment was never posted because the How
|
|
@jreakin can you please look into this? 🙏 |
…ompat, node alignment - Sanitize coverage values with is_numeric() validation and awk -v flag parameterization to prevent command injection from untrusted fork artifacts - Add mkdir -p before unzip in base coverage extraction step - Write both underscore and hyphenated artifact filenames so main-branch ci-report.yml (via workflow_run) can read them before this PR merges - Align Node version: engines >=18→>=20, Dockerfile.test 22→20 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Addressed all outstanding review itemsPushed 1. Coverage delta validation — AWK injection (Medium)
2. Directory creation resilience (Medium)
3. Node version pin mismatch (Low)
4. Artifact naming schema mismatch (re: missing test report)
🤖 Generated with Claude Code |
CI Report✅ All checks passed Pipeline
Tests
✅ All 3876 tests passed across 1102 files 2 test(s) skipped
Coverage
📋 Full run · Coverage from Ubuntu · Generated by CI |
) * ci: E2E workflow, web typecheck job, pre-commit hook, test suite CI: - ci.yml consolidated to reference ci-tests.yml - ci-quality.yml: add typecheck-web job for gitnexus-web/ - ci-e2e.yml: E2E workflow with dorny/paths-filter (web changes only) - ci-report.yml: remove dead integration-reports references - CI gate allows skipped E2E status - .gitignore: playwright artifacts, eval test artifacts Pre-commit hook: - .githooks/pre-commit: typecheck + unit tests for both packages - Activated via git config core.hooksPath in prepare script Test infrastructure: - Vitest + React Testing Library: 58 unit tests (graph, server-connection, mermaid, settings, constants, utils, paths) - Playwright E2E: 5 tests + manual recording harness - vitest.config from vitest/config, engines.node >= 20 - Playwright artifacts retain-on-failure - wait-on in devDependencies - vitest/coverage-v8 aligned with vitest 4.x Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * chore: update gitnexus-web package-lock.json Reflects devDependency additions (vitest, playwright, wait-on, @testing-library, etc.) from package.json changes in this PR. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * fix(e2e): add missing process-list-loaded testid, increase CI timeouts - Add data-testid="process-list-loaded" to ProcessesPanel (E2E tests were waiting for an element that didn't exist) - Increase server connect timeouts from 5s to 10s for slower CI Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * fix(ci): run gitnexus-web unit tests in CI, remove unused variable - Add gitnexus-web npm ci + vitest run to ci-tests.yml so web unit tests are gated by the CI status check (were only running locally) - Remove unused IS_PLAYWRIGHT_AUTOMATION variable from E2E spec Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * fix(e2e): add process-row testid, wait for networkidle on page load - Add data-testid="process-row" to ProcessItem component (E2E tests referenced it but it didn't exist in the source) - Use waitUntil: 'networkidle' on page.goto to ensure Vite dev server is fully ready before interacting (fixes first-test timeout in CI) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * fix(e2e): add process-view-button and process-highlight-button testids E2E tests referenced these data-testid attributes but they didn't exist in ProcessItem. All 6 E2E testids now have matching source elements: status-ready, process-list-loaded, process-row, process-view-button, process-highlight-button, server-url-input. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * fix(e2e): remove networkidle — Vite HMR WebSocket prevents it from resolving networkidle waits for zero network activity for 500ms, but Vite's HMR WebSocket stays open permanently, causing page.goto to timeout at 60s on all tests after the first. The explicit toBeVisible waits on UI elements are sufficient and deterministic. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * fix(e2e): wait for Server button visibility, add CI retry, all 5 tests pass locally Root cause: test 1 clicked the Server button before React hydrated, so the tab content never rendered and the input wasn't found. Fixes: - Wait for Server button toBeVisible before clicking - Increase input wait to 15s - Remove networkidle (Vite HMR WebSocket prevents it from resolving) - Add retries: 1 in CI for transient cold-start flakiness Verified locally: all 5 E2E tests pass, 198 unit tests pass, typecheck clean. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * fix(ci): tolerate LadybugDB native crash during analyze step gitnexus analyze can crash with "double free or corruption" (known issue #273) during the LadybugDB native addon shutdown. The index is usually written successfully before the crash. The workflow now: 1. Allows analyze to exit non-zero with a warning 2. Verifies .gitnexus index was actually created 3. Only fails if no index exists (real failure) All tests verified locally: 198 unit, 5 E2E pass, typecheck clean. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * fix(ci): fix shell quoting in analyze step, simplify to || true The previous echo string had special characters that broke bash quoting in GitHub Actions. Simplified to: analyze || true, then check if .gitnexus exists. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * docs: add agent development framework, GitHub templates, eval refactor Agent framework (layered docs for AI-assisted contributions): - AGENTS.md: canonical instructions, impact analysis, MCP tools - CLAUDE.md: Claude Code-specific deltas and hooks - GUARDRAILS.md: safety boundaries, non-negotiables, escalation - ARCHITECTURE.md: monorepo layout, data flow map - TESTING.md: test structure, commands, categories - RUNBOOK.md: copy-paste operations for dev/CI/MCP - llms.txt: minimal LLM context pointer Editor integration: - .cursor/index.mdc + rules/100-monorepo.mdc GitHub templates: - PR template with areas-touched checkboxes - Bug report + feature request issue forms Eval harness: - Refactored mcp_bridge, tool_registry, constants - Error sanitization utilities - Property-based tests via Hypothesis Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * fix(eval): use format_exception instead of format_exc in sanitize_exception format_exc() returns the currently handled exception traceback, which may be unrelated if called outside an active except block. Using format_exception(type(exc), exc, exc.__traceback__) reliably captures the passed exception's traceback. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * docs: update CONTRIBUTING.md and TESTING.md for current CI/hook setup - CONTRIBUTING.md: add gitnexus-web typecheck command, pre-commit hook checklist item - TESTING.md: add gitnexus-web typecheck command, pre-commit hook section (husky), update CI integration to list actual workflow files (ci-quality, ci-tests, ci-e2e) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * docs: update testing docs to reflect CI/E2E changes from PR #486 - AGENTS.md: update test counts (CLI ~2000 unit, ~1850 integration), add gitnexus-web testing section (198 unit, 5 E2E with commands) - RUNBOOK.md: fix Node requirement to >=20, fix E2E local repro command - TESTING.md: E2E uses data-testid selectors + real servers, not mocks - .cursor/rules/100-monorepo.mdc: add web test/E2E commands Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * docs: address context engineering review — deduplicate tokens, expand Cursor rules - Remove ~100-line gitnexus:start block from CLAUDE.md (was duplicated from AGENTS.md) - Fix gitnexus:start block inlined inside AGENTS.md Reference Docs bullet (doubled) - Replace CLAUDE.md scope table with pointer to AGENTS.md (single source of truth) - Expand .cursor/index.mdc with 5 non-negotiable safety rules for always-on context - Add .cursor/rules/200-eval.mdc with Python/eval commands (glob-scoped to eval/**) - Improve llms.txt with priority annotations and descriptions - Bump version headers to 1.2.0, last-reviewed to 2026-03-24 Saves ~1,400 tokens/session with zero information loss. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Co-authored-by: Gergő Magyar <gergomagyar@icloud.com>
…bhigyanpatwari#479) * ci: E2E workflow, web typecheck job, pre-commit hook, test suite CI: - ci.yml consolidated to reference ci-tests.yml - ci-quality.yml: add typecheck-web job for gitnexus-web/ - ci-e2e.yml: E2E workflow with dorny/paths-filter (web changes only) - ci-report.yml: remove dead integration-reports references - CI gate allows skipped E2E status - .gitignore: playwright artifacts, eval test artifacts Pre-commit hook: - .githooks/pre-commit: typecheck + unit tests for both packages - Activated via git config core.hooksPath in prepare script Test infrastructure: - Vitest + React Testing Library: 58 unit tests (graph, server-connection, mermaid, settings, constants, utils, paths) - Playwright E2E: 5 tests + manual recording harness - vitest.config from vitest/config, engines.node >= 20 - Playwright artifacts retain-on-failure - wait-on in devDependencies - vitest/coverage-v8 aligned with vitest 4.x Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * chore: update gitnexus-web package-lock.json Reflects devDependency additions (vitest, playwright, wait-on, @testing-library, etc.) from package.json changes in this PR. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * fix(e2e): add missing process-list-loaded testid, increase CI timeouts - Add data-testid="process-list-loaded" to ProcessesPanel (E2E tests were waiting for an element that didn't exist) - Increase server connect timeouts from 5s to 10s for slower CI Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * fix(ci): run gitnexus-web unit tests in CI, remove unused variable - Add gitnexus-web npm ci + vitest run to ci-tests.yml so web unit tests are gated by the CI status check (were only running locally) - Remove unused IS_PLAYWRIGHT_AUTOMATION variable from E2E spec Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * fix(e2e): add process-row testid, wait for networkidle on page load - Add data-testid="process-row" to ProcessItem component (E2E tests referenced it but it didn't exist in the source) - Use waitUntil: 'networkidle' on page.goto to ensure Vite dev server is fully ready before interacting (fixes first-test timeout in CI) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * fix(e2e): add process-view-button and process-highlight-button testids E2E tests referenced these data-testid attributes but they didn't exist in ProcessItem. All 6 E2E testids now have matching source elements: status-ready, process-list-loaded, process-row, process-view-button, process-highlight-button, server-url-input. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * fix(e2e): remove networkidle — Vite HMR WebSocket prevents it from resolving networkidle waits for zero network activity for 500ms, but Vite's HMR WebSocket stays open permanently, causing page.goto to timeout at 60s on all tests after the first. The explicit toBeVisible waits on UI elements are sufficient and deterministic. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * fix(e2e): wait for Server button visibility, add CI retry, all 5 tests pass locally Root cause: test 1 clicked the Server button before React hydrated, so the tab content never rendered and the input wasn't found. Fixes: - Wait for Server button toBeVisible before clicking - Increase input wait to 15s - Remove networkidle (Vite HMR WebSocket prevents it from resolving) - Add retries: 1 in CI for transient cold-start flakiness Verified locally: all 5 E2E tests pass, 198 unit tests pass, typecheck clean. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * fix(ci): tolerate LadybugDB native crash during analyze step gitnexus analyze can crash with "double free or corruption" (known issue abhigyanpatwari#273) during the LadybugDB native addon shutdown. The index is usually written successfully before the crash. The workflow now: 1. Allows analyze to exit non-zero with a warning 2. Verifies .gitnexus index was actually created 3. Only fails if no index exists (real failure) All tests verified locally: 198 unit, 5 E2E pass, typecheck clean. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * fix(ci): fix shell quoting in analyze step, simplify to || true The previous echo string had special characters that broke bash quoting in GitHub Actions. Simplified to: analyze || true, then check if .gitnexus exists. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * docs: add agent development framework, GitHub templates, eval refactor Agent framework (layered docs for AI-assisted contributions): - AGENTS.md: canonical instructions, impact analysis, MCP tools - CLAUDE.md: Claude Code-specific deltas and hooks - GUARDRAILS.md: safety boundaries, non-negotiables, escalation - ARCHITECTURE.md: monorepo layout, data flow map - TESTING.md: test structure, commands, categories - RUNBOOK.md: copy-paste operations for dev/CI/MCP - llms.txt: minimal LLM context pointer Editor integration: - .cursor/index.mdc + rules/100-monorepo.mdc GitHub templates: - PR template with areas-touched checkboxes - Bug report + feature request issue forms Eval harness: - Refactored mcp_bridge, tool_registry, constants - Error sanitization utilities - Property-based tests via Hypothesis Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * fix(eval): use format_exception instead of format_exc in sanitize_exception format_exc() returns the currently handled exception traceback, which may be unrelated if called outside an active except block. Using format_exception(type(exc), exc, exc.__traceback__) reliably captures the passed exception's traceback. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * docs: update CONTRIBUTING.md and TESTING.md for current CI/hook setup - CONTRIBUTING.md: add gitnexus-web typecheck command, pre-commit hook checklist item - TESTING.md: add gitnexus-web typecheck command, pre-commit hook section (husky), update CI integration to list actual workflow files (ci-quality, ci-tests, ci-e2e) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * docs: update testing docs to reflect CI/E2E changes from PR abhigyanpatwari#486 - AGENTS.md: update test counts (CLI ~2000 unit, ~1850 integration), add gitnexus-web testing section (198 unit, 5 E2E with commands) - RUNBOOK.md: fix Node requirement to >=20, fix E2E local repro command - TESTING.md: E2E uses data-testid selectors + real servers, not mocks - .cursor/rules/100-monorepo.mdc: add web test/E2E commands Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * docs: address context engineering review — deduplicate tokens, expand Cursor rules - Remove ~100-line gitnexus:start block from CLAUDE.md (was duplicated from AGENTS.md) - Fix gitnexus:start block inlined inside AGENTS.md Reference Docs bullet (doubled) - Replace CLAUDE.md scope table with pointer to AGENTS.md (single source of truth) - Expand .cursor/index.mdc with 5 non-negotiable safety rules for always-on context - Add .cursor/rules/200-eval.mdc with Python/eval commands (glob-scoped to eval/**) - Improve llms.txt with priority annotations and descriptions - Bump version headers to 1.2.0, last-reviewed to 2026-03-24 Saves ~1,400 tokens/session with zero information loss. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Co-authored-by: Gergő Magyar <gergomagyar@icloud.com>
Summary
CI infrastructure and test suite for gitnexus-web. Split from #303. Replaces closed #478 (rebased on main after #477 merged).
CI
ci.yml— Consolidated to referenceci-tests.yml. Gate allows skipped E2E.ci-quality.yml— Newtypecheck-webjob (tsc -b --noEmitingitnexus-web/).ci-e2e.yml— E2E workflow withdorny/paths-filter(only ongitnexus-web/changes).result == 'success'guard on filter.ci-report.yml— Removed deadintegration-reportsreferences..gitignore— Playwright artifacts, eval test artifacts.gitnexus/vitest.config.ts— RemovedautoUpdate: truefrom coverage thresholds.Test Infrastructure
defineConfigfromvitest/config,engines.node >= 20,wait-onin devDeps,retain-on-failurefor artifacts.Test plan
cd gitnexus-web && npx vitest run— tests passcd gitnexus-web && npx tsc --noEmit— clean🤖 Generated with Claude Code