Skip to content

test(git): preserve executable mode provenance - #37

Merged
nia-sg-bot merged 1 commit into
mainfrom
nia/issue-21-file-mode-provenance
Aug 27, 2026
Merged

test(git): preserve executable mode provenance#37
nia-sg-bot merged 1 commit into
mainfrom
nia/issue-21-file-mode-provenance

Conversation

@nia-sg-bot

@nia-sg-bot nia-sg-bot commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

Summary

  • add deterministic resolver coverage for executable-bit-only changes
  • verify unstaged and staged snapshots preserve the exact pre/post modes
  • verify mode-only transitions retain the same immutable blob ID at both endpoints

Part of #21.

Validation

  • python3 -m pytest tests/test_git_snapshot.py -q (19 passed)
  • python3 -m pytest -q (134 passed)
  • git diff --check

Remaining work

#21 still needs any remaining comparison edge-case slices beyond executable-mode provenance.

Summary by CodeRabbit

  • Tests
    • Added coverage confirming executable-permission changes preserve exact file content provenance.
    • Verified that both staged and unstaged changes report the correct file modes and matching content identifiers.

@nia-sg-bot nia-sg-bot added roadmap Tracked on the public WildestAI roadmap priority:P0 Critical path / blocks a usable product direction:aligned Aligned with the current WildestAI product direction labels Aug 27, 2026
@coderabbitai

coderabbitai Bot commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 4a5ddb71-bd56-41be-94fb-b3cc55210ff9

📥 Commits

Reviewing files that changed from the base of the PR and between 0a8a0e4 and b45c60e.

📒 Files selected for processing (1)
  • tests/test_git_snapshot.py

Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.


Walkthrough

Adds a test for executable-bit-only changes. The test verifies that staged and unstaged resolution reports both file modes and preserves the original blob OID at both endpoints.

Changes

File mode provenance

Layer / File(s) Summary
Mode transition resolution test
tests/test_git_snapshot.py
Adds coverage for 100644 to 100755 changes. The test checks the reported modes and identical old_oid and new_oid values for staged and unstaged resolution.

Estimated code review effort: 2 (Simple) | ~5 minutes

Merge Risk: ⚪ Minimal · up to b45c6

This change adds regression tests for preserving executable-file modes and blob identity without changing production behavior. No actionable merge-blocking risk remains after normal checks and review.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 2 functions across 1 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: adding Git tests for preserving executable-mode provenance.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch nia/issue-21-file-mode-provenance

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.

@nia-sg-bot

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Aug 27, 2026

Copy link
Copy Markdown
Contributor
✅ Action performed

Review finished.

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.

@nia-sg-bot
nia-sg-bot merged commit db5aa39 into main Aug 27, 2026
4 checks passed
@nia-sg-bot
nia-sg-bot deleted the nia/issue-21-file-mode-provenance branch August 27, 2026 22:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

direction:aligned Aligned with the current WildestAI product direction priority:P0 Critical path / blocks a usable product roadmap Tracked on the public WildestAI roadmap

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant