Skip to main content

Graph

Struct Graph 

Source
pub struct Graph {
Show 18 fields pub candidates: usize, pub judges: usize, pub deliberate_rounds: usize, pub reviewers: usize, pub review_rounds: usize, pub max_parallel: usize, pub language: String, pub sessions: bool, pub timeout_implement: u64, pub timeout_judge: u64, pub timeout_review: u64, pub timeout_fix: u64, pub retries: usize, pub worktree_root: Option<PathBuf>, pub land: bool, pub land_rounds: usize, pub land_approval: bool, pub answer_timeout: u64,
}
Expand description

Graph shape and limits.

Fields§

§candidates: usize

Parallel implementations of the same task.

§judges: usize

Independent judges.

§deliberate_rounds: usize

Deliberation rounds when the judges’ first choices disagree.

§reviewers: usize

Reviewers per review round.

§review_rounds: usize

Maximum review+fix rounds before the run is declared blocked.

§max_parallel: usize

Maximum agent processes running at once.

§language: String

Language for the prose the agents write (en / ja / any language name).

§sessions: bool

Keep one CLI conversation per seat, so a judge remembers its own argument across deliberation rounds and the fixer remembers its own implementation across review rounds.

Sessions are scoped to a seat, never to an agent id: the same model sitting as implementer and as judge gets two unrelated conversations, which is what keeps blind judging blind.

§timeout_implement: u64

Per-node timeouts, seconds.

§timeout_judge: u64

Per-node timeouts, seconds.

§timeout_review: u64

Per-node timeouts, seconds.

§timeout_fix: u64

Per-node timeouts, seconds.

§retries: usize

Retries for an agent invocation that fails or returns nothing usable.

§worktree_root: Option<PathBuf>

Root for candidate / judge worktrees. Defaults to ~/wt/magi.

§land: bool

After the pull request is open, keep going: watch its checks and reviews, run a fix round when they are unhappy, and ask to merge.

On, because stopping at an open pull request left the operator doing the watching by hand - six times in the session this was built in - and that is the work the loop exists to take. It only engages for merge = "pr"; every other merge mode ends the run as before.

Turning this on does not hand magi the merge button: Graph::land_approval is on too, and nothing merges without an explicit answer. Setting both to their non-defaults is the only way to get an unattended merge, and it has to be chosen twice.

§land_rounds: usize

Land rounds - watch, fix, push - before the run is left for a human.

§land_approval: bool

Ask the owner before merging, showing what is about to land.

On, and it is what makes land safe to have on: the question carries a rendered panel - the diffstat, the patch, the checks, the review comments that were addressed, and the subject the squash will use - so the decision is made on evidence rather than on trust, from wherever the operator happens to be.

Silence is a hold. An unanswered approval never merges, and neither does any answer other than the word merge.

§answer_timeout: u64

How long to wait for an owner to answer a question before the run is abandoned, seconds. A parked run costs nothing, so this is generous; it exists so a forgotten question cannot pin a worktree forever.

Trait Implementations§

Source§

impl Clone for Graph

Source§

fn clone(&self) -> Graph

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Graph

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for Graph

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for Graph
where Graph: Default,

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Serialize for Graph

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

§

impl Freeze for Graph

§

impl RefUnwindSafe for Graph

§

impl Send for Graph

§

impl Sync for Graph

§

impl Unpin for Graph

§

impl UnsafeUnpin for Graph

§

impl UnwindSafe for Graph

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> FromRef<T> for T
where T: Clone,

Source§

fn from_ref(input: &T) -> T

Converts to this type from a reference to the input type.
Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more