[agent/codex:gpt-5.4-mini] Read docs/RFC-STORE.md fully. Find features described in the... #141

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

View file

@ -11,8 +11,8 @@ import (
var defaultArchiveOutputDirectory = ".core/archive/"
// CompactOptions selects which completed journal rows move into cold archive
// output and where the compressed file is written.
// CompactOptions archives completed journal rows before a cutoff time to a
// compressed JSONL file.
//
// Usage example: `options := store.CompactOptions{Before: time.Now().Add(-90 * 24 * time.Hour), Output: "/tmp/archive", Format: "gzip"}`
type CompactOptions struct {

10
doc.go
View file

@ -1,9 +1,9 @@
// Package store provides SQLite-backed key-value storage for grouped entries, TTL expiry,
// namespace isolation, quota enforcement, reactive change notifications,
// workspace journalling, and explicit orphan recovery.
// Package store provides SQLite-backed key-value storage for grouped entries,
// TTL expiry, namespace isolation, quota enforcement, reactive change
// notifications, workspace journalling, and orphan recovery.
//
// Workspace files are created under `.core/state/` and can be recovered with
// `RecoverOrphans(".core/state")`.
// Workspace files live under `.core/state/` and can be recovered with
// `RecoverOrphans(".core/state/")`.
//
// Use `store.NewConfigured(store.StoreConfig{...})` when the database path,
// journal, and purge interval are already known. Prefer the struct literal

View file

@ -65,8 +65,8 @@ func (workspace *Workspace) DatabasePath() string {
return workspace.databasePath
}
// Close leaves the SQLite workspace file on disk so a later store instance can
// recover it as an orphan and decide whether to Commit or Discard it.
// Close keeps the workspace file on disk so `RecoverOrphans(".core/state/")`
// can reopen it later.
//
// Usage example: `if err := workspace.Close(); err != nil { return }; orphans := storeInstance.RecoverOrphans(".core/state"); _ = orphans`
func (workspace *Workspace) Close() error {
@ -287,8 +287,8 @@ func (workspace *Workspace) Aggregate() map[string]any {
return fields
}
// Commit writes one journal row for the workspace through the shared journal
// writer and upserts the summary row in `workspace:NAME`.
// Commit writes one completed workspace row to the journal and upserts the
// summary entry in `workspace:NAME`.
//
// Usage example: `result := workspace.Commit(); if !result.OK { return }; fmt.Println(result.Value)`
func (workspace *Workspace) Commit() core.Result {