molecule-core/workspace-server
Hongming Wang aec0fb35d2 feat(memories): PATCH /workspaces/:id/memories/:id endpoint for edits
Pre-fix the only writes to agent_memories were Commit (POST) and
Delete (DELETE). Editing an entry meant delete + recreate, losing the
original id and created_at, and (the user-visible reason for filing
this) leaving the canvas Memory tab without an Edit button at all.

Adds PATCH that accepts either content, namespace, or both — at
least one required (empty body 400s; silently no-op'ing would let a
buggy client think it succeeded). The full Commit security pipeline
is re-run on content edits:
  - redactSecrets on every scope (#1201 SAFE-T)
  - GLOBAL [MEMORY → [_MEMORY delimiter escape (#807 SAFE-T)
  - GLOBAL audit log row mirroring Commit's #767 forensic pattern
  - re-embed via the configured EmbeddingFunc (skipping would leave
    the row's vector pointing at the OLD content, silently breaking
    semantic search)

Cross-scope edits (LOCAL→GLOBAL) intentionally NOT supported — that's
delete + recreate so the GLOBAL access-control gate (only root
workspaces can write GLOBAL) gets re-evaluated cleanly.

7 new sqlmock tests pin: namespace-only, content-only LOCAL,
content-only GLOBAL with audit + escape, empty-body 400, empty-
content 400, 404 on missing/wrong-workspace memory, no-op 200 with
changed=false (and crucially: no UPDATE fires on no-op).

Build clean, full handlers test suite (./internal/handlers) passes
in 4s.

PR-2 (frontend): Add modal + Edit button in MemoryInspectorPanel.tsx
will land separately.
2026-05-04 21:00:47 -07:00
..
cmd Memory v2 fixup Critical: wire plugin from main.go (was fully dormant) 2026-05-04 10:22:30 -07:00
internal feat(memories): PATCH /workspaces/:id/memories/:id endpoint for edits 2026-05-04 21:00:47 -07:00
migrations feat(delegations): durable per-task ledger + audit-write helper (RFC #2829 PR-1) 2026-05-04 20:43:06 -07:00
pkg/provisionhook feat(#1957): wire gh-identity plugin into workspace-server 2026-04-24 15:01:41 +00:00
.ci-force
.gitignore
.golangci.yaml chore(workspace-server): add golangci.yaml disabling errcheck 2026-04-24 07:16:54 +00:00
Dockerfile feat(deploy): verify each tenant /buildinfo matches published SHA after redeploy 2026-04-30 10:55:08 -07:00
Dockerfile.tenant feat(deploy): verify each tenant /buildinfo matches published SHA after redeploy 2026-04-30 10:55:08 -07:00
entrypoint-tenant.sh
go.mod chore(deps)(deps): bump github.com/creack/pty in /workspace-server 2026-05-02 19:22:48 +00:00
go.sum chore(deps)(deps): bump github.com/creack/pty in /workspace-server 2026-05-02 19:22:48 +00:00