pub struct PrDelivery<'a> {
pub repo: &'a Path,
pub worktree: &'a Path,
pub target_branch: &'a str,
pub base_branch: &'a str,
pub draft: bool,
pub intent: &'a str,
pub contract: &'a OutcomeContract,
pub body: &'a str,
pub provenance: Option<&'a str>,
}Expand description
Everything PR delivery needs. Borrowed rather than owned because every field already exists in the caller’s session state.
Fields§
§repo: &'a PathThe repository. gh runs here, so this must be a checkout with the
GitHub remote configured.
worktree: &'a PathThe session’s worktree — where the changes are and where the commit is
made. It shares repo’s config, so it can push to the same remote.
target_branch: &'a strThe delivery branch. Stable across sessions: round N+1 pushes to the same branch, so a second branch is never created for the same goal.
base_branch: &'a strThe base the pull request merges into.
draft: boolOpen the pull request as a draft. Only ever consulted when a pull
request is CREATED — see deliver_pr on why this never flips an
existing one.
intent: &'a strThe run intent; becomes the commit subject and the pull-request title.
contract: &'a OutcomeContractThe contract that passed. Embedded in the commit body by
[commit_worktree].
body: &'a strThe substantive pull-request description: what was done, what remains, what the contract proved. It is the next fresh session’s context and must stand alone without the diff.
provenance: Option<&'a str>Where a distributed run’s subtasks ran, from placement_provenance.
A FIELD rather than a None baked into the commit step, even though no
caller can set it today: no distributed session can open a pull request
(the heal loop hardcodes local, car code-task has no distributed mode),
so this is out of reach rather than a gap. The day someone adds
--distributed to a pull-request path, a named field makes them decide
and a buried literal would silently drop the provenance (car#1322).
Auto Trait Implementations§
impl<'a> Freeze for PrDelivery<'a>
impl<'a> RefUnwindSafe for PrDelivery<'a>
impl<'a> Send for PrDelivery<'a>
impl<'a> Sync for PrDelivery<'a>
impl<'a> Unpin for PrDelivery<'a>
impl<'a> UnsafeUnpin for PrDelivery<'a>
impl<'a> UnwindSafe for PrDelivery<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
impl<S, T> Duplex<S> for Twhere
T: FromSample<S> + ToSample<S>,
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<S> FromSample<S> for S
impl<S> FromSample<S> for S
fn from_sample_(s: S) -> S
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
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