Repository navigation
Read one fairness batch before the whole claim candidate page - #1092
Conversation
|
|
Current-head CI is terminal at |
|
SOURCE PASS for Server PR #1092 at exact head Independent review found no blocking Source issue. The complete binary delta is SHA-256 Verified behavior and bounds:
The actual exact-head checks are terminal: 62 |
|
Security's exact-head SOURCE PASS (above) matches the current head |
|
Main acceptance and cleanup are complete. Merge |
|
ACTUAL-MAIN SOURCE PASS — protected main The reviewed PR tree is preserved exactly. All current-main workflows are terminal: CodeQL, SonarQube, Public Boundary, Shared Server fixtures, and PHPUnit Feature succeed; the merge-queue Sonar follow-up is intentionally skipped. This carries the finite Source review to actual main only. Published-artifact/performance acceptance and owner topic cleanup remain separate. |



Implements the source part of #1064 (refs #1064; the issue stays open for published-artifact acceptance). This is the operator-requested split of the first-batch piece out of #1088 (6707046455). The PostgreSQL candidate change (#1069) already merged from #1088. #1066 follows in its own PR.
What changes
A workflow or activity claim used to read the whole 100-row candidate page before trying the first task. It now reads the first 10 candidates (one fairness batch) and tries those first.
lease_at,ready_at) are captured once and reused for both reads.The SQL for each backend is the existing candidate query with only the
LIMITparameterized. This covers SQLite, PostgreSQL's per-status ranges, and MySQL's per-statusUNION ALL, where both ranges and the outer limit take the batch limit. Claim authority, receipts, typed errors and persistence budgets are unchanged.Tests
tests/execution/task_fairness.rs: two HTTP fairness regressions through the real API.poll_transaction_tests.rs:qualify_first_candidate_batch, shared across SQLite, PostgreSQL and MySQL, checks statement counts:ANALYZE.Provenance
The code is the preserved preparation
e9872912(from maindc2a9d10, recorded on #1064 at comment). It was rebased without conflict onto current main1c34f3b7; main's changes sincedc2a9d10touch only the qualification runner and a PHP test. No earlier #1088 result carries over to this head. No external reference patch was applied.Local result (lab4, CI's pinned Rust image
rust@sha256:ba81bc3e…, 2 CPUs)cargo test --locked --offline --lib runtime::: 413 passed, 0 failed (79 ignored backend-only tests run in CI).cargo test --locked --offline --test execution task_fairness: 3 passed, including both new regressions.The PostgreSQL/MySQL/MariaDB qualifications run in the normal PR checks.
🤖 Generated with Claude Code