Skip to content

fix(llm): resolve role names through nested governance calls - #459

Merged
spalen0 merged 2 commits into
mainfrom
inf-role
Nov 5, 2026
Merged

spalen0 merged 2 commits into
mainfrom
inf-role

Conversation

@spalen0

@spalen0 spalen0 commented Nov 5, 2026 •

Copy link
Copy Markdown
Collaborator

Batch role grants such as Infinifi's grantRoles(bytes32[],address[]) skipped role-name resolution because the collector only inspected scalar bytes32 parameters. Wrapped grants also lacked target-specific role context, while unrelated salts could inherit role labels resolved elsewhere on the same target.

Resolve scalar, array, and tuple role arguments through supported timelock execution/scheduling wrappers and Yearn Executor scripts. Group mixed-case target addresses before source lookup, and carry each inner target's role names into both the prompt and call-flow report. Annotate only role functions, preserve raw payloads on decoding failures, and leave unknown-target calldata unlabelled. The Infinifi priority-hook batch now identifies MANUAL_REBALANCER for both hooks and FARM_SWAP_CALLER for the long timelock. Scheduled payloads are inspected without changing the execution-only context used by protocol adapters.

Validation:

  • 262 tests passed, plus 19 subtests across role resolution, all explainer tests, report rendering, governance wrappers, and protocol context.
  • Regression coverage uses real ABI encoding for direct and wrapped grants, nested wrappers, Executor scripts, duplicate payloads with different targets, non-role salts and composite fields, nested role arrays/structs, mixed-case addresses, depth limits, decoding failures, and both public explainer entrypoints.
  • Ruff lint and formatting checks passed; ty passed for the changed files.
  • Local main matches origin/main; its 109 corresponding tests passed, plus 2 subtests. Reproduced the bug there without modifying the checkout.

@spalen0 spalen0 changed the title fix(llm): resolve role names in batch role grants fix(llm): resolve role names through nested governance calls Nov 5, 2026
@spalen0
spalen0 marked this pull request as ready for review November 5, 2026 10:31
@spalen0
spalen0 merged commit f38f40c into main Nov 5, 2026
3 checks passed
@spalen0
spalen0 deleted the inf-role branch November 5, 2026 10:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant