Skip to content

ci: pilot informational Vitest coverage for tab-leave decisions (#651) - #664

Merged
Fooftilly merged 6 commits into
masterfrom
ci/651-vitest-tab-leave-coverage-pilot
Oct 14, 2026
Merged

Fooftilly merged 6 commits into
masterfrom
ci/651-vitest-tab-leave-coverage-pilot

Conversation

@Fooftilly

@Fooftilly Fooftilly commented Oct 14, 2026 •

Copy link
Copy Markdown
Owner

Summary

Second B1 informational coverage slice under #651, following the merged Python coverage pilot #662.

Adds one path-scoped GitHub Actions workflow to measure line and branch coverage for frontend-app/src/lifecycle/tab-leave.ts using its existing tab-leave.test.ts Vitest suite. This module implements owner freshness, cancellation/rejection, flush and commit ordering, and batch atomicity; it is more safety-critical than UI rendering/style code.

Design

  • Uses the existing Vitest 5.0.2 from frontend-app/package-lock.json and @vitest/coverage-v8@5.0.2, matching the pinned version exactly.
  • Adds @vitest/coverage-v8@5.0.2 as a pinned development-only dependency in frontend-app/package.json, its generated npm lockfile, and the accepted dependency-inventory.json (required by PRKS's dependency preflight), matching vitest@5.0.2. CI installs everything with only npm ci --ignore-scripts; no ad-hoc installation, unpinned package, production dependency, or generated bundle is introduced. This addresses the zizmor unlocked-install finding and Codex's unlocked-transitive-dependency finding on the initial pilot.
  • Runs only the existing src/lifecycle/tab-leave.test.ts suite with V8 coverage, restricting the report to src/lifecycle/tab-leave.ts. It does not rerun all frontend tests or modify the main Vue CI job.
  • Writes separate line and branch covered/total values and percentages to the GitHub Actions job summary; json-summary stays in RUNNER_TEMP, never uploaded. Validates both denominators are nonzero to prevent falsely reporting an empty pilot.
  • Informational only: no coverage thresholds, fail-under, PR comments, or coverage artifact uploads. Failing tests or a broken reporter still fail the pilot job.
  • PR-triggered only for the workflow, targeted source/test, Vue test config, or npm manifests; manual workflow_dispatch is also supported. Minimal read-only permissions, pinned checkout/setup-node action SHAs, Node version consistent with the main Vue check.

Validation / acceptance

  • Base: master@104e1499f74b5522f8795fad906a731367a20f0d (merge of ci: pilot informational Python line and branch coverage (#651) #662).
  • Verify the pilot runs and produces actual nonempty per-module line/branch totals; inspect real CI results, not assumed percentages.
  • Verify all regular CI checks, actionlint and zizmor, as well as review findings. If provider installation exposes a problem, fix the pilot rather than weakening existing gates.
  • Verified lockfile-backed coverage baseline: run 38557111143 passed 12 tests, reporting 77/94 lines (81.9%) and 53/84 branches (63.1%) in tab-leave.ts only. The final head 782baca has now passed all eight GitHub Actions workflows, including the inventory-enforcing PRKS Test Gate, static analysis, CodeQL, actionlint, zizmor, Dependency Review, the Vitest pilot, and the Full E2E Gate. The original E2E attempt failed once on a Work Reminders Playwright wait; failed-job rerun (attempt 2) passed all six E2E shards, including the previously failing test. No unrelated product changes were made.
  • Record observed CI cost and coverage baseline in this PR. Further B1 work (broader modules, meaningful changed-line metrics, trend tracking) remains separate and nonblocking.

Scope: One new workflow plus one pinned dev dependency, its npm lockfile and the required dependency inventory entry; no runtime, PostgreSQL, offline-state, or existing CI gate changes. No automatic merge; leave open for maintainer approval.

Related: #651 (B1), #662, and tab leave ownership #233.

@sourcery-ai

This comment has been minimized.

@coderabbitai

This comment has been minimized.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 14, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review 🔄 Running since 2026-10-14T11:33:50.608895Z 782baca New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@Fooftilly Fooftilly moved this to Review in PRKS Roadmap Oct 14, 2026

@Fooftilly Fooftilly left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One finding on the provider install step (inline). The pilot itself ran and produced real totals (12 tests passed; Lines 77/94, 81.9%; Branches 53/84, 63.1%).

@Fooftilly
Fooftilly merged commit befacaa into master Oct 14, 2026
38 of 40 checks passed
@Fooftilly
Fooftilly deleted the ci/651-vitest-tab-leave-coverage-pilot branch October 14, 2026 12:34
@github-project-automation github-project-automation Bot moved this from Review to Done in PRKS Roadmap Oct 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants