Repository navigation
Create the bus when a root is adopted; an absent bus is a deleted bus - #2854
Merged
Merged
Conversation
#2784 (8ed65d3) made an absent bus.sqlite3 read as the declared empty schema, to fix a fresh root raising CANTOPEN. A missing file then meant two things, "never written" and "deleted" (IDEN-1), and test_outbound_transcript_source.py:245 (a deleted bus must not present as empty) went red on main. The owner of "this directory became a root" is RootRuntimeStore.adopt: it publishes the root's first record. It now creates the bus there, empty, through Bus.install. Bus.observing no longer falls back to an empty in-memory schema: an absent file fails to open. The fresh install's second Bus.install after wire(root) restated that creation and is deleted. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
test_root_runtime asserts a root adopted by wire() reads an empty bus. test_start.py:35 was red on main: it compared the registry's typed BoundExternalSession to a str. It now compares against the declared location bound to the root, built from the same declaration it registers. Its Bus.install after wire() restated the creation adoption now owns and is deleted. 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 insufficient remaining quota.
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.
|
debt-tools at 45a0abd, every finding: |
|
debt-src at 45a0abd, every finding: |
This was referenced Oct 23, 2026
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 main's red at
tests/test_outbound_transcript_source.py:245(test_missing_bus_cannot_be_an_empty_presentation,DID NOT RAISE OperationalError).Cause. #2784 (8ed65d3) moved Bus onto
WalStore.committed_or_empty, so an absentbus.sqlite3read as the declared empty schema. That fixed a fresh root raising CANTOPEN, but a missing file then meant two things, "never written" and "deleted" (IDEN-1).Shape. There's no flag recording "bus created": a flag would be a second writable copy of what the file's existence already says (IDEN-5). Instead the bus exists from the moment its root does.
RootRuntimeStore.adopt(root_runtime.py), where a directory first becomes a root, creates the bus empty throughBus.install.Bus.observingattaches the file directly. An absent bus is a deleted bus and raises CANTOPEN.Bus.installright afterwire(root)(installer/upgrade.py) restated that creation, so it's deleted.TypedStore.snapshotkeepscommitted_or_emptyfor the optional typed stores; Bus no longer uses it.Also main's red:
tests/test_start.py:35compared the registry's typedBoundExternalSessionto astr(red on main 55d5a3e too). It now compares with the declared location bound to the root, from the same declaration it registers. The test'sBus.installafterwire()restated adoption's creation and is deleted.Proof
Busdirectly (bus, install, historical views and notifications, connector, carry_bus_history, resource claims, native unknown recovery, check_root): 160 passed, 3 failed under load; those 3 pass in isolation on this head.installed, 42.3 s.installed, 41.7 s;bus.sqlite3created with.root-runtime.jsonat adoption.🤖 Generated with Claude Code