Repository navigation
test(#9426): make repos and scaffold tests pass on macOS/arm64 - #9436
fullsend-ai-coder[bot] wants to merge 2 commits into
Conversation
|
🤖 Finished Review · ✅ Success · Started 4:48 PM UTC · Completed 4:54 PM UTC Commit: Runtime: pi · Model: sonnet → claude-sonnet-5-5 · Effort: high · Cost: $0.88 |
|
Risk Assessment: moderate (2/5) DetailsSmall test-only portability fix by a bot with exact issue alignment, elevated to moderate risk by recent regression history and high change coupling in the touched test files. Previous runRisk Assessment: moderate (2/5) DetailsSmall test-only portability fix by a bot with exact issue alignment, elevated to moderate risk by recent regression history and high change coupling in the touched test files. Previous run (2)Risk Assessment: moderate (2/5) DetailsSmall test-only portability fix by a bot with exact issue alignment, elevated to moderate risk by recent regression history and high change coupling in the touched test files. |
|
Looks good to me Previous run<!-- fullsend:review-findings-v2:eyJ2ZXJzaW9uIjoyLCJhY3Rpb24iOiJhcHByb3ZlIiwiZmluZGluZ3MiOltdfQ== --> Looks good to me Previous run (2)<!-- fullsend:review-diff-hash:6f419e6d86eaf0ad0ffacffeadc7fee1370e95be282f5656b50c7b9f33dc32da --> Looks good to me Previous run (3)<!-- fullsend:review-findings-v2:eyJ2ZXJzaW9uIjoyLCJhY3Rpb24iOiJhcHByb3ZlIiwiZmluZGluZ3MiOltdfQ== --> Looks good to me Previous run (4)<!-- fullsend:review-findings-v2:eyJ2ZXJzaW9uIjoyLCJhY3Rpb24iOiJhcHByb3ZlIiwiZmluZGluZ3MiOltdfQ== --> Looks good to me Labels: Test-only Go change touching test code. |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
|
/fs-fix rebase and resolve conflicts |
|
🤖 Finished Fix · ✅ Success · Started 3:22 PM UTC · Completed 3:27 PM UTC Commit: Runtime: claude · Model: sonnet → claude-sonnet-5-5 · Effort: high · Cost: $0.36 |
Two tests failed on macOS/arm64 because of host-dependent behavior in the tests, not in production code: - TestValidate_LocalConfigSourceIsContainedAndResolvedRelativeToManifest built its expected config source from the raw t.TempDir(). Validate intentionally resolves against the symlink-canonicalized manifest directory, and on macOS the temp dir lives under /var, a symlink to /private/var. The expected value now uses filepath.EvalSymlinks(base). The escape and symlink-escape assertions are unchanged. - runInstallFullsendCLIScript stubbed git, curl, fullsend and go but not uname, so the release path ran the host's `uname -m`. macOS reports arm64, which install-fullsend-cli.sh (targeting Linux runners) rejects before the stubbed curl runs. The helper now stubs uname to print $UNAME_M_STUB (default x86_64). A new test covers the aarch64 mapping and the unsupported-architecture error. Verified on Linux with TMPDIR pointed through a symlink (fails before, passes after) and with the uname stub reporting arm64. Note: pre-commit could not fetch remote hook repos (TLS verification failure in the sandbox). Ran the applicable hooks directly instead: gofmt, go vet, git diff --check, lint-broken-symlinks; gitleaks via scan-secrets. Closes #9426 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
🔧 Fix agent — iteration 1 (human-triggered)Rebased the PR branch onto main and resolved the conflict in gitlab_job_scripts_test.go by combining upstream stub changes with the uname stub. go vet, gofmt, and go test for internal/repos and internal/scaffold pass. Fixed (1):
Tests: passed Conflict update: rebased; strategy
|
bbaf16e to
d73413f
Compare
|
🤖 Finished Review · ✅ Success · Started 3:30 PM UTC · Completed 3:35 PM UTC Commit: Runtime: pi · Model: sonnet → claude-sonnet-5-5 · Effort: high · Cost: $0.89 |
Superseded by updated review
|
🤖 Finished Review · ✅ Success · Started 5:47 PM UTC · Completed 5:53 PM UTC Commit: Runtime: pi · Model: sonnet → claude-sonnet-5-5 · Effort: high · Cost: $0.91 |
Superseded by updated review
Summary
Fixes two test-only portability failures that stopped
make go-testfrom finishing on macOS/arm64. Production code is unchanged. CI on Linux/amd64 was not affected.Changes
internal/repos/manifest_test.go:TestValidate_LocalConfigSourceIsContainedAndResolvedRelativeToManifestbuilt its expected path from the rawt.TempDir().Validatedeliberately resolves localconfig_basesources against the symlink-canonicalized manifest directory. On macOS the temp dir is under/var, which is a symlink to/private/var. The expected value now usesfilepath.EvalSymlinks(base). The escape and symlink-escape assertions are unchanged.internal/scaffold/gitlab_job_scripts_test.go:runInstallFullsendCLIScriptnow also stubsuname. The stub prints$UNAME_M_STUB, defaulting tox86_64. Before this, the release-pin path ran the host's realuname -m. macOS reportsarm64, whichinstall-fullsend-cli.shrejects before the stubbedcurlruns, because the script targets Linux runners. The script itself is unchanged. The newTestInstallFullsendCLIScript_ReleasePinArchitecturetest covers theaarch64mapping and the unsupported-architecture error.Testing
TMPDIRat a symlinked directory. The test fails without the fix and passes with it.arm64through the stub and confirms the exact error from the issue.go test ./internal/repos/ ./internal/scaffold/passes, as dogo vetandgofmt.pre-commitcould not fetch remote hook repos in the sandbox (TLS verification failure). I ran the applicable hooks directly instead: gofmt, go vet,git diff --check,lint-broken-symlinks, plus a gitleaks secret scan.🤖 Generated with Claude Code
Closes #9426
Post-script verification
agent/9426-macos-test-portability)dda4623665ec7f034c0e8cd503e2aa8e0220565a..HEAD)