Skip to content

fix(core): treat mint quote expiry as advisory - #397

Merged
Egge21M merged 1 commit into
masterfrom
issue-390-treat-mint-quote-expiry-as-advisory
Jul 29, 2026
Merged

fix(core): treat mint quote expiry as advisory#397
Egge21M merged 1 commit into
masterfrom
issue-390-treat-mint-quote-expiry-as-advisory

Conversation

@Egge21M

@Egge21M Egge21M commented Jul 29, 2026

Copy link
Copy Markdown
Collaborator

This pull request fixes local Mint Quote expiry handling so expiry is advisory payment-deadline metadata.

Problem

Coco treated elapsed Mint Quote expiry as terminal in claimability, preparation, recovery, and watcher paths. That could hide valid accounting increases, block issuance of paid value, or stop observing quotes that can still resolve after expiry.

Summary

  • remove Mint Quote expiry from local claimability and preparation decisions
  • keep BOLT12 and on-chain recovery and pending reconciliation active after expiry
  • keep Background Watchers observing expired Mint Quotes while preserving BOLT11 issued-state termination
  • retain expiry metadata in transport deduplication without deriving behavior from the local clock
  • document the decision in the glossary and ADR-0008
  • add a core patch changeset and focused regression coverage
  • update Centralize Mint Quote Claimability behind canonical accounting #387 so its future common claimability model explicitly ignores expiry

Melt Quote expiry semantics and existing mint-rejection error handling are unchanged.

Verification

  • bun test test/unit/MintOperationService.test.ts test/unit/MintOperationWatcherService.test.ts test/unit/MintBolt12Handler.test.ts test/unit/MintOnchainHandler.test.ts test/unit/HybridTransport.test.ts — 162 passed
  • bun run --filter='@cashu/coco-core' test:unit — 1,149 passed
  • bun run --filter='@cashu/coco-core' typecheck
  • bun run --filter='@cashu/coco-core' build
  • Prettier check for all changed files
  • git diff --check

This pull request resolves #390.

@changeset-bot

changeset-bot Bot commented Jul 29, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 766696d

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 8 packages
Name Type
@cashu/coco-core Patch
@cashu/coco-adapter-tests Patch
@cashu/coco-expo-sqlite Patch
@cashu/coco-indexeddb Patch
@cashu/coco-react Patch
@cashu/coco-sql-storage Patch
@cashu/coco-sqlite-bun Patch
@cashu/coco-sqlite Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@Egge21M
Egge21M marked this pull request as ready for review July 29, 2026 13:07
@codecov

codecov Bot commented Jul 29, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.63%. Comparing base (3be20ba) to head (766696d).

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #397      +/-   ##
==========================================
- Coverage   92.65%   92.63%   -0.03%     
==========================================
  Files         112      111       -1     
  Lines       17694    17633      -61     
==========================================
- Hits        16395    16334      -61     
  Misses       1299     1299              
Flag Coverage Δ
core-integration 50.31% <ø> (ø)
core-unit 93.07% <100.00%> (-0.03%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@Egge21M
Egge21M merged commit 1601cf7 into master Jul 29, 2026
12 checks passed
@github-project-automation github-project-automation Bot moved this from Backlog to Done in coco Jul 29, 2026
@Egge21M
Egge21M deleted the issue-390-treat-mint-quote-expiry-as-advisory branch July 29, 2026 13:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Treat mint quote expiry as advisory for observation and issuance

1 participant