fix(indexer): preserve complete fee generations and bounded pool frontier #1469

Merged
PlasticDigits merged 2 commits from fix/1464-pool-freshness into main 2026-10-11 00:58:51 +00:00
Owner

Scheduled pool observations can select a valid head older than already stored reserves, and a newly written raw generation temporarily lacks its compatible fee. These gaps leave common trading paths unavailable even while providers and reference prices are healthy.

Require the current live-pair height frontier inside the existing bounded provider scan. Preserve an exact previously qualified complete quote generation only during an explicitly validated pending fee phase, with its original time and expiry. Both quote publishers share the typed rule. Rejected headers, SQL failure, cancellation, changed fees and obsolete completion invalidate unsafe economics; cold producers cannot evade invalidation through qualification arriving during the request. Raw reserves continue publishing independently for valuation.

The phase registry has fixed namespace, marker, mirror, order and memory bounds. Quote requests perform no provider work. No provider cap, lag policy, reserve/reference freshness period, tax rule or execution floor is relaxed. The current external useful-latency target is 500 ms; tighter improvements remain deferred.

Verification and invariants: agent checklist, receipts, invariants, operator runbook, agent guidance.

  • Fee-phase unit controls: 11 passed twice.
  • Actual scheduled-worker fee/publication controls: 7 passed twice, including cold qualification, cancellation, maximum/changed fees and original expiry.
  • Bounded constrained-head/provider controls: 93 passed twice; ignored benchmark separately covered by broader verification.
  • Final worker-shutdown fixture correction: four consecutive passes with pinned reads, original head timing, positive output/floors and zero request RPC.
  • Frozen final-head local verification: 98 PASS / 0 FAIL / 9 explicit SKIP stages. Each command includes first/retest. #1464 11/0/2; #1452 14/0/0; #1453 12/0/2; #1394 23/0/0; #1392 10/0/2; #1396 28/0/3. Rust source fingerprint b8e1888a6c7479bb362928a8e524ae7ca08b3b1f9857bb36fc012256ec0a03b6.
  • Current-source authenticated runtime LOGIN supplement passed twice in a separately owned cluster, zero unrelated CONNECT before/after, owned resources cleaned up.
  • Actual hosted jobs in pipeline 399 must finish for the final head. Earlier canceled-head jobs are excluded.
  • Merge, deploy, independently attest the deployed revision, inspect logs, and repeat the 24-scenario public/browser corpus at 500 ms across multiple freshness cycles.

Agents may explicitly SKIP an unavailable check with its reason and scope, marking the source review PASS WITH SKIPS when every executed check passes. An executed failure stays FAIL until fixed and retested. Source checks never establish unperformed deployment or economic acceptance. Prior deployed availability failures remain recorded; #1464 stays open until sustained deployed acceptance is established.

Refs #1464, #1452, #1453; sustained acceptance also tracked in #1456.

Issue criteria completed in their stated local scope:

  • AC1: four-direction executable socket corpus with positive matching operations and floors.
  • AC2: provider recovery preserves serving and the original checkpoint.
  • AC3: integrity, permanent SQL and cancellation controls fail closed.
  • AC4: bounded admission and exact complete-generation retention; original expiry preserved.
  • AC5: missing/stale/unsupported blockers remain distinct from fresh economic rejection.
  • AC6: initialized local socket and controlled desktop/phone latency checks passed; current deployed 500 ms acceptance is still pending.
  • AC7: selected quote, cache, progress, reference and preparation fixtures assert zero request RPC.
  • AC8: cache, actor, confirmation and signing regressions passed.
  • AC9: six source verifiers, documented invariants and agent/runbook crosslinks.
  • Independent deployment and sustained common-path availability/latency acceptance.

Unavailable scope remains explicit: the bridge published-host path was attempted and unavailable, host IPv6 is disabled, full current local-engine funded settlement parity is not established, and historical/deployed acceptance is separate. Runtime-login and read-only identity supplements are reported independently from the scripts' built-in skips. Executed failures are preserved and corrected, including the synthetic-namespace and worker-shutdown fixture failures.

