chadtmiller.com/knotless
git that lives in your Atmosphere account
1
10
An ejection for a gate's review says how long it waited beside what it lacks
crates/knotless-run/src/queue.rs+3−1
| @@ -666,8 +666,10 @@ impl Runner { | ||
let awaited = standing.as_ref().is_some_and(|s| !s.awaiting.is_empty()); | ||
let why = standing.and_then(|s| approvals::refusal(url, &item.uri, on.branch, &s)); | ||
let waited = humantime::format_duration(self.opts.review_wait); | ||
// Said beside what it lacks, before what to do about it. | ||
let said = format!("It waited {waited} for that review. {}", approvals::HOW); | ||
let why = why.map(|why| match awaited { | ||
true => format!("{why}. It waited {waited} for that review"), | ||
true => why.replacen(approvals::HOW, &said, 1), | ||
false => why, | ||
}); | ||
let eject = why | ||
crates/knotless-run/tests/run.rs+4−3
| @@ -3529,10 +3529,11 @@ fn a_merge_queue_waits_for_its_gate() { | ||
std::thread::sleep(wait.saturating_sub(queued.elapsed())); | ||
l.pass(&rt); | ||
let shown = q.shows(&b, "merge queue: ejected"); | ||
// What it waits for, how to give it, then how long it waited. | ||
let wanted = format!("a review of its head from @{handle}."); | ||
// What it waits for and how long, then how to give it. | ||
let wanted = format!( | ||
"a review of its head from @{handle}. It waited 8s for that review. Those who may write" | ||
); | ||
assert!(shown.contains(&wanted), "{shown}"); | ||
assert!(shown.contains("It waited 8s for that review"), "{shown}"); | ||
} | ||
| ||
/// Another runner's pre-flight only queued, waiting for a job there, is | ||
AGENTS.md+7−1
| @@ -246,7 +246,13 @@ quarantine what failed rather than leave it for the next pull. A pull | ||
that conflicts with one queued ahead of it waits for that one to land or | ||
leave; ejected then, it conflicts with `main`, so merge `main` into it. | ||
Ejected three times for the same reason, stop and say so rather | ||
than queue it again. When several agents land pulls at once, one of them | ||
than queue it again. A branch whose rule names a gate, as `main` may | ||
name review.knotless.dev (`knotless rules`), waits for its review of the | ||
pull's head: `knotless show` says `waiting for its review` meanwhile. | ||
Ejected with `changes asked by @review.knotless.dev`, read the review | ||
with `knotless show`, push the fix, and queue it again: the agent reads | ||
the new head. Where the review is wrong, say why in a comment and ask | ||
the owner, whose approval of the head stands in for it. When several agents land pulls at once, one of them | ||
AGENTS.mdline 255Wrap this line like the rest of the paragraph: it runs past the column the surrounding text keeps to. | ||
lands them all, and the rest hand it their pulls' URIs rather than each | ||
watching its own. A deploy restarts the runner. A batch whose checks | ||
pass while it stops still lands; one it cuts off is built and checked | ||