feat(weave): prototype atomic historical turn ingestion - #7693
Draft
ash0ts wants to merge 3 commits into
Draft
Conversation
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! |
Contributor
Author
Review-mirror compatibility updateThe HiveMind review mirror now pins this companion branch at That commit adds the typed-message PII redaction fix from #7699 on top of this branch. The review mirror needs both capabilities present here:
The importer has a real-package regression for this exact combination. Its full suite passes (614 passed, 1 opt-in live test deselected). No hosted import was resumed as part of this update. |
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
I want HiveMind chat history to appear in Weave Agents without risking partial turns, duplicate retries, or silent data loss. The existing
log_turn/OTLP path is useful for ordinary telemetry, but it does not provide the atomic, durable idempotency contract a large historical backfill needs.This draft establishes the API and storage boundary that the HiveMind importer can depend on. It is deliberately fail-closed and is not ready for hosted deployment yet.
What this draft implements
prepare_turn,upsert_turn,get_turn_status, and capability discovery.GET /agents/v1/historical-turns/capabilitiesPUT /agents/v1/historical-turns/{logical_key}GET /agents/v1/historical-turns/{logical_key}Why it is still a draft
The open-source vertical slice currently uses canonical JSON identity encoding and a local SQLite backend. Before this can serve real imports, the hosted service still needs:
The advertised prototype capability values intentionally cause the HiveMind importer to reject it. There is no OTLP or
log_turnfallback.Related importer
The dependent importer work is in the draft HiveMind PR. That PR implements sealed date-based plans, whole-session micro-cohorts, exact per-turn reconciliation, canary selection, private scheduler state, Keychain-backed scheduled credentials, and content-free reporting.
No real HiveMind chat content was uploaded while developing this change.
Validation
git diff --checkpassed.