Repository navigation
test(experiments): route the turn-surface live collector over the measured bridge tools - #4035
Merged
Merged
Conversation
…sured bridge tools (#3886) The retained #587 live collector built its routing catalogue from every registered bridge tool. The bridge now registers 41, so core plus bridge plus skills passed the 64-entry bound in wideRoutingRequest and every routed arm was refused before the classifier ran. Following the 2026-11-11 ruling (option 3), the collector now routes over the eight bridge tools registered at the measured source, filtered by name, and fails when one of them is no longer listed. The 64-entry guard is unchanged and now names the bound and the catalogue size. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Owner
Author
|
Collisions at head |
This was referenced Nov 15, 2026
…e-catalogue-subset
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.
Closes #3886
What changed
The retained #587 live collector (
scripts/measure-turn-surface-live.ts) now routes over the core tools, the eightbrain-uibridge tools thatcreateBrainUiMcpServerregistered at the measured source (380ad6eaf), and the frozen skills. Every later bridge tool is excluded by name throughmeasuredRoutingToolsinscripts/turn-surface-classifier.ts. The bridge now registers 41 tools, so before this change the catalogue was 25 core + 41 bridge + 16 skills = 82 entries, andwideRoutingRequestrefused every routed arm. With the filter it is 25 + 8 + 16 = 49. The 64-entry guard is unchanged, but it now names the bound and the catalogue size (Invalid routing catalogue: 82 tool and skill entries exceed the 64-entry bound), and empty catalogues get their own message. The collector also fails if one of the eight measured bridge tools is no longer listed.Why this shape
This follows the maintainer's 2026-11-11 ruling on the issue (option 3: a reviewed subset). The pinned list matches the archived native catalogue's
bridgeLoadedSchemaNames(measurement archive at48227b09) and thecreateBrainUiMcpServersource at380ad6eaf, which registered onlyshow_block,get_current_location, the fourask_user*tools,request_image_maskandquery_activity. Raising the bound (option 1) would give it no measured meaning. Shortlisting (option 2) would change the design #587 measured. Corebraintools are left unfiltered, as the issue scope says. They grew from 8 at the measured source to 25, so the 15 slots of headroom left under the bound now come from core.Prior work: #4021 (#3788) did not resolve this. On
origin/maineb3c53ac2the experiment still failed on cell 2 withturn_error_or_missing_raw_usage, and the fixture's bridge still lists 41 tools.Proof
Failing-first (on
origin/maineb3c53ac2, before the change):bun run test ./experiments/turn-surface-fixture-live.test.ts→(fail) whole live collector indexes, routes, claims, executes and drains all four arms keylessly:2/20 hint rep1 quote-card excluded,error: turn_error_or_missing_raw_usage.Expected substring: "Invalid routing catalogue: 65 tool and skill entries exceed the 64-entry bound",Received message: "Invalid routing catalogue".After:
bun run test ./experiments/turn-surface-classifier.test.ts ./experiments/turn-surface-fixture-live.test.ts→ 7 pass, 0 fail. The receipt assertions inturn-surface-fixture-live.test.tsare unchanged.Mutations (each restored, tree clean afterwards):
measuredRoutingToolscall in the collector → the live-collector test fails again withturn_error_or_missing_raw_usage. The cell's private error file readsInvalid routing catalogue: 82 tool and skill entries exceed the 64-entry bound.tools.slice(0, core + 8)) →(fail) the live collector routes over the measured bridge tools only, excluded by nameontoEqual.(fail) a catalogue over the 64-entry bound is refused by name, never truncated:Received function did not throw.Expected substring: "Measured bridge routing tools missing: show_block",Received function did not throw.Root
tsc --noEmit: clean. It neededNODE_OPTIONS=--max-old-space-size=12288locally because the default heap aborted.{"version":1,"kind":"brain-check-pr-receipt","head":"4570672077284cd77104a8c89b7f3b35c3c8acaa","base":"origin/main","mode":"focused","startedAt":"2026-11-15T19:39:33.155Z","finishedAt":"2026-11-15T19:40:58.773Z","checks":[{"name":"all lint and leakage gates","categories":["changeset"],"outcome":"passed","elapsedMs":12923.299192999999},{"name":"environment documentation","categories":["changeset"],"outcome":"passed","elapsedMs":129.20517499999914},{"name":"pending changeset package names","categories":["changeset"],"outcome":"passed","elapsedMs":98.74039999999877},{"name":"contribution changeset","categories":["changeset"],"outcome":"passed","elapsedMs":17.72941400000127},{"name":"affected fast invariants","categories":["verify","unit"],"outcome":"passed","elapsedMs":72433.01144399999}]}Checklist
docs/decisions/turn-surface-routing.mddescribes a provider rerun at the measured source, which this does not touch.scripts/measure-turn-surface-live.tscalls either.Anything left open
Nothing. Collisions: see the comment below.
🤖 Generated with Claude Code