diff --git a/changelog.d/maintenance/11585-claude-web-anchor-lazy-map.md b/changelog.d/maintenance/11585-claude-web-anchor-lazy-map.md new file mode 100644 index 0000000000..9c35764812 --- /dev/null +++ b/changelog.d/maintenance/11585-claude-web-anchor-lazy-map.md @@ -0,0 +1 @@ +- **test(claude-web):** the Claude Web transport test's barrel anchors no longer pin the exact construction spelling. #11421 made the executor map lazy, so `/"claude-web": new ClaudeWebExecutor\(\)/` stopped matching and the test went red on `release/v3.8.51` itself — a base-red gate every open PR inherited. The anchors now match the alias key and the class name and tolerate either spelling in between, and were checked to still fail when an alias is genuinely repointed at another executor ([#11585](https://github.com/diegosouzapw/OmniRoute/pull/11585)) diff --git a/tests/unit/claude-web-transport.test.ts b/tests/unit/claude-web-transport.test.ts index 85f2e58467..08cf563248 100644 --- a/tests/unit/claude-web-transport.test.ts +++ b/tests/unit/claude-web-transport.test.ts @@ -407,7 +407,12 @@ describe("Claude Web executor transport orchestration", () => { assert.match(executorSource, /export class ClaudeWebExecutor extends BaseExecutor/); assert.doesNotMatch(executorSource, /claudeTurnstileSolver|getCfClearanceToken|tryBackedChat/); assert.doesNotMatch(indexSource, /ClaudeWebWithAutoRefresh/); - assert.match(indexSource, /"claude-web": new ClaudeWebExecutor\(\)/); - assert.match(indexSource, /"cw-web": new ClaudeWebExecutor\(\)/); + // Both aliases still resolve to ClaudeWebExecutor. Matched on the alias key + // and the class name rather than the exact construction spelling: #11421 made + // the map lazy (`() => import(…).then((m) => new m.ClaudeWebExecutor())`), and + // an anchor pinned to `new ClaudeWebExecutor()` went red for a change that + // never touched the wiring this test is here to guard. + assert.match(indexSource, /"claude-web":.*ClaudeWebExecutor/); + assert.match(indexSource, /"cw-web":.*ClaudeWebExecutor/); }); });