Repository navigation
test(claude-web): assert which class the registry entry builds, not one spelling of it (#11421) - #11586
Closed
ntdatt812 wants to merge 2 commits into
Closed
test(claude-web): assert which class the registry entry builds, not one spelling of it (#11421)#11586ntdatt812 wants to merge 2 commits into
ntdatt812 wants to merge 2 commits into
Conversation
…ne spelling of it (diegosouzapw#11421) `Unit Tests fast-path` is red on every branch: ✖ has no execution-time dependency on the standalone Turnstile solver The input did not match the regular expression /"claude-web": new ClaudeWebExecutor\(\)/ diegosouzapw#11421 made the executor registry lazy, so every entry became a thunk: "claude-web": () => import("./claude-web.ts").then((m) => new m.ClaudeWebExecutor()), The property this test guards — that the alias builds the plain executor rather than a `ClaudeWebWithAutoRefresh` wrapper, which would drag the standalone Turnstile solver back into the execution path — still holds exactly as before. Only the spelling of the registry changed, and the pinned literal went red on a refactor that never touched what it was protecting. Read the entry for each alias and assert on the class it names, so the guard survives the eager→lazy shape change and the next one. The `ClaudeWebWithAutoRefresh` negative guard and the module anchor are untouched. Third stale artifact of diegosouzapw#11421 in the checks; see also diegosouzapw#11582 (the known-symbols executor gate calling the now-async getExecutor synchronously).
Owner
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The red test
Unit Tests fast-pathfails on every branch:Cause
#11421 made the executor
registry lazy, so every entry in
open-sse/executors/index.tsbecame a thunk:The property this test exists to guard is unchanged: each alias builds the plain
ClaudeWebExecutor, not aClaudeWebWithAutoRefreshwrapper that would pull thestandalone Turnstile solver back into the execution path. Only the spelling of the
registry moved, and the pinned literal went red on a refactor that never touched what it
was protecting.
The fix
Read the registry entry for each alias and assert on the class it names, instead of
pinning one syntactic form of the map:
This survives the eager→lazy change and the next reshaping, and the
assert.okkeepsthe guard from silently going vacuous if an alias is dropped from the registry
altogether — the old regex would just have failed with "did not match" either way,
without distinguishing "renamed" from "gone". The
ClaudeWebWithAutoRefreshnegativeguard and the
ClaudeWebExecutor extends BaseExecutormodule anchor are untouched.Verification
The guard still bites. I pointed the
claude-webentry at the forbidden wrapper byhand:
prettier --checkreports this file as non-conformant both before and after the change(pre-existing on the base branch), so I left the formatting alone rather than mixing an
unrelated reformat into the diff.
Test-only; no production code touched.
Third stale artifact of #11421 that I have run into in the checks — the other two are
#11582 (the
known-symbolsexecutor gate still calling the now-async
getExecutor()synchronously, reporting all142 aliases dead) and the
extractExecutorAliasesfixture folded into that same PR.Each is independent; merge in any order.