Recover provider failures and preserve executable local quotes #1465

Merged
PlasticDigits merged 1 commit from fix/1464-provider-recovery into main 2026-10-10 09:22:15 +00:00
Owner

Provider capacity deferrals and outages previously terminated indexing and the API, erased initialized quotes, and discarded still-fresh admission during refresh. This change keeps serving qualified local data while retrying the same checkpoint, preserves original observation expiry, and makes incomplete/unsupported observations an availability blocker instead of an amount/protection rejection.

Historical block/transaction bodies must match the requested height; qualified history no longer trips the live-head lag circuit. Unsafe processing/database failures halt immediately and remain quarantined across restarts. Optional fee-tier hydration moves to scheduled reconciliation, required positive raw-fee metadata failures propagate, and cancellation owns background workers.

Refs #1464. Deployment/history follow-up remains separately scoped in #1456. No schema migration or runtime privilege changes.

Completed local criteria:

  • AC1 local fixture: all four reported directions, exact ordinary/small 6/18-decimal inputs, positive net output, operations, generation/expiry and positive hop/final floors.
  • AC2/AC3: provider retry without cursor skip, API supervision, reorg/integrity halt, resource cleanup and durable unsafe SQL quarantine. Final ingestion suite: 21 tests passed twice.
  • AC4/AC5: original-time retention, authoritative invalidation, healthy alternatives and bounded missing/stale/unsupported/protection classifications.
  • AC6 local transport: 24 useful socket samples per pass; maximum initialized miss 2.902 ms, hit 2.190 ms. These are loopback figures.
  • AC7/AC8: zero request upstream calls, cache/context isolation, refresh and signing races; 412 frontend tests and production-build desktop/phone fixtures pass.
  • AC9 source: focused verifier, invariants, operational runbook and agent checklist with explicit unavailable-item skips.
  • Full deployed acceptance: four-route coverage, sustained recovery and regional/browser useful latency must be verified on the merged deployment. Existing c5cc674f baseline is FAIL, 0/24 useful quotes.

Validation: focused #1464 11 PASS / 0 FAIL / 2 operational SKIP; #1452 14/0/0; #1453 12/0/2; #1394 23/0/0; #1392 10/0/2; #1396 28/0/3, with its optional authenticated runtime fixture separately passed twice. #1395 and applicable NE1398/RT1381/LG1390 checks pass. Funded isolated LocalTerra taxed-input execution and minimum-return rollback pass twice; current-artifact complete settlement acceptance remains unverified. Commit hooks, formatting, clippy, types and secret scanning pass.

Agent verification instructions and skip policy, exact results and remaining scope, PR1464 invariants.

Run make verify-issue-1464 and the linked prerequisite checks in an isolated worktree with disposable QA credentials. An unavailable check may be recorded as SKIP with overall PASS WITH SKIPS; leave its acceptance scope unchecked. Executed failures remain FAIL until corrected and successfully rerun. Production verification is read-only and excludes mainnet broadcasts.

Provider capacity deferrals and outages previously terminated indexing and the API, erased initialized quotes, and discarded still-fresh admission during refresh. This change keeps serving qualified local data while retrying the same checkpoint, preserves original observation expiry, and makes incomplete/unsupported observations an availability blocker instead of an amount/protection rejection. Historical block/transaction bodies must match the requested height; qualified history no longer trips the live-head lag circuit. Unsafe processing/database failures halt immediately and remain quarantined across restarts. Optional fee-tier hydration moves to scheduled reconciliation, required positive raw-fee metadata failures propagate, and cancellation owns background workers. Refs #1464. Deployment/history follow-up remains separately scoped in #1456. No schema migration or runtime privilege changes. Completed local criteria: - [x] AC1 local fixture: all four reported directions, exact ordinary/small 6/18-decimal inputs, positive net output, operations, generation/expiry and positive hop/final floors. - [x] AC2/AC3: provider retry without cursor skip, API supervision, reorg/integrity halt, resource cleanup and durable unsafe SQL quarantine. Final ingestion suite: 21 tests passed twice. - [x] AC4/AC5: original-time retention, authoritative invalidation, healthy alternatives and bounded missing/stale/unsupported/protection classifications. - [x] AC6 local transport: 24 useful socket samples per pass; maximum initialized miss 2.902 ms, hit 2.190 ms. These are loopback figures. - [x] AC7/AC8: zero request upstream calls, cache/context isolation, refresh and signing races; 412 frontend tests and production-build desktop/phone fixtures pass. - [x] AC9 source: focused verifier, invariants, operational runbook and agent checklist with explicit unavailable-item skips. - [ ] Full deployed acceptance: four-route coverage, sustained recovery and regional/browser useful latency must be verified on the merged deployment. Existing c5cc674f baseline is FAIL, 0/24 useful quotes. Validation: focused #1464 11 PASS / 0 FAIL / 2 operational SKIP; #1452 14/0/0; #1453 12/0/2; #1394 23/0/0; #1392 10/0/2; #1396 28/0/3, with its optional authenticated runtime fixture separately passed twice. #1395 and applicable NE1398/RT1381/LG1390 checks pass. Funded isolated LocalTerra taxed-input execution and minimum-return rollback pass twice; current-artifact complete settlement acceptance remains unverified. Commit hooks, formatting, clippy, types and secret scanning pass. [Agent verification instructions and skip policy](https://git.cl8y.com/code/cl8y-dex-terraclassic/src/branch/fix%2F1464-provider-recovery/docs/qa/issue-1464/README.md), [exact results and remaining scope](https://git.cl8y.com/code/cl8y-dex-terraclassic/src/branch/fix%2F1464-provider-recovery/docs/qa/issue-1464/verification.md), [PR1464 invariants](https://git.cl8y.com/code/cl8y-dex-terraclassic/src/branch/fix%2F1464-provider-recovery/skills/AGENTS_PROVIDER_RECOVERY.md). Run `make verify-issue-1464` and the linked prerequisite checks in an isolated worktree with disposable QA credentials. An unavailable check may be recorded as SKIP with overall PASS WITH SKIPS; leave its acceptance scope unchecked. Executed failures remain FAIL until corrected and successfully rerun. Production verification is read-only and excludes mainnet broadcasts.
fix(indexer): recover providers without erasing live quotes
All checks were successful
ci/woodpecker/pr/woodpecker Pipeline was successful
f664f3df4b
Keep API serving during checkpoint availability retries, preserve qualified observations, and halt unsafe accounting across restarts. Validate historical response heights and retain local quote execution guards.
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
code/cl8y-dex-terraclassic!1465
No description provided.