Skip to content

[SOLV-544] chore: Increase intent exclusiveFor window from 1m to 5m #51

Merged
reednaa merged 1 commit into
mainfrom
feature/solv-544-increase-intent-exclusivefor-window-from-1m-to-5m-for-solver
May 22, 2026
Merged

[SOLV-544] chore: Increase intent exclusiveFor window from 1m to 5m #51
reednaa merged 1 commit into
mainfrom
feature/solv-544-increase-intent-exclusivefor-window-from-1m-to-5m-for-solver

Conversation

@kiryllifi

@kiryllifi kiryllifi commented May 18, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Increase the exclusivity window encoded into intent output context bytes from 60s to 5 minutes (5 * ONE_MINUTE) via a new EXCLUSIVITY_WINDOW constant in src/lib/libraries/intent.ts.
  • The previous 1-minute window was too short for solver devs to exercise fills end-to-end during manual testing.
  • Lock the value with a unit test that decodes the trailing uint32 deadline from order.outputs[0].context and asserts it is now + 5m.

Linear: https://linear.app/lifi-linear/issue/SOLV-544/increase-intent-exclusivefor-window-from-1m-to-5m-for-solver-testing

Test plan

  • bun run test:unit
  • bun run check
  • bun run lint

Summary by CodeRabbit

  • Enhancement
    • Extended the exclusivity window duration for exclusive intents to 5 minutes, allowing exclusive intents to remain active longer before reaching their expiration deadline.

Review Change Stack

@kiryllifi kiryllifi requested a review from reednaa as a code owner May 18, 2026 16:30
@coderabbitai

coderabbitai Bot commented May 18, 2026

Copy link
Copy Markdown
📝 Walkthrough

Walkthrough

This PR extends the exclusivity time window for intent order context encoding from 1 minute to 5 minutes. A module-level constant is introduced and the encoder is updated to use it, with corresponding unit test assertions validating the encoded deadline behavior.

Changes

Exclusivity Window Extension to 5 Minutes

Layer / File(s) Summary
Exclusivity window constant and encoder update
src/lib/libraries/intent.ts
Module-level EXCLUSIVITY_WINDOW constant set to 5 * ONE_MINUTE is introduced at line 101. The Intent.encodeOutputs method is updated to compute the exclusive context expiry using currentTime + EXCLUSIVITY_WINDOW instead of an inline 1-minute offset, preserving the existing bytes1/bytes32/uint32 packing layout.
Exclusivity deadline test and helper
tests/unit/intent.test.ts
Test suite adds a FIVE_MINUTES constant, extends the makeIntent helper to accept an optional exclusiveFor parameter, and introduces a unit test that verifies when exclusiveFor is set, the encoded context deadline equals now + 5 minutes by parsing the trailing 4 bytes of the context field.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Suggested reviewers

  • vladwulf
  • jsanmigimeno
  • reednaa

Poem

🐰 Five minutes now, more generous and wide,
The intent's exclusivity takes a longer ride,
Constants aligned, and encoders updated true,
Tests verify the deadline—five minutes through! ⏱️✨

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
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.
Title check ✅ Passed The title accurately summarizes the main change: increasing the intent exclusiveFor window from 1 minute to 5 minutes, which is the primary objective of the PR.

✏️ 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 feature/solv-544-increase-intent-exclusivefor-window-from-1m-to-5m-for-solver

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.

@kiryllifi kiryllifi self-assigned this May 18, 2026
@github-actions

Copy link
Copy Markdown

🚀 Preview deployed!

Worker: lintent-pr-51
URL: https://lintent-pr-51.li-fi374.workers.dev

@kiryllifi kiryllifi changed the title Increase intent exclusiveFor window from 1m to 5m (SOLV-544) [SOLV-544] chore: Increase intent exclusiveFor window from 1m to 5m May 18, 2026
@reednaa reednaa merged commit 6b76278 into main May 22, 2026
7 checks passed
@reednaa reednaa deleted the feature/solv-544-increase-intent-exclusivefor-window-from-1m-to-5m-for-solver branch May 22, 2026 10:02
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