Command reference
oko tasks submit
Records a pushed source handoff for later shared build and behavioral qualification, without starting a build or finishing the task.
Invocation#
oko tasks submit (<session> <number> | <task-id>) --source REPO --commit SHA --by SESSION [--json]Inputs and options#
- A stated task, the directory of the repository's checkout, a pushed commit and the author session. --source may be relative to where the command runs and --commit may be a short hash: Oko resolves both, to the absolute checkout and the full commit, before handing them to Stado.
Output and state effect#
- Stado verifies remote main ancestry and records an immutable handoff. Oko saves the receipt by task identity. An accepted source handoff does not finish the task: queued, building, awaiting_tests, stale-policy or unreadable qualification keeps it not done. When the task's contract records a blocker, or any acceptance check has no met result, it remains open with the corresponding reason. Repeat for each changed product. Repeating the same handoff does not erase a later operator correction.
Refusals and safe exits#
- A --source that is not a directory on this machine refuses with “--source <path> is not a checkout on this machine: <cause>”, and a --commit git cannot resolve there with “--commit <rev> is not a commit of <checkout>”. Withdrawn tasks, missing statements, unpushed commits, unsupported Stado, unreadable remotes and storage failures remain errors. No successful handoff is inferred from a plain commit string.
- The Desktop Tasks screen submits through the same native operation, which saves the receipt and the task's proof in one write. The real `tests/native_api/handoff.rs` journey uses the resident Tasks API with a dedicated task, retained transcript, signed-in fixture member and isolated Stado HOME below the checkout's `.build`. It publishes the declared source commit to a newly created bare local Git origin under that HOME and gives its child processes only Git's file transport; the source checkout's configured origin and the operator's Stado queue are untouched. Its refusal case submits a commit the source does not hold and checks unchanged proof and change list; its success case observes the source commit in Stado's isolated queue and in the task's proof. Run `cargo test --manifest-path rust/Cargo.toml --test native-api-journey native_handoff_refuses_an_absent_commit_and_records_one_proof_for_an_accepted_one -- --ignored --nocapture` with OKO_SESSION_PATH, OKO_TEST_SOURCE_REVISION, OKO_TEST_HANDOFF_TASK, OKO_TEST_FIXTURE_SESSION, OKO_TEST_HANDOFF_SOURCE, OKO_TEST_HANDOFF_COMMIT and OKO_TEST_STADO_HOME declared. Missing task, source, commit, signed-in account, Stado binary or isolated queue is a refusal, not a passing journey.