Skip to content

docs: record why the inbox is per agent - #151

Merged
stormer78 merged 1 commit into
mainfrom
docs/per-agent-inbox-invariant
Aug 31, 2026
Merged

docs: record why the inbox is per agent#151
stormer78 merged 1 commit into
mainfrom
docs/per-agent-inbox-invariant

Conversation

@stormer78

Copy link
Copy Markdown
Contributor

The invariant behind #148#150, written down where the next person to touch reconcileInbound will find it. New section in CLAUDE.md, placed after "Advertisement is not availability" — that one is about reaching the agent, this one about being reached by it.

Why it earns a section rather than a code comment: a map where a string would do reads as over-built, and collapsing it back is a one-line change whose only symptom is one agent's consent requests quietly never arriving. Nothing fails, no check goes red.

The load-bearing fact isn't visible from any single file — it lives across store/holder-identity.ts, device/set-wake.ts and the absence of any publishing code: a v4 holder is a did:key with no service endpoint and the wallet publishes its relay to nobody, so there is no discovery path. An executor pushes through the relay it knows, and the wallet hears it only if it happens to be listening there. Everything else follows from that and is arbitrary without it — the pair keying, the source provenance field, and the two orderings (setInbox owning the read-modify-write; forgetting an entry inside the reconcile rather than where the agent is forgotten).

It also records the approver case, which is the sharper one: that session carries task-consent/request, so a wrong relay is a gated action that never got its human check (R7.2).

Also corrects the intro paragraph — the wallet runs one inbound session per onboarded agent, not "the" session.

Docs only; no code, no behaviour change.

The invariant behind #148#150, written down where the next person to
touch `reconcileInbound` will find it. Without it a map where a string
would do reads as over-built, and collapsing it back is a one-line change
whose only symptom is one agent's consent requests quietly never
arriving.

The load-bearing fact is not obvious from any single file: a v4 holder is
a `did:key` with no service endpoint and the wallet publishes its relay
to nobody, so there is no discovery path — an executor pushes through the
relay IT knows, and the wallet hears it only if it is listening there.
Everything else (the pair keying, the provenance field, the two
orderings) follows from that and looks arbitrary without it.

Also corrects the intro: the wallet runs one inbound session per
onboarded agent, not "the" session.

Signed-off-by: Glenn Gore <glenn.g@affinidi.com>
@stormer78
stormer78 merged commit 2fd8b16 into main Aug 31, 2026
3 checks passed
@stormer78
stormer78 deleted the docs/per-agent-inbox-invariant branch August 31, 2026 06:49
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