Repository navigation
feat: read tapes from any Bub tape store in plugin mode - #1
Merged
Merged
Conversation
As `bub walkman`, enter Bub's framework lifespan and serve the tape store from `provide_tape_store`. Bub's FileTapeStore keeps the file path (byte offsets, file watching); any other sync or async store is read through the store API: followed tapes are polled, the list shows entry counts instead of sizes, and deleting resets the tape and its sidecars in the store. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Summary
As a Bub plugin (
bub walkman), walkman now reads tapes from whatever tape store Bub is configured with (provide_tape_store), not onlyFileTapeStore.sources.pywith a small asyncTapeSourceprotocol:FileSource: the existing behaviour (JSONL files, byte offsets, watchfiles).StoreSource: any sync or async BubTapeStore. A followed tape is re-read every second, and its offset is an entry count. The tape list is cached for 3s.BubSource: entersframework.running()in the server lifespan, then picks a source.FileTapeStorekeeps the file path; any other store goes through the store API. With no store, it falls back to the tape directory.TapeSource.create_app(path)still works.Standalone
bub-walkmanis unchanged.Testing
tests/test_store_source.pycovers sync and async in-memory stores: list, snapshot, spill, delete/force, and follow with appends, resets and a stale offset.../bub): registered a plugin whoseprovide_tape_storereturnsAsyncTapeStoreAdapter(InMemoryTapeStore), then ranbub walkman. The list, tape page, live SSE appends and delete dialog all worked.🤖 Generated with Claude Code