[PR #83] [MERGED] fix(events): isolate events per run to prevent stale event pollution #125

Closed
opened 2026-02-27 10:22:19 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/mikeyobrien/ralph-orchestrator/pull/83
Author: @mikeyobrien
Created: 1/21/2026
Status: Merged
Merged: 1/21/2026
Merged by: @mikeyobrien

Base: mainHead: fix/run-isolated-events-82


📝 Commits (4)

  • a59e369 fix(events): isolate events per run to prevent stale event pollution
  • 99db23e test(events): add e2e integration tests for event isolation
  • 143186f feat(cli): rename resume subcommand to --continue flag
  • 900c153 feat(events): auto-detect current run events file in ralph events

📊 Changes

10 files changed (+1285 additions, -93 deletions)

View changed files

📝 crates/ralph-cli/src/main.rs (+77 -31)
crates/ralph-cli/tests/integration_events_isolation.rs (+638 -0)
📝 crates/ralph-cli/tests/integration_resume.rs (+72 -52)
📝 crates/ralph-core/src/event_logger.rs (+3 -3)
📝 crates/ralph-core/src/event_loop.rs (+6 -1)
📝 crates/ralph-core/src/event_reader.rs (+2 -2)
📝 crates/ralph-core/tests/event_loop_ralph.rs (+4 -4)
tasks/event-isolation-e2e-tests.code-task.md (+173 -0)
tasks/rename-resume-to-continue-flag.code-task.md (+150 -0)
tasks/run-isolated-events-file.code-task.md (+160 -0)

📄 Description

Summary

  • Isolate events per run: Each ralph run now writes to a unique timestamped events file (.agent/events-{timestamp}.jsonl), preventing stale events from previous runs from polluting the TUI
  • Rename resume--continue: The resume subcommand is now a --continue flag on the run command for cleaner CLI ergonomics
  • Auto-detect events file: ralph events now automatically finds the most recent events file for the current run, no manual path needed

Test Plan

  • Added comprehensive e2e integration tests for event isolation (integration_events_isolation.rs)
  • Updated resume integration tests for new --continue flag
  • All existing tests pass (cargo test)
  • Manual verification: run ralph run, check .agent/ for timestamped events file
  • Manual verification: run ralph events and confirm it shows current run's events

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/mikeyobrien/ralph-orchestrator/pull/83 **Author:** [@mikeyobrien](https://github.com/mikeyobrien) **Created:** 1/21/2026 **Status:** ✅ Merged **Merged:** 1/21/2026 **Merged by:** [@mikeyobrien](https://github.com/mikeyobrien) **Base:** `main` ← **Head:** `fix/run-isolated-events-82` --- ### 📝 Commits (4) - [`a59e369`](https://github.com/mikeyobrien/ralph-orchestrator/commit/a59e3696e69bad00ccb703447f84cfbe4e487cae) fix(events): isolate events per run to prevent stale event pollution - [`99db23e`](https://github.com/mikeyobrien/ralph-orchestrator/commit/99db23e49c48a0c2e789b07d2d036ef9f20b57ca) test(events): add e2e integration tests for event isolation - [`143186f`](https://github.com/mikeyobrien/ralph-orchestrator/commit/143186f589f74858b2449d0eef0abbcce89afeae) feat(cli): rename `resume` subcommand to `--continue` flag - [`900c153`](https://github.com/mikeyobrien/ralph-orchestrator/commit/900c1539f92deab9a06321e4356a64b298ffbbf2) feat(events): auto-detect current run events file in `ralph events` ### 📊 Changes **10 files changed** (+1285 additions, -93 deletions) <details> <summary>View changed files</summary> 📝 `crates/ralph-cli/src/main.rs` (+77 -31) ➕ `crates/ralph-cli/tests/integration_events_isolation.rs` (+638 -0) 📝 `crates/ralph-cli/tests/integration_resume.rs` (+72 -52) 📝 `crates/ralph-core/src/event_logger.rs` (+3 -3) 📝 `crates/ralph-core/src/event_loop.rs` (+6 -1) 📝 `crates/ralph-core/src/event_reader.rs` (+2 -2) 📝 `crates/ralph-core/tests/event_loop_ralph.rs` (+4 -4) ➕ `tasks/event-isolation-e2e-tests.code-task.md` (+173 -0) ➕ `tasks/rename-resume-to-continue-flag.code-task.md` (+150 -0) ➕ `tasks/run-isolated-events-file.code-task.md` (+160 -0) </details> ### 📄 Description ## Summary - **Isolate events per run**: Each `ralph run` now writes to a unique timestamped events file (`.agent/events-{timestamp}.jsonl`), preventing stale events from previous runs from polluting the TUI - **Rename `resume` → `--continue`**: The `resume` subcommand is now a `--continue` flag on the `run` command for cleaner CLI ergonomics - **Auto-detect events file**: `ralph events` now automatically finds the most recent events file for the current run, no manual path needed ## Test Plan - [x] Added comprehensive e2e integration tests for event isolation (`integration_events_isolation.rs`) - [x] Updated resume integration tests for new `--continue` flag - [x] All existing tests pass (`cargo test`) - [ ] Manual verification: run `ralph run`, check `.agent/` for timestamped events file - [ ] Manual verification: run `ralph events` and confirm it shows current run's events --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-27 10:22:19 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/ralph-orchestrator#125
No description provided.