O-6: C-S8: stateobjects.Tools, the four tools that read and drop a module's state objects and sent objects, each drop with by and why as a hand act first (milestone 47/G, issue 1966, ADR 0666 section 25)

Builds: design 47 G §60, §84, §258

Claude-Session: https://claude.ai/code/session_01JG73KEq4zoDfM9WtYpcQgZ
This commit is contained in:
2026-11-11 10:51:06 +01:00
parent 71f8e548aa
commit 8cb13d1033
3 changed files with 375 additions and 1 deletions
+7 -1
View File
@@ -23,6 +23,7 @@ type memory struct {
keys map[string]Entry
objects map[string][]byte
failPuts bool
modified map[string]time.Time
most int
}
@@ -79,6 +80,11 @@ func (m *memory) Put(name string, data []byte) error {
return errors.New("the store is full")
}
m.objects[name] = data
if m.modified != nil {
if _, ok := m.modified[name]; !ok {
m.modified[name] = time.Time{}
}
}
return nil
}
@@ -114,7 +120,7 @@ func (o memObjects) List() ([]Object, error) {
defer o.m.mu.Unlock()
var out []Object
for n, d := range o.m.objects {
out = append(out, Object{Name: n, Size: int64(len(d))})
out = append(out, Object{Name: n, Size: int64(len(d)), Modified: o.m.modified[n]})
}
return out, nil
}