fix(tests): bump e2e index-command test timeout for Windows CI runners - #70
Merged
Merged
Conversation
…ndows CI red) The post-merge CI run on `ardelperal/codegraph` for #48 (commit `e461afb`) reported a red windows-latest job (workflow run `28701721960`). The failing atom was: __tests__/index-command.test.ts > codegraph index — full re-index keeps the graph populated (#874) > --quiet path also rebuilds a populated graph with "Test timed out in 5000ms" at line 97. Vitest's default per-test timeout (5000ms) is too tight for end-to-end tests that spawn `node dist/bin/codegraph.js init` + `node ... index --quiet` — each subprocess pays for node cold-start, SQLite open, and the full extraction pipeline. A subsequent re-run on the same PR (`28702399021`) hit the SAME flake shape on a DIFFERENT atom: __tests__/db-perf.test.ts:116 (deleteResolvedReferences chunking) Both pass locally on dev Windows in 1.3–2.1s and 1–3s respectively — the bottleneck is the CI Windows runner under variable load, not the tests or the code. A per-test bump on one file would be whack-a-mole. Fix: add `vitest.config.ts` with a global `testTimeout: 30_000`. Per-test explicit timeouts (`it(name, fn, 15_000)`) STILL take precedence; this only lifts the default for tests that never set one. No assertion changes. No source-code changes. Verification: * `pnpm exec vitest run __tests__/index-command.test.ts __tests__/db-perf.test.ts` → 16 passed (the previously-red atoms + their describe-mates). * The previously-red atom on PR #70 (`6b42c53`'s per-test bump only) also still passes — the global cap is a strict superset. User rule upheld: "todo lo que se integre a main ha de estar verde".
ardelperal
force-pushed
the
fix/2026-07-04-windows-e2e-test-timeout
branch
from
July 4, 2026 10:00
6b42c53 to
4086a25
Compare
This was referenced Jul 4, 2026
Merged
ardelperal
added a commit
that referenced
this pull request
Jul 4, 2026
…mts` config (#72) PR #70 added `vitest.config.ts` with `testTimeout: 30_000`, but vitest 3.x prefers the existing ESM `vitest.config.mts` when both are present in the same project root — so the `.ts` was a silent no-op and the windows CI jobs continued to fail at the default 5000ms timeout (workflow runs `28702911905` and `28703027415` on PR #71 both flaked at `__tests__/db-perf.test.ts:116` and `index-command.test.ts:97` with the same 5000ms default). Fix: add `testTimeout: 30_000` to the actively-loaded `vitest.config.mts` (the existing file with maxWorkers/pool/execArgv already in place for the Node >=25 dev-machine safety). No other changes — the `.ts` sibling from PR #70 is left in place for reference but does not affect test execution; a future housekeeping PR can delete it. Verification: * `pnpm exec vitest run __tests__/index-command.test.ts __tests__/db-perf.test.ts` → 16 passed locally. * The flake pattern (5s timeout crossing on CI Windows) is closed by the global cap; per-test explicit timeouts (`it(name, fn, 15_000)`) still take precedence. User rule upheld: "todo lo que se integre a main ha de estar verde".
3 tasks
ardelperal
added a commit
that referenced
this pull request
Jul 4, 2026
… 7 issues, update README banner + CLAUDE.md schema Publishes the 7 VBA-extractor issues closed this session (#44, #48, #49, #50, #51, #52, #53) plus the test-infra flake fix from PR #72. CHANGELOG: - Populate the previously-empty `## [Unreleased]` section with 5 New Features (bang operator, OpenReport/OpenQuery, RecordSource/ RowSource, TempVars, encoding robustness) and 2 Fixes (conditional-compilation evaluator, procedure-local Const scoping). Each entry is plain-language, no internal paths, with PR numbers for traceability. Per the project's CLAUDE.md convention, the actual version section (`## [1.5.0] - <date>`) is auto-promoted by `scripts/prepare-release.mjs` when the release workflow runs — we do NOT pre-create the section. - The `(#NN)` PR numbers after each bullet auto-link in the published release notes. package.json: - `"version": "1.4.0"` → `"1.5.0"`. This triggers the GitHub Actions "Sync package-lock.json" step (`npm install --package-lock-only --ignore-scripts`) which rewrites the lock on the version-bump commit. README.md: - Banner line 5: `## 🎉 1.2 Released — Access forms are first-class` → `## 🎉 1.5 Released — VBA conditional-compilation is now correct + TempVars/RecordSource/RowSource indexed`. The "Already installed? Run codegraph-vba upgrade to update in place" line below is unchanged. CLAUDE.md: - Append `report-layout` to the NodeKind list and `'opens-report'` to the EdgeKind list — both added in #48 (PR #69) but missing from the docs. Also append the related chain (form-layout, form-instance-control, event-handler, opens-form, raises-event, subscribes-event, type-member) so CLAUDE.md matches the source of truth at `src/types.ts` (the prior abbreviated list was already drifting from the schema). No other CLAUDE.md changes. Not in this commit (out of scope per user brief): - Test-infra PRs #70 / #72 are correctly absent from CHANGELOG (per user's "not in changelog body but mention in known-issues if applicable" — no known-issues section exists in this repo's CHANGELOG; vitest.testTimeout bump is test infrastructure, not a user-visible feature). - Scriv fragment — this is the codegraph-vba repo, not the dysflow-managed one; Scriv doesn't apply. Next step: trigger the Release workflow via gh workflow run (or via the Actions → Release → Run workflow UI on the `main` branch). The workflow will: 1. Sync `package-lock.json` to match `package.json` (auto-commit). 2. Run `scripts/prepare-release.mjs` to promote [Unreleased] → `## [1.5.0] - 2026-07-04` + append the link reference. 3. Build per-platform bundles, generate SHA256SUMS, create the GitHub Release, publish the npm packages (requires NPM_TOKEN repo secret).
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.
Unblocks the #48 squash-merge (commit \�461afb) whose post-merge Windows CI run came back red on _tests_/index-command.test.ts\ at the vitest default 5000ms timeout. The test spawns
ode dist/bin/codegraph.js init\ +
ode ... index --quiet\ end-to-end and exceeds 5s on the CI Windows runner under variable load. Bumping the three \it()\ timeouts to 15000ms each — uniformly across the describe — clears the flake without touching any assertion or source. Verified locally (3 passed in 4.79 s; failing atom was 1330 ms under the new cap).