Repository navigation
test(claude-web): anchor on the alias wiring, not on how the map builds it - #11585
Conversation
…ds it
`tests/unit/claude-web-transport.test.ts` asserts that `claude-web` and
`cw-web` are wired to `ClaudeWebExecutor` in the executor barrel. It pinned
that on the exact construction spelling:
/"claude-web": new ClaudeWebExecutor\(\)/
cheaper-inference#11421 made the barrel lazy — the values are now
`() => import("./claude-web.ts").then((m) => new m.ClaudeWebExecutor())` — so
both anchors stopped matching. The wiring they guard is unchanged; only how the
map constructs executors moved.
This is a base-red gate: the test fails on `release/v3.8.51` itself, so every
open PR inherits the failure in `Unit Tests fast-path (1/4)` regardless of what
it changes.
The anchors now match the alias key and the class name and let the construction
in between be spelled either way. Verified they still fail on a real break:
repointing `cw-web` at `DefaultExecutor` turns the test red, and restoring it
turns it green.
Refs cheaper-inference#11421
|
CI on this PR is red, and I do not think any of it is mine. Recording the check rather than The same six gates fail — Locally, at the base commit this branch is rebased onto ( Happy to rebase again whenever the base is green — it has moved 45 commits since I opened this, |
fe12208
into
cheaper-inference:release/v3.8.51
Merged via /merge-batch (lote 2026-08-26 batch 2, v3.8.51). 7 conflitos, todos triviais/duplicados (mesmos base-reds já corrigidos por PRs paralelas mergeadas neste lote — #11580/#11582/#11583/#11585/#11588/#11589/#11590/#11591/#11609): mantida a versão já validada nesses casos. Validado: 68/68 testes passando. Obrigado por resolver os base-reds.
…ds it (cheaper-inference#11585) Merged via /merge-batch (lote 2026-08-26, v3.8.51). Boarded no worktree combinado junto com outras ~30 PRs; validação única: typecheck/complexity/cognitive-complexity/changelog-integrity verdes, file-size rebaseado onde necessário (crescimento legítimo), lint com os mesmos 228 achados pré-existentes confirmados via sonda contra o tip puro (não introduzidos por este lote), e ~370 testes focados (unit + vitest) passando. Obrigado pela contribuição.
…per-inference#11608) Merged via /merge-batch (lote 2026-08-26 batch 2, v3.8.51). 7 conflitos, todos triviais/duplicados (mesmos base-reds já corrigidos por PRs paralelas mergeadas neste lote — cheaper-inference#11580/cheaper-inference#11582/cheaper-inference#11583/cheaper-inference#11585/cheaper-inference#11588/cheaper-inference#11589/cheaper-inference#11590/cheaper-inference#11591/cheaper-inference#11609): mantida a versão já validada nesses casos. Validado: 68/68 testes passando. Obrigado por resolver os base-reds.
Summary
tests/unit/claude-web-transport.test.tschecks that the Claude Web executor carries noexecution-time dependency on the standalone Turnstile solver. Two of its assertions are
anchors — there to prove the file read resolved to the real barrel, so the negative guards
below them cannot pass against a moved or emptied file. They were pinned to the exact
construction spelling:
#11421 made the executor barrel lazy. The values are now
() => import("./claude-web.ts").then((m) => new m.ClaudeWebExecutor()), so neither anchormatches any more. The wiring they guard did not change — only how the map constructs executors.
This is a base-red gate. The test fails on
release/v3.8.51itself, so every open PRinherits the failure in
Unit Tests fast-path (1/4)no matter what it touches.The anchors now match the alias key and the class name and let the construction between them be
spelled either way:
.does not match a newline without thesflag, so each stays confined to its own entry.Related Issues
Validation
npm run lint— clean (eslintexit 0)origin/release/v3.8.51at
6eb7bf0ba9production code changed
The loosened anchor still catches a real break. A looser assertion is only worth having if
it still fails when the thing it guards is actually gone, so I checked that rather than assuming
it: repointing one alias at a different executor —
— turns the test red again (
pass 8 / fail 1), and restoring it turns it green. The guarantee isunchanged; only the spelling it tolerates is wider.
Tests Added Or Updated
tests/unit/claude-web-transport.test.ts— two anchor assertions relaxed. No production codechanged.
Coverage Notes
No
src/,open-sse/,electron/orbin/change, so coverage is unmoved.Reviewer Notes
grep -rn '": new [A-Za-z]*Executor' tests/returns these two lines and nothing else, so thisis the whole of that class of breakage, not the first of many.
reproduces the original problem — the next change to how the barrel constructs executors would
turn this test red again for a reason that has nothing to do with Turnstile. What the test
cares about is which class the alias resolves to, and that is what it now asserts.
(fix(cache): compare expires_at against an ISO cutoff, not datetime('now') (#11559) #11579, fix(api): restore the background-refresh injection point on /v1/models (#11551) #11581) alongside chore(stryker): register the two test files covering three mutated modules #11577 and test(authz): pin the GET-exemption set by membership, not by count (#11531) #11580 by other authors. It is not something I broke,
and it is not specific to my changes.