Autonomous code-review agent console
CodeGuardian is a minted 0G Agentic ID / ERC-7857-style iNFT. It audits allowlisted TypeScript fixtures, proposes a patch, runs a critic loop, writes memory, checks policy upgrades, commits a trace, and emits a certificate.
Validate JSON parse failures before using parsed payloads.
Added a JSON-shape validation heuristic to future reviews.
memory sha256:b71a518d1fadea56c7f0838e9fbd1c6a46bc043995a461f3d282ebf29b81e879trace sha256:5157e4d713781a2b08fba1012a38ba2483196e2ae935b458ea6a3f06c5626f0cVerify authorization before returning private records.
Added an authorization-check heuristic to critic reviews.
memory sha256:568cb2b7f31804eef4dbe0231c5bb82ffb3e669a4a726943bc7e6d8c4f835ba2trace sha256:0b1397e29e41dd2e2738c8ffdbb2ac027f8bae46173a763c79cee8a769418ad4Wrap awaited side effects in explicit error handling.
Added an async side-effect handling pattern to persistent review memory.
memory sha256:a2398bbb0b7b561c7fa891cf7a808f81991996cc1bce29b01dc0d6010ac11c72trace sha256:655cb96747a2141f62ddc78a16e4b2c39fd5a80e413358bc40ba7bdc125f3c7czg-live-analysis-95bb0f30184dA failed awaited side effect can escape without explicit classification or recovery.
zg-live-critic-a83aa740043aThe patch addresses the issue by ensuring that any errors from awaited side effects are handled explicitly. However, it is important to provide more context on how the failure result will be used and ensure that the error handling is robust and clear. Consider adding detailed error messages and specifying the type of failure for better debugging and maintenance.
Wrap the awaited side effect in explicit error handling and return a typed failure result.
diff --git a/examples/codeguardian/fixtures/unchecked-async-side-effect.ts b/examples/codeguardian/fixtures/unchecked-async-side-effect.ts
@@
export async function saveAuditResult(
id: string,
writeAudit: (id: string) => Promise<void>,
): Promise<SaveResult> {
- await writeAudit(id);
+ try {
+ await writeAudit(id);
+ } catch (error) {
+ return {
+ ok: false,
+ reason: error instanceof Error ? error.message : "audit write failed",
+ };
+ }
return { ok: true, id };
}
critic-loop 0.1.0 -> 0.1.1
After detecting a missing authorization guard, CodeGuardian added an authorization-check heuristic to future critic reviews.
old sha256:c88eb62cb4deeaa9dce46fa512f30276a4d6c93620e51da886f87d0474f9e4a9new sha256:105b17eb2621b0c6591e097f1fc0ebd81b8c6596b46efe2b7404e420173de20cCopy roots and tx identifiers into StorageScan when a direct deep link is unavailable.
sha256:228dab69761d19637632d73801a34d899064ce51f3ffd82d6fc182bb2432aee40x291e15a3960ae9993a7fbd6a921df9793ea098109fafc9106326fa801c379408sha256:6289903e00f2e42448eb3cad30d322fcd4e1b3e3af54dd37f35a863a864f0bcd0x56f2475226993ff79654b246f0fcb3a947a9b877321f6487f869b07ff54df7d4sha256:a2398bbb0b7b561c7fa891cf7a808f81991996cc1bce29b01dc0d6010ac11c720xe814c589530f4ae5e338ba17d087cb9785ab145e222f636cc173f207a4651c9asha256:59f86560dcb00747fcb04368daeb8d0318f75ac4928180636db1e37e445362e90xe8cfb1ea8be06e7989ea8a8a2eb366303e63629addea0b09299b0c934c7c8037sha256:3536c2223ad4ce203d583a7b55a73c249aded63430eebbc53a3989be2eadaf4e0x8b37187dd39bfdd69ad293bbb8be7e338ff57a54b5159fb37535225a0fc18ea3sha256:8e573883fd043ae0e58b566e12d96c682306c89a8b08a7c3c9a77cac6e6e2db10x7e846170285fe403b349bb474e42a830ca17690076a7b95c243f9662d66be272Live Galileo writes recorded during contract deployment, demo iNFT seeding, registry updates, and certificate issuance.