You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
tools/ensure_autoclaw2_git_identity.ps1: idempotent de-injection of the four GIT_AUTHOR_/GIT_COMMITTER_="zwork" fallback lines in resources/app/dist/main.cjs (safeEnvironment()), which override the user's .gitconfig and make every agent commit authored zwork <zwork@local>.
Timestamped backup, node --check gate before swap, post-patch verification, -CheckOnly mode; resolves the install root without %LOCALAPPDATA% (agent shells may not carry it).
src/windows/launch_autoclaw2_clone.ps1: non-fatal preflight hook so every clone launch re-applies the patch automatically after AutoClaw2 updates.
Summary by CodeRabbit
Bug Fixes
The launcher now checks AutoClaw2’s Git identity settings before opening the app and removes matching local overrides when needed.
If the check is missing, encounters an error, or cannot complete successfully, the launcher displays a warning. These issues do not prevent AutoClaw2 from launching.
The change adds a PowerShell guard that checks and can remove matching Git identity assignments in AutoClaw2’s main.cjs. The launcher runs the guard before profile creation. Missing guard scripts and guard failures produce warnings but do not stop the launch.
Changes: AutoClaw2 Git Identity Guard
Layer / File(s)
Summary
Guard parameters and bundle checks tools/ensure_autoclaw2_git_identity.ps1
The script accepts an install root and check-only mode. It checks for the bundle and matching identity assignments, then returns status codes based on the results.
Patch and verify the bundle tools/ensure_autoclaw2_git_identity.ps1
When four matching assignments are found, the script backs up the bundle and writes a temporary patched file. It checks syntax when Node is available, replaces the original, and verifies that the assignments are removed.
The launcher runs the guard after the executable preflight and before profile creation. It warns if the script is missing or fails, then continues launch.
sequenceDiagram
participant Launcher as AutoClaw2 launcher
participant Guard as Git identity guard
participant Bundle as main.cjs
participant Node as Node.js
Launcher->>Guard: Run with the install directory
Guard->>Bundle: Check matching assignments
Guard->>Bundle: Write patched bundle after backup
Guard->>Node: Check patched syntax when available
Guard-->>Launcher: Return status code
Launcher-->>Launcher: Warn on failure and continue launch
Loading
Merge Risk: Moderate · up to a3eb2
The guard can report success or fail silently while agent commits still use the zwork identity, and a clone that is already running is not forced to restart after patching. Tighten layout detection, fail closed when no syntax checker is available, and surface guard results before relying on this to fix the commit identity.
Finishing Touches
🧪 Generate unit tests (beta)
Commit to this branch
Create a new PR
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
tools/ensure_autoclaw2_git_identity.ps1: idempotent de-injection of the four GIT_AUTHOR_/GIT_COMMITTER_="zwork" fallback lines inresources/app/dist/main.cjs(safeEnvironment()), which override the user's.gitconfigand make every agent commit authoredzwork <zwork@local>.node --checkgate before swap, post-patch verification,-CheckOnlymode; resolves the install root without%LOCALAPPDATA%(agent shells may not carry it).src/windows/launch_autoclaw2_clone.ps1: non-fatal preflight hook so every clone launch re-applies the patch automatically after AutoClaw2 updates.Summary by CodeRabbit