Repository navigation
feat(engine): reserve host calls in task budgets - #144
Conversation
Co-authored-by: Medulla <medulla@tinyhumans.ai>
Tiny Sweeper reviewTiny Sweeper reviewed this change across 5 lane(s) and found 0 active actionable finding(s). Detailed lane evidence and any incomplete work are listed below. State: Incomplete Review snapshot
Completeness: Incomplete FeaturesNone identified with supported citations. TestsNo supported feature-to-test mapping was produced. Test execution is not inferred.
FindingsNo active actionable findings. Could not review: crates/tinycomputer-engine/src/task/budget.rs, crates/tinycomputer-engine/src/task/persistence.rs, crates/tinycomputer-engine/src/task/plan_recovery.rs, crates/tinycomputer-engine/src/task/publish.rs, crates/tinycomputer-engine/src/task/recovery.rs, crates/tinycomputer-engine/src/task/store.rs, crates/tinycomputer-engine/src/task/task_tests/payment_tests.rs, crates/tinycomputer-engine/src/task/task_tests/plan_tests.rs, crates/tinycomputer-engine/src/task/task_tests/rescue_tests.rs, tinysweeper/description, tinysweeper/tests Before merge
How this fits togetherflowchart LR
n0["FailedStepRecovery<br/>changed"]:::changed
n1["PlanRecoveryRequest<br/>changed"]:::changed
n2["redact_value<br/>changed"]:::changed
n3["build_cell<br/>changed"]:::changed
n4["TaskId"]:::impacted
n5["FlowRunner"]:::impacted
n6["TaskConstraints"]:::impacted
n7["Value"]:::impacted
n8["Cell"]:::impacted
n0 -->|uses| n4
n0 -->|uses| n6
n1 -->|uses| n4
n1 -->|uses| n6
n2 -->|uses| n7
n3 -->|uses| n8
n5 -->|uses| n4
n5 -->|uses| n6
classDef changed fill:#0d4429,stroke:#238636,color:#e6edf3
classDef impacted fill:#161b22,stroke:#6e7681,color:#c9d1d9
classDef flagged fill:#5a1e02,stroke:#d93f0b,color:#ffffff
classDef blocking fill:#67060c,stroke:#f85149,color:#ffffff
Agent review detailscritique
security
tests
commits
description
Evidence and run details
|
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configuration
You can disable this status message by setting the Use the checkbox below for a quick retry:
Comment |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
There was a problem hiding this comment.
tinysweeper found nothing blocking, but could not review everything, so this is not an approval: crates/tinycomputer-engine/src/lib.rs, crates/tinycomputer-engine/src/task/budget.rs, crates/tinycomputer-engine/src/task/mod.rs, crates/tinycomputer-engine/src/task/persistence.rs, crates/tinycomputer-engine/src/task/plan_recovery.rs, crates/tinycomputer-engine/src/task/recovery.rs, crates/tinycomputer-engine/src/task/store.rs, crates/tinycomputer-engine/src/task/task_tests.rs and 5 more.
$0.0001 · 0 in / 0 out · 739 embedded · ladder/vectors-oai3
…-202-h3f-fallback
Co-authored-by: Medulla <medulla@tinyhumans.ai>
There was a problem hiding this comment.
tinysweeper found nothing blocking, but could not review everything, so this is not an approval: crates/tinycomputer-engine/src/task/budget.rs, crates/tinycomputer-engine/src/task/persistence.rs, crates/tinycomputer-engine/src/task/plan_recovery.rs, crates/tinycomputer-engine/src/task/publish.rs, crates/tinycomputer-engine/src/task/recovery.rs, crates/tinycomputer-engine/src/task/store.rs, crates/tinycomputer-engine/src/task/task_tests/payment_tests.rs, crates/tinycomputer-engine/src/task/task_tests/plan_tests.rs and 3 more.
$0.0001 · 0 in / 0 out · 736 embedded · ladder/vectors-oai3
Adds a per-task host call budget handle to TinyComputer recovery and planning hooks. Hosts reserve each model attempt before provider I/O, and a failed or cancelled attempt remains charged. A scoped host-work guard charges active recovery/planning time on return, failure, timeout, or cancellation. The same task state supplies later hooks and continued Jev runs with the reduced model-call allowance.
The handle is also exposed through UsageRecorder so worker hosts can apply the same reservation to external model calls made while a task is paused. Native Jev evaluation and H4 PlanningDebit accounting remain in their existing paths.
Regression coverage verifies plan recovery and a later failed-step recovery share one call, cancellation preserves the reservation and elapsed time, and host plan-recovery time after a failed native handoff is charged once.
Validation: