hyperhive/hive-jobq/src
Repository files (latest commit first)
Filename Latest commit message Latest commit date
atlas 3ebfed1226 jobq: pin the fairness guarantee where it is made
fifo_fairness_for_the_slot lived in hive-c0re and submitted three
rebuilds, driving one to completion to watch the freed build slot go to
the earlier waiter. The guarantee it was checking is this crate's:
claim_one scans nodes in insertion order and takes the first satisfiable
one. Nothing here tested it -- the property hive-jobq provides was
asserted only downstream, through a host's templates.

a_contended_resource_goes_to_the_oldest_waiter tests it directly.
Mutation-checked: reversing the scan order fails it.

What is hive-c0re's is which nodes contend for the slot at all, and that
is a declaration, so its half is now a declared_resources table with
nothing running. The measured shape corrected an assumption on the way:
MetaSync takes the meta window only, and the agent lease starts at
StopForUpdate -- the first node that touches the container -- not at the
head of the chain. Prebuild deliberately holds no lease, which is what
lets it overlap another DAG on the same agent while the container is
still up.

"Uniform hold across the chain" needs no test of its own: a resource is
held for the acquirer's whole subtree, and the parent nesting is already
asserted in rebuild_chain_is_declared_serial.
2026-08-02 22:00:34 +02:00
..
builder.rs jobq: drop JobBuilder's Default impl so it is really unconstructible outside 2026-08-02 22:00:34 +02:00
lib.rs jobq: make the builder the only way nodes enter a graph 2026-08-02 15:45:27 +02:00
resources.rs refactor(#2500): encapsulate the jobq lock, drop the dead borrowed-guard layer 2026-07-19 15:24:11 +02:00
scheduler.rs jobq: pin the fairness guarantee where it is made 2026-08-02 22:00:34 +02:00