Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
acb22ab
Fix toktrack version drift
tyl3r-ch Apr 28, 2026
5f69ade
Add test system review
tyl3r-ch Apr 28, 2026
c4abb2b
Make Vitest setup and reports parallel-safe
tyl3r-ch Apr 28, 2026
ab49513
Isolate Playwright workers
tyl3r-ch Apr 28, 2026
cb31d35
Move command palette contracts to Vitest
tyl3r-ch Apr 28, 2026
3a4285d
Improve runtime and dashboard coverage
tyl3r-ch Apr 28, 2026
b5cac6a
Split CI test pipeline
tyl3r-ch Apr 29, 2026
117cfeb
Fix CodeRabbit test robustness issues
tyl3r-ch Apr 29, 2026
e9d54fa
Add test timing budgets
tyl3r-ch Apr 29, 2026
944a049
Add project test timing benchmark
tyl3r-ch Apr 30, 2026
2932697
Tune frontend test parallelism
tyl3r-ch Apr 30, 2026
c4882ae
Move toktrack cache tests to fake spawn
tyl3r-ch Apr 30, 2026
44c073d
Cover process runtime edge cases
tyl3r-ch Apr 30, 2026
67db759
Add parallel verification gate
tyl3r-ch Apr 30, 2026
b7fbe80
Stabilize background concurrency tests
tyl3r-ch Apr 30, 2026
1657822
Move command palette contracts to unit tests
tyl3r-ch Apr 30, 2026
7555c0e
Harden process-adjacent test coverage
tyl3r-ch Apr 30, 2026
f2b3400
Cover router auto-import error paths
tyl3r-ch Apr 30, 2026
eab08c5
Harden parallel gate diagnostics
tyl3r-ch Apr 30, 2026
efb9cee
Guard Playwright smoke scope
tyl3r-ch Apr 30, 2026
7e60008
Refresh test review baseline
tyl3r-ch Apr 30, 2026
708c3c7
Expand background runtime branch coverage
tyl3r-ch Apr 30, 2026
be994fd
Lighten chart legend frontend test
tyl3r-ch Apr 30, 2026
04aa7a6
Cover runner resolution error branches
tyl3r-ch Apr 30, 2026
ca29012
Cover settings and CSV export branches
tyl3r-ch Apr 30, 2026
0834a07
Guard parallel gate option errors
tyl3r-ch Apr 30, 2026
5a701b7
Guard Playwright spec state isolation
tyl3r-ch Apr 30, 2026
475aee4
Document test gates and untrack review docs
tyl3r-ch May 1, 2026
c4e3049
Split dashboard section ownership
tyl3r-ch May 1, 2026
892d551
Split HTTP router route ownership
tyl3r-ch May 1, 2026
aec28b2
Split data runtime services
tyl3r-ch May 1, 2026
104d663
Split auto import runtime services
tyl3r-ch May 1, 2026
f5cf2b6
Guard shared declaration contracts
tyl3r-ch May 1, 2026
4d31a8f
v6.3.0: Update changelog
tyl3r-ch May 2, 2026
0a58eb6
Fix E2E reset state flake
tyl3r-ch May 2, 2026
851ac77
v6.3.0: Address review feedback
tyl3r-ch May 2, 2026
e2afb63
Add required CI gate
tyl3r-ch May 2, 2026
9fe0a3e
v6.3.0: Address security review findings
tyl3r-ch May 3, 2026
19ed61c
v6.3.0: Address CodeRabbit follow-up findings
tyl3r-ch May 3, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
203 changes: 186 additions & 17 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ concurrency:
cancel-in-progress: true

jobs:
test:
static:
runs-on: ubuntu-latest
timeout-minutes: 20
timeout-minutes: 12

steps:
- name: Check out repository
Expand All @@ -31,33 +31,162 @@ jobs:
- name: Install dependencies
run: npm ci --ignore-scripts

- name: Check formatting
run: npm run format:check
- name: Run static checks
run: npm run test:static

