Repository navigation
feat(adapters): publish production persistence implementations - #2005
Merged
Merged
Conversation
JAORMX
force-pushed
the
feat/public-persistence-adapters
branch
from
September 30, 2026 08:04
7f1471a to
7c8647a
Compare
Move JSONL, Redis, and gRPC drivers into an opt-in public module. Isolate generated contracts and shared support, preserve production wiring and conformance, and prove external consumption without workspace replacements. Document read-only limits and dependency-first releases. Co-authored-by: Mecatl <[email protected]>
Co-authored-by: Mecatl <[email protected]>
Copy the captured configuration for each session factory invocation so concurrent session creation cannot overwrite another session's child permission resolver. Keep the default-policy test's model discovery on its existing offline HTTP fixture. Co-authored-by: Mecatl <[email protected]>
Replace race shards, workflow-shape assertions, and timing experiments with one CI job using Task's parallel module dependencies. Remove redundant release wrappers and repeated CI normalization cycles. Pin public dependencies to resolvable revisions, commit standalone adapter checksums, and preserve PR #1999's tidy/sync ordering. Retain the external consumer proof once after dependency setup. Co-authored-by: Mecatl <[email protected]>
JAORMX
force-pushed
the
feat/public-persistence-adapters
branch
from
September 30, 2026 08:14
7c8647a to
df68a9e
Compare
Run the disposable consumer with -mod=mod instead of go mod tidy, which also loads dependency-owned tests and required uncached OpenTelemetry versions in CI. Preserve the file-only proxy, isolated cache, GOWORK=off, and module graph checks. Verified with the exact missing archives from the failing Build job and race-enabled consumer tests. Co-authored-by: Mecatl <[email protected]>
Run cross-adapter behavior tests in the existing adapters module suite. Remove the candidate module proxy, offline cache proof, standalone fixture module, and CI-only dependency prewarming. Wait for startup recovery test RPC handlers before deleting their stores. Co-authored-by: Mecatl <[email protected]>
Classify golang.org/x/mod as indirect now that the proxy helper is gone. Verified task tidy is stable, task build succeeds, and the remaining Build closure guard passes. Co-authored-by: Mecatl <[email protected]>
Merged
2 tasks
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
Expose the existing JSONL, Redis, and gRPC driver implementations to external Go applications without copying the stores, changing persistence formats/semantics, or adding transport dependencies to the engine.
github.com/stacklok/mecatl/adapters/{jsonlstore,redisstore,grpcdriver}./driver/v1package path stays unchanged. Shared watcher and soul validation have one implementation in a private support module.adapters/go.sumis committed; ordinary builds/tidy do not depend on unpublished tags or consumer replacements.The existing user-facing owner,
user-docs/building/extension-points/session-store.md, documents construction, capabilities, cleanup, read-only limitations, and snapshots versus logs.adapters/COMPATIBILITY.mddefines compatibility and independent nested-module releases. ADR 0372 records the promotion without rewriting frozen decisions.Simpler CI and workspace hygiene
Following the operator's explicit request to prioritize maintainability over low-value CI self-tests:
task test:racefor ready PRs/main, ortask testfor drafts. Task runs independent modules concurrently, with CI concurrency capped at three. The normal required-check name remains Test (race).GOWORK=offand read-only manifests. Preserve microVM's test-only integration-module boundary.The follow-up cleanup removes approximately 1,000 net lines relative to the initial implementation. The tradeoff is shared-runner execution instead of cross-runner sharding, not a new package-registration burden.
External-consumer proof
task test:persistence-standalonepackages current adapter source and runs an unrelated external module withGOWORK=off, noreplace, an isolated cache, and file-only dependency resolution. Real dependency versions remain unchanged. Filesystem fixtures, miniredis, and bufconn exercise:The proof rejects host-module leakage and checks the engine-only graph. A real app composition test also verifies persisted production-writer output through the public JSONL reader.
Preserved limitations and release status
JSONL construction and some reads write initialization/lock/catalog state: this is not a general read-only-mount API. Redis needs initialized markers and suitable read/scripting permissions; miniredis is not real ACL/replica certification. gRPC wrappers add no authorization, and a read-only Go interface is not an authorization boundary.
Snapshots and event logs are independent, not an atomic reconstruction contract. Empty zero-cursor history cannot distinguish absent from pruned data; arbitrary external Redis trimming without a generation change remains undetected. Existing transport error-classification limits are documented.
No tags were published. Support and driver are pinned to publicly verified immutable revisions; human-owned
adapters/v*releases can use normal standalone Go checks without waiting for dependency tags.Verification
Final assembled contents, committed through
7c8647ac0:task --concurrency 3 testtask linttask --concurrency 3 test:racetask test:persistence-standalone RACE=-racetask build,task docs,task site:build,task ac-trace-strictgit diff --check.Verification uncovered two existing issues: an offline test omitted its metadata-discovery HTTP fixture, and concurrent session factories mutated captured configuration. Both received minimal fixes; the failing scheduler test then passed 20 repetitions under
-race, as did the app race suite. The proposed larger factory refactor is explicitly not included.GPT-6 Astra reviewed the simplification; its remaining download-error-handling finding was fixed by removing the custom retry wrapper. Earlier independent adapter reviews were completed and their findings addressed. GitHub CI still independently validates the updated head.
Work was performed in a dedicated worktree; unrelated main-worktree files are untouched. The operator waived the separate acceptance-plan PR for the extraction and subsequently authorized this CI cleanup. No merge is performed by this change.