Skip to content

feat: harden query policies, history pagination, and cache invalidation - #806

Merged
IbrahimIjai merged 4 commits into
SO4-Markets:mainfrom
Ay-obami:combined-ay-query-policies
Sep 26, 2026
Merged

IbrahimIjai merged 4 commits into
SO4-Markets:mainfrom
Ay-obami:combined-ay-query-policies

Conversation

@Ay-obami

@Ay-obami Ay-obami commented Sep 25, 2026 •

Copy link
Copy Markdown
Contributor

Summary

This PR consolidates the four assigned Ay-obami query-cache issues into one reviewable change set.

Correctness details

  • dynamic financial data never uses permanent freshness
  • fallback polling does not run alongside an active stream or hidden view
  • history refreshes merge by stable source ID so equal timestamps/live insertions cannot duplicate or skip retained rows
  • confirmed order submission does not imply execution; fill/close refreshes are driven by authoritative execution evidence
  • active affected queries refetch while inactive affected queries remain stale for their next mount
  • refresh failures are reported without changing the truth of an already-confirmed transaction
  • old wallet-context requests are cancelled before private cache removal so they cannot repopulate logged-out/switched-account views

Verification

Before upstream main advanced, this change set passed the complete ordered repository gate and all required web/indexer integration checks:

  • bun lint
  • bun typecheck
  • bun run check:tokens
  • bun run check:content
  • bun run test
  • bun run test:coverage
  • bun run build
  • indexer codegen/build/test
  • local contract sync + manifest validation
  • web typecheck + production build

After rebasing onto the latest main:

  • focused query/cache regression suite: 35/35 passing
  • production web build: passing
  • branch is 0 commits behind main

The ordered gate now stops on baseline failures introduced by newer upstream commits in files unchanged by this PR:

  • apps/web/src/features/trade/components/TransactionRecoveryToast.tsx — lint/import-order issues and an unused React import; the latter is also the only remaining web typecheck error
  • apps/web/src/features/trade/lib/transaction-explorer.ts — lint array-type errors

This PR does not modify either file.

Dependency note

This branch includes the canonical query-key/network/cancellation foundation required by #756–#759 because #760–#763 explicitly depend on that work. Once that foundation lands separately, this PR can be rebased to contain only the Ay-obami layer.

Closes #760
Closes #761
Closes #762
Closes #763

@vercel

vercel Bot commented Sep 25, 2026

Copy link
Copy Markdown

@Ay-obami is attempting to deploy a commit to the Ijai's projects Team on Vercel.

A member of the Team first needs to authorize it.

@drips-wave

drips-wave Bot commented Sep 25, 2026

Copy link
Copy Markdown

@Ay-obami Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

Unify query-key identity across RPC and indexer reads, remove hardcoded network cache identity, migrate producers and invalidators together, and propagate cancellation to supported transports. Also repairs existing web gate blockers required by the repository commit policy.
@Ay-obami
Ay-obami force-pushed the combined-ay-query-policies branch from 626dd14 to 465c053 Compare September 25, 2026 13:28
@IbrahimIjai
IbrahimIjai merged commit 8b43459 into SO4-Markets:main Sep 26, 2026
1 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants