@qmediat.io/gemini-code-context-mcp 1.7.0 → 1.7.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +30 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,36 @@ All notable changes to `@qmediat.io/gemini-code-context-mcp` will be documented
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [1.7.2] - 2026-04-26
|
|
9
|
+
|
|
10
|
+
### Fixed — release pipeline reliability (true root cause)
|
|
11
|
+
|
|
12
|
+
- **`test/unit/ask-agentic.test.ts:592` rewritten to use real timers.** The pre-existing fake-timer implementation (added in v1.5.1, `bdd2b3f`) had a latent race condition that finally triggered intermittent CI deadlocks on second-run-in-same-job invocations:
|
|
13
|
+
- The test called `vi.useFakeTimers()` then `await askAgenticTool.execute(…)`. Inside `execute`, `await resolveWorkspaceRoot(…)` calls `fs.promises.realpath` (`src/tools/agentic/sandbox.ts:155`) — libuv thread-pool I/O that is **not** observable by `vi.advanceTimersByTimeAsync` (which only drains the microtask queue).
|
|
14
|
+
- Sequence on a slow disk: `advanceTimersByTimeAsync(1_000)` and `(3_000)` returned BEFORE realpath resolved. When realpath finally resolved, `withNetworkRetry` (`src/gemini/retry.ts:141`) registered `setTimeout(1000)` for backoff — but this timer was queued AFTER the fake clock already advanced past it. With fake timers active, that setTimeout never fired again. The test hung to the 30 s ceiling. Its `finally { vi.useRealTimers() }` block never ran (because the awaited promise never settled), so **fake timers stayed active globally for the worker**.
|
|
15
|
+
- Cascade: vitest runs all tests of one file in the same worker. The next three tests in this file (`:748`, `:794`, `:853` — the F2 / F3 / end-to-end real-timer assertions added in v1.6.0 + v1.7.0) all rely on a real `setTimeout` firing inside `createTimeoutController` (`src/tools/shared/abort-timeout.ts:82`). With the global hijacked, their timers never fired either. Each ate the full 30 s timeout — observed total in CI: 121.65 s, exactly `4 × 30 s + ~1.65 s overhead`.
|
|
16
|
+
- Trigger of the race in CI run #2 specifically: the explicit `Unit tests` step ran first cleanly. Then `npm run build` wrote ~160 files to `dist/`. Then `npm publish` triggered `prepublishOnly` which re-ran the full test suite. The post-build hot disk-write queue slowed `realpath` on the test's `tmpdir`-fresh directory, widening the race window enough to lose. Run #1 had a cold queue and won the race. Local macOS APFS is fast enough to win every time. `ci.yml` runs the suite once so never sees the second-run path.
|
|
17
|
+
- **Why v1.5.x didn't surface this:** the v1.6.0 + v1.7.0 fixes did not introduce the race — they introduced the *witnesses* (real-timer tests that get cascade-killed once the fake-timer global leaks). Before those, fake-timer leakage from `:592` was invisible because no later test in the same file depended on a real `setTimeout` firing.
|
|
18
|
+
- **Defense-in-depth: file-level `afterEach(() => vi.useRealTimers())` added** to `ask-agentic.test.ts`. Future tests that call `vi.useFakeTimers()` and fail to clean up cannot poison subsequent tests in the file. The cascade pattern (one failing fake-timer test deadlocks the next N real-timer tests) is now structurally impossible.
|
|
19
|
+
- **Timer-precision lower bounds in `:748` / `:794` / `:853` relaxed by ~5 %.** Once the cascade was fixed and these three tests actually ran (vs deadlocking), a second latent flake surfaced on Node 22 / Linux: `expect(elapsedMs).toBeGreaterThanOrEqual(1_000)` failed at `999ms`. Node's `setTimeout(fn, 1_000)` is documented as "approximately 1000ms" and can fire 1-2 ms early due to clock-source quantisation between `Date.now()` and the timer's internal monotonic clock. Lower bounds raised to `>= 950` (and `>= 1_450` for the F2 1500ms case) — generous enough to absorb timer imprecision, tight enough to still catch a misfired guard that returns instantly. Same intent, more portable.
|
|
20
|
+
|
|
21
|
+
### Why this is the root cause, not a band-aid
|
|
22
|
+
|
|
23
|
+
- An earlier alternative considered passing `--ignore-scripts` to `npm publish` in `release.yml` to skip the `prepublishOnly` re-run. That would have masked the test bug while leaving local `npm publish` invocations exposed to the same deadlock. The current fix removes the underlying race; `release.yml` runs the test suite twice cleanly without any flag changes.
|
|
24
|
+
- v1.7.1 (`testTimeout` 10 s → 30 s) was a partial fix that addressed run #1 only — the timeout was correctly raised so the first invocation no longer flaked, but the second-run race was unaffected. v1.7.2 closes the remaining gap.
|
|
25
|
+
|
|
26
|
+
### Notes
|
|
27
|
+
|
|
28
|
+
- Zero runtime change vs v1.7.1 / v1.7.0. Production code (`src/`) is byte-identical except for the version-string bumps in `package.json` + `server.json`.
|
|
29
|
+
- v1.7.1 was never published to npm — its `release.yml` run failed at `Publish to npm` because of the cascade described above. Users see latest = 1.7.0 (no provenance) before this release; latest = 1.7.2 (provenance-signed) after.
|
|
30
|
+
|
|
31
|
+
## [1.7.1] - 2026-04-26 (NEVER PUBLISHED — same root cause it was meant to address; superseded by v1.7.2)
|
|
32
|
+
|
|
33
|
+
### Fixed — release pipeline reliability (partial — completed in v1.7.2)
|
|
34
|
+
|
|
35
|
+
- **`vitest.config.ts` `testTimeout` raised from 10 s to 30 s.** Fixed run #1 of the test suite in `release.yml` (the explicit `Unit tests` step). Did not address the run #2 (`prepublishOnly`) deadlock — which v1.7.2 traced to a fake-timer race in `ask-agentic.test.ts:592` rather than an undersized timeout. Kept in 1.7.2 for headroom on slower runners.
|
|
36
|
+
- **Removed three redundant per-test `}, 10_000)` overrides** in `ask-agentic.test.ts` so the affected tests inherit the new 30 s global.
|
|
37
|
+
|
|
8
38
|
## [1.7.0] - 2026-04-25
|
|
9
39
|
|
|
10
40
|
### Added — T20 streaming heartbeat for `ask` / `code`
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@qmediat.io/gemini-code-context-mcp",
|
|
3
|
-
"version": "1.7.
|
|
3
|
+
"version": "1.7.2",
|
|
4
4
|
"mcpName": "io.github.qmediat/gemini-code-context-mcp",
|
|
5
5
|
"description": "MCP server that gives Claude Code persistent memory of your codebase, backed by Gemini's 2M-token context. Includes eager `ask`/`code` for cached repo Q&A and `ask_agentic` for agentic file access on repos that exceed the model's input-token limit.",
|
|
6
6
|
"keywords": [
|