DRAFT: Exchanges() provenance sub-store (companion to baton-axiomatic #175)#989
Draft
c1-squire-dev[bot] wants to merge 1 commit into
Draft
DRAFT: Exchanges() provenance sub-store (companion to baton-axiomatic #175)#989c1-squire-dev[bot] wants to merge 1 commit into
c1-squire-dev[bot] wants to merge 1 commit into
Conversation
…quest-provenance) Companion to baton-axiomatic PR #175 (RFC 0001, per-object request provenance). Adds the SDK-side storage for captured transport exchanges so the export tool can resolve an emitted object's c1.connector.v2.RequestId annotations back to the (redacted) request/response that built it. - c1zstore.ExchangeStore + Exchange row type, reached via the OPTIONAL c1zstore.ExchangesProvider interface (type-asserted by the syncer) so engines and external Store implementations that predate provenance compile unchanged. - *C1File SQLite implementation: PutExchanges / GetExchange / ListExchangesForObject, with the exchanges table created on demand. Deliberately NOT registered in allTableDescriptors: exchanges are a per-sync debug side-store and must not enter the object sync-diff/clone machinery (which keys every table on external_id). Lazy creation also yields "old .c1z opens empty" for free. - Round-trip test + compile-time capability assertions. Not included (the cross-process handoff, RFC §6.7): the StreamCapturedExchanges ConnectorService RPC + the syncer-side consumer, which require a proto change in the c1 monorepo. This branch lands the storage shape so the RPC can target it. Co-authored-by: c1-squire-dev[bot] <c1-squire-dev[bot]@users.noreply.github.com> Co-Authored-By: Claude Opus 4.8 <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.
SDK-side storage for per-object request provenance — companion to baton-axiomatic PR #175 (RFC 0001).
Persists captured (redacted) transport exchanges in the
.c1zso the export tool can resolve an emitted object'sc1.connector.v2.RequestIdannotations back to the request/response that built it.What
c1zstore.ExchangeStore+Exchangerow type, reached via the optionalc1zstore.ExchangesProviderinterface (the syncer type-asserts for it). Engines and externalStoreimplementations that predate provenance compile unchanged.*C1FileSQLite implementation:PutExchanges/GetExchange/ListExchangesForObject. The exchanges table is created on demand and is deliberately not registered inallTableDescriptors— exchanges are a per-sync debug side-store and must not enter the object sync-diff/clone machinery (which keys every table onexternal_id). Lazy creation also yields "old.c1zopens empty" for free.TestExchangesSubStoreRoundTrip) + compile-time capability assertions.go test ./pkg/dotc1z/...green.Not included (next step)
The cross-process handoff (RFC §6.7): the
StreamCapturedExchangesConnectorServiceRPC + the syncer-side consumer, which require a proto change in the c1 monorepo. This branch lands the storage shape so that RPC can target it.🤖 Generated with Claude Code