Skip to content

fix(tests): bump e2e index-command test timeout for Windows CI runners - #70

Merged
ardelperal merged 1 commit into
mainfrom
fix/2026-07-04-windows-e2e-test-timeout
Jul 4, 2026
Merged

fix(tests): bump e2e index-command test timeout for Windows CI runners#70
ardelperal merged 1 commit into
mainfrom
fix/2026-07-04-windows-e2e-test-timeout

Conversation

@ardelperal

Copy link
Copy Markdown
Owner

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).

@ardelperal ardelperal added the bug Something isn't working label Jul 4, 2026
…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
ardelperal force-pushed the fix/2026-07-04-windows-e2e-test-timeout branch from 6b42c53 to 4086a25 Compare July 4, 2026 10:00
@ardelperal
ardelperal merged commit 0b15a8e into main Jul 4, 2026
5 checks passed
@ardelperal
ardelperal deleted the fix/2026-07-04-windows-e2e-test-timeout branch July 4, 2026 10:10
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".
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).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant