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
task_id: HarnessTaskIdTaskOutsideOwnSubtree
IllegalTransition
TaskOwnedByLiveRun
RevisionConflict
Implementations§
Source§impl HarnessTaskMoveResultV1
impl HarnessTaskMoveResultV1
pub fn validate(&self) -> Result<(), HarnessValidationError>
Trait Implementations§
Source§impl Clone for HarnessTaskMoveResultV1
impl Clone for HarnessTaskMoveResultV1
Source§fn clone(&self) -> HarnessTaskMoveResultV1
fn clone(&self) -> HarnessTaskMoveResultV1
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more