Skip to content

Add durable project task ownership and bounded execution lanes - #10655

Closed
PhilipJohnBasile wants to merge 2 commits into
unslothai:mainfrom
PhilipJohnBasile:codex/project-tasks-review-20260909
Closed

PhilipJohnBasile wants to merge 2 commits into
unslothai:mainfrom
PhilipJohnBasile:codex/project-tasks-review-20260909

Conversation

@PhilipJohnBasile

@PhilipJohnBasile PhilipJohnBasile commented Sep 9, 2026 •

Copy link
Copy Markdown

The task engine is now included with its first real execution/UI consumer in #10658, as requested in review. This engine-only PR is retained as a draft for source/history reference; review and land the combined task feature through #10658 after its worktree prerequisites. The combined branch runs engine regressions in its integration matrix and removes this duplicate standalone workflow.

The original engine-only scope and validation receipt follow for traceability:

Background tasks need durable ownership and dedicated child capacity before model and workspace adapters can safely use them. This adds an internal project task store and bounded runner: parents can wait for children while separate child workers continue, interrupted attempts require explicit retries, and late workers cannot publish results after losing ownership.

The layer includes atomic child-count/token reservations, retry caps, immutable snapshots, monotonic events, queued/running lease recovery, cancellation and project-retirement admission fences. Shutdown stops admission and reports workers that have not returned; a child that cannot drain leaves its parent interrupted and its project busy. The executor contract documents the required model-admission release and existing filesystem/process fences.

This is the independently reviewable engine layer requested in #9673. No renderer endpoints, model/tool adapters, owned child-worktree wiring, or UI are added here. It does not advance the held existing-folder PR #9859, replace the aggregate #9987 executor, or claim an end-to-end background coding workflow.

Validation at 191ac8ba86943eb0bd54a9f1532c5d2ed384c6c5:

  • All six native jobs passed on Linux, macOS, and Windows with Python 3.11 and 3.12: run 34387110775. Each job covers 46 task-engine cases and 62 adjacent storage cases, including the actual Studio database integration.
  • The same 108 cases passed locally in a clean Python 3.12 environment.
  • 112 workflow-trigger regression cases passed; Ruff, repository formatting, and git diff --check passed.

The first native run exposed a racy assertion that shutdown had already flushed cancellation to SQLite, and the adjacent 900-thread storage fixture exceeded the 30-second Windows budget. The shutdown test now observes the actual cancellation signal. Storage runs with a separate 120-second budget while engine tests retain 30 seconds; no cases are skipped.

The tests cover concurrent claims and budget reservations, both parent workers waiting on children, stale results, explicit retries, shutdown/submission races, project archival/deletion, an executor that does not stop promptly, and preservation of worker capacity after an executor raises SystemExit. Real model, tool-confinement, and packaged-app qualification belong to the following integration layers.

@PhilipJohnBasile
PhilipJohnBasile marked this pull request as ready for review September 9, 2026 18:11
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 9, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-09-09T18:17:19.659166Z 191ac8b Draft marked ready
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@danielhanchen

Copy link
Copy Markdown
Member

This adds the task engine and a six-job matrix in .github/workflows/studio-project-tasks-ci.yml but nothing in the tree calls task_runner.py yet. Could you fold it in with its first real consumer so the layer arrives with something exercising it?

@PhilipJohnBasile
PhilipJohnBasile marked this pull request as draft September 10, 2026 02:43
@PhilipJohnBasile
PhilipJohnBasile deleted the codex/project-tasks-review-20260909 branch September 12, 2026 02:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants