[agent/codex:gpt-5.4-mini] Read ~/spec/code/core/go/store/RFC.md fully. Find features d... #63
2 changed files with 10 additions and 4 deletions
10
doc.go
10
doc.go
|
|
@ -1,6 +1,6 @@
|
|||
// Package store provides SQLite-backed storage for grouped entries, TTL expiry,
|
||||
// namespace isolation, quota enforcement, reactive change notifications, and
|
||||
// workspace journalling.
|
||||
// namespace isolation, quota enforcement, reactive change notifications,
|
||||
// workspace journalling, and explicit orphan recovery.
|
||||
//
|
||||
// Usage example:
|
||||
//
|
||||
|
|
@ -93,6 +93,12 @@
|
|||
// return
|
||||
// }
|
||||
//
|
||||
// orphans := storeInstance.RecoverOrphans(".core/state")
|
||||
// for _, orphanWorkspace := range orphans {
|
||||
// fmt.Println(orphanWorkspace.Aggregate())
|
||||
// orphanWorkspace.Discard()
|
||||
// }
|
||||
//
|
||||
// journalResult := storeInstance.QueryJournal(`from(bucket: "events") |> range(start: -24h)`)
|
||||
// if !journalResult.OK {
|
||||
// return
|
||||
|
|
|
|||
|
|
@ -109,8 +109,8 @@ func (storeInstance *Store) NewWorkspace(name string) (*Workspace, error) {
|
|||
}, nil
|
||||
}
|
||||
|
||||
// RecoverOrphans opens any leftover workspace files so callers can inspect and
|
||||
// decide whether to commit or discard them.
|
||||
// RecoverOrphans opens leftover workspace files in a state directory so
|
||||
// callers can inspect them before calling Discard().
|
||||
// Usage example: `orphans := storeInstance.RecoverOrphans(".core/state")`
|
||||
func (storeInstance *Store) RecoverOrphans(stateDirectory string) []*Workspace {
|
||||
if storeInstance == nil {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue