Skip to main content

Module pr_flow

Module pr_flow 

Source
Expand description

“The review of PR N for agent A: approved, at T” and “the checks of PR N: failing”: the review-flow, checks-flow and merge-flow events and their short lists of recent ones, for the review bot and CI nodes of the Atlas agent map (spec SPEC_REVIEW_AND_CHECKS_FLOW_EVENTS_2026_11_14.md).

They carry ids, numbers, states and times only. A repository is its numeric id, never a name; there is no field for a title, a branch, a URL, a review body, a log or a login, so none can leak through them.

The data is a small flow object the relay sends beside a review, CI or merge notice. It is not part of the notice’s signature, so it is advisory and applied only with the notice it belongs to: that notice must have verified and be fresh, and the object’s PR number must be the one in the signed text’s first line (see accept). The recent lists live in memory only and are read with GET /api/v1/pr-flow.

Structs§

ChecksFlowEvent
The checks of a PR’s head commit.
MergeFlowEvent
The end of a PR’s lines on the map.
Notice
What the call site knows of one pulled notice.
PrFlowBot
The bot’s own state as this srv sees it.
PrFlowSnapshot
The answer of GET /api/v1/pr-flow: the recent events of each kind, oldest first.
PrRef
A pull request by GitHub’s own numbers.
ReviewFlowEvent
A review of a PR, for the agent it belongs to.

Enums§

Accepted
A notice’s flow object that passed every check, as the event it makes.
PrFlowBy
What kind of reviewer: coarse, never a login.

Constants§

RECENT_MAX
How many recent events of each kind are kept.

Functions§

accept
The events flow makes for notice, at at_ms: flow is one object, or a list of up to [OBJECTS_MAX] (the rest are ignored), each judged on its own by [accept_one]. None for a notice that has none, is not genuine and fresh, or whose objects are all malformed.
accept_now
The event flow makes for a notice delivered now, if any, to be passed to note once the notice is accepted. See accept.
install
Start publishing on broker for the rest of the process. The first call wins.
install_cards
Start putting accepted notices on the cards in store for the rest of the process. The first call wins.
note
Records and publishes accepted, after putting it on the cards it names, so a board read on the event sees it. Does nothing before install and install_cards.
note_all
note for each of accepted.
recent
The recent events, oldest first.