Skip to main content

CoderRunner

Trait CoderRunner 

Source
pub trait CoderRunner: Send + Sync {
    // Required methods
    fn run<'life0, 'life1, 'life2, 'life3, 'async_trait>(
        &'life0 self,
        target: &'life1 HealTarget,
        item: &'life2 Candidate,
        seed: &'life3 SessionSeed,
    ) -> Pin<Box<dyn Future<Output = Result<Attempt, RunFailure>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait,
             'life3: 'async_trait;
    fn deliver<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
        &'life0 self,
        target: &'life1 HealTarget,
        item: &'life2 Candidate,
        session_id: &'life3 str,
        body: &'life4 str,
    ) -> Pin<Box<dyn Future<Output = Result<PrDeliveryOutcome, DeliverRefusal>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait,
             'life3: 'async_trait,
             'life4: 'async_trait;
    fn abandon<'life0, 'life1, 'async_trait>(
        &'life0 self,
        session_id: &'life1 str,
    ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
}
Expand description

Runs a coder session and a review panel for one item.

Separate from LiveTickIo because it is the piece that needs the daemon’s runtime, its inference engine and a worktree, while everything else here needs only gh. Keeping the seam means the GitHub half is testable — and reviewable — without standing up an engine.

Required Methods§

Source

fn run<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 self, target: &'life1 HealTarget, item: &'life2 Candidate, seed: &'life3 SessionSeed, ) -> Pin<Box<dyn Future<Output = Result<Attempt, RunFailure>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait,

Run the session, evaluate the outcome contract, and poll the review panel. Returns the evidence; the verdict is computed by the caller.

Source

fn deliver<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>( &'life0 self, target: &'life1 HealTarget, item: &'life2 Candidate, session_id: &'life3 str, body: &'life4 str, ) -> Pin<Box<dyn Future<Output = Result<PrDeliveryOutcome, DeliverRefusal>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait, 'life4: 'async_trait,

Commit, push, and reconcile exactly one pull request for the item.

body is supplied by the caller rather than built here because it must be redacted, and the redactor lives with the GitHub half.

Source

fn abandon<'life0, 'life1, 'async_trait>( &'life0 self, session_id: &'life1 str, ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Close a session out without delivering, releasing its worktree.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§