Skip to content

Conversation

@samhvw8
Copy link
Contributor

@samhvw8 samhvw8 commented May 22, 2025

Ensures that invoking the newTaskTool always creates a checkpoint, even if no files have changed. This provides a consistent state snapshot before a sub-task is initiated.

Related GitHub Issue

Closes: #

Description

Test Procedure

Type of Change

  • 🐛 Bug Fix: Non-breaking change that fixes an issue.
  • New Feature: Non-breaking change that adds functionality.
  • 💥 Breaking Change: Fix or feature that would cause existing functionality to not work as expected.
  • ♻️ Refactor: Code change that neither fixes a bug nor adds a feature.
  • 💅 Style: Changes that do not affect the meaning of the code (white-space, formatting, etc.).
  • 📚 Documentation: Updates to documentation files.
  • ⚙️ Build/CI: Changes to the build process or CI configuration.
  • 🧹 Chore: Other changes that don't modify src or test files.

Pre-Submission Checklist

  • Issue Linked: This PR is linked to an approved GitHub Issue (see "Related GitHub Issue" above).
  • Scope: My changes are focused on the linked issue (one major feature/fix per PR).
  • Self-Review: I have performed a thorough self-review of my code.
  • Code Quality:
    • My code adheres to the project's style guidelines.
    • There are no new linting errors or warnings (npm run lint).
    • All debug code (e.g., console.log) has been removed.
  • Testing:
    • New and/or updated tests have been added to cover my changes.
    • All tests pass locally (npm test).
    • The application builds successfully with my changes.
  • Branch Hygiene: My branch is up-to-date (rebased) with the main branch.
  • Documentation Impact: I have considered if my changes require documentation updates (see "Documentation Updates" section below).
  • Changeset: A changeset has been created using npm run changeset if this PR includes user-facing changes or dependency updates.
  • Contribution Guidelines: I have read and agree to the Contributor Guidelines.

Screenshots / Videos

image

Documentation Updates

Additional Notes

Get in Touch


Important

Ensure newTaskTool creates a checkpoint even if no files change by forcing empty commits.

  • Behavior:
    • newTaskTool in newTaskTool.ts now calls checkpointSave with force=true to ensure a checkpoint is created even if no files have changed.
    • checkpointSave in index.ts updated to accept a force parameter, allowing empty commits.
  • Services:
    • saveCheckpoint in ShadowCheckpointService.ts updated to handle allowEmpty option for empty commits.
  • Misc:
    • Minor delay added after checkpoint creation in newTaskTool.ts.

This description was created by Ellipsis for 10535b42acd8f2fbb73b7e4b5e3c82f36de9d3e5. You can customize this summary. It will automatically update as commits are pushed.

@daniel-lxs
Copy link
Member

daniel-lxs commented May 22, 2025

Hi again @samhvw8,
Do you think it makes sense to add a new unit test to ShadowCheckpointService.test.ts for the force empty commit behavior?

Overall I think this is a great idea, many times I wanted to revert the changes made by a subtask only to find out there was no checkpoint.

@samhvw8
Copy link
Contributor Author

samhvw8 commented May 22, 2025 via email

@hannesrudolph
Copy link
Collaborator

@cte Can we please merge this for now? this functionality of checkpoints with orchestrator is not useful. This would be far better than the current state of things and we don't have the time for a more complex solution at the moment.

@hannesrudolph hannesrudolph moved this from New to PR [Greenlit] in Roo Code Roadmap May 23, 2025
@cte
Copy link
Collaborator

cte commented May 23, 2025

@cte Can we please merge this for now? this functionality of checkpoints with orchestrator is not useful. This would be far better than the current state of things and we don't have the time for a more complex solution at the moment.

Yes, I think we can merge it after it goes through code review, though as I mentioned before this isn't the way I want to solve this problem, so fair warning that there's a chance that I will revert this and re-implement it later.

Ensures that invoking the `newTaskTool` always creates a checkpoint, even if no files have changed. This provides a consistent state snapshot before a sub-task is initiated.
@samhvw8 samhvw8 force-pushed the feat/make-checkpoint-on-new-task branch from 10535b4 to b518212 Compare May 23, 2025 05:07
@samhvw8
Copy link
Contributor Author

samhvw8 commented May 23, 2025

@daniel-lxs Roo help me added test, can you check it

@hannesrudolph hannesrudolph moved this from TEMP to Needs Preliminary Review in Roo Code Roadmap May 27, 2025
Copy link
Member

@daniel-lxs daniel-lxs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @samhvw8, I think we should prevent the tool from failing if the checkpoint creation fails.

Also I would like to know what the delay is for.

Edit: the delay is not necessary for this to work

@dosubot dosubot bot added the size:L This PR changes 100-499 lines, ignoring generated files. label May 28, 2025
@daniel-lxs
Copy link
Member

This looks good to me as a temporary solution for the checkpoint before new_task issue.

@daniel-lxs daniel-lxs moved this from PR [Needs Preliminary Review] to PR [Needs Review] in Roo Code Roadmap May 28, 2025
@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label May 28, 2025
@mrubens mrubens merged commit e8b4dda into RooCodeInc:main May 28, 2025
14 checks passed
@github-project-automation github-project-automation bot moved this from PR [Needs Review] to Done in Roo Code Roadmap May 28, 2025
@github-project-automation github-project-automation bot moved this from New to Done in Roo Code Roadmap May 28, 2025
SmartManoj pushed a commit to SmartManoj/Raa-Code that referenced this pull request Jun 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lgtm This PR has been approved by a maintainer PR - Needs Review size:L This PR changes 100-499 lines, ignoring generated files.

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

5 participants