[agent/codex:gpt-5.4-mini] Read ~/spec/code/core/go/store/RFC.md fully. Find features d... #129

Merged
Virgil merged 1 commit from agent/read---spec-code-core-go-store-rfc-md-fu into dev 2026-04-04 11:19:36 +00:00
3 changed files with 5 additions and 2 deletions

View file

@ -256,7 +256,7 @@ transaction.go Store.Transaction and transaction-scoped mutation helpers
events.go EventType, Event, Watch, Unwatch, OnChange, notify
scope.go ScopedStore, QuotaConfig, namespace-local helper delegation, quota enforcement
journal.go Journal persistence, Flux-like querying, JSON row inflation
workspace.go Workspace buffers, aggregation, commit flow, orphan recovery
workspace.go Workspace buffers, aggregation, query analysis, commit flow, orphan recovery
compact.go Cold archive generation to JSONL gzip or zstd
store_test.go Tests: CRUD, TTL, concurrency, edge cases, persistence
events_test.go Tests: Watch, Unwatch, OnChange, event dispatch

View file

@ -122,7 +122,7 @@ The entire package lives in a single Go package (`package store`) with the follo
| `events.go` | `EventType` constants, `Event` struct, `Watch`/`Unwatch` channel subscriptions, `OnChange` callback registration, internal `notify` dispatch |
| `scope.go` | `ScopedStore` wrapper for namespace isolation, `QuotaConfig` struct, `NewScoped`/`NewScopedWithQuota` constructors, namespace-local helper delegation, quota enforcement logic |
| `journal.go` | Journal persistence, Flux-like querying, JSON row inflation, journal schema helpers |
| `workspace.go` | Workspace buffers, aggregation, commit flow, and orphan recovery |
| `workspace.go` | Workspace buffers, aggregation, query analysis, commit flow, and orphan recovery |
| `compact.go` | Cold archive generation to JSONL gzip or zstd |
Tests are organised in corresponding files:

View file

@ -318,6 +318,9 @@ func (workspace *Workspace) Discard() {
_ = workspace.closeAndRemoveFiles()
}
// Query runs SQL against the buffer for ad-hoc analysis and returns rows as
// `[]map[string]any`.
//
// Usage example: `result := workspace.Query("SELECT entry_kind, COUNT(*) AS count FROM workspace_entries GROUP BY entry_kind")`
func (workspace *Workspace) Query(query string) core.Result {
if err := workspace.ensureReady("store.Workspace.Query"); err != nil {