Skip to content

test: measure frontend coverage with an honest source denominator (refs #2962) - #3025

Merged
mblua merged 5 commits into
mainfrom
feature/2962-frontend-coverage
Oct 15, 2026
Merged

mblua merged 5 commits into
mainfrom
feature/2962-frontend-coverage

Conversation

@mblua

@mblua mblua commented Oct 15, 2026 •

Copy link
Copy Markdown
Owner

Frontend tests previously had no auditable, opt-in V8 coverage report that included eligible source files outside the test import graph. Pin @vitest/coverage-v8 to the runner version and configure explicit TypeScript/TSX coverage with HTML, JSON and summary output, including unexecuted runtime sources. Run it with npm test -- --coverage --maxWorkers=1; use a fresh COVERAGE_OUTPUT directory for each measurement.

Source-boundary tests now read the selected source files directly, preserving their selection and assertions while avoiding raw-module coverage collisions. Stale project discovery rejects invalidated requests before reading the transport. Loop automation regressions verify fresh task snapshots, retain failure-path snapshot identity and reuse local interactions without weakening assertions or adding duplication.

Pre-merge checks used clean commit 9f819d3f1e90ff19cf924ca1b35ab83e9a5e78a5. Complete coverage and applicable independent proof were repeated successfully on merged main commit a1a694b5962f30f265c1a07b5b91eace18fb683a; the final metrics below match both runs:

  • Complete one-worker coverage: 270 test files and 3,846 tests passed using Node22.23.3/npm11.6.2.
  • 466 tracked TS/TSX files, 284 explicitly excluded test/helper/declaration sources, 182 eligible files; coverage JSON and summary match that universe exactly.
  • Independent graph/AST review confirms main.tsx is the only eligible source outside the test import closure. Its nonempty executable mappings remain at zero hits.
  • Typecheck, frontend build, source-boundary guards, dependency/version checks and scoped regression checks passed. Actual duplication gate against the current origin/main merge base: 270 files, 117 existing clones, zero new clones.
  • Independent code review, coverage audit and static HTML/source/navigation proof passed. All 57,150 checked local HTML links/resources/anchors resolve.
Metric Covered / total Coverage
Lines 18,442 / 20,679 89.18%
Functions 6,688 / 7,568 88.37%
Branches 9,551 / 11,945 79.95%
Statements 23,223 / 26,699 86.98%

Known reporting limit: 1,049 inverted range ends across 53 files make some HTML highlighting extents imprecise. Independent source/map equality and reporter review validate the counters, denominator and four metrics; exhaustive token-level mapping fidelity is not claimed. This measures the existing Node/jsdom suite, not browser/Tauri behavior.

All applicable remote checks passed on the exact reviewed head, including the previously failing duplication gate. Official full-tier jobs were skipped by the workflow's existing full=false condition. Protected landing completed on 2026-10-15T22:15:57Z as a1a694b5962f30f265c1a07b5b91eace18fb683a. The unchanged incoming main delta was independently classified unrelated in #3025 (comment).

Refs #2962. Fresh merged-main measurement and final UI/Grinch proof completed; delivery evidence and final metrics are recorded in the issue. No release, version bump, final application build or installation is included.

@socket-security

socket-security Bot commented Oct 15, 2026 •

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Addednpm/​@​vitest/​coverage-v8@​4.1.5991007998100

View full report

@mblua

mblua commented Oct 15, 2026

Copy link
Copy Markdown
Owner Author

Step9.5 stale-base triage: the target advanced from integrated f6e5d08 to2c18a98deff4d0edb53eff5e6ef78456397c9512 (#3026/#3024,e094917c plus merge). Current PR head remains bd7384f, identical to the local checkout/validated coverage source.

Independent Grinch review classified this delta UNRELATED:

  • Four changed paths only: src-tauri/src/config/root_agent.rs, root_agent_defaults/Context.root-agent.md, seeded_context_templates.rs, session_context.rs. No overlap with the nine PR paths; no frontend/package/lock/Vitest/build-config/workflow change.
  • Frontend Rust-text reader terminal-viewport.test.ts inspects PtyViewport/PLAUSIBLE_MIN in pty/backend.rs; changed text does not affect it.
  • check:skills pins session_context.rs206–714; changed hunks start4208 with no line shifts. Room-rename allowlist pinned seeded-template spans/text remain unchanged. The only SettingsModal reference is a comment.
  • Rust is outside the measured src TS/TSX universe. The merge combines disjoint files; no affected import/dependent/configuration edge was identified.

No branch update or extra CI run is required for this unrelated delta under the landing policy. Existing successful checks and coverage remain evidence for the unchanged PR head. The red test-debt check and its one isolated same-head rerun remain separate; this triage does not authorize merging a failed check.

Evidence: room-shared artifacts and messaging/20261015-194712-room14-ac-dev-rust-grinch-v4-to-room14-ac-tech-lead-v4-2962-main-delta-triage-verdict.md. CODE PASS and Verification10 PASS with the documented1049-range/53-file remap limitation remain valid.

@sonarqubecloud

Copy link
Copy Markdown

@mblua

mblua commented Oct 15, 2026

Copy link
Copy Markdown
Owner Author

Final CI verification after the native completion notice: all triggered Actions runs and applicable external checks succeeded on exact head 9f819d3f1e90ff19cf924ca1b35ab83e9a5e78a5. In particular, test-debt, Rust regression/fmt, Clippy, bundle validation, lockfile/version/name/no-plans and security checks are green. PR regression run: https://github.com/mblua/AgentsCommander/actions/runs/38807833693.

Skipped platform/frontend jobs follow the workflow's existing light-tier condition: ci-tier run3299 reports full=false, no full label; those jobs require full=='true'. They are not represented as executed. No red/pending/unknown check is waived.

Fresh explicit main fetch still resolves 2c18a98deff4d0edb53eff5e6ef78456397c9512; no target drift beyond the same independently classified unrelated four-path Rust delta in #3025 (comment). The added correction only changes the existing loop automation test. Proceeding through the protected admin-merge path without a redundant stale-base-only update. Keep #2962 open for the final merged-main coverage measurement and proof.

@mblua
mblua merged commit a1a694b into main Oct 15, 2026
22 checks passed
@mblua
mblua deleted the feature/2962-frontend-coverage branch October 15, 2026 22:15
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