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

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

2
doc.go
View file

@ -89,7 +89,7 @@
//
// orphans := configuredStore.RecoverOrphans(".core/state")
// for _, orphanWorkspace := range orphans {
// fmt.Println(orphanWorkspace.Aggregate())
// fmt.Println(orphanWorkspace.Name(), orphanWorkspace.Aggregate())
// orphanWorkspace.Discard()
// }
//

View file

@ -46,6 +46,14 @@ type Workspace struct {
closed bool
}
// Usage example: `workspaceName := workspace.Name(); fmt.Println(workspaceName)`
func (workspace *Workspace) Name() string {
if workspace == nil {
return ""
}
return workspace.name
}
func (workspace *Workspace) ensureReady(operation string) error {
if workspace == nil {
return core.E(operation, "workspace is nil", nil)

View file

@ -177,6 +177,7 @@ func TestWorkspace_RecoverOrphans_Good(t *testing.T) {
orphans := storeInstance.RecoverOrphans(stateDirectory)
require.Len(t, orphans, 1)
assert.Equal(t, "orphan-session", orphans[0].Name())
assert.Equal(t, map[string]any{"like": 1}, orphans[0].Aggregate())
orphans[0].Discard()