Repository navigation
feat: embed guarded browser tasks with resumable state - #148
Conversation
Co-authored-by: Medulla <medulla@tinyhumans.ai>
Co-authored-by: Medulla <medulla@tinyhumans.ai>
Co-authored-by: Medulla <medulla@tinyhumans.ai>
Co-authored-by: Medulla <medulla@tinyhumans.ai>
Co-authored-by: Medulla <medulla@tinyhumans.ai>
Co-authored-by: Medulla <medulla@tinyhumans.ai>
Co-authored-by: Medulla <medulla@tinyhumans.ai>
Co-authored-by: Medulla <medulla@tinyhumans.ai>
…/tinycomputer into epic-202-u4-models # Conflicts: # crates/tinycomputer-engine/src/agentic/runtime.rs # crates/tinycomputer-engine/src/lib.rs
Co-authored-by: Medulla <medulla@tinyhumans.ai>
Co-authored-by: Medulla <medulla@tinyhumans.ai>
Co-authored-by: Medulla <medulla@tinyhumans.ai>
Co-authored-by: Medulla <medulla@tinyhumans.ai>
…02-u3-secret-host
Co-authored-by: Medulla <medulla@tinyhumans.ai>
Co-authored-by: Medulla <medulla@tinyhumans.ai>
…ic-202-u5-persistence
…02-u5-persistence
…02-u3-secret-host
Co-authored-by: Medulla <medulla@tinyhumans.ai>
…ic-202-u5-persistence
Co-authored-by: Medulla <medulla@tinyhumans.ai>
Co-authored-by: Medulla <medulla@tinyhumans.ai>
Co-authored-by: Medulla <medulla@tinyhumans.ai>
Co-authored-by: Medulla <medulla@tinyhumans.ai>
chore: pin TinyInference usage aggregation fix
Tiny Sweeper reviewFindingsNo active actionable findings. Advisory notes
Verdict: Incomplete · Priority: medium Diagnostics and supporting detailsFull summaryPull request purpose (title): feat: embed guarded browser tasks with resumable state. Tiny Sweeper completed its review; deterministic results follow. Unreviewed paths
Partial review reasons
Review snapshot
Completeness: Incomplete What changedWhole pull-request diff spans 133 files with 12,694 additions and 619 deletions. Latest-push delta unavailable: from c79852e to 06f3449, with reason that there is no trusted base-to-head diff comparison; cached prompt differences are not a proven push delta. Features
Tests
Before merge
Agent review detailscritique
security
tests
commits
description
Evidence and run details
|
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. |
|
Warning Review limit reached
This review includes 132 billable files and costs up to $33.00. Or wait 56 minutes for your next included review. View limit details
Comment |
There was a problem hiding this comment.
tinysweeper found nothing blocking, but could not review everything, so this is not an approval: crates/tinycomputer-browser/src/action_gate.rs, crates/tinycomputer-browser/src/error/error_tests.rs, crates/tinycomputer-browser/src/error/mod.rs, crates/tinycomputer-browser/src/fake/mod.rs, crates/tinycomputer-browser/src/lib.rs, crates/tinycomputer-browser/src/observer.rs, crates/tinycomputer-browser/src/sessions/mod.rs, crates/tinycomputer-browser/src/sessions/page.rs and 115 more.
$0.0001 · 0 in / 0 out · 775 embedded · ladder/vectors-oai3
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: bfc73c3e2a
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| @@ -0,0 +1,724 @@ | |||
| //! A browser-only [`super::FlowRunner`] for hosts embedding the engine. | |||
There was a problem hiding this comment.
Split oversized task modules by responsibility
This change introduces task/browser.rs at 724 lines and task/persistence.rs at 611 lines while expanding drive.rs, controller.rs, and recovery.rs to roughly 959, 803, and 498 lines respectively. These exceed the repository's module-size boundary and concentrate several independent responsibilities in single files; convert them to focused folder modules before merging.
AGENTS.md reference: AGENTS.md:L199-L214
Useful? React with 👍 / 👎.
Co-authored-by: Medulla <medulla@tinyhumans.ai>
Co-authored-by: Medulla <medulla@tinyhumans.ai>
fix(engine): keep stable Clippy clean with checked task ids
There was a problem hiding this comment.
tinysweeper found nothing blocking, but could not review everything, so this is not an approval: crates/tinycomputer-browser/src/sessions/sessions_tests/lifecycle_tests.rs, crates/tinycomputer-engine/src/task/browser.rs, crates/tinycomputer-engine/src/task/store.rs, crates/tinycomputer-engine/src/task/task_tests/persistence_tests.rs, crates/tinycomputer-engine/src/task/task_tests/plan_tests.rs, crates/tinycomputer/tests/public_api_tests.rs, tinysweeper/description, tinysweeper/tests.
$0.0001 · 0 in / 0 out · 775 embedded · ladder/vectors-oai3
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b2de3466c6
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Co-authored-by: Medulla <medulla@tinyhumans.ai>
Co-authored-by: Medulla <medulla@tinyhumans.ai>
Co-authored-by: Medulla <medulla@tinyhumans.ai>
Co-authored-by: Medulla <medulla@tinyhumans.ai>
Co-authored-by: Medulla <medulla@tinyhumans.ai>
Co-authored-by: Medulla <medulla@tinyhumans.ai>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e70bef3a52
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Co-authored-by: Medulla <medulla@tinyhumans.ai>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c79852ef7d
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Payment continuations now reserve each planner call against the task budget before starting, refuse the transition when the budget is exhausted, and reject plans that navigate away from the current checkout page. Cancelling a payment checkpoint also closes its authorization so it cannot be replayed, and evicted tasks release their runner slots. Auto-committed-on: cuttlefish Co-authored-by: Medulla <medulla@tinyhumans.ai>
The payment budget helper now binds the task call budget to a local before starting payment work, instead of chaining the calls in one expression. This keeps the lock guard from being held across the begin_payment_work call and makes the borrow lifetimes explicit. Auto-committed-on: cuttlefish Co-authored-by: Medulla <medulla@tinyhumans.ai>
There was a problem hiding this comment.
💡 Codex Review
When the 32-entry task store is full and its oldest final entry is a non-continuable payment checkpoint, starting another task removes that cell without calling runner.release. Such checkpoints intentionally retain their browser session, so the task becomes unreachable while its BrowserRunner surface still consumes one of the eight browser slots; repeated evictions can exhaust all slots. Release the evicted cell's task resources as the import eviction path already does.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| ) | ||
| .await; | ||
| } else { | ||
| runner.release(&id); |
There was a problem hiding this comment.
Retain checkout sessions while awaiting planner answers
When a payment continuation plan returns any questions, this releases the retained checkout session before publishing NeedsInput. After the caller supplies those values, supply starts the navigation-free payment plan on a newly created browser session, so it cannot inspect or fill the original checkout page. Keep the retained session until the continuation finishes, is cancelled, or otherwise reaches a terminal state.
Useful? React with 👍 / 👎.
| drop(work); | ||
| handle_plan_failure(cell, runner, id, task, reason).await; |
There was a problem hiding this comment.
Keep payment recovery authorized after planner failure
When payment planning fails and the runner has plan recovery enabled, dropping this payment HostWorkGuard changes host_work from PaymentActive to Closed; handle_plan_failure then calls host_plan, whose begin_work() accepts only Open. Consequently the configured recovery callback is never invoked for payment planner errors or timeouts and the task always fails with an unavailable host-work budget. Run recovery under the existing payment scope or explicitly transition to a state that permits the fallback.
Useful? React with 👍 / 👎.
Add an embeddable browser task runtime so a server host can run Jev tasks in process with desktop dependencies optional. Hosts supply models, enforce an ActionGate, resolve secret facts by opaque handle, and inspect per-role usage. Paused input/human tasks export and import into a fresh manager while retaining their task identity and constraints.
The runtime also supports safe flow-prefix handoff, host recovery and payment continuation on the same browser session, atomic model-call reservations, cancellation/release ordering, private-field masking and fresh target validation. Payment checkpoints stay non-exportable. No hosted product default or production rollout changes here.
This rolls up the epic-branch work for #116 through #120 and subsequent guard, privacy, budget and lifecycle fixes. Part of tinyhumansai/openintents-core#202. Its qualification decision is NO-GO pending evidence; OpenHuman remains the host default.
Dependencies are pinned to canonical commits: TinyInference 0.5.0 with exact usage accounting (tinyhumansai/tinyinference#115), agent-browser ZIP/TLS hardening (tinyhumansai/agent-browser#8), and TinyBus main. Suggested integration order is the dependency PRs, this PR, then the host PR. All pinned commits already exist in their canonical repositories.
Validation: locked all-target/all-feature workspace check, formatting and strict engine/browser Clippy passed. Full engine and browser suites passed (546 and 290 tests). Fresh parent tests on the final dependency pin passed 15 budget tests and 3 usage tests. The pin includes the verified usage recovery and mixed-precision aggregation fixes. Desktop/platform CI remains for the final hosted pass.
Leave this final integration PR open for full CI and review; preserve individual commits.