feat(integrations): unify Tau memory schemas and setup - #1493
Open
phernandez wants to merge 2 commits into
Open
Conversation
Signed-off-by: phernandez <paul@basicmachines.co>
Signed-off-by: phernandez <paul@basicmachines.co>
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
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.
Why
Follow-up to #1489; refs #1487. Basic Memory's value is shared, structured knowledge that any connected agent can find and understand. Tau's first integration delivered lifecycle continuity but emitted
coding_sessionnotes without the established Git identity fields and used cwd-only recall. Its setup also lacked the schema/placement conventions already present in the hook-backed integrations.This aligns the memory contract without invoking
bm hook, importing CLI orchestration, or adding a generic host framework. Sidebar/custom-frontend work is deliberately separate.What Changed
integrations/shared/schemas, with checked copies in Claude Code, Codex, and Tau packages. Codex keeps its existing separate general-session schema. Adds optionaltau_session_idand host-neutral prose without changing existing required fields.session, not a misleadingcoding_sessiontype. Synthesis instructions use the shared schema categories.d8216af0b34059839734422d1e39b4c5972d7966, including the single-copy snapshot fix. Upstream contribution: feat: support awaited extension continuity across compaction huggingface/tau#687 (replaces CLI access to Basic Memory via auto-starting server (Ollama pattern) #683).Implementation Details
knowledge.pycontains validated configuration profiles, a small frozen Git-context value, bounded asynchronous metadata reads, and placement guidance. The lifecycle remains incontinuity.py; MCP discovery, ownership, argument forwarding, and receipts retain their existing boundaries. Missing/failed/timed-out optional GitHub lookup omits PR context; invalid successful payloads and required Git failures surface rather than fabricating identity.A coding profile never inherits the global write destination implicitly. Its root must match Git's top-level directory; additional worktrees require explicit user configuration with the same stable repository identity. Secondary projects are used only in automatic read operations. Explicit agent tool arguments remain unchanged.
Existing config keys and durable receipts remain compatible. Existing notes are not rewritten to retrofit metadata; general cwd recall can still find legacy snapshots. Canonical schemas are bundled as copies for self-contained installation;
scripts/sync_memory_schemas.py --checkand package tests detect drift. This does not rewrite installed user schemas or create a lifecycle-event-to-knowledge pipeline.Testing
On the rebased branch, based on
9cd8169ea:just fast-check: passed, including root Ruff/format/typecheck.just package-check: passed across all packages. Tau: 66 passed, 3 opt-in real-BM tests skipped, Ruff/format/ty passed.just doctor: passed in a temporary project.integrations/tau:BM_TAU_TEST_COMMAND=<worktree>/.venv/bin/bm uv run --with pytest-cov pytest --cov=tau --cov-report=term-missing -q: 69 passed; 100% statement coverage across six runtime modules (617 statements).git diff --check: passed.New evidence covers actual Git metadata, missing/invalid optional PR results, cancellation cleanup, explicit profile selection, nested/unborn checkout safety, read-only source routing, real Tau skill loading/invocation, and schema bundle parity. Real-BM tests seed the shared schemas, validate a Tau checkpoint with no warnings/errors, find it using the hook-style repository query, and recall Tau plus a schema-valid other-host fixture from another actual Git worktree while excluding both from a different repository's coding brief.
Existing actual Tau compaction/reload/branch/resume, headless TUI reload, receipt failure/reconciliation, privacy, and persistent MCP tests still pass. Model synthesis uses deterministic fake providers. No paid live-model, production memory, or cloud-account test was performed.
Risks / Follow-ups
No merge is authorized.