From 69d98c43c89f541c926b9559b75b5207a061a052 Mon Sep 17 00:00:00 2001 From: Greg Soucy Date: Sun, 26 Apr 2026 21:29:46 -0400 Subject: [PATCH] [runtime] add judge-facing integration comments Why: Help ETHGlobal judges quickly locate ENS resolution, verification, receipt generation, and schema validation integration points via direct line links. Contract impact: none --- server.mjs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/server.mjs b/server.mjs index 76986a6..9d04d8d 100644 --- a/server.mjs +++ b/server.mjs @@ -1013,6 +1013,8 @@ function makeFlowReceiptId() { } function makeReceipt({ execution, result, status = "success", error = null, traceId, receiptId }) { + // CommandLayer receipt generation + // Wraps an agent verb execution into a signed, verifiable receipt. let receipt = { status, entry: execution.entry, @@ -1797,6 +1799,8 @@ app.post("/verify", async (req, res) => { let ensExpect = null; if (wantEns) { + // ENS signer resolution (VerifyAgent.eth integration) + // Resolves cl.sig.pub / cl.sig.kid from the signer ENS name so receipts can be verified without hardcoded keys. const signerForEns = String(proof?.signer_id || runtimeConfig.signerId || "").trim(); const ensOut = await fetchEnsSignerBundle({ signerName: signerForEns, refresh }); @@ -1866,7 +1870,8 @@ app.post("/verify", async (req, res) => { }); } - // 2) verify signature/hash via runtime-core + // CommandLayer receipt verification + // Rebuilds the canonical receipt hash and verifies the Ed25519 signature. let v; try { v = verifyReceiptEd25519Sha256(runtimeCoreReceipt, { @@ -1899,6 +1904,8 @@ app.post("/verify", async (req, res) => { const sigErr = signatureValid ? null : v?.reason || "verify failed"; + // Schema validation for verifiable agent receipts + // Confirms receipt structure matches the declared CommandLayer schema. // 3) schema validation (optional + edge-safe) let schemaOk = null; let schemaErrors = null;