test: save ~79 CI hours/mo in gateway session utils#95602
Conversation
|
Codex review: needs maintainer review before merge. Reviewed June 22, 2026, 4:11 AM ET / 08:11 UTC. Summary PR surface: Source -119, Tests +430, Other +24. Total +335 across 47 files. Reproducibility: not applicable. this is a test-only CI hot-path cleanup. The PR body provides terminal timing proof for the changed gateway-core test path. Review metrics: 1 noteworthy metric.
Stored data model Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Risk before merge
Maintainer options:
Next step before merge
Security Review detailsBest possible solution: Land the focused test-local provider fixture if maintainers accept it, or replace it with a concrete cache-based PR only after that alternative exists and is proven. Do we have a high-confidence way to reproduce the issue? Not applicable; this is a test-only CI hot-path cleanup. The PR body provides terminal timing proof for the changed gateway-core test path. Is this the best way to solve the issue? Yes for the stated goal: using the existing active-registry test seam is a narrow maintainable way to avoid bundled provider loading while preserving the per-agent model-selection invariant. The cache alternative is plausible but not yet a concrete superseding implementation. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 4e9dc6b5d5c4. Label changesLabel justifications:
Evidence reviewedPR surface: Source -119, Tests +430, Other +24. Total +335 across 47 files. View PR surface stats
What I checked:
Likely related people:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. How this review workflow works
|
|
This could be resolved by updating cache. I'll prepare a PR if that sounds good. |
|
sounds good, I'll close mine in favour of yours when ready |
0ac4785 to
ccf42a8
Compare
20ab471 to
26af4bd
Compare
9bffece to
e4ac00b
Compare
e4ac00b to
53574bd
Compare
|
Merged via squash.
Thanks @zats! |
Merged via squash. Prepared head SHA: 53574bd Co-authored-by: zats <[email protected]> Co-authored-by: vincentkoc <[email protected]> Reviewed-by: @vincentkoc
What Problem This Solves
src/gateway/session-utils.test.tshad a gateway behavior test that accidentally loaded real bundled provider policy metadata to answer one fixture question: whether the per-agent DeepSeek model exposesxhighthinking.That made the gateway-core shard spend seconds in bundled provider/plugin infrastructure while the test's actual goal was narrower: verify
listAgentsForGatewayuses the agent-specific model when returning thinking controls.CI impact estimate from the 30-day actions report:
CI/checks-node-agentic-gateway-core: estimated36,902executions/month, avg99.3s, p5092s, p95151s.207/258sampled executions werepull_request(80.2%).testsphase improved by7.66s/runon average.36,902 * 7.66s = 78.5 runner-hours/month.78.5h * 80.2% = 63.0 runner-hours/month.Why This Change Was Made
The test now installs a tiny in-test provider registry for MiniMax and DeepSeek, then asserts the DeepSeek thinking resolver is called with
modelId: "deepseek-v4-flash".This keeps the gateway behavior coverage focused:
deepseek/deepseek-v4-flashthinkingDefault: "xhigh"survivesthinkingOptionsstill mirrorsthinkingLevelsBundled DeepSeek provider-policy behavior remains covered by the DeepSeek plugin tests.
User Impact
No production behavior changes. This is a test-only CI speedup for the gateway-core shard, reducing feedback time and runner spend across CI, including PR runs.
Evidence
Focused proof after rebasing on latest
origin/main:Result:
Before/after timing, 3 paired runs of the full
src/gateway/session-utils.test.tsfile, alternating revisions with a fresh Vitest fs-module cache path per run:Other checks:
Autoreview result: