Skip to content

Namespaces can register signed webhooks that announce memory changes without their content - #95

Merged
zlareb1 merged 69 commits into
mainfrom
feat/memory-webhooks
Oct 21, 2026
Merged

zlareb1 merged 69 commits into
mainfrom
feat/memory-webhooks

Conversation

@zlareb1

@zlareb1 zlareb1 commented Oct 20, 2026 •

Copy link
Copy Markdown
Member

Changelog category (leave one):

  • New Feature

Changelog entry (one or two sentences a user of Loom can read without the diff; the release pull request collects these into the release notes):

A namespace admin can register signed webhooks (webhook.register, webhook.list, webhook.remove, webhook.deliveries) that are told when memory in the namespace is written, revised, tombstoned, restored, redacted or erased. Each event carries ids, the memory key and the identity tuple, never a value, tags or evidence; the receiver reads the memory back with its own token. A key reaches every registered receiver, so the docs tell writers to keep secrets and facts out of keys. Copies into the namespace (memory.copy_to, memory.cross_promote) and namespace.restore from a snapshot send no event.

Why

A product built on Loom, such as a chat service that shows each user what the assistant remembers, has to poll today to learn that memory changed. A push that carries the content would move authorization from read time to a URL someone registered. These webhooks push only the fact of a change (event type, org, namespace, key, id, version, identity tuple, actor, request id, timestamp); the receiver fetches with memory.get_by_id under its own token, so what it may read is decided exactly as for any other read.

Scope and risk

Design:

  • Signing, delivery and outbound URL checks are shared with the task inbox webhook. The secret-name rule (LOOM_WEBHOOK_SECRET_<ORG>__<NAME>), Standard Webhooks signing (HMAC-SHA256 over id.timestamp.body, same header names), the pinned-address target (vet_host, connect to the vetted address, no redirects) and the POST moved from server/tasks/ to server/core/webhooks.py; the task worker now calls it. It still accepts http and private hosts are still refused, but four things differ for the task inbox webhook: one 10 s deadline now covers the name lookup as well as the connection and status line, the answer's body is no longer read, a secret is read with surrounding whitespace dropped, a whsec_ value is decoded with every whitespace character removed and then strict base64, so a value with other characters outside the base64 alphabet (url-safe - and _, say), which decoded leniently before, now holds the inbox (warned once) instead of signing, and an undecodable one holds it instead of counting a failure (as does a non-ASCII whsec_ value or a value that is not UTF-8), and a refusal in its log no longer names the resolved address.

  • Append-only outbox on the write path, no network. These call announce once the memory rows are in (the embedding insert runs beside them), and before or whatever the result of the later steps (the lift, the vector retire, the high-sensitivity fence, supersession, peer links, the audit row), so a failure in that tail does not lose the event (a retry of memory.set or memory.bulk_set with the same fields is a restatement and sends nothing, while a retry that recomputes a relative expiry (ttl_seconds, a type's retention, the sensitive-data retention) moves expires_at and is memory.revised; a memory.set of the same value with a new status (a restated rejected, superseded or conflicted row is served again), type, tags, expiry, confidence, valid_at, valid_to or sensitivity is memory.revised, each compared at its column's precision (Float32 confidence, whole-second DateTime); memory.bulk_set skips an entry whose value equals the live row's, whatever its other fields, so it writes and sends nothing; a retry of memory.update writes and announces a new version; a key repeated in one batch is memory.revised; a rollback that revives a tombstoned key is memory.restored; a change a background pass made carries actor worker:<name>): memory.set (and every op that writes through it: procedures, profiles, learnings, decisions; a proposal is announced as memory.written when memory.proposal_decide or the auto policy accepts it, never when it is written or rejected), memory.bulk_set (once its memory rows are in, even when the gathered embedding insert, the lift, the vector retire or the fence fails), memory.update / update_by_id, memory.delete (once its tombstone is in, even when retiring the summaries and vectors derived from it fails), memory.delete_version (announced where every finish passes, so a deferred 503 finished by a retry or the delete_version_check worker is announced too), memory.restore, memory.redact (the redacted version, and the newest scrubbed version of each profile key built from that memory), memory.clear (each row it clears, at the version it held; only for a namespace with a webhook that takes memory.tombstoned does it read those rows back, straight after the memory mutation and before the embeddings one, in one streamed read in sort-key order with one outbox insert per 1000 rows, so a namespace without one pays the two counts it paid before; a failed read-back is noted as a degradation and does not fail the clear), conflicts.resolve (the side it tombstones, announced straight after the tombstone and before the kept side's status change), memory.dedup_resolve (the side it tombstones, at the tombstone's version), a completed run's retention (demote or expire, each row revised, in one insert), the sensitivity sweep (each relabelled row revised, in one insert made in a finally, so a pass cut short still announces the rows it relabelled), the retroactive sweep of blacklist.add and blacklist.sweep (each live row it tombstones, in one insert), namespace.rollback (each insert chunk as it lands), the source of memory.move (revised with keep_redirect, tombstoned without it), and the expiry sweep. For each webhook of the namespace that takes the event, one loom.memory_webhook_outbox row is inserted once and never rewritten. Which namespaces have webhooks is a per-process copy of loom.memory_webhooks held in server/core/polled_copy.PolledCopy and re-read every LOOM_MEMORY_WEBHOOK_REFRESH_SECONDS: a namespace with no webhook pays no insert, and the first write after each interval waits for one registry read. Until a process's first read lands, every write waits for it rather than taking the empty copy for "no webhook"; a write queued behind a read takes its result, even a failed one, and once a copy is loaded a write that finds a refresh under way takes the copy it has. A failed read keeps the last copy. announce reads the copy once per call, however many changes it carries, so a failed first read is noted once per write as a degradation and writes announce nothing until a read lands: the next read is due an interval later, or at once after a register or remove here. A failed outbox insert is logged and noted as a degradation and never fails the write (same stance as the audit row). Not announced, listed in the docs: summaries memory.delete retires, consolidation, observations and distillation, period digests, touch, pin/unpin, lock/unlock, verify, apply, a proposal and its rejection, the status change conflicts.resolve and memory.dedup_resolve make on the rows they keep, the supersessions a write makes of other rows (older same-key rows under the newest_wins policy, the peers a refines verdict supersedes; the new row's own event is sent), the status a conflict verdict lands after the write, inline or from the deferred judge (conflicted on the row and its peers, duplicate on the row; the write's own event is sent), the supersession undo in memory.restore, memory.copy_to / cross_promote, namespace.restore from a snapshot, entity backfills, typed records, saved chat messages (conversation.*, including the saved-message management merged from main). A merge, a dry run and a refused write send nothing.

  • Worker memory_webhook_deliver writes only attempt rows. loom.memory_webhook_attempts holds event id, status, attempt count, next attempt, last HTTP status and error, and no key or identity; the newest version per event wins. Each pass:

    • marks dead in one INSERT … SELECT each the events of webhooks removed in the last LOOM_MEMORY_WEBHOOK_REMOVAL_WINDOW_LEASES lease lengths (10, about 30 minutes by default; "the webhook was removed": an event of a removed webhook is never due, so after that window it waits for the TTL and costs no statement) and the events that waited 2.5 days for a secret that is unset or not usable ("no usable secret"), so webhook.deliveries says why before the 3-day TTL drops them; and the events of every live webhook that a receiver has not taken within 2.75 days ("not delivered in time"), so a receiver that is down, or a backlog that never reached its turn, has every event dead before the TTL, with LOOM_MEMORY_WEBHOOK_MAX_ATTEMPTS as a second cap;
    • reads due events only of the webhooks it can send to (registered, a usable secret, not cooling down) through the outbox's sort key (org, namespace, webhook_id, occurred_at), in turns: row_number() OVER (PARTITION BY webhook ORDER BY occurred_at), then ORDER BY turn, occurred_at, at most 10 per webhook and 40 in all;
    • appends a lease, then POSTs 4 at a time and one at a time per webhook (each webhook's events go in sequence), so a slow receiver holds one slot; once an event holds a slot, right before its POST, it checks that the webhook was not removed since the pass began (a point read of its registration on the table's sort key; a webhook.remove during a pass stops its later POSTs; only one already in flight goes out), the webhook's cooldown (5 failed POSTs in a row, LOOM_MEMORY_WEBHOOK_FAILURES_BEFORE_COOLDOWN: a cooldown doubling from a minute, _COOLDOWN_SECONDS, to an hour, _MAX_COOLDOWN_SECONDS, reset by a 2xx, in-process and best effort) and the key's history in loom.memory_versions (an erased key, including by an N-1 saga that does not know the outbox, goes dead unsent; only an erasure landing during the POST itself can let one out);
    • runs each webhook's turn as a task in an asyncio.TaskGroup until a deadline taken at the start of the pass (asyncio.timeout_at; 100 s after the start: the ack deadline times the larger of the per-pass cap over the concurrency and the per-webhook share, since one webhook's POSTs go one after another, and cut to LOOM_MEMORY_WEBHOOK_DELIVER_RESERVE_SECONDS, 20 s, short of the pass deadline, so the reserve covers the one insert after the POSTs; the reads before them come out of the POST budget, and a due-event read that grows with the outbox backlog needs a higher LOOM_MEMORY_WEBHOOK_DELIVER_MAX_PASS_SECONDS), so an error in one turn cancels the rest before the pass returns and no POST outlives it; collects each outcome as it finishes and inserts them once, in a finally, so a pass cut by the budget or by an error still records what it sent while the unfinished keep their lease. A failed pre-send check (the registration read or the history read) is logged, counted as a partial failure of the pass (pass_context.note_failure) and leaves that event leased without stopping the pass. Every time (the lease's end, a retry's due time, recorded_at) is read from naive_utc_now() when it is needed, so a backoff runs from the failure, not from the pass's start. Outcomes: delivered, pending with backoff (LOOM_MEMORY_WEBHOOK_BACKOFF_STEPS_SECONDS, 5 s, 30 s, 2 min, 10 min and 30 min by default, then hourly, the ceiling being LOOM_MEMORY_WEBHOOK_MAX_BACKOFF_SECONDS), or dead after LOOM_MEMORY_WEBHOOK_MAX_ATTEMPTS (60 by default, about 2.3 days of retries; the 2.75-day deadline marks an event dead whatever it is set to, so a lower value only gives up sooner). A dead row keeps the attempt count and last HTTP status of the attempts before it. A pass that dies before that insert leaves its leases to expire, and the re-send carries the same event ids.

    Every webhook with work gets its first POST of a pass before any webhook gets a second, while fewer than 40 webhooks have work and within the budget; one webhook gets at most 10 POSTs per pass, one after another.

    The delivery ceiling is about 40 events per pass, a pass every 5 s while there is work: some 8 events a second per deployment, stated in the docs.

  • Announcing takes (event, change) pairs and inserts once per call site, so a bulk write, a rollback and an expiry batch each write one outbox insert.

  • One deadline per POST. server/core/webhooks.post wraps the name lookup, the connection and the status line in one asyncio.timeout(10 s) and streams the response, closing it without reading the body; every delivery has its own client but shares one TLS context, built on first use. The secret-name rules live in server/core/webhook_secrets.py, a module with no I/O, so the wire models that check a secret_ref do not import the HTTP client. The task inbox webhook shares it. A whsec_ secret is decoded with its whitespace removed (a value wrapped across lines still signs); one that is empty or not then base64 is "not usable" (an empty key signs what anyone can sign) (read_secret returns None and logs the variable name only); the memory worker, webhook.list / register (secret_present) and the task worker all handle it. Webhook refusals no longer name the resolved address (tracker refusals still do), logs name the host only, and registration refuses a URL with a user name or password.

  • Knobs. Every tunable value of the feature is a setting with a floor, read where it is used, or says on its line why it is not one. Settings: the per-pass cap (40), the per-webhook share (10), the concurrency (4), the ack deadline (10 s, passed to server/core/webhooks.post as a parameter so the task worker keeps its own 10 s), the backoff steps (5 s, 30 s, 2 min, 10 min, 30 min; each above 0), the backoff ceiling (an hour), the pass deadline (120 s, the registry row's max_pass_setting), the reserve kept for the insert after the POSTs (20 s, validated below the pass deadline), the lease margin (60 s), the removal window in leases (10) and the per-namespace cap (LOOM_MEMORY_WEBHOOK_MAX_PER_NAMESPACE, 10: every memory write inserts one outbox row per webhook). The POST budget (100 s) and the lease (the pass deadline plus the margin, so a crashed pass's leases outlive it) are computed from them at call time. The 2.5- and 2.75-day deadlines are derived from the tables' 3-day TTL (store.KEEP_DAYS less 12 and 6 hours). Constants, each with its reason: the page of rows memory.clear reads back and announces at once (an in-process buffer), and the registry reads' safety bound, which all three registry reads use. Webhook secrets are environment variables a registration names, so they cannot be settings: server/core/webhooks.read_secret is the one place either webhook plane reads them (os.environ when no env is given), and tests/unit/test_env_reads.py lists that one file. The family's prefix is declared in NON_SETTINGS_ENV_PREFIXES beside NON_SETTINGS_ENV, so the unknown-variable warning at boot skips it, and docs/reference/environment.md documents it as one LOOM_WEBHOOK_SECRET_<ORG>__<NAME> row, which tests/unit/test_environment_reference.py checks for every declared prefix. The delivery worker warns once per secret name that is unset or not usable, naming the variable and the org prefix it must start with.

  • Registration. One per URL per namespace: registering the same URL again replaces its secret and events, so the op is idempotent. At most LOOM_MEMORY_WEBHOOK_MAX_PER_NAMESPACE per namespace (10), and secret_ref must be one of the org's own names. The URL check runs under the same 10 s deadline. It reads, then writes: two registrations of one new URL at the same moment can make two webhooks, one past the cap (documented; webhook.remove takes either). All four ops are ADMIN; register and remove are audited.

  • Ids. An event id is derived from (webhook, event type, memory id, version), or the erasure id for memory.erased, so a repeat of one event to one webhook (a retry, overlapping passes, a delete_version check run twice) shares its webhook-id. A webhook id is new at each registration: registering the same live URL again keeps its id, but after a remove it is a new webhook that does not revive the old events.

  • Outbound URL rules. https only unless LOOM_MEMORY_WEBHOOK_ALLOW_HTTP; loopback, private, link-local and multicast targets are refused at registration and at every delivery unless LOOM_MEMORY_WEBHOOK_PRIVATE_HOSTS names the host (an allowlisted host is connected to by name).

  • Erasure. The outbox is a census row with a saga step (memory_webhook_outbox.delete) in both scopes that deletes the scope's events. The census does not count memory.erased rows: they are the saga's own announcement (no key, user -), so a resumed or repeated census of an erased namespace does not report them as residue. The attempts table is classified NO_MEMORY_CONTENT: it holds event ids, counters and HTTP statuses, no key or identity, and is read for 3 days and dropped within about 4, so deleting the events alone leaves nothing to send. Nothing the worker writes afterwards names a key, so an erasure racing a pass leaves nothing deliverable. memory.erased is sent after the census passes of any erasure saga and before its completed checkpoint, so a crash in between reopens the saga, which sends it again under the same event id, (erasure.request, collection.delete, code.repo.remove) and carries only the erasure_id, with actor - and an empty request id, so it does not name who asked; a namespace erasure goes to that namespace's webhooks, a user erasure to every webhook of the org that takes the event, including namespaces that never held the user. So that a receiver cannot turn that id into the user id, erasure.status of a user_id saga now answers only the org-wide view from a token of the saga's org (a flat org admin or platform admin); other flat tokens of the org get found=False, and a platform admin whose token names another org gets found=False as before. The registry table is configuration (NO_MEMORY_CONTENT) and stores no principal id: who registered a webhook is in the audited webhook.register row, so a user erasure leaves nothing of the registrant there. A deleted collection keeps its registrations, so the purge's memory.erased still reaches them; the name never becomes a collection again (collection.create answers 409 over its soft-deleted directory row, and namespace.register refuses col- names), so they open nothing. A secret is the org's, not one webhook's, by design: the docs and security.md tell a receiver to check org and namespace in the signed body.

Alternatives considered: a materialized view from loom.memory into the outbox cannot tell a first write from a revision, never sees redaction or erasure, and would copy every write of every namespace; deriving events in the worker from loom.memory_versions misses erasure and redaction the same way.

Tables: migration 063_memory_webhooks.sql adds loom.memory_webhooks (ReplacingMergeTree(version)), loom.memory_webhook_outbox (MergeTree sorted by (org, namespace, webhook_id, occurred_at, event_id)) and loom.memory_webhook_attempts (MergeTree sorted by (event_id, version)), both partitioned by day with a 3-day TTL and ttl_only_drop_parts = 1. It takes 063, the next free number on main; if another open PR's 063 merges first, this file renumbers. An event not delivered within 3 days is no longer read; a day's part is dropped once its last row is 3 days old, so a row leaves the disk within about 4 days.

Read cost at 1,000,000 events, measured on a private ClickHouse seeded with 1M events over about 2.9 days across 200 webhooks in 20 namespaces, all but 500 delivered (two attempt rows per delivered event, 1,999,500 in all), with every outbox read keeping the earliest copy of an event (ORDER BY … occurred_at LIMIT 1 BY event_id); system.query_log, three runs each:

Read read_rows read duration memory
worker's due read (due_events, 200 webhooks): the outbox events less the settled-or-waiting id set 2,999,500 172.8 MiB 509–564 ms 319–350 MiB
the attempt counts of the chosen events ≤ 819,200 ≤ 29.9 MiB 6–7 ms 4.5 MiB
an admin's webhook.deliveries for one namespace 2,130,572 129.9 MiB 52–62 ms 112 MiB
the "not delivered in time" mark_dead over 200 webhooks (bounded by the 2.75-day deadline) 2,677,730–2,678,230 124.3 MiB 130–147 ms 96 MiB
the same statement without the bound (the removed-webhook form, which runs only over webhooks removed in the removal window) 3,999,500–4,000,000 206.8 MiB 705–809 ms 627–644 MiB

Keeping the earliest copy costs the due read about 10% in duration and nothing in memory or rows: the same seed with a bare LIMIT 1 BY event_id ran in 472–484 ms with 319–349 MiB, and with no dedupe in 443–474 ms with 322–342 MiB; webhook.deliveries is unchanged (49–52 ms, 112 MiB either way). The outbox side of webhook.deliveries reads only the namespace's events; the attempts side is a scan, since event ids are hashes spread over every granule. Reproduce: seed with INSERT INTO loom.memory_webhook_outbox SELECT … FROM numbers(1000000) and the matching attempts inserts, call store.due_events, store.namespace_deliveries and store.mark_dead with a client that sets log_comment, then SELECT read_rows, read_bytes, query_duration_ms, memory_usage FROM system.query_log WHERE log_comment = '<tag>' AND type = 'QueryFinish'. The server and its data were removed afterwards.

memory.clear read-back, measured on a ClickHouse 26.9 started for it: 200,000 rows in one namespace, 100,000 of them u1's, cleared with user_id = u1 and a subscriber. The streamed read is one statement that read 104,064 rows in 176 ms and handed over 100 pages. The keyset loop it replaces took 101 statements for the same rows, each reading 105,088–105,216 rows, 10,622,464 rows and 2,861 ms in all, so its cost grew with the square of the rows cleared. Reproduce: insert the rows with INSERT INTO loom.memory (org, namespace, agent, user_id, session_id, memory_key, version) SELECT … FROM numbers(200000), call lifecycle.bulk_tombstone_scope with an on_tombstoned callback, then sum read_rows and query_duration_ms from system.query_log for the read-back statement. The server and its data were removed afterwards.

Not in this PR: a replay op for dead events, and a dashboard page.

Compatibility, rollout and rollback

  • Wire: new ops webhook.register, webhook.list, webhook.remove, webhook.deliveries (experimental, not in any MCP roster). No field changes. erasure.status of a user_id saga answers found=False to a flat token without the org-wide view (viewer, writer, namespace admin), where it answered before: its status names the erased user. A platform admin whose token names another org still gets found=False for every scope, so the change only narrows access. Namespace and namespace-list sagas are unchanged.
  • Rolling upgrade: an N-1 replica writes no outbox rows, so a memory write it serves sends no event; it never reads the new tables. An N-1 erasure saga does not touch the outbox, so webhooks are registered only once no N-1 replica serves: no outbox row exists while an N-1 replica can complete an erasure. Documented as rule 14 in docs/architecture/rolling-upgrades.md.
  • Behaviour break for task inbox webhooks: a whsec_ secret is now decoded as strict base64, so a value with characters outside the standard base64 alphabet (url-safe - or _, stray punctuation) holds its inbox after the upgrade, with one warning, where it signed before. A value that is not UTF-8 is not usable either.
  • Operator steps: before upgrading, check that each LOOM_WEBHOOK_SECRET_* value with the whsec_ prefix is standard base64 (whitespace allowed) and re-encode any that is not; nothing else is needed to keep today's behaviour. To use memory webhooks, call webhook.register only once no N-1 replica serves, and set each webhook's secret in LOOM_WEBHOOK_SECRET_<ORG>__<NAME> on the servers. New settings: LOOM_MEMORY_WEBHOOK_DELIVER_ENABLED, _DELIVER_INTERVAL_SECONDS, _DELIVER_IDLE_INTERVAL_SECONDS, _DELIVER_MAX_PASS_SECONDS, _DELIVER_RESERVE_SECONDS, _LEASE_MARGIN_SECONDS, _REMOVAL_WINDOW_LEASES, _MAX_POSTS_PER_PASS, _POSTS_PER_WEBHOOK, _DELIVER_CONCURRENCY, _ACK_TIMEOUT_SECONDS, _BACKOFF_STEPS_SECONDS, _MAX_BACKOFF_SECONDS, _MAX_ATTEMPTS, _FAILURES_BEFORE_COOLDOWN, _COOLDOWN_SECONDS, _MAX_COOLDOWN_SECONDS, _REFRESH_SECONDS, _MAX_PER_NAMESPACE, _ALLOW_HTTP, _PRIVATE_HOSTS. Each numeric one has a floor (a count, cap or interval of at least 1, a timeout or backoff above 0, a pass deadline of at least 30 s); DELIVER_ENABLED and ALLOW_HTTP are switches and PRIVATE_HOSTS is a host allowlist, so the three have none; BACKOFF_STEPS_SECONDS is a comma-separated list of one or more steps, each above 0. They are the MemoryWebhook section of server/settings/catalog.py; the per-pass cap, the per-webhook share, the concurrency, the ack deadline, the backoff steps and ceiling, the attempts cap, the three cooldown settings, the lease margin, the removal window, the registry refresh interval and the per-namespace cap are LIVE (read when used). The four ops' p99 budgets are entries of the budgets table, each with its reason. CI's integration job sets ALLOW_HTTP, PRIVATE_HOSTS=127.0.0.1 and REFRESH_SECONDS=1 for the local receiver; a server without them skips the delivery tests with the reason, unless the test process has them too (as in CI), where a refused URL fails the tests.
  • Rollback: reverting leaves the three tables (migrations are never reverted). N-1 never reads or erases the outbox rows written before the rollback, so an erasure N-1 completes leaves those rows (keys and ids, no content); they and the attempts expire within about 4 days, and N's worker, rolled forward again, sends none of an erased key's events.

Tests

  • SQL on clickhouse-local (tests/unit/test_memory_webhooks_sql.py, against the tables in schemas/schema.sql): due_events returns the unsettled due events in turns (a newest delivered attempt settles, a live lease waits, a pending one past its time is due), with per_webhook and limit applied; mark_dead settles only its webhooks' unsettled events, with join_use_nulls 0 and 1, and with a deadline only the older ones; namespace_deliveries shows each event's newest state (a lease as pending), filtered by status and webhook, never another namespace's; webhook_removed_since is true only for a removal of that webhook since the given time, not an earlier one, a live webhook or the same id in another namespace; keys_with_history reads loom.memory_versions; an event announced twice is due, listed and marked dead once, and one announced at two times reads as its earliest; a dead row keeps the attempt count and last HTTP status; with a deadline, an old event already delivered is not marked dead.
  • Unit (tests/unit/test_memory_webhooks.py): a cold registry read that fails announces nothing, is shared by writes queued behind it, and is tried again after a register here; each delivery interval, cap, concurrency, timeout, backoff, cooldown, refresh, reserve and lease-margin setting refuses 0 and the pass deadline refuses 29 s; a reserve equal to the pass deadline is refused; the POST budget counts from the start of the pass, so a slow due read leaves the POSTs only what remains; the backoff follows its steps and levels off at its ceiling, and a step of 0, below 0 or not a number, or a schedule with no step, is refused; a register or remove made while a read is under way has the next write read again rather than wait out the interval; a loaded copy serves while a refresh is under way; an always-503 receiver with a 15-event backlog over simulated days has every event dead before the TTL; two writes on a cold registry copy both see the webhook after one read; an unparsable URL is refused; the receiver's last status survives a lease and a cooldown wait; a backoff is measured from the failure on the worker's clock (tests/unit/clock_fake.py); a failing pre-send check leaves its event leased and the pass going; an error in one webhook's turn stops every POST before the pass returns and still records the finished; a pass cut at its budget still records its finished deliveries (these tests order events with asyncio.Events, and the budget tests block a POST on an event only the budget ends); an erasure while an event waits for a slot stops its POST; turns go round every webhook, so a fresh event of another org goes out in the first pass beside six backlogged webhooks, and a slow receiver never has more than one POST in flight; a malformed secret is not usable, its value is not logged and a trailing newline is dropped; an empty whsec_ value is not usable; the body's keys are exactly the fixed set with no value, tags or evidence; repeats share an event id and nothing else does; attempt rows name no key or identity; the registry copy is read again, kept when a read fails, and read again after forget_registry; outbox rows only for subscribed webhooks, and no statement for a namespace without them; a failed insert never raises; a background pass is worker:<name>; a memory.erased event names no actor or request id; memory.set's decision (written, revised, none for a restatement, also when the live row holds the Float32 read-back of the confidence and a whole-second valid_at; revised for the same value with a new type, tags, expiry, confidence, valid_at, valid_to or sensitivity, and for a restated rejected row); a blacklist.add sweep announces each row it tombstones at the tombstones' version; memory.dedup_resolve announces the side it tombstones at the tombstone's version and nothing for keep_both; run retention announces each row it demotes or sets to expire at the version it wrote; the POST budget fits one webhook's whole turn when the concurrency or the per-webhook share is raised, and stops short of the pass deadline; memory.set and memory.update whose supersession fails after the insert, a memory.set whose embedding insert fails, a memory.update and a memory.restore whose high-sensitivity fence fails, and a memory.update relabelled high and cancelled during its inserts still writes the fence, a memory.delete whose retire of derived rows fails, and a memory.bulk_set whose embedding insert fails still leave their event (tests/unit/test_memory_set_chunks.py, tests/unit/test_memory_update_by_key.py, tests/unit/test_restore_mirrors_all_types.py, tests/unit/test_memory_bulk_parity.py); an accepted proposal is announced as written and a rejected one not at all (tests/unit/test_proposals.py); bulk_set written/revised, a repeated key revised, an unchanged batch silent; delete_version finished and moved-on; rollback revised, restored and tombstoned; memory.move with keep_redirect; expiry tombstone and demote; run_saga announces memory.erased to the namespace, the list or the org before its completed checkpoint, and nothing on failure; a receiver's flat viewer, writer or admin token reads found=False for a user erasure's id, and an org admin reads its status (tests/unit/test_erasure_authz_matrix.py holds the full matrix); signature; 5xx backoff then dead; a missing secret waits uncounted and dies as "no usable secret" past 2.5 days; a malformed whsec_ is not usable and its value is not logged; an unset secret is warned about once, naming the variable and the org prefix; a removed webhook's backlog dies in one batch, a webhook removed during a pass gets no POST after the one in flight, and one removed before the window is passed to no statement; an erased key goes dead unsent, keeping the receiver's last status from the attempts before it; another org's secret is never read; a waiting, a removed and an unanswering webhook with 100-event backlogs do not delay another namespace's event, and the unanswering one cools down; an overlapping pass skips leased events; an erasure between a pass's read and its writes leaves nothing to send; the worker's reads are sequential; a receiver that drips its status line is cut at the deadline, an endless body is never read, a slow name lookup is inside the deadline; URL rules (inward addresses refused without naming them, http, user info, allowlist); the 10-per-namespace cap and a URL registered again keeping its id; a URL registered again after a remove gets a new id. tests/unit/test_memory_clear.py: a clear in a namespace without a subscribed webhook reads no row, one with a subscriber reads the rows its mutation stamped in one streamed read and announces them a page at a time, before the embeddings mutation, so a clear whose embeddings step fails still announces them, and a failed read-back is noted and the clear still answers. A sensitivity sweep cancelled partway announces the rows it relabelled before the cancel, in one insert (tests/unit/test_memory_webhooks.py). tests/unit/test_erasure_verify.py (clickhouse-local): the census counts a namespace's memory.written outbox row and not its memory.erased row. tests/unit/test_task_webhook_deliver.py covers the task worker on the shared sender, including an undecodable secret now holding its inbox. tests/unit/test_profile_redaction.py: memory.redact leaves a memory.redacted outbox row for the memory and one for the profile key built from it, at its newest scrubbed version. A unit-suite fixture keeps the registry copy empty, since the unit fakes have no such table.
  • Integration (tests/integration/test_memory_webhooks.py): signed memory.written and memory.tombstoned reach a receiver on 127.0.0.1 with no value in the body; a 500 is retried and delivered, visible through webhook.deliveries; another namespace's admin can neither remove nor list a webhook and a writer is refused all four ops; every write path leaves its event type and version in the outbox (set new and revised, bulk new and revised, update_by_id, delete, restore, delete_version, redact); memory.clear and a conflicts.resolve announce the rows they tombstone, and a restatement on either path, a dry run and a blacklisted write leave none; a user erasure deletes that user's events and the pass sends only the other user's; a namespace erasure is announced by its id. Each test waits for the server's processes to announce writes by polling probe writes in a probe namespace, not by sleeping. tests/unit/test_task_webhook_deliver.py adds a newline-terminated whsec_ secret and one wrapped across two lines, each signing as the secret.
  • make format lint clean at this head. The unit suite (with the clickhouse-local tests) and the integration suite run in CI's pytest unit + coverage and pytest integration (ClickHouse service) jobs; their result is on this PR's checks.

AI assistance in the code (leave one; writing this description with AI is fine):

  • AI-generated (Claude Code): the diff was written by an agent; the design, the write-path hook points, the erasure classification and the test results were checked by reading the code and by CI's runs of the suites above.

  • I can explain every line of this diff and how it interacts with the rest of Loom.

Checklist

  • make format-check and make lint pass; make typecheck and make test-unit run in CI; the integration suite passes if server behaviour changed.
  • Generated files are regenerated in this PR, not by hand: the SDK op tables, docs/reference/configuration.md and the docs/reference/ tables (python scripts/codegen/docs_reference.py), the reach manifest, schemas/schema.sql (make schema-dump) and the Codex plugin copies (python3 scripts/codegen/agent_plugin_sync.py).
  • A new migration is additive and numbered after the latest on main; no merged migration is edited.
  • A behaviour change to any file a plugin ships (hooks/, lib/, bin/, skills/, .mcp.json, the Codex plugin-defaults.json) bumps both plugin manifests' version, and no other open PR uses that version.
  • The frontend builds (npm --prefix frontend run build) and its tests pass, if frontend/ changed.
  • Docs under docs/ describe the system as it now is, and this description names any operator steps and wire changes.
  • Repository text has no dates, people, host names, internal namespaces, ticket or decision numbers; the history goes in this description (tests/unit/test_public_copy.py).
  • Commits are signed off (git commit -s), as CONTRIBUTING.md asks.

🤖 Generated with Claude Code

zlareb1 and others added 30 commits October 20, 2026 16:08
…without their content

webhook.register / list / remove / deliveries let a namespace admin name a URL
that is told when memory is written, revised, tombstoned, restored, redacted
or erased. The write paths leave ids-only rows in loom.memory_webhook_outbox;
the memory_webhook_deliver worker signs and POSTs them with retries and a dead
state. Signing, delivery and the outbound address checks move from the task
plane to server/core/webhooks.py and serve both.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: zlareb1 <[email protected]>
…pt log

The worker appends attempt rows (event ids and counters only) instead of
rewriting outbox rows, so an erasure in flight leaves nothing to send; it
skips events whose key history is gone; a missing secret waits uncounted.
Rollback, move redirects, expiry and deferred delete_version finishes are
announced. Migration renumbered to 059.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: zlareb1 <[email protected]>
Signed-off-by: zlareb1 <[email protected]>

# Conflicts:
#	docs/reference/operations.md
#	sdk/typescript/src/generated/ops.ts
#	tests/unit/test_schema_baseline.py
Each pass takes only the webhooks it can send to, at most ten events of
each, four POSTs at a time; removed and secretless backlogs are marked dead
in one statement; a webhook failing five POSTs in a row cools down. One
deadline covers each POST from the name lookup to the status line and the
answer body is never read. Event and webhook ids are derived, so repeats
share an id and a re-registered URL starts afresh. Restatements send
nothing, a rollback revival is memory.restored, background changes carry a
worker actor.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: zlareb1 <[email protected]>
Signed-off-by: zlareb1 <[email protected]>

# Conflicts:
#	docs/reference/operations.md
#	sdk/typescript/src/generated/ops.ts
#	tests/analyzer/shapes.txt
…l name it

The shared delivery read becomes an id set plus a point lookup of attempt
counts (a third of the memory at 1M events), and the schema reference is
regenerated after the merge.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: zlareb1 <[email protected]>
Due events are ranked per webhook so every webhook's oldest goes first; a
webhook's events are sent one after another and the cooldown and key history
are checked before each POST; outcomes are inserted once per pass. Secrets
drop surrounding whitespace and warn once when unusable; retries default to
60 attempts within the 3-day keep. The delivery statements run on
clickhouse-local in tests.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: zlareb1 <[email protected]>
Signed-off-by: zlareb1 <[email protected]>

# Conflicts:
#	server/memory/app/bulk_set.py
…before each POST

Outcomes are collected as they finish under a 100 s budget and inserted once;
the cooldown and erased-key checks run after an event takes its slot.
announce takes (event, change) pairs, one insert per call site. The erasure
step reads ids by namespace list and tags each attempt batch apart. One TLS
context; one warning for a malformed task secret; docs state the per-webhook
ceiling and that a receiver checks org and namespace.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: zlareb1 <[email protected]>
Each webhook's turn is a task in an asyncio.TaskGroup under the 100 s budget,
with the attempt insert in a finally; a failed check leaves its event leased.
Every time is read from naive_utc_now() when needed, so a backoff runs from
the failure. Failures count pending POST outcomes only. The erasure step's
attempt batches get an explicit mutation tag part, and a namespace list is
read and deleted with one predicate.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: zlareb1 <[email protected]>
…very delete path

run_lightweight_delete takes the tag part too, and the batch test checks the
mutation tags inside a saga. A test cancels a pass from outside mid-POST.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: zlareb1 <[email protected]>
…etes events only

due_events returns each event's newest status and error, and lease and
cooldown rows carry them. loom.memory_webhook_attempts holds no key or
identity and expires in 3 days, so it is classified as no memory content and
the erasure step deletes only the outbox. The TLS context is built on first
use, and the secret-name rules move to server/core/webhook_secrets.py.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: zlareb1 <[email protected]>
… copy is awaited

Events a receiver did not take within 2.75 days are marked dead, so a down
receiver's backlog never outlives the outbox unexplained. Callers on a cold
registry copy wait for the first read. url_refusal answers an unparsable URL;
the redact event uses memory_change on a history target that carries its org
and id; integration tests poll for announced probe writes instead of sleeping.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: zlareb1 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: zlareb1 <[email protected]>
Signed-off-by: zlareb1 <[email protected]>

# Conflicts:
#	tests/analyzer/shapes.txt
#	tests/unit/test_schema_baseline.py
…ads dedupe repeats

The not-delivered-in-time mark_dead bounds its attempt subquery by the
deadline (a third of the rows at 1M events). due_events and
namespace_deliveries read one outbox row per event id. A loaded registry copy
serves while a refresh runs, and a write queued behind a failed cold read
takes its result. HistoryTarget requires org and memory_id; _send returns
plain attempt rows with its failure count; the probe webhook is removed.
Migration renumbered to 064 after the merge with main.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: zlareb1 <[email protected]>
…its last status

mark_dead reads its events once, deduped like the other outbox readers, and
builds that subquery itself. A registry change made during a refresh has the
next write read again. The attempts cap no longer has an upper bound: the
delivery deadline ends every event before the TTL.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: zlareb1 <[email protected]>
memory.clear reads the rows its mutation tombstones and announces each at
the version it held; conflicts.resolve announces the side it tombstones at
the tombstone's version.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: zlareb1 <[email protected]>
…bhook secrets

The cooldown after failed POSTs is three settings; the delivery intervals
are bounded. The pass's POST cap, concurrency, budget, lease and deadlines
say why each is not a setting, and the budget is derived from the others.
read_secret reads the process environment when no env is given, so the
memory webhook modules no longer read it. Each webhook op's budget says
what it pays for.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: zlareb1 <[email protected]>
The memory webhook settings move into the catalog's Memory webhooks
section; the attempts cap and the cooldown settings are LIVE. The webhook
ops' budgets join the budgets table, the delivery worker declares its pass
deadline as MAX_PASS_SECONDS, and server/core/webhooks.py is the file that
reads webhook secrets from the environment.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: zlareb1 <[email protected]>
… is a documented variable

The delivery worker's per-pass cap, per-webhook share, concurrency, ack
deadline, backoff ceiling and pass deadline are settings in a MemoryWebhook
catalog section, read at call time; the POST budget and the lease are computed
from them. core.webhooks.post takes the ack deadline as a parameter, so the
task worker keeps its own. The secret and delivery deadlines derive from the
tables' TTL. A failed history check counts as a partial failure of the pass.

The unknown-variable warning skips LOOM_WEBHOOK_SECRET_* names, which the
environment reference documents as one row, and the task worker reads its
secrets through core.webhooks.read_secret, so only that module reads the
environment.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: zlareb1 <[email protected]>
The two dead-letter deadlines and the lease margin carry their reason, the
namespace registry read uses the shared registry bound, the per-namespace cap
states what it bounds, the four delivery settings name memory webhooks in their
descriptions, and the registry refresh interval is live. The environment
reference says the webhook secret family is skipped by prefix.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: zlareb1 <[email protected]>
…ges; delivery reserve and lease margin are settings

memory.clear runs its counts and mutations as before and, only when a
webhook of the namespace takes memory.tombstoned, reads back the rows its
mutation stamped, 1000 at a time in sort-key order, one outbox insert per
page. The mutation stamps one timestamp so the read-back finds exactly
its rows, including one written between the count and the mutation.

The registry copy keeps the time of its last read and compares it with
memory_webhook_refresh_seconds on every write, so a changed interval
applies at once.

memory_webhook_deliver_reserve_seconds (validated below the pass
deadline) and memory_webhook_lease_margin_seconds replace the two
worker constants.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: zlareb1 <[email protected]>
…r values

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: zlareb1 <[email protected]>
zlareb1 and others added 12 commits October 21, 2026 02:31
…cs say the key is sent

- Before each POST the delivery worker checks that the webhook was not
  removed since the pass began; such an event is marked dead with "the
  webhook was removed", so only a POST already in flight goes out.
- security.md and writing.md name the memory key among what an event
  carries and tell writers that a key reaches every registered receiver.
- memory_change and MemoryRef move to server/memory/domain/webhook_events.py;
  conflicts.tombstone_ids builds its change with it instead of a copy.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: zlareb1 <[email protected]>
…once no N-1 serves

The revision write's gather and announce sit inside the try, so the high
fence in its finally runs on cancellation too. Rule 12 now gates
webhook.register on no N-1 replica serving, as rule 11 does for
collections, and states what a rollback leaves. The body's key list lives
in the tests that pin it, the docstring fits the line limit, two setting
comments are cut to two lines, and the docs name blacklist.sweep and say
when an event can go unannounced. An integration test pins the admin
ops' namespace scope.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: zlareb1 <[email protected]>
The base64 part drops every whitespace character before the strict decode,
so a value wrapped at 64 characters decodes as it did before.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: zlareb1 <[email protected]>
memory_webhook_removal_window_leases (live, default 10, at least 1) sets how
many event leases after a webhook.remove delivery passes still mark the
removed webhook's events dead, so an operator whose worker leader was down
longer than the default can widen it. Three docstrings and the Change
webhooks section of the memory architecture page are reflowed.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: zlareb1 <[email protected]>
The check before each POST read every removed registration of the
deployment and tested membership in Python. It is now a point read on
loom.memory_webhooks' sort key (store.webhook_removed_since); the
once-per-pass mark_dead window keeps removed_webhooks. The POST budget
rule is stated once, in _post_budget_seconds.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: zlareb1 <[email protected]>
A memory.bulk_set or a rollback chunk looked the copy up once per change,
so a cold process whose first read failed noted the unread registry, and
recorded a provider-health failure, once per change. The list of writes
that send no event is now a bulleted list.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: zlareb1 <[email protected]>
erasure.status of a user_id saga now answers only the org-wide view (a
flat org admin of the org or a platform admin), since memory.erased
carries that saga's id to every webhook of the org. An empty whsec_
secret is not usable, so no event is signed with an empty key.

The blacklist sweep fakes take the cascade's version and the first test
checks the event carries it; the removal window setting's floor is
tested. The docs list conflict verdict statuses among the changes that
send no event and say when a webhook secret is not usable.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: zlareb1 <[email protected]>
Signed-off-by: zlareb1 <[email protected]>

# Conflicts:
#	docs/architecture/security.md
…is required

- announce_erasure sends actor "-" and an empty request id; _outbox_row takes
  them from the change when it carries them.
- The user_id erasure.status test asserts the org-wide rule: a flat viewer
  reads nothing, an org admin reads the saga.
- Each derived deadline in the delivery worker carries its own marker.
- A failed pre-send check is logged and noted as that, not as the history read.
- WebhookInfo.created_at is a datetime, never None; the SDK op tables follow.
- The registry copy uses PolledCopy's current constructor and note_change.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: zlareb1 <[email protected]>
The memory webhook migration moves to 062, after 061_profile_schemas;
schema.sql, the schema and operations references and the SDK op tables
are regenerated. memory.redact announces its target after main's profile
scrub.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: zlareb1 <[email protected]>
…ackoff steps are a setting

- memory.redact sends memory.redacted for every profile key with versions
  built from the redacted memory, naming the newest scrubbed version.
- LOOM_MEMORY_WEBHOOK_BACKOFF_STEPS_SECONDS (live) holds the retry waits
  before the ceiling; every step must be over 0.
- The worker tests order events with asyncio.Event instead of sleeps, and
  the budget tests block on an event only the budget ends.
- The profile redaction tests build HistoryTarget with org and memory_id.
- Regenerated the analyzer shapes for the merged schema.sql and the
  settings reference, schema and example.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: zlareb1 <[email protected]>
zlareb1 and others added 13 commits October 21, 2026 06:46
…red writer

announce took the actor and request id from the change mapping when it had
them, and a memory version row carries its writer's actor forward, so an
expiry tombstone, a restore, a rollback, an accepted proposal and a move
redirect named the historical writer. The outbox row now takes both from the
call; announce has keyword overrides, which memory.erased uses for its blank
actor and request id.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: zlareb1 <[email protected]>
… an empty webhook backoff schedule is refused

A restatement with a new sensitivity changes what Loom serves for the key, so it is no
longer treated as a reinforcement. parse_backoff_steps refuses a schedule with no step.
find_history_target selects org and memory_id instead of patching them into the row.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: zlareb1 <[email protected]>
…kips the saga's own erasure events

- The memory webhook worker warns once per secret name that is unset or not
  usable, naming the variable and the org prefix it must start with.
- The webhook secret family is declared in NON_SETTINGS_ENV_PREFIXES beside
  NON_SETTINGS_ENV; the environment reference test checks a row per prefix.
- The outbox census row does not count memory.erased rows, which the saga
  writes into the erased scope after its census.
- The _announce_set docstring and the restatement paragraph of writing.md
  are rewritten and reflowed.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: zlareb1 <[email protected]>
…ret only returns the key

The migration is now 064_memory_webhooks.sql. The three long webhook setting
comments are cut to two lines, and the generated settings files follow.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: zlareb1 <[email protected]>
… the changes they wrote

tombstone_cascade_by_ids draws the tombstone version after its read loop again
and returns each tombstoned row's change at that version; tombstone_by_id
returns the same. blacklist.sweep, conflicts.resolve and memory.dedup_resolve
announce from that return value, so no caller draws a version before the rows
are read. The PolledCopy docstring covers both a fail-closed check and the
best-effort webhook registry.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: zlareb1 <[email protected]>
…its default is pinned

The delivery pass parses memory_webhook_backoff_steps_seconds where it uses it, so
the live-settings check sees the read; the Settings helper method is gone. The
settings defaults snapshot pins the backoff steps default. The missing-secret warning
and the list of unsecured webhooks come from one loop.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: zlareb1 <[email protected]>
…ment above it

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: zlareb1 <[email protected]>
…de rule is 14

The webhook tables take migration 063, the next number after 062 on main, and the
webhook rule follows main's extraction-policy rule as 14. The delivery page no longer
says an event is delivered at least once: an event can be marked dead. The set path's
value phase reads the restatement from its write state.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: zlareb1 <[email protected]>
…ow_redirects

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: zlareb1 <[email protected]>
…ments

memory.clear reads back the rows it tombstoned in one streamed read handed
over in 1000-row pages, so the scope is scanned once instead of once per
page. The sensitivity sweep announces every row it relabelled in one insert
from a finally, so a pass cut short still announces them. A user_id saga's
erasure.status needs a token of the saga's org before the org-wide check, so
a platform admin of another org keeps found=False. The receiver fixture
closes its socket. The webhook migration is 064.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: zlareb1 <[email protected]>
…stead of failing the pass

read_secret caught only binascii.Error, so a non-ASCII whsec_ value
(ValueError) or an environment value with non-UTF-8 bytes
(UnicodeEncodeError) raised and stopped every memory webhook delivery
pass. It now catches ValueError, the base of both.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: zlareb1 <[email protected]>
…webhook id by name

063 is the next free number on main. The cooldown lookups name the webhook id
instead of indexing the Hook tuple.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: zlareb1 <[email protected]>
@zlareb1
zlareb1 merged commit e685b4f into main Oct 21, 2026
20 of 22 checks passed
@zlareb1
zlareb1 deleted the feat/memory-webhooks branch October 21, 2026 09:40
zlareb1 added a commit that referenced this pull request Oct 21, 2026
…ercise (#120)

* The tests #95 left red follow the code they exercise

- test_memory_sensitivity calls _set_prepare_value with the write alone: #95 moved
  restated onto _SetWrite.
- test_memory_webhooks builds its SweepCandidate with the sort_key #89 made required.
- test_settings_env_contract probes memory_webhook_backoff_steps_seconds with a valid
  list of steps, as it does other validated strings.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: zlareb1 <[email protected]>

* The sweep candidate's sort key comes from its own identity tuple

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: zlareb1 <[email protected]>

---------

Signed-off-by: zlareb1 <[email protected]>
Co-authored-by: Claude Opus 5.5 <[email protected]>
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.

1 participant