Repository navigation
Let the root that published a harness transcript write it - #2781
Merged
Merged
Conversation
#2771 decided whether a root may write an external transcript by comparing it with the machine's published route (CommsRoute.current()). Any root that was not the route, such as the installer's nested private bus, refused to write a harness transcript it had published itself. ExternalSessionLocation now declares the root that published it. Only that root writes the file; a copy keeps the declared root, so it can read the file but refuses to write it. A bus transcript published into another root becomes External, owned by its source root. The session_file module no longer reads the machine route. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.
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.
Fixes the main red that #2771 (23becf5) introduced:
tests/test_native_input_bus_path.py::test_saved_owner_dm_replies...raisedRelationViolationError: Copied bus ... cannot write external sessioninside the installer's nested run.Cause.
ExternalSessionLocation.writablecompared the root withCommsRoute.current(), which is the machine-wide published route. A private root is never that route, so it refused to write a harness transcript it had published itself.Fix. The decision now comes from the session's own declared location.
ExternalSessionLocationdeclarespublished, the root whose registry published it. The wire form is{"path", "published"}.publishedmay write the file. A copy keeps that root, so the copy reads the file and refuses to write it.RegistrySessionLocation.publish(absolute, root, publisher)is the single place that picks the class. A path under the root becomes Bus. Anything else becomes External, owned by the publishing root.session_file.pyno longer importsCommsRoute.Proof.
tests/test_carry_session_locations.py(including a new private-root write test) andtests/test_native_input_bus_path.py: 6 passed.test_check_rootx2: "A check root belongs under the caller's agent-scratch directory";test_start::test_real_stopped_owner...;test_native_owner_launcher_resolution::test_fork_runs....🤖 Generated with Claude Code