Repository navigation
An older bus never breaks a newer client: CoreAccess.serves, OptionalRead, a typed unexposed refusal - #4890
Merged
Conversation
…serves, and a read its caller can do without answers its declared nothing where it is not served Tristan's phone (runtime 11a019b) on the laptop's bus (a73a3a1, older than message files) failed every history page: the page's files read reached a connector that exposes no comms_message_files, whose refusal decoded by text into RelationViolationError. - CoreAccess.serves(request_type): an in-process Core serves every request it declares; a RemoteCoreAccess lists its connector's tools once per connection (tools/list, the same kept connection; a dropped connection may be a restarted connector and lists again). - OptionalRead (a ReadRequest): a read its caller can do without declares absent(); posted to a Core that does not serve it, it answers that instead of sending. CommsMessageFilesTool is one: a bus without message files lists none on its pages. - The connector refuses an unexposed tool as UnexposedToolError (CoreError "unexposed"), a ToolRefusedError that is still a RelationViolationError, so every earlier handler catches it; an OptionalRead meeting it (a stale list) answers absent() and lists again. Tests drive the real connector application through a real RemoteCoreAccess: with the files tools left out of the caller's exposed set (the older connector), the read is never posted and answers no files; with them, it is answered; a stale list meets the typed refusal; a direct call is refused as unexposed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RnH6dT7wdh7i4tjJZQdFu3
|
debt-tools at 84646ac passes. |
|
debt-src at 84646ac passes. |
…only the remote Core reads tools/list CoreAccess.serves is concrete (True) so every in-process Core, including the test Cores of clients built before it (toad's ServedCore), keeps instantiating; RemoteCoreAccess answers from its connector's tools. LocalCoreAccess's own copy of the default is gone. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RnH6dT7wdh7i4tjJZQdFu3
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.
What broke
On 2026-11-18, Tristan's phone (runtime
11a019b19) was connected to the laptop's bus (runtimea73a3a12e, which predates message files). Every history page failed with:RelationViolationError: The connector exposes no tool 'comms_message_files'.Each page read asks for its messages' files (
CommsMessageFilesTool, added in #4889). The older connector refused that call with an untypedToolRefusedError, which the client could only decode as a generic refusal by its text.Change
CoreAccess.serves(request_type): one way to ask whether a Core answers a request.LocalCoreAccessserves every request it declares.RemoteCoreAccesslists its connector's tools once per connection withtools/list, on the same kept connection.exchangeand the list share oneround_trip. A dropped connection may mean a restarted connector, so the list is read again next time.OptionalRead(aReadRequest) is a read its caller can do without. It declaresabsent(), whichpostedreturns instead of sending when the Core doesn't serve the read.CommsMessageFilesToolis one, withabsent()= no files.comms_message_file) stays required: it only runs from a chip the files list put on screen.UnexposedToolError(ToolRefusedError, RelationViolationError)with its wire memberCoreError "unexposed".RelationViolationError, so every existing handler keeps catching it (same shape asGoalRefused).OptionalReadthat meets it because its tool list was stale returnsabsent()and lists the tools again.Audit of other recent tools. Tools added since Oct 28 that toad calls:
comms_owner_goal,comms_transcript_page,comms_input_delivery. All three predate every runtime any bus in the fleet runs, and none is read on every page. A lagging bus today lacks only the two file tools.Tests (
tests/test_connector.py)These run the real connector application through a real
RemoteCoreAccess; its kept connection forwards each request to the test server. Results withPYTHONPATH=src: 4 passed.tools/listis the only request, and the read returns no files.serveslists the tools again.exchangeof the unexposed tool: raisesUnexposedToolError, which is aRelationViolationError.The toad side (
optional-reads: the composer offers Attach only where the bus takes files, pages from an older bus draw with no file chips) follows on this.🤖 Generated with Claude Code
https://claude.ai/code/session_01RnH6dT7wdh7i4tjJZQdFu3