Skip to content

Fix macOS symlink test failures and upgrade phonenumbers dependency#4399

Merged
JAORMX merged 1 commit intomainfrom
fix/test-macos-symlinks-and-phonenumbers-vuln
Mar 27, 2026
Merged

Fix macOS symlink test failures and upgrade phonenumbers dependency#4399
JAORMX merged 1 commit intomainfrom
fix/test-macos-symlinks-and-phonenumbers-vuln

Conversation

@reyortiz3
Copy link
Copy Markdown
Contributor

Summary

  • Two unit tests were failing on macOS because t.TempDir() returns paths under /var/folders/..., which is a symlink to /private/var/.... The skill extractor rejects paths containing symlinks, and the resolved path also exceeded macOS's 104-char Unix socket path limit.
  • Upgrades github.com/nyaruka/phonenumbers from v1.1.6 to v1.6.12 to resolve GHSA-fmjh-f678-cv3x (Medium severity).

Changes

File Change
pkg/skills/skillsvc/skillsvc_test.go Use existing tempDir(t) helper (calls filepath.EvalSymlinks) in setupPR closures so extracted skill paths pass symlink validation
pkg/server/discovery/health_test.go Use os.MkdirTemp("", "thv-") for the Unix socket test to produce a short path that fits within macOS's 104-char limit
go.mod / go.sum Upgrade github.com/nyaruka/phonenumbers v1.1.6 → v1.6.12

Type of change

  • Bug fix (non-breaking change which fixes an issue)

Test plan

  • task test passes locally with no failures

Does this introduce a user-facing change?

No

Generated with Claude Code

On macOS, t.TempDir() returns paths under /var/folders which is a
symlink to /private/var. This caused two test failures:
- skillsvc tests failed because the skill extractor rejects paths
  containing symlinks; fix by resolving via EvalSymlinks using the
  existing tempDir(t) helper
- health_test unix socket test failed because the resolved path
  exceeded macOS's 104-char socket path limit; fix by using
  os.MkdirTemp with a short prefix

Also upgrades github.com/nyaruka/phonenumbers from v1.1.6 to v1.6.12
to resolve GHSA-fmjh-f678-cv3x (Medium).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@reyortiz3 reyortiz3 requested a review from JAORMX as a code owner March 27, 2026 03:08
@github-actions github-actions bot added the size/XS Extra small PR: < 100 lines changed label Mar 27, 2026
@codecov
Copy link
Copy Markdown

codecov bot commented Mar 27, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 69.51%. Comparing base (9ee7873) to head (aa06971).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #4399   +/-   ##
=======================================
  Coverage   69.51%   69.51%           
=======================================
  Files         485      485           
  Lines       49805    49805           
=======================================
+ Hits        34623    34624    +1     
- Misses      12503    12509    +6     
+ Partials     2679     2672    -7     

☔ View full report in Codecov by Sentry.
📢 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.

@JAORMX JAORMX merged commit e52f3e9 into main Mar 27, 2026
40 checks passed
@JAORMX JAORMX deleted the fix/test-macos-symlinks-and-phonenumbers-vuln branch March 27, 2026 07:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/XS Extra small PR: < 100 lines changed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants