Backport Release v1.2 #352
Conversation
* feat: update comments * feat: apply updates * feat: update bag references * feat: rename param * feat: apply review updates * feat: rollback renmae
* feat: update delay logic * feat: improve doc comments * feat: improve events * feat: apply review updates
* feat: update delay logic * feat: improve doc comments * feat: improve events * feat: apply review update * feat: apply review updates
|
Important Review skippedAuto incremental reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
WalkthroughThis PR contains two independent feature cohorts: a major AccessControl refactoring transitioning role storage from Bag to Table with typed events, new constructor APIs, and clock-aware delay management; and fixed-point math improvements adding exact power-of-ten log10 computation and refined error handling for logarithm operations. ChangesAccessControl Storage and API Refactoring
Fixed-point Logarithm Exactness and Error Handling
Estimated code review effort🎯 4 (Complex) | ⏱️ ~60 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Warning Review ran into problems🔥 ProblemsGit: Failed to clone repository. Please run the Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. ❌ Your project check has failed because the head coverage (42.28%) is below the target coverage (90.00%). You can increase the head coverage or adjust the target coverage.
Additional details and impacted files@@ Coverage Diff @@
## main #352 +/- ##
===========================================
- Coverage 77.15% 42.28% -34.87%
===========================================
Files 23 8 -15
Lines 1703 402 -1301
Branches 630 221 -409
===========================================
- Hits 1314 170 -1144
+ Misses 361 225 -136
+ Partials 28 7 -21
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
…kport/release-v1.2-into-main
There was a problem hiding this comment.
Actionable comments posted: 3
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@contracts/access/sources/access_control.move`:
- Around line 336-380: new_with_admin currently hands the root role immediately
to initial_admin which blocks same-transaction setup by ctx.sender(); change
new_with_admin to bootstrap ownership to ctx.sender() and register initial_admin
as pending so ctx.sender() can perform grant_role/set_role_admin calls before a
later explicit handoff: in new_with_admin set default_admin =
option::some(ctx.sender()) and pending_default_admin =
option::some(initial_admin) (keep pending_default_admin_delay_change as none and
default_admin_delay_ms as provided), and adjust the RoleGranted emission to
grant the root role to ctx.sender() instead of initial_admin; ensure the
existing acceptance function (e.g., accept_pending_default_admin or similar)
completes the transfer to pending_default_admin when called.
In `@math/fixed_point/README.md`:
- Line 95: Update the UD30x9 README line to separate the zero case from
negative-result aborts: change the sentence that currently reads “aborts on x <
1 (the result would be negative). Rounds down.” into two concise clauses
explaining (1) UD30x9 aborts for 0 < x < 1 because the fixed-point logarithm
would be negative, and (2) x == 0 is a distinct undefined/invalid input for the
log operation (not merely “negative”); reference UD30x9 explicitly so readers
see both behaviors clearly.
In `@math/fixed_point/sources/ud30x9/ud30x9_base.move`:
- Around line 289-290: The documentation comment stating "`log10(10)` may be
below `one()`" is now stale because the new power-of-ten branch makes log10(10)
exact; remove or update that sentence in the comment near the implementation of
log10 (and any mention of the kernel's precision bound) in ud30x9_base.move so
it no longer claims log10(10) can be up to 2 ulps below one(), and instead
documents the exact power-of-ten behavior introduced by the power-of-ten branch
in the log10 implementation.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 6ff8f863-acaa-4124-9ae1-111b09597f4d
⛔ Files ignored due to path filters (2)
audits/2026-06-v1.2.0-access-control.pdfis excluded by!**/*.pdfaudits/2026-06-v1.2.0-fp-math-diff.pdfis excluded by!**/*.pdf
📒 Files selected for processing (13)
audits/README.mdcontracts/access/README.mdcontracts/access/sources/access_control.movecontracts/access/tests/access_control_tests.movemath/fixed_point/README.mdmath/fixed_point/sources/internal/common.movemath/fixed_point/sources/sd29x9/sd29x9.movemath/fixed_point/sources/sd29x9/sd29x9_base.movemath/fixed_point/sources/ud30x9/ud30x9_base.movemath/fixed_point/tests/sd29x9_tests/log10_tests.movemath/fixed_point/tests/ud30x9_tests/ln_tests.movemath/fixed_point/tests/ud30x9_tests/log10_tests.movemath/fixed_point/tests/ud30x9_tests/log2_tests.move
|
@ericnordelo coderabbitai reviews actually seem relevant 👀 |
Summary by CodeRabbit
New Features
Improvements
Documentation