test(ci): reconcile release/v3.8.30 baseline + test drift - #4276
Conversation
Four deterministic CI failures on release/v3.8.30 (reproducible on the no-op cycle-open commit and in clean CI) were stale baselines/test expectations that never got reconciled when the v3.8.30 cycle opened — NOT flaky, NOT regressions: 1. complexity-baseline.json 1800 -> 1885 (+85): legitimate feature growth across the v3.8.25->v3.8.29 cycle (~130 PRs). Same _rebaseline_* pattern as prior release-boundary re-baselines; reduction stays a dedicated refactor debt. 2. integration-wiring "opaque theme colors": #4233 ("opaque tables D9") replaced the bg-black/5 tint (which lost to bg-surface via tailwind-merge) with the opaque bg-surface; assert bg-surface, preserving the test's opaque-surface intent. 3. search-providers-catalog EXPECTED_SEARCH_COUNT 12 -> 13: duckduckgo-free was added to searchRegistry.ts in the v3.8.27 cycle (verified: route now returns 13 search + 3 fetch = 16). Docstring + test name updated to match. 4. tproxy-transparent-socket: #4236 (prebuilds) makes the native addon load on the Node-compat runners, so the helpers reach the OS and throw a privilege error instead of the "not available" guard. Branch the 3 tests on isTransparentSocketAvailable() so both states hold (absent -> guard message; present -> still throws, just a runtime OS error). NOT touched: the round-robin test (resilience-http-e2e.ts:777) fails for a DIFFERENT reason — the undici dispatcher throws "fetch failed" in proxyFetch.ts (known undici-dispatcher issue, #4252 territory), NOT a round-robin combo regression (handleRoundRobinCombo counter logic verified correct). Left as a canary; realigning it would mask the real dispatcher symptom. Validation (RED->GREEN, tests-only + quality baseline; no production code): complexity: REGRESSÃO 1885>1800 -> OK 1885 integration-wiring opaque: 1/1 pass search-providers-catalog: 14/14 pass tproxy-transparent-socket: 11/11 pass (else branch local; if branch on CI runners)
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
There was a problem hiding this comment.
Code Review
This pull request updates the complexity baseline to 1885, adjusts integration tests to account for the new duckduckgo-free search provider (increasing the total count to 16), and updates wiring tests to assert the use of bg-surface. It also refactors transparent socket unit tests to handle environment-dependent addon availability dynamically. The reviewer recommends adding a unit test for the connectMarked helper function to ensure comprehensive coverage of all transparent socket utilities.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
| test("setSocketMark throws when unavailable (guard) or when present without privileges (OS error)", () => { | ||
| if (isTransparentSocketAvailable()) { | ||
| assert.throws(() => setSocketMark(7, 0x539)); | ||
| } else { | ||
| assert.throws(() => setSocketMark(7, 0x539), /not available/i); | ||
| } | ||
| }); |
There was a problem hiding this comment.
The connectMarked helper function in transparentSocket.ts is currently untested for its throwing behavior when unavailable or when run without privileges. Adding a test for connectMarked alongside setSocketMark and createTransparentListenerFd ensures complete test coverage for all transparent socket helper functions.
test("setSocketMark throws when unavailable (guard) or when present without privileges (OS error)", () => {
if (isTransparentSocketAvailable()) {
assert.throws(() => setSocketMark(7, 0x539));
} else {
assert.throws(() => setSocketMark(7, 0x539), /not available/i);
}
});
test("connectMarked throws when unavailable (guard) or when present without privileges (OS error)", async () => {
const { connectMarked } = await import("../../src/mitm/tproxy/transparentSocket.ts");
if (isTransparentSocketAvailable()) {
assert.throws(() => connectMarked("127.0.0.1", 80, 0x539));
} else {
assert.throws(() => connectMarked("127.0.0.1", 80, 0x539), /not available/i);
}
});…ase/v3.8.30 merge (diegosouzapw#4293) Measured on the actual merged tree (not the PR's main-based estimate): complexity 1885->1887 (+2); file-size auth.ts 2219->2279, chatCore.ts 5116->5125, accountFallback.ts 1727->1731, + the 4 Codex test files. Drift test-file conflicts (search-providers-catalog, tproxy-transparent-socket, integration-wiring) resolved to the already-merged release versions (diegosouzapw#4276). Co-authored-by: diegosouzapw <diegosouza.pw@gmail.com>
* fix(codex): isolate Spark quota scope * fix(codex): address Spark quota review feedback * fix(ci): update Electron undici override * fix(ci): update root undici overrides * test(integration): sync stale expectations * test(tproxy): tolerate available native addon * test(tproxy): avoid environment-specific skips * test(tproxy): keep assertion count stable * fix(ci): stabilize quality and tproxy checks * chore(ci): rebaseline auth file size * fix(ci): extend node compatibility budget * chore(quality): reconcile complexity + file-size baselines after release/v3.8.30 merge (#4293) Measured on the actual merged tree (not the PR's main-based estimate): complexity 1885->1887 (+2); file-size auth.ts 2219->2279, chatCore.ts 5116->5125, accountFallback.ts 1727->1731, + the 4 Codex test files. Drift test-file conflicts (search-providers-catalog, tproxy-transparent-socket, integration-wiring) resolved to the already-merged release versions (#4276). Co-authored-by: diegosouzapw <diegosouza.pw@gmail.com> --------- Co-authored-by: ci <ci@local> Co-authored-by: diegosouzapw <diegosouza.pw@gmail.com>
…pw#4276) Reconcile baseline + test drift on release/v3.8.30 (complexity, opaque surface, search count, tproxy addon). Round-robin left as a canary for the undici-dispatcher issue.
* fix(codex): isolate Spark quota scope * fix(codex): address Spark quota review feedback * fix(ci): update Electron undici override * fix(ci): update root undici overrides * test(integration): sync stale expectations * test(tproxy): tolerate available native addon * test(tproxy): avoid environment-specific skips * test(tproxy): keep assertion count stable * fix(ci): stabilize quality and tproxy checks * chore(ci): rebaseline auth file size * fix(ci): extend node compatibility budget * chore(quality): reconcile complexity + file-size baselines after release/v3.8.30 merge (diegosouzapw#4293) Measured on the actual merged tree (not the PR's main-based estimate): complexity 1885->1887 (+2); file-size auth.ts 2219->2279, chatCore.ts 5116->5125, accountFallback.ts 1727->1731, + the 4 Codex test files. Drift test-file conflicts (search-providers-catalog, tproxy-transparent-socket, integration-wiring) resolved to the already-merged release versions (diegosouzapw#4276). Co-authored-by: diegosouzapw <diegosouza.pw@gmail.com> --------- Co-authored-by: ci <ci@local> Co-authored-by: diegosouzapw <diegosouza.pw@gmail.com>
Summary
Four deterministic CI failures on
release/v3.8.30(reproducible on the no-op cycle-open commita5c0576c3AND in clean CI) were stale baselines / test expectations that never got reconciled when the v3.8.30 cycle opened. None are flaky; none are regressions — each tracks a change that was already intentional and shipped.check:complexity1885 > baseline 1800_rebaseline_2026_06_19_v3830(legit feature growth, ~130 PRs v3.8.25→v3.8.29)integration-wiringassertsbg-black/5bg-surface→ assertbg-surfacesearch-providers-catalogEXPECTED_SEARCH_COUNT=12duckduckgo-freeadded in v3.8.27 → bump 12→13 (route returns 13 search + 3 fetch = 16)tproxy-transparent-sockethard-asserts addon=== falseisTransparentSocketAvailable()NOT in this PR (deliberately)
The round-robin test
resilience-http-e2e.ts:777fails for a different reason and is left untouched: the undici dispatcher throws"fetch failed"inproxyFetch.ts(getDefaultDispatcher()path) → the p7 request falls through to p6, so the test readsround robin Atwice. This is the known undici-dispatcher instability (#4252 territory), NOT a round-robin combo regression —handleRoundRobinCombo's counter logic is correct (verified: counter 0→1→2, startIndex 0→1). Realigning that test would mask the real dispatcher symptom, so it stays as a canary.Validation (RED→GREEN — tests-only + quality baseline, no production code)
check:complexity: REGRESSÃO 1885>1800 → OK 1885integration-wiringopaque-surface: 1/1search-providers-catalog: 14/14tproxy-transparent-socket: 11/11 (local exercises theelse/absent branch; theif/present branch runs on the Node-compat CI runners with prebuilds)check:file-size: OK (none of the 4 files frozen)