Expand description
The CI executor seam (D18): what runs a candidate merge, and what it is allowed to say about the result.
This replaces a fn verdict(&Change, &str) -> bool that could not
carry a real executor. Three things the bool could not express, each
of which changed a decision the queue makes:
- A provider fault is not a test failure. A VM that fails to
boot and a test that legitimately fails both returned
false, and the queue ejected the change either way — along with everything that transitively depended on it.Verdict::evictsis now the single place that rule lives, and onlyVerdict::Failedsays yes. - A batch is the unit, so a provider may be concurrent. The
train’s cost model assumes every member’s CI runs in parallel;
a one-job-at-a-time method with
&mut selfmade that impossible to implement no matter what the model said. - A job is content-addressed, so a shared build cache has something to key on. A queue-local change id does not survive being asked the same question twice.
§Examples
use choir_queue::executor::{CiExecutor, Job, Synthetic, Verdict};
use choir_hash::ContentHash;
let mut ci = Synthetic::passing();
let job = Job::new(ContentHash::blake3(b"tree"), vec!["true".into()]);
assert_eq!(ci.run(&[job]).unwrap(), vec![Verdict::Passed]);Structs§
- Executor
Info - Who a provider says it is, established once before any job.
- Job
- One unit of work, addressed by content so a shared cache can hit.
- Synthetic
- An executor that answers from a caller-supplied function instead of running anything.
Enums§
- Executor
Error - Why an executor produced no verdicts at all.
- Verdict
- What an executor found. Four cases, because the queue’s response to each of them differs.
Constants§
- DEFAULT_
DEADLINE - Default wall-clock ceiling for one job.
- PROTOCOL
- Wire-protocol version a provider must echo before receiving work.
Traits§
- CiExecutor
- The CI executor seam (D18).