Skip to content

Cover the Exported GIT_WORK_TREE and GIT_DIR Drive Spellings in the Guard Self-Test - #2470

Merged
ptr727 merged 1 commit into
developfrom
fix/2460-msys-export-case
Oct 7, 2026
Merged

ptr727 merged 1 commit into
developfrom
fix/2460-msys-export-case

Conversation

@ptr727

@ptr727 ptr727 commented Oct 7, 2026

Copy link
Copy Markdown
Owner

Summary

Copilot's overview on the promotion PR #2469 noted that the exported GIT_WORK_TREE/GIT_DIR spelling had no self-test case. #2460 asks for one per spelling. This adds both export NAME=/c/... && git reset --hard forms to the Git Bash drive block. The guard code is unchanged, since _leading_export_dirs values already pass through _expand_dir.

Verification

  • Both cases pass natively on Windows 11. With _msys_drive_path replaced by identity, both fail.
  • local-strict-review raised no findings. It also showed that with _leading_export_dirs stubbed out, both cases allow, so it is the export parse that makes them deny. The same probe under WSL Linux matched.

Refs #2460

🤖 Generated with Claude Code

…uard Self-Test

The Git Bash drive cases covered every directory spelling but the
leading `export NAME=value &&` form. Both exported variables now have a
case, and each fails with the conversion removed.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@coderabbitai

coderabbitai Bot commented Oct 7, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 28 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

⚙️ Run configuration
  • Configuration used: Repository: ptr727/ProjectTemplate/.coderabbit.yaml
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: b3040ee6-11e9-4bfd-9907-23176a36f407
📥 Commits

Reviewing files that changed from the base of the PR and between 9b1326c and 3099fa2.

📒 Files selected for processing (1)
  • host-setup/agent-safety/claude/gh-write-guard.py
  • Autopilot · 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.

❤️ Share

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

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot review overview

🟢 Approval recommended

No unresolved review issues were identified.

Review effort: Lite
Findings: None

What changed in this PR

Adds self-test coverage for exported Git Bash GIT_WORK_TREE and GIT_DIR drive-path spellings.

Changes:

  • Adds denial cases for both exported variable forms.
  • Leaves guard behavior unchanged.
File Description
host-setup/​agent-safety/​claude/​gh-write-guard.py Adds two exported environment-variable self-test cases.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@codecov

codecov Bot commented Oct 7, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 58.47%. Comparing base (9b1326c) to head (3099fa2).

Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #2470   +/-   ##
========================================
  Coverage    58.47%   58.47%           
========================================
  Files           16       16           
  Lines         8062     8062           
========================================
  Hits          4714     4714           
  Misses        3348     3348           
Flag Coverage Δ
python-3.13 58.47% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@ptr727

ptr727 commented Oct 7, 2026

Copy link
Copy Markdown
Owner Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Oct 7, 2026 •

Copy link
Copy Markdown
⚠️ Action not completed

Review rate limited.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@ptr727
ptr727 merged commit c9b2c66 into develop Oct 7, 2026
13 checks passed
@ptr727
ptr727 deleted the fix/2460-msys-export-case branch October 7, 2026 06:11
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