Skip to content

Fit the generated Software Garden into Cloud's 60-minute run cap (cloud#4235) #155

Description

@khaliqgant

Why

Cloud now caps every hosted Relayflow v2 run at 60 minutes (AgentWorkforce/cloud#4235: Daytona credits are exhausted, and E2B sandboxes have a verified one-hour lifetime). The generated Software Garden flow still plans for 180 minutes (FLOW_TIME.headerMinutes = 180, bodyMinutes = 175, in web/lib/flow-workflows.ts). Measured runs this week took 1.5–2 h, so on E2B most Garden runs are cut off mid-flow, and the time-aware step gating (#132) is working from a deadline that is 3x too long.

Where the time goes today: the full check suite runs 2–4 times per run (~12–15 min each on Rust repos, where kernel/target is rebuilt from scratch); up to two 45-min repair agents; a base-commit check that reruns the whole suite; plan + plan-review agents; two adversarial reviews; and a fix round.

Ask: fit a typical run into 30–45 min and the worst case into 60

  1. Real deadline. FLOW_TIME.headerMinutes = 60 (Cloud's cap), with setupMinutes sized for E2B cold start. Re-derive every allowance and *StartMinutes from it, and keep the existing budget-sim sweep test (every step at its full limit still leaves publishing room).
  2. Fewer check runs. Reuse the build cache between check runs (e.g. a shared CARGO_TARGET_DIR / dependency cache outside the worktree). Make the base-commit check optional: skip it when there is not time for a full check plus publishing, and report "base not checked".
  3. One repair round, with an agent timeout of about 15 min (relayflows ≥2.0.40 f.agent({ timeout }), live in Cloud's runtime).
  4. One adversarial review (20 min cap) and no separate fix round by default. Unresolved findings go on the draft PR, as they do today.
  5. Drop the separate plan-review agent. The implementer's task includes planning, so the traditional workflow becomes discover → implement → check → (repair) → publish → review.
  6. Fail fast to a draft PR: when the remaining time can't fit the next long step, publish what exists as a draft with the report, using the existing time-stop path.
  7. Disk: clean build outputs and caches the run no longer needs before the second check (the E2B/Daytona sandbox is 10 GB, and a doubled Rust build fills it: flows#505, relay#1824).

Acceptance

  • Generator tests updated, plus a sweep test proving the worst case fits 60 min.
  • The generated flow passes flows check.
  • The orchestrator re-applies the change to the seven live Gardens and proves one real Garden run on E2B completes and opens a PR within 60 min.

Related: cloud#4235 (cap), cloud#4248 (E2B gh), #132/#136/#139 (time plan, publish limits, agent limits).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions