Skip to content

chore: sync intent fillDeadline/expires with lifi-backend (EXP-432)#50

Merged
reednaa merged 2 commits into
mainfrom
feature/exp-432-intent-filldeadline-44h
May 18, 2026
Merged

chore: sync intent fillDeadline/expires with lifi-backend (EXP-432)#50
reednaa merged 2 commits into
mainfrom
feature/exp-432-intent-filldeadline-44h

Conversation

@kiryllifi

@kiryllifi kiryllifi commented May 14, 2026

Copy link
Copy Markdown
Contributor

Summary

Bump Intent fillDeadline from 2h → 44h and expires from 24h → 2d, mirroring lifi-backend PR #8340 (LIFI_INTENTS_FILL_DEADLINE_DURATION_SECONDS / LIFI_INTENTS_EXPIRES_DURATION_SECONDS).

The change is two constants on the Intent class (src/lib/libraries/intent.ts:118-119); values are applied uniformly to every issued order via singlechain() and multichain().

Linear: EXP-432
Backend PR: lifinance/lifi-backend#8340

Test plan

  • bun run test:unit — 25/25 (3 new tests under tests/unit/intent.test.ts covering cross-chain singlechain, same-chain singlechain, and multichain — all asserting fillDeadline=44h, expires=2d)
  • bun run test:e2e — 3/3 (Chromium)
  • bun run check — no new errors introduced (pre-existing env-var errors on main unaffected)
  • bun run lint — clean on touched files
  • Manual carousel walk: issued intent shows in 44h in IntentList

Cross-chain orders now use fillDeadline=44h, expires=2d to match
LIFI_INTENTS_FILL_DEADLINE_DURATION_SECONDS / LIFI_INTENTS_EXPIRES_DURATION_SECONDS
from lifi-backend PR #8340. Same-chain orders continue to use 10m/10m,
matching LIFI_INTENTS_SAMECHAIN_FILL_DEADLINE_DURATION_SECONDS.
@kiryllifi kiryllifi requested a review from reednaa as a code owner May 14, 2026 11:17
@coderabbitai

coderabbitai Bot commented May 14, 2026

Copy link
Copy Markdown
📝 Walkthrough

Walkthrough

The PR makes deadline calculations in the Intent class conditional on chain topology. Fixed expiry and fillDeadline properties become private getters that branch on isSameChain(), returning shorter windows (10 minutes) for single-chain intents and longer windows (44 hours for fill, 2 days for expiry) for cross-chain intents. Unit tests validate the deadline values and ordering across both scenarios.

Changes

Chain-aware deadline computation

Layer / File(s) Summary
Chain-aware deadline getters and validation tests
src/lib/libraries/intent.ts, tests/unit/intent.test.ts
Intent expiry and fillDeadline are now private getters that return different deadlines based on isSameChain(): 10-minute windows for same-chain intents and 44-hour/2-day windows for cross-chain intents. Tests validate deadline values, time bounds, and fillDeadline ≤ expiry ordering across single-chain, cross-chain, and multi-chain scenarios.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Poem

A rabbit hops through deadline trees,
Same-chain swift—just ten minutes, please!
Cross-chain takes longer paths to roam,
Forty-four hours brings you home. 🐰⏳

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 33.33% 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
Title check ✅ Passed The title clearly and concisely summarizes the main change: synchronizing intent fillDeadline/expires timeouts with the lifi-backend service, which is the primary objective of this pull request.
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.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ 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/exp-432-intent-filldeadline-44h

Tip

💬 Introducing Slack Agent: The best way for teams to turn conversations into code.

Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.

  • Generate code and open pull requests
  • Plan features and break down work
  • Investigate incidents and troubleshoot customer tickets together
  • Automate recurring tasks and respond to alerts with triggers
  • Summarize progress and report instantly

Built for teams:

  • Shared memory across your entire org—no repeating context
  • Per-thread sandboxes to safely plan and execute work
  • Governance built-in—scoped access, auditability, and budget controls

One agent for your entire SDLC. Right inside Slack.

👉 Get started


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 requested a review from vladwulf May 14, 2026 11:17
@github-actions

Copy link
Copy Markdown

🚀 Preview deployed!

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

@kiryllifi kiryllifi requested a review from jsanmigimeno May 14, 2026 11:19
Apply fillDeadline=44h / expires=2d uniformly. Out-of-scope branching
on isSameChain() removed.
@github-actions

Copy link
Copy Markdown

🚀 Preview deployed!

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

@kiryllifi kiryllifi self-assigned this May 15, 2026
@reednaa reednaa merged commit 93d8951 into main May 18, 2026
7 checks passed
@reednaa reednaa deleted the feature/exp-432-intent-filldeadline-44h branch May 18, 2026 10:23
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