Skip to main content

HarnessTaskMoveResultV1

Enum HarnessTaskMoveResultV1 

Source
pub enum HarnessTaskMoveResultV1 {
    Moved {
        task_id: HarnessTaskId,
        revision: HarnessRevision,
        from: HarnessTaskStateV1,
        to: HarnessTaskStateV1,
    },
    TaskIsOwn {
        task_id: HarnessTaskId,
    },
    TaskOutsideOwnSubtree {
        task_id: HarnessTaskId,
        own_task_id: HarnessTaskId,
    },
    IllegalTransition {
        task_id: HarnessTaskId,
        from: HarnessTaskStateV1,
        to: HarnessTaskStateV1,
    },
    TaskOwnedByLiveRun {
        task_id: HarnessTaskId,
        run_id: HarnessRunId,
    },
    RevisionConflict {
        task_id: HarnessTaskId,
        expected: HarnessRevision,
        current: HarnessRevision,
    },
}
Expand description

The outcome of one g4a_task_move call (D5, Slice D): restricted to a task inside the caller’s own subtree, and never the task that governs the caller’s own run – a session never moves the task its own run is attributed to (scope discipline: an agent narrates its own subtree, it does not narrate itself). Moved names the resulting revision and both endpoints of the transition; every other variant is a named refusal in the same style HarnessTaskCreateResultV1 establishes. IllegalTransition answers to the same shape of rule the operator’s own validate_operator_move (hatchery-harness-service) enforces – from != to, no move out of a terminal state, Done only from Review – without duplicating that function here: the service applies its own agent-scoped rule and reports the two states it rejected.

TaskOwnedByLiveRun names the rule commit 7799812’s incident exposed: while a run is non-terminal, its lifecycle projection owns its task’s state, and a caller-initiated move that would change it races a projection it cannot win cleanly rather than being told plainly it was never going to be allowed – so it is refused by name, carrying the id of the run that holds the task, instead of racing RevisionConflict on a revision the run’s own churn keeps moving out from under the caller.

Variants§

§

Moved

§

TaskIsOwn

Fields

§

TaskOutsideOwnSubtree

Fields

§own_task_id: HarnessTaskId
§

IllegalTransition

§

TaskOwnedByLiveRun

Fields

§

RevisionConflict

Fields

Implementations§

Trait Implementations§

Source§

impl Clone for HarnessTaskMoveResultV1

Source§

fn clone(&self) -> HarnessTaskMoveResultV1

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 HarnessTaskMoveResultV1

Source§

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

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

impl<'de> Deserialize<'de> for HarnessTaskMoveResultV1

Source§

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

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

impl Eq for HarnessTaskMoveResultV1

Source§

impl PartialEq for HarnessTaskMoveResultV1

Source§

fn eq(&self, other: &HarnessTaskMoveResultV1) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl Serialize for HarnessTaskMoveResultV1

Source§

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

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for HarnessTaskMoveResultV1

Auto Trait Implementations§

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, 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> 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.