Skip to content

feat: read tapes from any Bub tape store in plugin mode - #1

Merged
frostming merged 1 commit into
mainfrom
feat/bub-tape-store
Nov 9, 2026
Merged

frostming merged 1 commit into
mainfrom
feat/bub-tape-store

Conversation

@frostming

Copy link
Copy Markdown
Contributor

Summary

As a Bub plugin (bub walkman), walkman now reads tapes from whatever tape store Bub is configured with (provide_tape_store), not only FileTapeStore.

  • New sources.py with a small async TapeSource protocol:
    • FileSource: the existing behaviour (JSONL files, byte offsets, watchfiles).
    • StoreSource: any sync or async Bub TapeStore. A followed tape is re-read every second, and its offset is an entry count. The tape list is cached for 3s.
    • BubSource: enters framework.running() in the server lifespan, then picks a source. FileTapeStore keeps the file path; any other store goes through the store API. With no store, it falls back to the tape directory.
  • The server now goes through TapeSource. create_app(path) still works.
  • CLI: in plugin mode, a tape argument that isn't a file is treated as a store tape name.
  • UI: a store tape has no byte size, so the list shows entry counts. Deleting resets the tape and its sidecars in the store, and the confirm dialog says so.
  • README: new "Other tape stores" section.

Standalone bub-walkman is unchanged.

Testing

  • tests/test_store_source.py covers sync and async in-memory stores: list, snapshot, spill, delete/force, and follow with appends, resets and a stale offset.
  • Full suite: 16 passed, 1 skipped (the bub plugin registration test, which needs bub installed). Ran on Python 3.12 and 3.14.
  • Web: typecheck and build pass.
  • End to end with real Bub (../bub): registered a plugin whose provide_tape_store returns AsyncTapeStoreAdapter(InMemoryTapeStore), then ran bub walkman. The list, tape page, live SSE appends and delete dialog all worked.

🤖 Generated with Claude Code

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>
@frostming
frostming merged commit fd430de into main Nov 9, 2026
5 checks passed
@frostming
frostming deleted the feat/bub-tape-store branch November 9, 2026 12:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant