Skip to content

Implement run execution management (ISSUE-005)#6

Open
proboscis wants to merge 1 commit intomainfrom
issue/ISSUE-005/run-20251228-153238
Open

Implement run execution management (ISSUE-005)#6
proboscis wants to merge 1 commit intomainfrom
issue/ISSUE-005/run-20251228-153238

Conversation

@proboscis
Copy link
Copy Markdown
Owner

Summary

  • Extended Run struct with status, runtime, log_ref, timeline, exit_code, and pid fields for execution tracking
  • Added RunStatus enum (Pending, Running, Exited, Failed, Killed) for tracking execution state
  • Added Runtime enum (Background, Tmux, Zellij) for supporting different execution environments
  • Implemented new CLI commands:
    • runbox ps - list running and recent runs with status filtering
    • runbox logs <run_id> - view logs with -f for tail mode
    • runbox stop <run_id> - stop a running job
    • runbox attach <run_id> - attach to tmux/zellij session
    • runbox _on-exit - internal command for exit detection (hidden)
  • Extended runbox run with --runtime option (bg, tmux, zellij)
  • Added atomic run updates via temp file + rename pattern
  • Added logs directory support in storage layer
  • Updated JSON schema for Run with new fields

Test Plan

  • All existing tests pass (18 tests)
  • Manual test: runbox run -t <template> --runtime bg starts in background
  • Manual test: runbox run -t <template> --runtime tmux creates tmux window
  • Manual test: runbox ps shows running jobs with status
  • Manual test: runbox logs <run_id> shows log output
  • Manual test: runbox stop <run_id> stops running job

Related

Implements ISSUE-005: Run Execution Management

🤖 Generated with Claude Code

Add execution management features to runbox, enabling observation and
control of running jobs while maintaining the core reproducibility focus.

Key changes:
- Extended Run struct with status, runtime, log_ref, timeline, exit_code fields
- Added RunStatus enum: Pending, Running, Exited, Failed, Killed
- Added Runtime enum: Background, Tmux, Zellij
- Implemented new CLI commands:
  - `runbox ps` - list running and recent runs with status filtering
  - `runbox logs <run_id>` - view logs with -f for tail mode
  - `runbox stop <run_id>` - stop a running job
  - `runbox attach <run_id>` - attach to tmux/zellij session
  - `runbox _on-exit` - internal command for exit detection
- Extended `runbox run` with --runtime option (bg, tmux, zellij)
- Added atomic run updates and logs directory to storage layer
- Updated JSON schema for Run with new fields

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
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