Skip to content

refactor: introduce ProjectTask platform for project-level async work#147

Merged
Che-Zhu merged 3 commits intomainfrom
codex-project-task-platform
Mar 12, 2026
Merged

refactor: introduce ProjectTask platform for project-level async work#147
Che-Zhu merged 3 commits intomainfrom
codex-project-task-platform

Conversation

@Che-Zhu
Copy link
Copy Markdown
Collaborator

@Che-Zhu Che-Zhu commented Mar 12, 2026

This PR introduces a new ProjectTask abstraction for project-level asynchronous work and migrates GitHub repository import onto that platform. It removes the old project-import-specific reconcile path and keeps the existing sandbox/database resource reconciliation model unchanged.

What changed

  • Added ProjectTask schema, enums, and migration.
  • Added task persistence helpers, reconcile loop, and executor registry.
  • Implemented CLONE_REPOSITORY as the first task type.
  • Migrated GitHub import to create a task instead of driving import through Project.importStatus.
  • Updated project APIs and UI status handling to read task state.
  • Replaced sandbox-triggered import wake-up with sandbox-triggered task wake-up.
  • Refreshed architecture documentation and added architecture evolution guidance.

Why

  • GitHub import is not a resource lifecycle concern; it is project-level async work that happens after sandbox readiness.
  • We need a reusable platform for future project-scoped work such as skill installation and deploy.
  • This separates resource orchestration from task orchestration and gives us a clearer platform model.

Follow-ups / Known gaps

  • Existing migration does not backfill historical import state into ProjectTask.
  • Task locking currently still allows RUNNING tasks to be re-claimed after lock expiry; this matters more once longer-running task types are added.
  • CLONE_REPOSITORY currently treats sandbox RUNNING as task-ready, but ttyd readiness can lag behind pod readiness.

Validation

  • pnpm exec prisma generate
  • pnpm exec tsc --noEmit
  • pnpm lint
  • Remote test DB schema updated via prisma db push

@github-actions
Copy link
Copy Markdown

✅ PR Check Results: Passed

Build Checks

Check Status
Lint & Build ✅ Passed
Docker Build ✅ Passed

✨ Great work!

All checks passed successfully. Your PR is ready for review.

Details:

  • ✅ Code quality verified (linting passed)
  • ✅ Build successful
  • ✅ Docker image build verified (linux/amd64)
    Commit: f219ce616670a340be38be04ce21609c87a9d4aa
    Branch: codex-project-task-platform

🔗 View Details:

@Che-Zhu Che-Zhu merged commit ce87b37 into main Mar 12, 2026
9 checks passed
@Che-Zhu Che-Zhu deleted the codex-project-task-platform branch March 12, 2026 03:30
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