Scheduled pool observations can select a valid head older than already stored reserves, and a newly written raw generation temporarily lacks its compatible fee. These gaps leave common trading paths unavailable even while providers and reference prices are healthy. Require the current live-pair height frontier inside the existing bounded provider scan. Preserve an exact previously qualified complete quote generation only during an explicitly validated pending fee phase, with its original time and expiry. Both quote publishers share the typed rule. Rejected headers, SQL failure, cancellation, changed fees and obsolete completion invalidate unsafe economics; cold producers cannot evade invalidation through qualification arriving during the request. Raw reserves continue publishing independently for valuation. The phase registry has fixed namespace, marker, mirror, order and memory bounds. Quote requests perform no provider work. No provider cap, lag policy, reserve/reference freshness period, tax rule or execution floor is relaxed. The current external useful-latency target is 500 ms; tighter improvements remain deferred. Verification and invariants: [agent checklist](docs/qa/issue-1464/README.md), [receipts](docs/qa/issue-1464/verification.md), [invariants](docs/indexer-invariants.md#quote-ready-fee-provenance-1464-follow-up), [operator runbook](docs/runbooks/indexer-provider-recovery.md), [agent guidance](skills/AGENTS_PROVIDER_RECOVERY.md). - [x] Fee-phase unit controls: 11 passed twice. - [x] Actual scheduled-worker fee/publication controls: 7 passed twice, including cold qualification, cancellation, maximum/changed fees and original expiry. - [x] Bounded constrained-head/provider controls: 93 passed twice; ignored benchmark separately covered by broader verification. - [x] Final worker-shutdown fixture correction: four consecutive passes with pinned reads, original head timing, positive output/floors and zero request RPC. - [x] Frozen final-head local verification: 98 PASS / 0 FAIL / 9 explicit SKIP stages. Each command includes first/retest. #1464 11/0/2; #1452 14/0/0; #1453 12/0/2; #1394 23/0/0; #1392 10/0/2; #1396 28/0/3. Rust source fingerprint `b8e1888a6c7479bb362928a8e524ae7ca08b3b1f9857bb36fc012256ec0a03b6`. - [x] Current-source authenticated runtime LOGIN supplement passed twice in a separately owned cluster, zero unrelated CONNECT before/after, owned resources cleaned up. - [ ] Actual hosted jobs in [pipeline 399](https://ci.cl8y.com/repos/7/pipeline/399/1) must finish for the final head. Earlier canceled-head jobs are excluded. - [ ] Merge, deploy, independently attest the deployed revision, inspect logs, and repeat the 24-scenario public/browser corpus at 500 ms across multiple freshness cycles. Agents may explicitly SKIP an unavailable check with its reason and scope, marking the source review PASS WITH SKIPS when every executed check passes. An executed failure stays FAIL until fixed and retested. Source checks never establish unperformed deployment or economic acceptance. Prior deployed availability failures remain recorded; #1464 stays open until sustained deployed acceptance is established. Refs #1464, #1452, #1453; sustained acceptance also tracked in #1456. Issue criteria completed in their stated local scope: - [x] AC1: four-direction executable socket corpus with positive matching operations and floors. - [x] AC2: provider recovery preserves serving and the original checkpoint. - [x] AC3: integrity, permanent SQL and cancellation controls fail closed. - [x] AC4: bounded admission and exact complete-generation retention; original expiry preserved. - [x] AC5: missing/stale/unsupported blockers remain distinct from fresh economic rejection. - [x] AC6: initialized local socket and controlled desktop/phone latency checks passed; current deployed 500 ms acceptance is still pending. - [x] AC7: selected quote, cache, progress, reference and preparation fixtures assert zero request RPC. - [x] AC8: cache, actor, confirmation and signing regressions passed. - [x] AC9: six source verifiers, documented invariants and agent/runbook crosslinks. - [ ] Independent deployment and sustained common-path availability/latency acceptance. Unavailable scope remains explicit: the bridge published-host path was attempted and unavailable, host IPv6 is disabled, full current local-engine funded settlement parity is not established, and historical/deployed acceptance is separate. Runtime-login and read-only identity supplements are reported independently from the scripts' built-in skips. Executed failures are preserved and corrected, including the synthetic-namespace and worker-shutdown fixture failures.
fix(indexer): preserve qualified fee generations and pool frontier
Some checks failed
ci/woodpecker/pr/woodpecker Pipeline was canceled
3a62bafb9c
test(indexer): finish fee observations before cached quote checks
All checks were successful
ci/woodpecker/pr/woodpecker Pipeline was successful
a585a0505d
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!1469
No description provided.