Skip to content

Commit ac49533

Browse files
author
Neo
committed
Phase 1C: agent_identity._verify fails closed (stop verifying the wrong thing)
The live agent_identity 'verify' tool set verified = (tx_count > 0) on the SHARED platform wallet — so ANY agent name returned verified:true once that one wallet had a single tx. A security check that passes for an unrelated reason is the same danger class as a fake success (reclassified 🚩). There is no per-agent attestation lookup yet, so this now FAILS CLOSED: verified:false with an honest reason. The platform-wallet figures remain as context only and are explicitly NOT the basis for verification. Suite 171 green. Flags OFF, OBSERVE. Held.
1 parent 0f610b9 commit ac49533

1 file changed

Lines changed: 27 additions & 22 deletions

File tree

runtime/blockchain/agent_identity.py

Lines changed: 27 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -68,33 +68,38 @@ async def _register(self, params: dict) -> str:
6868
return json.dumps(result, indent=2, default=str)
6969

7070
async def _verify(self, params: dict) -> str:
71-
"""Verify an agent's on-chain identity by checking the platform wallet on-chain."""
71+
"""Verify an agent's on-chain identity.
72+
73+
HONEST FAILURE (fail-closed): there is no per-agent attestation/registration
74+
lookup yet, so this CANNOT confirm a specific agent's identity. It must NOT
75+
report ``verified`` based on an unrelated condition — the previous version set
76+
``verified = tx_count > 0`` on the SHARED platform wallet, so ANY agent name
77+
passed once that one wallet had a single transaction. A check that passes for
78+
the wrong reason is the same danger class as a fake success. Until the real
79+
per-agent attestation check is built, this returns ``verified: False`` with an
80+
honest reason. The wallet figures below are CONTEXT ONLY and are explicitly not
81+
the basis for verification.
82+
"""
7283
agent_name = params.get("agent_name", "neo")
7384
try:
74-
# Verify the platform wallet exists on-chain with a real balance check
7585
balance_wei = self.web3.eth.get_balance(self.platform_wallet) if self.platform_wallet else 0
7686
tx_count = self.web3.eth.get_transaction_count(self.platform_wallet) if self.platform_wallet else 0
87+
except Exception:
88+
balance_wei, tx_count = 0, 0
7789

78-
return json.dumps({
79-
"agent": agent_name,
80-
"platform": "0pnMatrx",
81-
"verified": tx_count > 0,
82-
"platform_wallet": self.platform_wallet,
83-
"wallet_tx_count": tx_count,
84-
"wallet_has_balance": balance_wei > 0,
85-
"capabilities": self._get_capabilities(agent_name),
86-
"network": self.network,
87-
}, indent=2)
88-
except Exception as e:
89-
return json.dumps({
90-
"agent": agent_name,
91-
"platform": "0pnMatrx",
92-
"verified": False,
93-
"error": str(e),
94-
"hint": "Ensure blockchain.rpc_url and blockchain.platform_wallet are configured.",
95-
"capabilities": self._get_capabilities(agent_name),
96-
"network": self.network,
97-
}, indent=2)
90+
return json.dumps({
91+
"agent": agent_name,
92+
"platform": "0pnMatrx",
93+
"verified": False,
94+
"reason": ("Per-agent on-chain attestation verification is not available yet; "
95+
"this agent's identity cannot be confirmed. (Platform-wallet "
96+
"activity is shown for context only and does NOT verify any agent.)"),
97+
"platform_wallet": self.platform_wallet,
98+
"wallet_tx_count": tx_count,
99+
"wallet_has_balance": balance_wei > 0,
100+
"capabilities": self._get_capabilities(agent_name),
101+
"network": self.network,
102+
}, indent=2)
98103

99104
async def _attest_action(self, params: dict) -> str:
100105
"""Attest an action performed by an agent."""

0 commit comments

Comments
 (0)