Honor explicit qualified memory forgets

853c2de48282 · AtlantisPleb · · parent b164d60fef75

Honor explicit qualified memory forgets

Deploy story

What this commit did to the running system — joined from the forge receipt chain, the part a commit page elsewhere cannot show.

Not deployed through the forge lane

No push, promotion, build, or deploy receipt references this commit (receipts are scanned over a bounded recent window). Changes shipped by full node replacement carry their proof in the release gate receipt instead.

Changed files

  • modified lib/openagents/memory/consent.ex
  • modified test/openagents/tools/profile_memory_tools_test.exs

Diff

2 files changed, +90 -0

test/openagents/tools/profile_memory_tools_test.exs modified +57

@@ -61,6 +61,63 @@ defmodule OpenAgents.Tools.ProfileMemoryToolsTest do

61 61
    end
62 62
  end
63 63
64
  test "record forget accepts an explicit qualified subject without widening authority", %{
65
    snapshot: snapshot
66
  } do
67
    assert {:ok, %{kind: "current_message"}} =
68
             Consent.forget(
69
               "Forget my permanent staging qualification shape and remove that lasting profile preference.",
70
               "record",
71
               "The user's permanent staging qualification shape is square"
72
             )
73
74
    assert {:error, :memory_consent_mismatch} =
75
             Consent.forget(
76
               "Forget my permanent staging qualification shape and remove that lasting profile preference.",
77
               "record",
78
               "The user's permanent deployment preference is canary"
79
             )
80
81
    assert {:error, :memory_consent_mismatch} =
82
             Consent.forget(
83
               "Forget my name and remove that memory.",
84
               "record",
85
               "My name is Chris"
86
             )
87
88
    scope = browser("memory-qualified-forget")
89
90
    record =
91
      remember(
92
        snapshot,
93
        scope,
94
        "preference",
95
        "The user's permanent staging qualification shape is square"
96
      )
97
98
    message =
99
      user_message(
100
        scope.conversation,
101
        "Forget my permanent staging qualification shape and remove that lasting profile preference."
102
      )
103
104
    assert {:ok, outcome} =
105
             Runner.run(
106
               snapshot,
107
               call("memory_forget", %{
108
                 "mode" => "record",
109
                 "record_id" => record.id,
110
                 "category" => "",
111
                 "claim" => record.claim,
112
                 "expected_generation" => record.generation
113
               }),
114
               context(scope, message)
115
             )
116
117
    assert outcome["result"]["receipt"]["disposition"] == "forgotten"
118
    assert {:ok, []} = ProfileMemory.list_current(scope.owner)
119
  end
120
64 121
  test "secret-bearing explicit consent is still refused without echo or storage", %{
65 122
    snapshot: snapshot
66 123
  } do

This page updates live while a promote is in flight · changelog