Skip to content

Add KEEP mutate surface for bound node/edge writes - #113

Merged
pewpewpotato merged 2 commits into
mainfrom
cursor/keep-mutate-surface-4e92
Sep 19, 2026
Merged

pewpewpotato merged 2 commits into
mainfrom
cursor/keep-mutate-surface-4e92

Conversation

@pewpewpotato

@pewpewpotato pewpewpotato commented Sep 19, 2026

Copy link
Copy Markdown
Contributor

Closes #112.

Implements the Architecture design comment on #112 as source of truth (comment).

Surface

  • CLI: spl mutate --operations <file|-> (stdin via -)
  • MCP: spl_mutate { "operations": [...], "author"?, "message"? }
  • No aliases to add / commit / status / stage / write
  • Golden KEEP lists include mutate / spl_mutate; REMOVE still excludes add/commit/…

Behaviour

  • Bound-only: FindBind fail-closed (ErrUnbound)
  • One-shot ops batch (same MutationOperation shape as schema migrate / private Stage) → existing ctxgit Stage then Commit → spool/mcp/<stamp>-<nonce> + PR
  • Identical / empty effective diff → no empty PR
  • Projection rebuilt after write; never .spl packs/CAS/gc; never push protected branch
  • Result aligns with WriteResult: branch, commit, pullRequest, written, deleted

schema migrate stays schema-first. Mutate is graph-first.

make check is green locally (GOTOOLCHAIN=go1.26.8). Architect review as requested.

Open in Web Open in Cursor 

Closes #112. Dedicated spl mutate / spl_mutate applies one ops batch through
existing ctxgit Stage/Commit (short-lived spool/mcp/… branch + PR). Bound-only
FindBind fail-closed. Golden KEEP lists include mutate; REMOVE still excludes
add/commit/status/branch/switch.

Co-authored-by: Werner Swart <werner@swart.io>
@pewpewpotato
pewpewpotato marked this pull request as ready for review September 19, 2026 18:30
Copilot AI lite review requested due to automatic review settings September 19, 2026 18:30

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

Use --operations (file or stdin) instead of --batch, return WriteResult
written/deleted, no-op identical diffs without an empty PR, and lock
mutate against add/commit/status/stage/write aliases.

Co-authored-by: Werner Swart <werner@swart.io>

@pewpewpotato pewpewpotato left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Architecture review (#112 design)

Checked against the normative design comment on #112.

Matches

  • Naming: CLI mutate / MCP spl_mutate; empty aliases; no add/commit/status/stage/write reopen (golden + TestMutateHasNoVCSAliases).
  • Authority: thin Session.Mutate one-shot over existing Stage then Commit — no new SoT; private Stage/Commit stay library.
  • Behaviour: FindBind fail-closed; empty batch rejected; short-lived spool/mcp/… + PR; identical diff → no empty PR; projection rebuild; leftover .spl packs untouched; protected branch not push-cleaned.
  • KEEP surface: internal/surface + help/tools/list goldens updated; schema migrate remains schema-first.
  • Contract: ops batch uses MutationOperation; result embeds WriteResult (branch/commit/pullRequest/written/deleted).

Architect: no design block. (Formal APPROVE blocked — same GitHub author as the PR; treat this COMMENT as sign-off.) Merge when remaining check is green.

@pewpewpotato
pewpewpotato merged commit d52cd9b into main Sep 19, 2026
7 checks passed
@pewpewpotato
pewpewpotato deleted the cursor/keep-mutate-surface-4e92 branch September 19, 2026 18:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

KEEP: dedicated bound mutate tool for node/edge writes (not schema-migrate-only)

3 participants