Skip to content

test(agentworkspace): isolate Darwin Rancher Docker fixture - #1457

Merged
skevetter merged 1 commit into
mainfrom
fix/1456-darwin-docker-test
Oct 11, 2026
Merged

skevetter merged 1 commit into
mainfrom
fix/1456-darwin-docker-test

Conversation

@skevetter

@skevetter skevetter commented Oct 10, 2026 •

Copy link
Copy Markdown
Contributor

Summary

TestFindDarwinDockerCLIRancherDesktopPath previously searched the production candidate list, allowing an installed Docker CLI to shadow its temporary Rancher fixture.

Assert separately that the candidate generator includes Rancher, then test discovery using a missing test-owned path followed by the executable fixture. Preserve the final error/path assertion, all seven Darwin tests, and production candidate precedence. Only cmd/internal/agentworkspace/docker_darwin_test.go changes (+8/-1).

Closes #1456.

Validation

Native Darwin arm64, Go 1.26.8:

  • Baseline named test failed because an installed Docker CLI shadowed the fixture. Corrected named test passed uncached with -count=1 and -count=20, plus focused -race -short -count=1.
  • All seven Darwin discovery tests passed. The complete affected package passed without test selection, normally with -count=1 and with -race -short -count=1; package vet passed.
  • CI-parity lint passed before and after. CodeScene supported the changed test file: 9.68 before and after; no new delta findings. This does not measure a production-code improvement.
  • Local CodeRabbit completed with zero findings; independent source review found no actionable defects. Pre-commit, commit-message, and pre-push hooks passed.

Complete unit-task environment

The initial complete repository unit task failed in unchanged synthetic sign-commit, Docker, MicroSandbox, and inject fixtures. Diagnostic source/dependency checks found no dependency on the changed package. The synthetic commit inherited global signing despite using a fake identity. An indexed test-only Git override was unsuitable because it conflicted with an inherited-config fixture.

The earlier cached-success task cli:test attempt used process-only GOFLAGS=-p=1 and a disposable GIT_CONFIG_GLOBAL containing:

[include]
    path = ~/.gitconfig
[commit]
    gpgsign = false

The include resolves against each child HOME, preserving test-owned GPG/SSH configuration; all 11 selected signing/configuration fixtures passed under this setup. It preserves host configuration without copying its contents and changes no persistent settings. Real authored commits use the existing personal signing identity outside these test-only overrides.

A bounded race/atomic-coverage comparison reproduced the unchanged 300 ms Docker fixture failure in all three default-concurrency repetitions; all three passed with -p=1. MicroSandbox and inject cases passed in both modes. This supports resource/scheduling sensitivity but does not fix or establish reliability under default concurrency. All assertions and deadlines remain unchanged.

Validation record correction: the earlier local full-suite pass included cached results (135 passing packages, of which 133 were cached). A later uncached local run had 134 passing packages and one Git-configuration fixture failure. Both standard hosted platform runs passed 135 packages with no cached test results. The standard hosted race/short runs and the local atomic-coverage task use different coverage modes; the hosted results do not establish a passing uncached local atomic-coverage run.

Summary by CodeRabbit

  • Tests
    • Expanded coverage for Docker CLI discovery on macOS, including Rancher Desktop candidate paths and lookup behavior. No user-facing behavior changes are included.

@netlify

netlify Bot commented Oct 10, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for devsydev canceled.

Name Link
🔨 Latest commit 1201440
🔍 Latest deploy log https://app.netlify.com/projects/devsydev/deploys/6aca75e8b27b49000877ac04

@coderabbitai

coderabbitai Bot commented Oct 10, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 72659f12-8e1e-49be-8e07-5b6cf54a69c7



📥 Commits

Reviewing files that changed from the base of the PR and between 511d216 and 1201440.




📒 Files selected for processing (1)
  • cmd/internal/agentworkspace/docker_darwin_test.go



Included review availability: This review used your included allowance. Your plan provides up to 2 included reviews per hour; 0 remain after this review.





📝 Walkthrough
📝 Walkthrough
📝 Walkthrough

Walkthrough

The Darwin Rancher Desktop Docker discovery test now checks that its fixture appears in generated candidates. It searches a controlled list of test-owned paths instead of the full candidate list.

Changes

Darwin Docker discovery test

Layer / File(s) Summary
Candidate assertion and controlled lookup
cmd/internal/agentworkspace/docker_darwin_test.go
The test asserts that the Rancher Desktop path is among the generated candidates. It then searches a missing path followed by the Rancher executable. The existing error and path assertion remains.

Priority: ⬇️ Low

Estimated code review effort: 1 (Trivial) | ~4 minutes

Change: Other · Severity of issue fixed: Low





Merge Risk: ⚪ Minimal · up to 12014

The test isolates lookup from host-installed Docker CLIs while checking candidate generation separately. No concrete merge-blocking risk remains.

Pre-merge checks | Passed 4 | Failed 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%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 1 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Linked Issues check Passed The PR satisfies the coding requirements in #1456. cmd/internal/agentworkspace/docker_darwin_test.go uses slices.Contains to assert the Rancher candidate. The Rancher lookup uses test-owned tempor…
Out of Scope Changes check Passed The reviewed change is limited to the requested Darwin test file. The changes isolate the Rancher fixture and verify candidate generation. They preserve production candidate precedence and do not chan…
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly and concisely describes the main change: isolating the Darwin Rancher Docker test fixture. It matches the test-only scope of the pull request.

  • Fix all pre-merge checks with AI
✨ Finishing Touches
✨ Simplify code
  • 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.

❤️ Share

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

@netlify

netlify Bot commented Oct 10, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for images-devsy-sh canceled.

Name Link
🔨 Latest commit 1201440
🔍 Latest deploy log https://app.netlify.com/projects/images-devsy-sh/deploys/6aca75e8160bd000084013c3

Copy link
Copy Markdown
Contributor Author

@coderabbitai full review

Please review the one-file test correction at exact head 1201440, preserving production candidate ordering and meaningful fixture assertions.

Copy link
Copy Markdown
Contributor Author

@greptileai Please review the one-file Darwin test correction at exact head 1201440, including preservation of production discovery ordering and the candidate-generator assertion.

@coderabbitai

coderabbitai Bot commented Oct 10, 2026 •

Copy link
Copy Markdown
✅ Action performed

Full review finished.

@greptile-apps

greptile-apps Bot commented Oct 10, 2026 •

Copy link
Copy Markdown

RetriggerConfidence Score: 5/5

[Low impact] This test-only correction appears safe to merge.

Summary

Isolates the Rancher Desktop discovery test from Docker installations on the host.

  • The Rancher test finds its fixture without using installed Docker.

Reviews (1) · Last reviewed commit: "test(agentworkspace): isolate Darwin Ran..." · Reviewed by Greptile

@skevetter
skevetter marked this pull request as ready for review October 10, 2026 18:45
@mergify

mergify Bot commented Oct 10, 2026 •

Copy link
Copy Markdown

This pull request does not currently match the merge queue conditions, so it cannot be queued from here. The box comes back if it matches again.

@skevetter
skevetter merged commit 4398ab2 into main Oct 11, 2026
97 checks passed
@skevetter
skevetter deleted the fix/1456-darwin-docker-test branch October 11, 2026 00:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(test): isolate Darwin Rancher Desktop Docker discovery

1 participant