Skip to content

fix(share,r): validate map_name/verbose on master - #71

Merged
davidbudzynski merged 3 commits into
fastverse:masterfrom
davidbudzynski:fix/59-share-validate
Sep 20, 2026
Merged

davidbudzynski merged 3 commits into
fastverse:masterfrom
davidbudzynski:fix/59-share-validate

Conversation

@davidbudzynski

Copy link
Copy Markdown
Collaborator

Closes #59.

shareData/getData passed raw args to C: "", NA_character_ and R-coerced numerics (via sub() in shmName) reached shm_open and produced only the cryptic * Creating file mapping...ERROR (cf. #40). close(conn) had no on.exit guard, leaking the connection when serialize fails.

  • R/call.R: shmName now validates (is.character + length 1 + !is.na + nzchar, NA checked before nzchar since nzchar(NA) is TRUE) then normalizes sub("^/*", "/", .); new internal checkVerbose (is.logical + length 1 + !is.na, message matches house style); also applied to clearData; connections closed via on.exit(close(conn), add = TRUE) (explicit close removed to avoid double-close).
  • test-share.R: 9 validation tests (share-0059.001–009) placed before the shm-gated roundtrip so they run even without shm.
  • NEWS.md: bug-fix entry.

Verification: all bad inputs now fail fast with clear R errors, valid roundtrip + clearData still TRUE, full tinytest suite green (1418 results). R-only, O(1) checks before O(n) serialize — no hot-path impact.

@codecov-commenter

Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.27%. Comparing base (99413b6) to head (df60c6f).
⚠️ Report is 67 commits behind head on master.
❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##           master      #71      +/-   ##
==========================================
+ Coverage   98.01%   98.27%   +0.26%     
==========================================
  Files          13       13              
  Lines        5083     5105      +22     
==========================================
+ Hits         4982     5017      +35     
+ Misses        101       88      -13     

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

@davidbudzynski
davidbudzynski merged commit 4d1d79d into fastverse:master Sep 20, 2026
11 checks passed
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.

fix(share,r): validate map_name/verbose on master

2 participants