Skip to content

fix(tui): fix event accumulation across multiple runs in start command#431

Merged
FL4TLiN3 merged 2 commits intomainfrom
fix/event-accumulation
Jan 19, 2026
Merged

fix(tui): fix event accumulation across multiple runs in start command#431
FL4TLiN3 merged 2 commits intomainfrom
fix/event-accumulation

Conversation

@FL4TLiN3
Copy link
Contributor

Summary

  • Fixed event accumulation across multiple runs in perstack start command
  • Added getRunIdsByJobId function in @perstack/filesystem-storage that scans runs directory directly
  • Updated getAllEventContentsForJob to use directory scanning instead of run-setting.json

Problem

When using perstack start with interactive tools, the TUI would display incorrectly because:

  1. getAllEventContentsForJob relied on getRunsByJobId to find runs
  2. getRunsByJobId only returned runs that had run-setting.json files
  3. In the TUI execution loop, run-setting.json files were not being created
  4. This meant events from subsequent runs were never loaded, causing display issues

Solution

Added a new function getRunIdsByJobId that directly scans the runs/ directory to find all runIds, regardless of whether run-setting.json exists. This ensures all events are accumulated correctly.

Test plan

  • TypeCheck passes
  • Tests pass
  • Manual testing with interactive tools

🤖 Generated with Claude Code

@FL4TLiN3 FL4TLiN3 force-pushed the fix/event-accumulation branch from 086a18d to 07055df Compare January 19, 2026 00:02
When using `perstack start` with interactive tools, events from all runs
in a job were not being loaded because `getAllEventContentsForJob` relied
on `run-setting.json` files which are not always present.

Added `getRunIdsByJobId` function that scans the runs directory directly,
ensuring all runs are discovered even when `run-setting.json` is missing.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@FL4TLiN3 FL4TLiN3 force-pushed the fix/event-accumulation branch from 07055df to 7be9839 Compare January 19, 2026 00:02
@codecov-commenter
Copy link

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

❌ Patch coverage is 0% with 6 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
packages/storages/filesystem/src/event.ts 0.00% 6 Missing ⚠️

📢 Thoughts on this report? Let us know!

@FL4TLiN3 FL4TLiN3 enabled auto-merge (squash) January 19, 2026 00:04
@FL4TLiN3 FL4TLiN3 merged commit 7278836 into main Jan 19, 2026
9 checks passed
@FL4TLiN3 FL4TLiN3 mentioned this pull request Jan 19, 2026
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.

2 participants