- name: Run ESLint
run: npm run lint
vitest:
name: Vitest (${{ matrix.project }})
runs-on: ubuntu-latest
timeout-minutes: 15
strategy:
fail-fast: false
matrix:
project:
- architecture
- unit
- frontend
- integration
- integration-background

- name: Run docstring lint
run: npm run lint:docstrings
steps:
- name: Check out repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2

- name: Set up Node.js
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version: 24
cache: npm

- name: Run dependency graph checks
run: npm run check:deps
- name: Install dependencies
run: npm ci --ignore-scripts

- name: Run TypeScript checks
run: ./node_modules/.bin/tsc --noEmit
- name: Run Vitest project
run: npm run test:vitest:${{ matrix.project }}

- name: Run architecture tests
run: npm run test:architecture
- name: Check Vitest timing budget
run: |
node scripts/report-test-timings.js \
test-results/vitest-${{ matrix.project }}.junit.xml \
--max-suite-seconds=20 \
--max-test-seconds=12

- name: Upload Vitest report
if: always()
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: test-reports-vitest-${{ matrix.project }}
if-no-files-found: ignore
path: test-results/vitest-${{ matrix.project }}.junit.xml

coverage:
runs-on: ubuntu-latest
timeout-minutes: 20

steps:
- name: Check out repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2

- name: Set up Node.js
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version: 24
cache: npm

- name: Install dependencies
run: npm ci --ignore-scripts

- name: Run unit and integration tests with coverage
run: npm run test:unit:coverage
run: npm run test:vitest:coverage

- name: Upload coverage reports
if: always()
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: coverage-reports
if-no-files-found: ignore
path: |
coverage/
test-results/vitest-coverage.junit.xml

build:
runs-on: ubuntu-latest
timeout-minutes: 10

steps:
- name: Check out repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2

- name: Set up Node.js
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version: 24
cache: npm

- name: Install dependencies
run: npm ci --ignore-scripts

- name: Build production bundle
run: npm run build:app

- name: Upload production bundle
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: production-dist
if-no-files-found: error
path: dist/

package-smoke:
runs-on: ubuntu-latest
timeout-minutes: 10
needs: build

steps:
- name: Check out repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2

- name: Set up Node.js
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version: 24
cache: npm

- name: Install dependencies
run: npm ci --ignore-scripts

- name: Download production bundle
uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7.0.0
with:
name: production-dist
path: dist

- name: Verify packed npm artifact
run: npm run verify:package

e2e:
runs-on: ubuntu-latest
timeout-minutes: 20
needs: build

steps:
- name: Check out repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2

- name: Set up Node.js
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version: 24
cache: npm

- name: Install dependencies
run: npm ci --ignore-scripts

- name: Download production bundle
uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7.0.0
with:
name: production-dist
path: dist

- name: Install Playwright browser
run: npx playwright install --with-deps chromium

Expand All @@ -68,10 +197,9 @@ jobs:
if: always()
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: test-reports
name: test-reports-e2e
if-no-files-found: ignore
path: |
coverage/
playwright-report/
test-results/

Expand All @@ -97,3 +225,44 @@ jobs:

- name: Build production bundle
run: npm run build:app

ci-required:
name: CI Required
runs-on: ubuntu-latest
timeout-minutes: 5
needs:
- static
- vitest
- coverage
- build
- package-smoke
- e2e
- windows-smoke
if: ${{ always() }}

steps:
- name: Verify required CI jobs
run: |
failed=0

check_result() {
local job_name="$1"
local result="$2"

if [[ "${result}" = "success" ]]; then
echo "${job_name}: ${result}"
else
echo "::error::${job_name}: ${result}"
failed=1
fi
}

check_result "static" "${{ needs.static.result }}"
check_result "vitest" "${{ needs.vitest.result }}"
check_result "coverage" "${{ needs.coverage.result }}"
check_result "build" "${{ needs.build.result }}"
check_result "package-smoke" "${{ needs['package-smoke'].result }}"
check_result "e2e" "${{ needs.e2e.result }}"
check_result "windows-smoke" "${{ needs['windows-smoke'].result }}"

