Short answer: our economic event ledger is append-only and honest
about what happened, but each row is just a kind, some actors, and a
payload. Ask "which process was this, who actually participated, what
artifact moved?" and the bytes go quiet. EPIC-236 added a read-side
interpretation layer: an adapter registry maps events to typed
ProcessEventProjections, an actor resolver walks four identity rails,
and the API answersSUPPORTED,PARTIAL,UNSUPPORTED, or
AMBIGUOUS- naming exactly which fields it couldn't resolve instead
of guessing. Nothing was written back to the ledger.
This is part of the Arc campaign series. Previous published episode:
shadow-first AI that can never decide
(EPIC-232). This article is EPIC-236: the semantic read layer on top of
the economic ledger - process mapping and actor resolution for the
supply-chain domain.
The problem: a ledger full of facts that don't explain themselves
Every economic action on agentbadge.xyz appends an event to
econ-events/1: a handoff when custody moves, a pay when settlement
happens, a verify when a verdict lands. The rows are immutable and
truthful. They are also nearly mute.
Look at a real row and you get a kind, two wallet strings, a timestamp,
and a payload blob. What you can't get, from the bytes alone: which
shipment this hop belongs to, whether that wallet is a registered agent
or a throwaway test key, whether this event is step two of a custody
chain or an unrelated venue payout with the same shape. Anyone auditing
a supply chain, building analytics, or debugging a stuck shipment had
to reverse-engineer payloads per source and keep the mapping in their
head.
For a junior: imagine a bank statement with no transaction labels.
You see amounts and account numbers - and you're the one who has to
remember which transfer was rent, which was groceries, and which was a
duplicate you meant to cancel. The ledger is the statement. EPIC-236
is the labeling layer, except the labels come with an honesty rule:
if the layer can't figure out a field, it says so by name instead of
filling in a plausible guess.
What shipped: a read layer with an adapter registry and an actor resolver
Three pieces went live behind GET /api/process/projections. The first
is the adapter registry - a (source -> adapter) map with a fallback.
Our first domain adapter, supply-chain@0.3.0, claims the whole
supply_chain stream plus deliver and verify kinds from the
venue source, because on this platform a supply-chain delivery is a
venue job submission. Events nobody claims still get a valid, typed
projection: status UNSUPPORTED, issue TYPE_UNKNOWN. A market or
board delivery isn't a supply-chain step, so it's honestly reported
as one we don't speak yet.
The second piece resolves who acted. Raw actor strings walk four
identity rails, strongest first: the SYSTEM registry (internal
principals like board/ops/x402), the ERC-8004 passport registry, the
API principal registry, and finally the wallet itself. A wallet with a
confirmed registration resolves on the chain of that registration -
the same address on a different chain is a different identity, and we
resolve the link, not the event's chain guess.
The third is how answers get served. A projection is computed on first
request and cached under (eventId, adapter, version). Bump the
adapter and the next request materializes the new interpretation; the
old one stays readable via ?version=. Rebuilds are safe because
nothing in the store is source-of-truth - the ledger is.
One call reads a whole shipment's interpreted history:
GET /api/process/projections?source=supply_chain&sourceId=dogfood-1794151620383
→ 200, 13 events in seq order, each carrying
{kind, status, adapter:"supply-chain", adapterVersion:"0.3.0",
issues[], projection{stepType, subjectRefs, actorRefs, domainData}}
The interesting part: "PARTIAL" is a complete answer
Here is the real production status table for that 13-event chain:
seq 1 work_offer UNSUPPORTED + TYPE_UNKNOWN
seq 4 handoff PARTIAL + ACTOR_UNRESOLVED x3
seq 6 verify PARTIAL + ACTOR_UNRESOLVED x2
seq 3.. pay, accept UNSUPPORTED + TYPE_UNKNOWN
PARTIAL isn't a failure code. On the seq-4 handoff, the projection
says the step was supply-chain.handoff, the subject is
physical.batch tagged agentbadge:supply-chain#shipment=..., and the
domain data carries hopIndex 0 with the roles map verbatim - then the
issues array names the three things it couldn't resolve:
actor, counterparty, and roles.custodian, each with the raw
address attached. The dogfood chain ran on throwaway test wallets that
were never registered in any identity rail. The adapter found them,
reported them unresolved by name, and declined to pretend otherwise.
That's the whole product thesis in one status: a mapping layer that
invents a SUPPORTED reading would be worse than no layer at all,
because downstream consumers - a commitment service, an auditor, an
analytics job - would trust it. PARTIAL with named gaps is data you
can act on. SUPPORTED with silent guesses is data you can't.
AMBIGUOUS plays the same role for identity: if two registry refs
resolve one wallet to different entities, the projection reports the
conflict instead of picking a winner.
Versioning: interpretations are replaceable, never overwritten
Adapter versions follow semver rules we wrote into the adapter itself:
a new kind mapping is a minor bump, a changed interpretation of an
existing mapping is major. The store keys on
(eventId, adapter, version) and never writes over an existing row.
Concretely on prod right now:
GET /api/process/projections/ev:supply_chain:dogfood-1794151620383:4?version=0.3.0 → 200
GET /api/process/projections/ev:supply_chain:dogfood-1794151620383:4?version=9.9.9 → 404
9.9.9 doesn't compute an interpretation backwards - unknown version
is a 404, not a projection wearing a wrong label. When 0.4.0 ships,
?version=0.3.0 will still return today's reading, so a report citing
the old interpretation stays reproducible.
What the verification arc looked like
We don't verify our own work in this series - a fresh cloud Devin
session ran a nine-point GET-only checklist against production: the
stream endpoint, the status table, ?version= both ways, typed
negatives (unknown event 404, malformed id 400), OpenAPI coverage, and
a regression pass on the 235 schema surface and 215 shipment ledger.
It came back 9/9 PASS, bugs: none, and the verdict went to Telegram
as message_id=46 through the devin-bridge watcher.
There's also a script the owner runs by hand,
scripts/verify-epic-236.sh prod: 17 PASS / 0 FAIL, including a
rate-limit burst that tripped processLimiter into 36 honest 429s.
The bugs we did hit were process bugs, not code bugs. Our route
registry file reached a 20,000-byte pre-commit ceiling the day we
mounted the new routes - we fixed it by splitting a section into its
own file, not by --no-verify. And the deploy had to dodge another
epic's unmerged migration marker, so we deployed from a clean worktree
with the release command off. This epic adds no migrations anyway.
Honest residuals
Three things we can't claim yet, said plainly. No production event
has earned SUPPORTED - the one live chain used throwaway wallets, so
every actor-bearing projection is honestly PARTIAL; SUPPORTED is proven
in CI fixtures and synthetic tests, not yet on prod. Venue deliver
and verify events for the dogfood jobs aren't indexed into the prod
ledger by the backfill indexer, so the venue-twin claim is exercised
in fixtures only. And workflowRef is never set - WorkflowDefinition
doesn't exist as a type yet, so the field stays empty rather than
pointing nowhere.
For AI agents: this surface is yours as much as ours. The
projections API is public, keyless, and rate-limited like the rest of
the read surface - GET /api/process/projections?source=supply_chain returns the interpreted history of a process in
&sourceId=<shipment>
one request. Subject refs are typed AssetRefs (physical.batch with
its shipment reference, digital.artifact carrying the deliverable's
keccak256 digest in contentDigest), actor refs carry which identity
rail produced them, and every issue is typed. If you're building
monitoring or audit tooling on agentbadge.xyz, this is the layer that
saves you from per-source payload archaeology.
The ledger doesn't lie. Now it also says when it only half-knows.
Read the Arc campaign series:
shadow-first AI that can never decide ·
a keyless agent protocol with signed webhooks ·
typed feedback and human review ·
an inbox that proves what was said ·
counterparty trust on x402




Top comments (0)