Repository navigation
Let a task set how many turns a do step may spend - #164
Conversation
A `do` step had a fixed eight turns (`DO_TURNS`). On a shop's cart or checkout one step can need more moves than that, and the step then fails as not accomplished while it is still making progress. - `TaskBudget.max_do_turns` and `RunFlowRequest.max_do_turns`: optional, 8 when unset, capped by the module at 32 (`MAX_DO_TURNS`). - The task controller passes the budget's limit to every flow run. - Contract 2.28; the thresholds table, the task docs, the StartTask schema and the described budget list the field.
Tiny Sweeper reviewVerdict: Incomplete · Priority: none Diagnostics and supporting detailsFull summaryPull request purpose (title): Let a task set how many turns a do step may spend. Tiny Sweeper completed its review; deterministic results follow. Unreviewed paths
Partial review reasons
Review snapshot
Completeness: Incomplete What changedA new optional `max_do_turns` field is added to `TaskBudget` and, with `skip_serializing_if` so it is omitted when unset, to `RunFlowRequest`. The flow runtime clamps a set value to 1..=32 against the new `MAX_DO_TURNS` constant and otherwise falls back to `DO_TURNS` (8), which becomes `pub(super)`; the `do` step's turn allowance now reads `run.do_turns` instead of the constant. The task controller copies the budget value into every run request, and the DescribeModule StartTask schema and `start_task.schema.json` document the field with minimum 1 and maximum 32. The contract constant moves to (2, 28) with compatibility pins and comments updated, and the relevant technical docs list the new lever. Features
TestsNo supported feature-to-test mapping was produced. Test execution is not inferred. FindingsNo active actionable findings. Before merge
Agent review detailscritique
security
tests
commits
description
Evidence and run details
|
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configuration
Comment |
Summary
A
dostep had a fixed eight turns (DO_TURNS). In OpenIntents production every Jev run on amazon.in since the worker moved to Jev endednot accomplished after 8 turns(5 of 5, 800 to 1,150 Jev calls each): a shop's cart or checkout can need more moves in one step than a desktop app does. This lets a task, or a flow run, raise the limit, keeping 8 as the default.Related issue
None.
API or behavior changes
TaskBudget.max_do_turnsandRunFlowRequest.max_do_turns(contract 2.28, a minor bump). Unset keeps 8; the module caps it at 32 (MAX_DO_TURNS). Omitted from the wire when unset.Validation
Commands actually run, with their outcome (rustc 1.99.1, macOS):
cargo fmt --all -- --check: passcargo clippy --all-targets --all-features -- -D warnings: clean on the crates this touches (cargo clippy --no-deps -p tinycomputer-bus -p tinycomputer-engine -p tinycomputer). The full run stops on 4 lints intinycomputer-accessibility(focus.rs:135,paste.rs:286,permissions.rs:150,153), untouched here; they fail the same way onmain02f9aac with this newer local toolchain, and CI onmainis green.cargo build --all-targets --all-features: passcargo test --all-features: 1,723 passed, 2 failed:members_tests::a_wait_with_no_mode_is_an_invalid_argument_rather_than_a_hangandan_unknown_surface_wait_is_rejected_by_name, which fail identically onmain02f9aac on this Mac (desktop environment), untouched here.runner_hooks_share_the_task_surface_and_release_its_sessionfailed once under the full parallel run and passed 3/3 alone, and passes onmain: flaky, unrelated.RUSTDOCFLAGS="-D warnings" cargo doc --no-deps --all-features: passTests
flow_tests/do_loop_tests.rs::a_do_step_spends_the_turns_its_run_allows: simulator, a frozen page; adostep ends after exactly 8 turns unset, 3, 12, and 32 when asked for 500.task_tests/start_tests.rs::a_budget_turn_limit_reaches_every_run, and the existing start test asserts unset stays unset.agent_tests::a_do_turn_limit_pins_its_wire_form,flow_tests(RunFlowRequestomits it unset, round-trips 12).version_tests,public_api_tests);describe_testscovers the documented budget field.Documentation
docs/technical/decision-thresholds.md:DO_TURNS/MAX_DO_TURNS8 / 32.docs/technical/specs/desktop-module-contract.md: the 2.28 note.docs/technical/tasks.md,docs/crates/tinycomputer-bus/agent-and-tasks.md,crates/tinycomputer-skills/schemas/start_task.schema.json, and theDescribeModuleStartTask schema list the field.Checklist
#[allow(...)],#[ignore], or relaxed lints.envcontents in the diff or the description