exit "${failed}"
1 change: 1 addition & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ jobs:
--workflow ci.yml \
--branch main \
--sha "${MAIN_SHA}" \
--required-job "CI Required" \
--retries 90 \
--retry-delay-ms 10000

Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ node_modules/
dist/
data.json
.DS_Store
.cache/
.playwright-mcp/
.tmp-playwright/
.tmp-smoke-*/
Expand All @@ -21,7 +22,6 @@ coverage/
requirements/
docs/security/
docs/review/*
!docs/review/*.md
docs/application-stack-reference.md
/activity-*.png
/cache-hit-rate-*.png
Expand Down
3 changes: 2 additions & 1 deletion AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Frontend code is TypeScript + React. Follow the existing style: 2-space indentat

## Testing Guidelines

Automated tests are part of the repo now. Before opening a PR, run `npm run verify:full`. If you only need the main local gate without Playwright, run `npm run verify`. If local port `3015` is already in use, run Playwright with `PLAYWRIGHT_TEST_PORT=3016 npm run test:e2e`. Use `npm run test:timings` to inspect the slowest Vitest suites and cases after larger test changes, but do not run it in parallel with another Vitest command that writes the same JUnit report. Architecture and dependency boundaries are guarded by `npm run test:architecture` and `npm run check:deps`; when you add or move modules, keep [`docs/architecture.md`](docs/architecture.md) aligned with the actual structure.
Automated tests are part of the repo now. Before opening a PR, run `npm run verify:full`; on a local machine with enough CPU, `PLAYWRIGHT_TEST_PORT=3016 npm run verify:full:parallel` is the faster non-coverage fast path across the main test surfaces. If you only need the main local gate without Playwright, run `npm run verify`. If local port `3015` is already in use, run Playwright with `PLAYWRIGHT_TEST_PORT=3016 npm run test:e2e`. Use `npm run test:timings` to inspect the slowest Vitest suites and cases after larger test changes, but do not run it in parallel with another Vitest command that writes the same JUnit report. Architecture and dependency boundaries are guarded by `npm run test:architecture` and `npm run check:deps`; when you add or move modules, keep [`docs/architecture.md`](docs/architecture.md) aligned with the actual structure.

When adding tests:

Expand All @@ -37,6 +37,7 @@ When adding tests:
- use real subprocesses only when shell/PATH/CLI or cross-process behavior is the thing being tested
- split files once they mix unrelated concerns like content, navigation, localization, motion, or keyboard behavior
- keep `waitFor(...)` for real eventual consistency only, not as the default assertion pattern
- keep Playwright fixtures and shared helpers in `tests/e2e/fixtures.ts`; place specs in `tests/e2e` spec files and reset state with `resetAppState(...)` or `prepareDashboard(...)`
- when improving coverage, prefer critical branch-heavy runtime modules like `src/lib/api.ts`, `src/hooks/use-usage-data.ts`, and `src/hooks/use-dashboard-controller.ts` over adding another broad dashboard catch-all test

Continue to manually verify the main flows affected by the change: dashboard load, auto-import, JSON upload, filtering, and export actions.
Expand Down
24 changes: 24 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,29 @@
# Changelog

## [6.3.0] - 2026-05-02

### Added

- **Paralleles Verification-Gate für lokale und CI-nahe Prüfläufe** — ein neuer Parallelmodus bündelt die wichtigsten Test- und Build-Oberflächen mit eigener Portsteuerung, damit breite Validierungen schneller und reproduzierbarer laufen
- **Test-Timing-Budgets und Benchmark-Transparenz** — neue Timing-Budgets, Projekt-Benchmarks und dokumentierte Gate-Optionen machen langsame oder driftende Tests besser sichtbar
- **Gezielte Branch-Coverage für Runtime-, Router- und Exportpfade** — zusätzliche Unit-, Frontend- und Integrationstests decken Settings, CSV-Export, Runner-Auflösung, Background-Runtime, Auto-Import-Router und process-adjacent Serverpfade gegen Regressionen ab

### Improved

- **Klarere Ownership in Runtime und Dashboard-Struktur** — Auto-Import-, Daten-, HTTP-Router- und Dashboard-Section-Verantwortlichkeiten wurden weiter in fokussierte Services und Contracts aufgeteilt
- **Stabilere parallele Testausführung** — Playwright-Specs isolieren ihren Zustand robuster, Vitest-/Frontend-Parallelismus ist gezielter abgestimmt, Toktrack-Cache-Tests nutzen Fake-Spawn-Pfade, und Chart-Legend-Tests bleiben leichtergewichtig
- **Bessere Diagnosequalität in Test- und Verify-Gates** — parallele Gate-Fehler, Runner-Auflösungsfehler und Scope-Fehler liefern klarere Hinweise, während Test-Gates und Review-Baselines aktualisiert und dokumentiert wurden

### Fixed

- **Flaky Cross-Test-State in Browser- und Parallelgates** — Playwright-Smoke-Scope, Spec-State-Isolation und parallele Gate-Optionsfehler sind gegen versteckte Zustandskopplung und schwer lesbare Fehlschläge abgesichert
- **Unvollständige Fehlerpfadabdeckung in Server-Runtime und Auto-Import** — Background-Concurrency, Router-Auto-Import-Fehler, process-adjacent Runtime-Kanten und Runner-Resolution-Branches sind jetzt gezielt getestet
- **Shared-Declaration- und Architekturdrift** — gemeinsame Deklarationsverträge werden explizit geschützt, damit geteilte Typ- und Boundary-Erwartungen nicht unbemerkt auseinanderlaufen

### Commits

- Enthält alle Branch-Commits seit `v6.2.9`: `f5cf2b6`, `104d663`, `aec28b2`, `892d551`, `c4e3049`, `475aee4`, `5a701b7`, `0834a07`, `ca29012`, `04aa7a6`, `be994fd`, `708c3c7`, `7e60008`, `efb9cee`, `eab08c5`, `f2b3400`, `7555c0e`, `1657822`, `b7fbe80`, `67db759`, `44c073d`, `c4882ae`, `2932697`, `944a049`, `e9d54fa`, `117cfeb`, `b5cac6a`, `3a4285d`, `cb31d35`, `ab49513`, `c4abb2b`, `5f69ade`, `acb22ab`

## [6.2.9] - 2026-04-28

### Improved
Expand Down
19 changes: 13 additions & 6 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,19 +41,26 @@ For feature requests, explain the user problem first. Suggestions that only desc

Make sure the change is small, focused, and aligned with the existing product direction.

Run the main local checks:
Run the full local gate before opening a PR:

```bash
npm run verify
npm run test:e2e
npm run verify:full
```

`npm run verify` covers formatting, ESLint, `tsc --noEmit`, unit tests, the production bundle, and packaged-artifact verification. If you want the same coverage gate used in release preparation, also run:
On a local machine with enough CPU, the staged parallel gate gives faster feedback across the same
main test surfaces without the coverage-instrumented pass:

```bash
npm run test:unit:coverage
PLAYWRIGHT_TEST_PORT=3016 npm run verify:full:parallel
```

Do not use the parallel fast path as a replacement for the final coverage gate when a change affects
coverage thresholds; keep `npm run verify:full` or `npm run test:vitest:coverage` in that validation.

`npm run verify` remains the faster non-browser gate for inner-loop work. It covers formatting,
ESLint, `tsc --noEmit`, Vitest without coverage instrumentation, the production bundle, and
packaged-artifact verification.

If you only need the production bundle without the lint/format gate, use:

```bash
Expand All @@ -66,7 +73,7 @@ If local port `3015` is already occupied, run Playwright on another isolated por
PLAYWRIGHT_TEST_PORT=3016 npm run test:e2e
```

The Playwright suite uses an isolated local app directory under `.tmp-playwright/` and should not reuse your normal local dashboard data. `npm run verify:package` builds the real tarball and verifies that the packaged CLI can start outside the repo checkout.
The Playwright suite starts an isolated local app per worker under `.tmp-playwright/workers/` and should not reuse your normal local dashboard data. `npm run verify:package` builds the real tarball and verifies that the packaged CLI can start outside the repo checkout.

Then manually verify the main user flows touched by your change:

Expand Down
Loading
Loading