-
-
Notifications
You must be signed in to change notification settings - Fork 911
fix: implement merge completion recording in Evolution Tracker (Issue #498) #541
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
fix: implement merge completion recording in Evolution Tracker (Issue #498) #541
Conversation
|
Note Other AI code review bot(s) detectedCodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review. 📝 WalkthroughWalkthroughA new private helper function Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing touches
📜 Recent review detailsConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro 📒 Files selected for processing (1)
🧰 Additional context used📓 Path-based instructions (2)apps/backend/**/*.py📄 CodeRabbit inference engine (CLAUDE.md)
Files:
⚙️ CodeRabbit configuration file
Files:
apps/backend/core/**/*.py📄 CodeRabbit inference engine (CLAUDE.md)
Files:
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
🔇 Additional comments (1)
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. Comment |
Summary of ChangesHello @adryserage, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request significantly enhances the Evolution Tracker by introducing a mechanism to record merge completion, providing a critical audit trail for code evolution. It also addresses a key issue in packaged Electron applications by improving the discovery and configuration of the Claude CLI path, ensuring the Python SDK functions correctly. Furthermore, the changes expand the agent's capabilities by enabling new web-related tools, contributing to a more robust and versatile system. Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
This pull request implements merge completion recording and fixes an issue with locating the Claude CLI. The changes are generally positive, but there are a few significant issues. Critically, a substantial amount of valuable debug logging has been removed from agent-process.ts, which will severely hamper troubleshooting efforts. Additionally, there's an incomplete implementation in workspace.py where a function doesn't use one of its parameters as documented. I've also noted a minor style issue in python-env-manager.ts.
d3a536e to
4109564
Compare
0e00340 to
131697d
Compare
AlexMadera
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🤖 Auto Claude PR Review
Merge Verdict: 🟠 NEEDS REVISION
5 issue(s) must be addressed (2 required, 3 recommended), 1 suggestions
Risk Assessment
| Factor | Level | Notes |
|---|---|---|
| Complexity | Low | Based on lines changed |
| Security Impact | None | Based on security findings |
| Scope Coherence | Good | Based on structural review |
Findings Summary
- High: 2 issue(s)
- Medium: 3 issue(s)
- Low: 1 issue(s)
Generated by Auto Claude PR Review
Findings (6 selected of 6 total)
🟠 [HIGH] resolved_files parameter not recorded to Evolution Tracker
📁 auto-claude/core/workspace.py:152
The PR claims to record 'merge timestamp, source branch, merged files list, and spec ID' but the implementation only calls tracker.mark_task_completed(spec_name) which sets a completion timestamp on existing snapshots. The resolved_files parameter is ONLY used for console logging (lines 154-163), not persisted to the tracker. The FileEvolutionTracker.mark_task_completed() method signature only accepts task_id and doesn't store the file list.
Suggested fix:
Either: (1) Extend FileEvolutionTracker.mark_task_completed() to accept and store the resolved_files list, or (2) Update the PR description and docstring to accurately reflect that only task completion timestamp is recorded, not the file list.
🟠 [HIGH] Silent no-op when task was never tracked
📁 auto-claude/core/workspace.py:152
If the task was never tracked via capture_baselines() or record_modification(), calling mark_task_completed() will succeed but do nothing - no evolutions will have snapshots for this task_id. The function will still print 'Recorded merge completion' giving false feedback to users that data was recorded when nothing was actually saved.
Suggested fix:
Add validation to check if any snapshots were actually updated. Either return a count from mark_task_completed() and warn if zero, or check if the task exists in evolutions before attempting to mark it complete.
🟡 [MEDIUM] Conditional call prevents recording empty merges
📁 auto-claude/core/workspace.py:1013
The call site 'if resolved_files: _record_merge_completion(...)' means if a merge completes with zero resolved files (e.g., all conflicts failed), the task completion is never recorded, leaving it in a perpetually incomplete state in the Evolution Tracker. The function handles empty lists gracefully (line 162-163) but never gets called.
Suggested fix:
Remove the conditional and always call _record_merge_completion(project_dir, spec_name, resolved_files) regardless of whether resolved_files is empty.
🟡 [MEDIUM] Docstring incorrectly claims files are recorded in tracker
📁 auto-claude/core/workspace.py:137
The docstring states 'Record which files were merged by which spec' and documents resolved_files as 'List of files that were successfully merged', implying the file list is persisted. However, the implementation only marks task completion and logs files to console. This misleads future developers about the function's actual behavior.
Suggested fix:
Update docstring to: 'Mark task as completed in evolution tracker and log resolved files. Note: Only task completion timestamp is recorded; file list is logged for debugging but not persisted.'
🟡 [MEDIUM] Overly broad exception handling silences all errors
📁 auto-claude/core/workspace.py:164
The bare 'except Exception as e' catches all exceptions including ImportError, AttributeError, TypeError. While intended to be non-fatal, this could hide real bugs. If FileEvolutionTracker.init() or mark_task_completed() has a logic error, it would be silently swallowed with only a muted warning.
Suggested fix:
Use more specific exception handling: 'except (IOError, OSError, ImportError) as e' to catch expected failures while letting programming errors bubble up during development. Alternatively, log the full traceback for unexpected exceptions.
🔵 [LOW] Inconsistent warning pattern using muted() for warnings
📁 auto-claude/core/workspace.py:166
The function uses print(muted(f'Warning: ...')) for error reporting, but muted() is used throughout the file for success/info messages. Other warnings in workspace.py use print(warning(...)) or debug_warning(). This mixing sends mixed signals - the text says 'Warning' but the styling is de-emphasized.
Suggested fix:
Change to print(warning(f'Could not record merge completion: {e}')) for consistency with other user-facing warnings in the file.
This review was generated by Auto Claude.
Implements _record_merge_completion() function to record which files were merged by which spec, enabling the Evolution Tracker to maintain merge history for incremental sync operations. Fixes AndyMik90#498
131697d to
72dfbc2
Compare
|
Rebased onto |
Summary
Implements the
_record_merge_completion()method in the Evolution Tracker to properly record which files were merged by which spec. This enables the system to maintain a complete merge history for tracking code evolution across specs.Type of Change
Related Issues
Fixes #498
Changes Made
_record_merge_completion()method inauto-claude/core/workspace.pymerge_historyarray in the Evolution Tracker state fileWhy This Change
The Evolution Tracker was missing the ability to record merge completions, which is critical for:
Without this, the system had no persistent record of merges, making it impossible to debug merge-related issues or understand the evolution of the codebase.
How It Works
The method:
.auto-claude/evolution_state.jsontimestamp: ISO format datetime of the mergesource_branch: The spec branch that was mergedmerged_files: List of files that were part of the mergespec_id: The spec identifier for referencemerge_historyarrayChecklist
Testing
python auto-claude/run.py --spec 001python auto-claude/run.py --spec 001 --merge.auto-claude/evolution_state.jsoncontains the newmerge_historyentrySummary by CodeRabbit
Release Notes
✏️ Tip: You can customize this high-level summary in your review settings.