Triggering Event
Release: https://github.com/mozilla-ai/cq/releases/tag/cli/v0.15.1
PR mozilla-ai#476: mozilla-ai#476 — feat(sdk/go): add context.Context to Store interface methods
PR mozilla-ai#477: mozilla-ai#477 — fix(sdk): stamp writer metadata on every store mutation (Go half)
What Changed
Breaking: Go Store SPI — context.Context on every method (PR mozilla-ai#476)
context.Context is now the first parameter on all seven Store interface methods:
| Method |
Old signature |
New signature |
Unit |
Unit(id string) |
Unit(ctx, id) |
All |
All() |
All(ctx) |
Insert |
Insert(ku) |
Insert(ctx, ku) |
Update |
Update(ku) |
Update(ctx, ku) |
Delete |
Delete(id) |
Delete(ctx, id) |
Query |
Query(opts) |
Query(ctx, opts) |
Stats |
Stats() |
Stats(ctx) |
Close is unchanged (no cancellable I/O). All three upstream implementations (in-memory, SQLite, PostgreSQL), the Client, and the conformance suite (storetest) have been updated. The SQLite store now uses context-aware database/sql methods (QueryContext, ExecContext, BeginTx, PrepareContext). postgres.New also gains a context.Context parameter to avoid indefinite blocking on pool creation, ping, and schema migration.
This is a compile-time break. Any fork code that implements or embeds the Go Store interface will fail to compile against sdk/go v0.14.0+ until every method signature is updated.
Go-side writer-stamp fix (PR mozilla-ai#477, companion to #411)
The atomic writer-metadata stamping fix (tracked for Python in #411) also covers the Go SDK in this release:
stampWriter is now a free function taking an execer interface, runs within the mutation's transaction
- PostgreSQL
Delete is wrapped in a transaction so stamp is atomic with the delete
- SQLite and PostgreSQL both now stamp
last_writer / last_write_at on every Insert, Update, Delete (not just at store construction)
The Python side of this is tracked in #411. The Go side is new here.
Why It Matters for 8th-layer
- 8th-layer-agent's Go Store adapters (any custom store implementing the SPI, crosstalk store bridges, harness adapters) will not compile against Go SDK v0.14.0 until method signatures are updated. This blocks any Go SDK version bump.
- The conformance suite (
storetest) has been updated — running it against fork adapters will catch missed signatures.
- The context threading enables proper timeout/cancellation propagation through the full store call stack — the fork should adopt this for AIGRP/DSN request lifecycles where bounded latency is critical.
- The writer-stamp atomicity fix ensures
last_writer is accurate in multi-agent shared PostgreSQL stores — relevant for 8th-layer's multi-agent crosstalk scenarios.
Recommended Actions
Related Issues
Triggering Event
Release: https://github.com/mozilla-ai/cq/releases/tag/cli/v0.15.1
PR mozilla-ai#476: mozilla-ai#476 —
feat(sdk/go): add context.Context to Store interface methodsPR mozilla-ai#477: mozilla-ai#477 —
fix(sdk): stamp writer metadata on every store mutation(Go half)What Changed
Breaking: Go Store SPI — context.Context on every method (PR mozilla-ai#476)
context.Contextis now the first parameter on all seven Store interface methods:UnitUnit(id string)Unit(ctx, id)AllAll()All(ctx)InsertInsert(ku)Insert(ctx, ku)UpdateUpdate(ku)Update(ctx, ku)DeleteDelete(id)Delete(ctx, id)QueryQuery(opts)Query(ctx, opts)StatsStats()Stats(ctx)Closeis unchanged (no cancellable I/O). All three upstream implementations (in-memory, SQLite, PostgreSQL), theClient, and the conformance suite (storetest) have been updated. The SQLite store now uses context-awaredatabase/sqlmethods (QueryContext,ExecContext,BeginTx,PrepareContext).postgres.Newalso gains acontext.Contextparameter to avoid indefinite blocking on pool creation, ping, and schema migration.This is a compile-time break. Any fork code that implements or embeds the Go
Storeinterface will fail to compile against sdk/go v0.14.0+ until every method signature is updated.Go-side writer-stamp fix (PR mozilla-ai#477, companion to #411)
The atomic writer-metadata stamping fix (tracked for Python in #411) also covers the Go SDK in this release:
stampWriteris now a free function taking anexecerinterface, runs within the mutation's transactionDeleteis wrapped in a transaction so stamp is atomic with the deletelast_writer/last_write_aton everyInsert,Update,Delete(not just at store construction)The Python side of this is tracked in #411. The Go side is new here.
Why It Matters for 8th-layer
storetest) has been updated — running it against fork adapters will catch missed signatures.last_writeris accurate in multi-agent shared PostgreSQL stores — relevant for 8th-layer's multi-agent crosstalk scenarios.Recommended Actions
Storeinterface — update every method to acceptcontext.Contextas the first argumentpostgres.Newcall sites to pass acontext.Contextstoretest) against fork adapters after signature updateRelated Issues