Skip to content

Remove progress file writing, keep reading for context#226

Merged
subsy merged 5 commits intomainfrom
claude/investigate-issue-218-DqaCR
Jan 26, 2026
Merged

Remove progress file writing, keep reading for context#226
subsy merged 5 commits intomainfrom
claude/investigate-issue-218-DqaCR

Conversation

@subsy
Copy link
Owner

@subsy subsy commented Jan 26, 2026

Summary

This PR removes the automatic progress file writing logic from the execution engine while retaining the ability to read progress files for agent context. The progress file is now intended to be written by agents themselves rather than the engine.

Changes

  • Removed progress writing functions: Deleted createProgressEntry() and appendProgress() functions that automatically created progress entries after each iteration
  • Removed engine integration: Removed calls to appendProgress() in the execution engine's iteration completion and failure paths
  • Kept progress reading: Retained readProgress(), getRecentProgressSummary(), and extractCodebasePatterns() functions so agents can still access progress history for context
  • Updated exports: Removed ProgressEntry type and progress writing functions from the public API in src/logs/index.ts
  • Simplified tests: Removed 360+ lines of tests for progress entry creation and writing; kept tests for reading and pattern extraction

Rationale

This change shifts responsibility for progress tracking from the engine to the agents themselves. Agents can now decide what progress information is worth recording and how to format it, while still having access to previously recorded progress for context. This provides more flexibility and reduces unnecessary file I/O in the engine.

Implementation Details

  • The progress file structure and reading logic remain unchanged
  • The default progress header now clarifies that agents update the file
  • All progress reading functionality continues to work as before
  • Tests now focus on reading and pattern extraction rather than writing

Summary by CodeRabbit

  • Refactor
    • Simplified progress handling: removed automatic per‑iteration progress creation/appending and narrowed the feature to reading, clearing and extracting codebase patterns; minor header/text tweaks.
  • Tests
    • Updated tests to focus on progress file reading, summaries and pattern extraction; removed tests that relied on incremental append helpers.
  • Chores
    • CI updated to run and report coverage for the logs test suite.

✏️ Tip: You can customize this high-level summary in your review settings.

Removes the automatic progress file appending that was causing:
1. Duplicate entries (agent + engine both writing progress)
2. Gibberish notes from extractCompletionNotes() capturing JSON fragments

Agents now have sole responsibility for writing to progress.md via
template instructions. This gives them full control over progress
content and eliminates the corrupted data issue.

Fixes #218
@vercel
Copy link

vercel bot commented Jan 26, 2026

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

1 Skipped Deployment
Project Deployment Review Updated (UTC)
ralph-tui Ignored Ignored Preview Jan 26, 2026 9:38pm

Request Review

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 26, 2026

Warning

Rate limit exceeded

@subsy has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 18 minutes and 50 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

Walkthrough

Removed cross-iteration progress entry creation and append logic from the engine and simplified the progress logging module to a read-focused API: builders and appenders were deleted; functions for reading, summarising and extracting codebase patterns remain.

Changes

Cohort / File(s) Summary
Engine progress logging removal
src/engine/index.ts
Deleted cross-iteration progress logging: removed imports and calls to createProgressEntry and appendProgress, and the surrounding error-handling for progress appending.
Progress module API simplification
src/logs/progress.ts
Removed public types/functions: ProgressEntry, createProgressEntry, appendProgress, extractInsights, isToolOutputLine, extractCompletionNotes, formatProgressEntry. Retained: readProgress, getRecentProgressSummary, clearProgress, extractCodebasePatterns, getCodebasePatternsForPrompt.
Logs barrel export cleanup
src/logs/index.ts
Removed re-exports of ProgressEntry, createProgressEntry, and appendProgress from the logs barrel.
Progress tests refactor
src/logs/progress.test.ts
Removed tests that relied on entry creation/appending and IterationResult helpers; replaced with tests using prepopulated progress content and added/adjusted tests for reading, summaries, missing-file scenarios and getCodebasePatternsForPrompt.
CI coverage addition
.github/workflows/ci.yml
Added test batch and coverage artefact for src/logs/, producing coverage-parts/logs.lcov and including it in Codecov upload list.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Poem

🐰🌿
I hopped through logs where entries used to play,
Tidied the trails and whisked the crumbs away,
Now I read the footprints, tidy and spry,
A lighter hop beneath a clearer sky.

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'Remove progress file writing, keep reading for context' directly and clearly summarises the main change: removal of progress file writing functions whilst retaining reading functionality.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@codecov
Copy link

codecov bot commented Jan 26, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 45.08%. Comparing base (4bebef6) to head (da62aea).
⚠️ Report is 6 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #226      +/-   ##
==========================================
+ Coverage   45.04%   45.08%   +0.04%     
==========================================
  Files          84       84              
  Lines       24596    24409     -187     
==========================================
- Hits        11079    11006      -73     
+ Misses      13517    13403     -114     
Files with missing lines Coverage Δ
src/engine/index.ts 49.03% <100.00%> (+0.02%) ⬆️
src/logs/index.ts 100.00% <ø> (ø)
src/logs/progress.ts 98.24% <100.00%> (+44.94%) ⬆️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@subsy subsy merged commit 1f3afd8 into main Jan 26, 2026
9 checks passed
@subsy subsy deleted the claude/investigate-issue-218-DqaCR branch January 26, 2026 21:55
sakaman pushed a commit to sakaman/ralph-tui that referenced this pull request Feb 15, 2026
…DqaCR

Remove progress file writing, keep reading for context
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

Comments