Skip to content

Add: Job concept implementation (schema, runtime, CLI)#78

Merged
FL4TLiN3 merged 7 commits intoepic/job-conceptfrom
feat/job-concept
Dec 9, 2025
Merged

Add: Job concept implementation (schema, runtime, CLI)#78
FL4TLiN3 merged 7 commits intoepic/job-conceptfrom
feat/job-concept

Conversation

@FL4TLiN3
Copy link
Contributor

@FL4TLiN3 FL4TLiN3 commented Dec 9, 2025

Summary

Implements the Job concept as a parent container for Runs, enabling future parallel delegation support.

  • Add Job schema and jobId to Checkpoint, RunSetting, and Event types
  • Update storage structure from perstack/runs/{runId}/ to perstack/jobs/{jobId}/runs/{runId}/
  • Update CLI options: --job-id, --continue-job (replacing --continue-run)
  • Update all affected tests and E2E tests

Test plan

  • pnpm typecheck passes
  • pnpm test passes (357 tests)
  • pnpm test:e2e passes (37 tests)
  • pnpm build passes

Closes #76


Note

Introduce Job as a parent for Runs, propagate jobId across schemas/events, switch storage to jobs/{jobId}/runs/{runId}, and update CLI, runtime, TUI, and tests accordingly.

  • Core:
    • Add Job schema and jobStatusSchema in schemas/job.ts.
    • Add jobId to Checkpoint, RunSetting, RunEvent, and RuntimeEvent; support parallel delegateTo via array in Checkpoint.
    • Update event/command/runtime schemas to parse jobId, continueJob, and resumeFrom.
  • Runtime:
    • Emit/runtime events now include jobId; createRuntimeEvent signature updated.
    • Store/retrieve checkpoints/events under perstack/jobs/{jobId}/runs/{runId}/ (update default store and run-setting store APIs).
    • Pass jobId through run loop, skill managers, and state machines; adjust delegation logic and initialization to use jobId.
  • CLI (perstack):
    • Add --job-id and --continue-job; deprecate --continue-run.
    • Enforce --resume-from requires --continue or --continue-job.
    • start and run commands plumb jobId; history/resume flows use job-aware helpers.
  • TUI/Tooling:
    • Update TUI types (RunHistoryItem, CheckpointHistoryItem, EventHistoryItem) to include jobId.
    • run-manager rewritten to traverse jobs/*/runs/* and job-scoped helpers (getMostRecentRunInJob, job-aware checkpoint/event accessors).
  • Tests/E2E:
    • Update tests to assert/propagate jobId, new CLI flags, event payloads, and storage paths; add validation for --resume-from usage.

Written by Cursor Bugbot for commit d2cf500. This will update automatically on new commits. Configure here.

Introduce Job as a parent concept for Runs:
- Add Job schema with status, totalSteps, maxSteps, usage
- Add jobId to Checkpoint, RunSetting, and all Event types
- Change delegateTo to array to support parallel delegation
- Update runtime and skill managers to propagate jobId
- Update all tests for new schema structure
@vercel
Copy link

vercel bot commented Dec 9, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Preview Comments Updated (UTC)
perstack Ignored Ignored Preview Dec 9, 2025 1:03am

@codecov
Copy link

codecov bot commented Dec 9, 2025

Codecov Report

❌ Patch coverage is 68.96552% with 9 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
packages/runtime/src/skill-manager/helpers.ts 0.00% 4 Missing ⚠️
packages/runtime/src/skill-manager/mcp.ts 20.00% 4 Missing ⚠️
packages/runtime/src/run-setting-store.ts 50.00% 1 Missing ⚠️

📢 Thoughts on this report? Let us know!

@FL4TLiN3 FL4TLiN3 merged commit 654ea63 into epic/job-concept Dec 9, 2025
@FL4TLiN3 FL4TLiN3 deleted the feat/job-concept branch December 9, 2025 01:03
@FL4TLiN3 FL4TLiN3 mentioned this pull request Dec 9, 2025
9 tasks
@github-actions github-actions bot mentioned this pull request Dec 9, 2025
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