Skip to content

🐛 app: fix proposal block override time#980

Merged
cruzdanilo merged 1 commit intomainfrom
simulate
Apr 28, 2026
Merged

🐛 app: fix proposal block override time#980
cruzdanilo merged 1 commit intomainfrom
simulate

Conversation

@dieguezguille
Copy link
Copy Markdown
Member

@dieguezguille dieguezguille commented Apr 28, 2026

Summary by CodeRabbit

  • Bug Fixes
    • Fixed proposal block override timestamp calculation to ensure accurate block timing during proposal simulations and delayed executions.

@dieguezguille dieguezguille self-assigned this Apr 28, 2026
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 28, 2026

Walkthrough

This PR introduces a patch-level update for the @exactly/mobile package that fixes the proposal block override time. The changeset metadata is added, and the simulation utility is updated to add an extra 1 to block timestamp calculations for both initial and delayed execution blocks.

Changes

Cohort / File(s) Summary
Changeset Metadata
.changeset/wild-geckos-remain.md
New changeset file declaring a patch-level update for @exactly/mobile with a note about the proposal block override time fix.
Simulation Utility
src/utils/useSimulateProposal.ts
Updated block timestamp calculations in useSimulateBlocks by adding + 1n to both the initial block override and delayed execution block override computations.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~7 minutes

Possibly related PRs

Suggested labels

bug

Suggested reviewers

  • franm91
  • cruzdanilo
🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'fix proposal block override time' directly corresponds to the main change: a fix to block timestamp calculations in useSimulateProposal affecting proposal block override behavior.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch simulate

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1


ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 96713f67-6504-4c0c-8400-7589b8ed726a

📥 Commits

Reviewing files that changed from the base of the PR and between a43a2e5 and 45fcb30.

📒 Files selected for processing (2)
  • .changeset/wild-geckos-remain.md
  • src/utils/useSimulateProposal.ts

Comment on lines +172 to 173
blockOverrides: timestamp?.status === "success" ? { time: timestamp.result + 1n } : undefined,
calls: request
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick | 🔵 Trivial

Add a regression test for timestamp boundary behavior.

Given this is a precision timing fix, add a focused test for the equality boundary (timestamp + delay) so this doesn’t regress.

Also applies to: 184-187

@dieguezguille dieguezguille marked this pull request as ready for review April 28, 2026 13:35
Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates the useSimulateProposal utility to increment the block override timestamp by 1n in two simulation scenarios. This adjustment ensures that the simulated block time is strictly greater than the current timestamp, preventing potential simulation errors. A changeset file has also been included to document this patch. I have no feedback to provide.

Copy link
Copy Markdown

@devin-ai-integration devin-ai-integration Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no potential bugs to report.

View in Devin Review to see 1 additional finding.

Open in Devin Review

@sentry
Copy link
Copy Markdown

sentry Bot commented Apr 28, 2026

❌ 1 Tests Failed:

Tests completed Failed Passed Skipped
662 1 661 0
View the full list of 1 ❄️ flaky test(s)
local::local

Flake rate in main: 100.00% (Passed 0 times, Failed 1 times)

Stack Traces | 350s run time
Element not found: Text matching regex: Spending limit

To view more test analytics, go to the Prevent Tests Dashboard

@cruzdanilo cruzdanilo merged commit 45fcb30 into main Apr 28, 2026
13 checks passed
@cruzdanilo cruzdanilo deleted the simulate branch April 28, 2026 14:11
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.

2 participants