Repository navigation
Start an agent's evidence at its first bond (ADR 0013) - #334
Merged
Merged
Conversation
Registration costs only gas, yet every registered agent adds payment-scan calls on each chain and a daily bond read. Under ADR 0013 the oracle reads and scans only agents that have bonded, found from the identity registry's first AgentStatusUpdated(did, Active) log, and a payment before an agent's first bond is refused as before_bond on every path. Credits already held stay. Docs only; not built. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The registry scan now reads AgentStatusUpdated with registrations and transfers, and an agent's first Active log is its bond. The epoch and the payment scans read only bonded agents. A payment before the bond is refused as before_bond by both scans, POST /attest and peer import, and POST /attest answers 503 bond_not_seen while it cannot tell yet. Arc testnet's one registration from before PendingBond counts from its block. A saved state catches up its status logs once, a read at each registration still without a bond. /health reports registered and bonded agents. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Nov 16, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
ADR 0013 and its build: an agent's evidence starts at its first bond, so a registration that never bonds costs the oracles no reads (F-01 of the 16 November security review).
What changes
AgentStatusUpdatedin the calls it already makes. An agent's firstActivelog is its bond (bondedBlock). The identity registry allowsActiveonly with the minimum stake, and nothing returns toPendingBond.before_bond. A payment before the first bond is refused by the scan, by a payment chain's scan (by the bond block's time), byPOST /attest(402) and by peer import. The bond's own block counts.POST /attestanswers 503bond_not_seenwhile the registry scan has not read far enough to tell. A slashed agent is taken as before.Active, counts from its block. One agent is affected: the demo agent, registered 18 September, with 11 payments./healthreportsagents: { registered, bonded }.Checked on the live operators first. Neither the primary nor the checker holds a credit settled before its agent's first bond (2,568 and 2,562 events), and all 47 registrations have one. So the rule changes no evidence already held on testnet.
Tests.
oracle/first-bond.test.js, end to end:Plus unit tests in
chain.test.js(first bond, the catch-up and its skips, the testnet rule),payment-scan.test.js,payment-chains.test.jsandpayment-chain-outcomes.test.js(the payment-chain attest answers). Oracle suite withCI=1: 1559 of 1559 pass.scripts/check-docs.mjsis ok. A second Claude agent reviewed the diff and found no bug in the rule; that is not an independent review. Its points on slashed agents, a test that did not reach the catch-up, and the untested payment-chain path are fixed here.Rollout. Deploy both testnet operators in one window between epochs (they run at about :57 and :58), as with #301. Then compare their
/healthagent counts, and run the pre-bond credit check again: it should still find none.🤖 Generated with Claude Code