Concepts

How review and CI waits settle

When Kraft counts a review bot as finished with a push, what each kind of chain does with what the bots said, and when a wait ends.

The mr.automated_review task waits for the reviewers that repos.yaml, the item or the chain names, then hands on what they said. This page is what that wait does at run time. Which reviewers it waits for, and the forms they take, are in automated_review.

What the wait does with the reviewers

What the wait does with them depends on the chain.

  • The collect path. When a later task in the same node declares the bot_feedback input, as the shipped triage step does, the wait holds until every reviewer has finished with the latest push, then hands what they said to that task. The wait never fails on feedback; the triage agent decides what needs a change.
  • Nothing reads the feedback. When the node has no such task, as in a chain from before the triage step, or the item covers several repos, a bot is still waited for until it has finished with the push, as on the collect path. On a multi-repo item, each repo's bot is waited for against that repo's own push. Kraft then judges what was said itself:
    • Each unresolved thread, a newest review that requests changes (when the bot left no thread), and a check that finished without passing fail the wait and go to the fix loop. Anything else is clean.
    • On a multi-repo item, a member repo's findings give its paths from the item's own checkout, such as repos/pkg/calc.py:3, so the fix loop finds the file.
    • Kraft can't tell what a bot's summary says, so a summary alone reads as clean, and the node's log names it as not read. kraft admin doctor's triage_review_feedback row shows the edit that adds the triage step.
    • A check still unfinished at the timeout stops the item for you, as it would alone.
  • The direct path. Reviewers that are only checks, when nothing collects them, are each read once per look. Any actionable feedback fails the wait at once, with every finding read in that check, and goes to the fix loop. A timeout stops the item for you.

When the triage runs

Unreleased

On the collect path the triage agent starts only when the bots said something that could need a change.

  • It runs for an unresolved bot thread, a check that didn't pass (one still unfinished at the limit included), or a summary or review with text. An approval's text counts, since some bots list items there.
  • It is skipped for silence, or for an approval with no text and no open threads. No agent starts and the node goes on to the CI wait.
  • A GitLab approval leaves no summary, so on GitLab an approval alone is silence.

The conversation is not activity

Unreleased

For a bot with replies: true, the wait leaves Kraft's conversation out when it reads the bot's activity. A note in a thread that holds a Kraft note, a blank review made only of replies in such threads, and a change in the threads Kraft posted in all count for nothing. A review that requests changes or approves still counts. With replies off, the wait reads activity as before.

The reply record, not the note on the forge, says which threads are Kraft's. A thread stays out of the bot's activity when a person deleted Kraft's note, and a thread a bot resolves after Kraft first posted in it isn't activity either.

The reply wait

Unreleased

When a node would complete with a thread still owed an answer, Kraft starts a reply round, and the review wait in it waits only for the threads the round was started for. A thread is done when the bot answered it, someone resolved it, a person wrote in it, or its deadline passed. The deadline is Kraft's latest note plus reply_timeout_minutes, 5 minutes by default.

A deadline settles the wait and doesn't stop the item. The wait still pushes and reads CI when the task watches it, and it records no heard or silent bots. Every comparison reads creation times, never edit times. The limits are in Let Kraft answer the review bots.

When a bot is finished with a push

A bot is finished with a push when it has been active since Kraft pushed that head and then quiet for the grace period, config.grace_period on the task (60 seconds by default). Its activity is a new or edited comment, a review, an inline comment, a thread it resolved, or, on GitLab, an approval it gave or withdrew. Threads already open on the first check set a baseline and aren't activity. A check is finished when it completes.

When the wait ends

On the collect path, and for a bot that nothing reads, the timeout settles the wait: a bot that never posted had nothing to say, and the item goes on with what was collected. The timeout is recorded in the wait's events as timed_out. The default chain's review wait has a 10-minute limit and watches CI, while the library's await_automated_review keeps 30. For a slower bot, see a bot that reviews late.

Every settled review records which bots posted and which never did (automated_review_settled). A bot that has never posted in a repo, across three items or more, is likely misconfigured, and kraft admin doctor's review bots row names it.

A reviewer that errors stops the item for you rather than spending a repair.

When the wait also watches CI

Unreleased

A review wait with config.watch_ci on also watches the merge request's pipeline, so a red pipeline doesn't wait behind the bots.

  • Every check pushes the branch first, every repo's on a multi-repo item, and reads each pipeline before it reads the bots. It never rebases, retries a job or pins a pipeline.
  • A red pipeline ends the wait failed. The node's on_failure and fix loop take it as the CI wait's own finding, so it counts once, however many tasks read it.
  • A merge conflict ends the wait without a collection, so the triage is skipped and the CI wait rebases.
  • Anything else is left to the CI wait: a pipeline still running, a green one, a read that failed, an infrastructure failure, a cancelled run.
  • The limit counts from when the head was pushed, so time already spent on that head counts. Without config.watch_ci it counts from when the wait started.
  • A wait cut short by CI records no heard or silent bots, so kraft admin doctor doesn't count them as silent.

What Kraft reads

Kraft reads every page of a merge request's reviews, review comments, review threads and their comments, issue comments and a GitLab merge request's notes and discussions, up to 3,000 of each. A longer list stops the wait with an error rather than reading part of it. GitLab commit statuses are still read one page of 100.

Forge clocks

Forge clocks are compared with Kraft's push time as they are, with no allowance for skew. A bot that posts a placeholder and edits it long after the grace period is read early; a longer config.grace_period on that chain is the fix.

The post-merge CI wait

With ci_checks on, the CI waits still end early in one case. The setting is in ci_checks.

With ci_checks left on, mr.post_merge_ci still passes on a merge commit that has no CI run at all five minutes after its wait started, and records post_merge_ci_absent. That is a branch whose CI doesn't run on a push, such as a workflow on pull_request only, merged into a branch other than the default. A commit with any run, even a pending one, is waited for as before.

A red post-merge pipeline normally pauses every running item whose base is the merged commit and files a follow-up bead. When the repository lists post_merge_publish_jobs and every failed job matches one of them, such as a failed deploy to Pages, mr.post_merge_ci still files the bead, titled post-merge publish failed, but pauses no item. One failed build or test job beside the deploy still pauses them. The setting is in post_merge_publish_jobs.

On GitHub, where Kraft reads only Actions runs, a commit whose CI reports from another app as a check run or commit status doesn't pass this way: the wait stays pending.

Copyright © 2026