Skip to content

fix(platform): bound retry and worker cleanup - #4643

Merged
yannickmonney merged 1 commit into
mainfrom
fix/platform-wave4-review
Oct 9, 2026
Merged

yannickmonney merged 1 commit into
mainfrom
fix/platform-wave4-review

Conversation

@yannickmonney

@yannickmonney yannickmonney commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

What

These are the platform half of the post-merge review of the sandbox wave. I confirmed each finding against the code, and each fix has a test.

  • Task out-of-memory retries (feat(sandbox): attribute OOM kills and retry out-of-memory runs after a pause #4633). The retry was meant to wait 2, 10, then 30 minutes. The retry job queued the new run at once and held only its turn job, and the stranded-queued-run sweep re-kicks any queued run idle past 4 minutes, so the longer waits started after about 5. Now the task.agent_retry decision itself is held for the wait (startAfter on the job). No queued run exists meanwhile, the failed run shows its retry pending (it already holds its slot as an armed retry), and every guard is re-checked when the wait ends.
  • Automation out-of-memory re-kick (feat(sandbox): attribute OOM kills and retry out-of-memory runs after a pause #4633). The stepper asked for 2/10/30 minutes, but the kick holds a start for at most 2 minutes (its op row must stay inside the stalled-turn sweep's window), so it always waited 2. It now asks for that explicitly (RESOURCE_EXHAUSTED_REKICK_DELAY_MS), and the sandbox README and coverage row say "a task run waits 2, 10, then 30 minutes, an automation's agent node 2". Parking an agent node for a longer timed wait would need new cursor state in the stepper; that's out of scope here.
  • Out-of-memory wording (feat(sandbox): attribute OOM kills and retry out-of-memory runs after a pause #4633). The card shows a failure class's sentence only for a final failure and in run history, yet this one said "Tale tries again after a pause". It now reads like its siblings ("Start the agent again — if it keeps happening, ask an Admin to give agents more memory") in EN/DE/FR, and the run's own reason drops the promise.
  • Worker input cleanup (fix(platform): clear stale task inputs and turn instructions from agent workers #4628). A pass took the 50 oldest copies before asking which were stale. 50 old copies of tasks still open (in review, recurring, backlog) hid every stale copy behind them on every start. It now asks about up to 1,000 copies, oldest first, and removes at most 50 stale ones.

Checks

  • Platform type-aware lint and type-check are clean.
  • agent-runs.test.ts covers the held retry decision for each attempt. task_input_mirrors.test.ts covers the new bound and the hidden-stale-copies case.
  • The sandbox-ended suites, the stepper suites, i18n messages, the legacy agent-flow guard and lint:manual pass.

Current-main rebase

Replayed the previously accepted source 6eb171b4190ab48bdb9f99f233a47d2f128cabc1 onto main d1373d84cd56972501403f62145ec52e6f65d44a, including the merged shared CI repair in #4625. The accepted feature payload and all current-main changes are preserved in one atomic commit. Configured commit and conflict checks pass; earlier behavioral proof remains recorded above. All seven native required checks and full merge-group validation remain required for this new source.

Maintenance replay: preserves the accepted feature payload on main fd277c4, including merged #4649, #4650 and #4655. Retains the exact independently accepted one-line shared CLI inventory repair from #4654 (252f0df), pending native merge on main. The #4282 task-register union, where applicable, retains the accepted feature row and current-main rows. Existing behavioral evidence remains recorded above; no fresh full-feature/full-workspace or hosted-green claim. All seven native required contexts and full merge-group validation remain mandatory.

@yannickmonney
yannickmonney force-pushed the fix/platform-wave4-review branch from 6eb171b to 77a5444 Compare October 9, 2026 14:10
@yannickmonney yannickmonney changed the title fix(platform): post-merge review fixes for out-of-memory retries and worker cleanup fix(platform): bound retry and worker cleanup Oct 9, 2026
@yannickmonney
yannickmonney force-pushed the fix/platform-wave4-review branch from 77a5444 to d1a221c Compare October 9, 2026 15:24
@yannickmonney
yannickmonney added this pull request to the merge queue Oct 9, 2026
@yannickmonney
yannickmonney merged commit decea00 into main Oct 9, 2026
64 checks passed
@yannickmonney
yannickmonney deleted the fix/platform-wave4-review branch October 9, 2026 22:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant