Skip to content

test: cover untracked binary workspace diff - #177

Merged
delete-cloud merged 1 commit into
mainfrom
test/adr-0026-untracked-binary-diff
May 16, 2026
Merged

delete-cloud merged 1 commit into
mainfrom
test/adr-0026-untracked-binary-diff

Conversation

@delete-cloud

@delete-cloud delete-cloud commented May 16, 2026 •

Copy link
Copy Markdown
Owner

Summary

  • add a real Git regression test for untracked binary files in workspace diff
  • verify binary additions are reported as added/binary with no line counts
  • verify the real Git index remains unmodified after result diff generation

Validation

  • uv run pytest tests/coding_agent/environment/test_docker_workspace_provider.py -k untracked_binary_file -q
  • uv run pytest tests/coding_agent/environment/test_docker_workspace_provider.py tests/ui/test_http_server.py tests/cli/test_remote_client.py -k "git_workspace or workspace_diff or workspace_patch or publish" -q
  • uv run basedpyright --level error tests/coding_agent/environment/test_docker_workspace_provider.py
  • uv run ruff format --check tests/coding_agent/environment/test_docker_workspace_provider.py
  • git diff --check

Summary by CodeRabbit

  • Tests
    • Added test coverage for untracked binary file handling in workspace diff functionality to ensure accurate detection and reporting.

Review Change Stack

@coderabbitai

coderabbitai Bot commented May 16, 2026 •

Copy link
Copy Markdown
Contributor

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 04176b6a-5939-41d1-9843-47bde0602857

📥 Commits

Reviewing files that changed from the base of the PR and between 192aaea and 685e567.

📒 Files selected for processing (1)
  • coding-agent/tests/coding_agent/environment/test_docker_workspace_provider.py

📝 Walkthrough

Walkthrough

This PR adds a single test function to validate that the workspace diff provider correctly identifies untracked binary files as added with the binary flag set and appropriate diff metadata, while verifying the underlying git status output.

Changes

Untracked Binary File Diff Test

Layer / File(s) Summary
Untracked binary file diff handling test
coding-agent/tests/coding_agent/environment/test_docker_workspace_provider.py
Test initializes a git repository with an untracked binary file (new.bin) and asserts that workspace_diff_from_config reports it as added with binary=True, zero addition/deletion counts, no file-level addition/deletion values, and verifies git status --porcelain=v1 output shows ?? new.bin.

Possibly related PRs

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

🐰 A binary bounces into sight,
Git marks it with a "??" bright,
The test checks status, flags, and form—
Untracked files now norm! 📝✨

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. 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 accurately describes the primary change: adding a test to cover untracked binary file handling in workspace diffs.
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.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch test/adr-0026-untracked-binary-diff

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 and usage tips.

@delete-cloud
delete-cloud merged commit b77e1e3 into main May 16, 2026
1 check passed
@delete-cloud
delete-cloud deleted the test/adr-0026-untracked-binary-diff branch May 16, 2026 01:08
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.

1 participant