fix(protocol): address review findings on Proposal0020 - #22016
Conversation
- Fix the pre-approval getProposal cast command in Proposal0020.md: the documented signature omitted the uint16 approvals return value, so the command failed to decode (reproduced against mainnet proposal 21). - Replace the stale verify-mode instruction in the generated action file with the getProposal comparison, and regenerate Proposal0020.action.md (action calldata unchanged). - Revert with InvalidMode on an unrecognized MODE instead of exiting 0. - Assert the new member is an EOA in checkBaseline. - Correct post-execution step 2: a replacement agent registers the seat key via setPublicKey, not setOwnPublicKey (which requires being listed). - Document what removeUnused actually prunes (accountList only; the appointerOf/agent mappings of removed members persist harmlessly). - Clarify which action ordering is contract-enforced (Action 1 before Action 3) versus defensive (Actions 4-5 after Action 3). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NXZ8HWv6KYVV3fgC6MGJiv
🐋 DeepSeek Code Review🟡 Warnings
🔵 Suggestions
Automatically triggered on PR update • model: |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 96cc8ae47e
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
|
||
| error MissingEnv(string name); | ||
| error CheckFailed(string what); | ||
| error InvalidMode(string mode); |
There was a problem hiding this comment.
Move the custom error to the end of the contract
Adding InvalidMode alongside the declarations extends the existing layout violation in this non-interface Solidity file; place the custom error declarations in the contract's final custom-errors section as required by the protocol coding standard.
AGENTS.md reference: packages/protocol/AGENTS.md:L41-L45
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Fixed in 2b57591 — all three custom errors (MissingEnv, CheckFailed, InvalidMode) now live in a final Custom Errors section, resolving the pre-existing layout violation as well.
Generated by Claude Code
…per standard - checkPostState now asserts every account still enumerated by the EncryptionRegistry is a listed signer, making the removeUnused claim auditable in the dryrun instead of prose-only; readRaw becomes internal so subclasses can decode non-scalar returns. - Move the custom errors to a final Custom Errors section per the protocol coding standard (packages/protocol/AGENTS.md). - Link the registry implementation from the spec's Action 6 note. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NXZ8HWv6KYVV3fgC6MGJiv
|
Re the DeepSeek suggestions, disposition in 2b57591:
Generated by Claude Code |
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NXZ8HWv6KYVV3fgC6MGJiv
…ertion Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NXZ8HWv6KYVV3fgC6MGJiv
|
Re the latest DeepSeek round — no changes made, with reasons:
Generated by Claude Code |
ggonzalez94
left a comment
There was a problem hiding this comment.
LGTM. Just left one small comment
| !readBool(L1.DAO_SIGNER_LIST, "isListed(address)", L1.SC_GUSTAVO_GONZALEZ), | ||
| "new member already listed" | ||
| ); | ||
| check(L1.SC_GUSTAVO_GONZALEZ.code.length == 0, "new member is not an EOA"); |
There was a problem hiding this comment.
should we check this explicitely?
There was a problem hiding this comment.
If "this" is the EOA property — it is now checked explicitly, on this exact line (code.length == 0, added by this PR).
If you mean the agent precondition (that SC_GUSTAVO_GONZALEZ is currently the Taiko Labs seat's appointed agent): that one is deliberately not pinned in checkBaseline, because it's expected to change before execution — Taiko Labs may rotate at any point after creation, and the dryrun must stay green in both worlds. simulatePreExecution handles it conditionally (rotates only if an appointer is still set), and checkPostState asserts the invariant that actually matters (appointerOf(SC_GUSTAVO_GONZALEZ) == address(0) once listed). An explicit appointerOf == SC_TAIKO_LABS baseline check would fail the rehearsal after a legitimate early rotation. Happy to add it as a warning-style log instead in a follow-up if you'd like visibility without the hard failure.
Generated by Claude Code
|
Independent review: approve ✅ I re-verified this PR from scratch — deployed mainnet sources (Etherscan-verified), live chain state, and a clean toolchain reproduction (pnpm 9 + repo-pinned Foundry v1.4.2). Findings confirmed fixed
Independent reproduction
Nits (non-blocking)
No functional concerns; with respect to the proposal calldata this is a docs/tooling-only change. Ship it. |
Applies the actionable findings from the in-depth review of #22010, stacked on
revamp-security-council.Fixes
Proposal0020.md): the documentedgetProposalcast signature omitted theuint16 approvalsreturn value, so the exact command approvers are told to run before approving failed with an ABI decode error. Corrected signature verified working against mainnet proposal 21.verify-mode instruction:BuildDirectProposal.logProposalActionstill wrote "run theverifymode" (dropped in 6d57357) into every generated action file. The template now points at thegetProposalcomparison from the spec, andProposal0020.action.mdis regenerated — all six action To/Value/Data fields are byte-identical; only the instruction text changes.MODE:run()now reverts withInvalidMode(mode)instead of logging and exiting 0.checkBaselinenow assertsSC_GUSTAVO_GONZALEZ.code.length == 0.setPublicKey(the agent path) instead of implyingsetOwnPublicKey, which revertsMustBeListedfor a non-listed agent.removeUnused()accuracy: the Action 6 comment and spec now state it prunes the account enumeration only; the removed members'appointerOf/agent mappings persist (harmlessly).Verification
MODE=bogusnow fails the script (InvalidMode("bogus")).MODE=printregeneration: committedProposal0020.action.mdmatches; calldata diff vs the previous file is empty.MODE=l1dryrunon a mainnet fork: green end-to-end, including the new EOA baseline assertion.forge fmtwith the repo config; no lines exceed 100 chars.🤖 Generated with Claude Code
https://claude.ai/code/session_01NXZ8HWv6KYVV3fgC6MGJiv
Generated by Claude Code