You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix the finalize budget, hand the writer to the coordinator, drop scaffolding
Review follow-ups on the AgentDriver wiring.
1. Derive the finalize budget instead of passing `upload_timeout`.
The coordinator's floor is `script_timeout + upload_timeout`, so passing
`upload_timeout` alone made `remaining > floor` false for every possible
configuration (defaults: 120s > 60s + 120s). Because this path `return`s
past the legacy one-shot upload, enabling `PeriodicHandoffCheckpoints`
meant no end-of-run snapshot at all: runs shorter than one checkpoint
interval uploaded nothing, and longer runs lost everything since the last
periodic tick.
Use `checkpoint_coordinator::finalize_budget(script_timeout,
upload_timeout)`, which owns the floor so the two cannot drift apart.
2. Give the coordinator the declarations writer.
`run_snapshot_upload` flushes queued driver-side `file` appends before
running the declarations script so none is in flight when the bash script
starts appending to the same JSONL. The coordinator path skipped that, so
checkpoints could miss the agent's most recent edits. The coordinator is
gated on a superset of the writer's own conditions, so the handle is
always present when the coordinator exists.
3. Remove the temporary `allow(dead_code)` scaffolding.
Both earlier PRs in this stack noted their allows were "removable once
that PR is merged on top of this one" — this is that PR. Removes the
module-wide `#![allow(dead_code)]` in `checkpoint_coordinator` (which
would otherwise permanently blind the lint over new async/networking
code) plus the per-item allows in `snapshot` and `harness_support`, along
with the now-stale comments explaining them.
Verified with `cargo clippy -p warp --all-targets --tests -- -D warnings`.
Co-Authored-By: Oz <oz-agent@warp.dev>
0 commit comments