Skip to content

fix(fspy): improve intercepting node:fs operations#35

Merged
branchseer merged 8 commits intomainfrom
11-18-fix_fspy_correctly_report_access_mode_from_node_fs_on_windows
Nov 19, 2025
Merged

fix(fspy): improve intercepting node:fs operations#35
branchseer merged 8 commits intomainfrom
11-18-fix_fspy_correctly_report_access_mode_from_node_fs_on_windows

Conversation

@branchseer
Copy link
Copy Markdown
Member

@branchseer branchseer commented Nov 18, 2025

TL;DR

Enhanced file system access tracking with support for additional Node.js and system-level file operations.

What changed?

  • Supported & tested tracking for more Node.js file operations:
    • fs.existsSync()
    • fs.statSync()
    • fs.createReadStream()
    • fs.createWriteStream()
    • fs.writeFileSync()
  • Improved Unix preload interception:
    • Added interception for access() and faccessat() functions
    • Added Linux-specific syscall interception for statx
  • Enhanced Windows file access detection:
    • Improved detection of read/write operations by checking specific file access flags
  • Improved test infrastructure:
    • Updated track_child! macro to accept arguments
    • Replaced hardcoded temp paths with proper tempfile usage

@branchseer branchseer marked this pull request as ready for review November 18, 2025 13:08
Copy link
Copy Markdown
Member Author

branchseer commented Nov 18, 2025

# Conflicts:
#	crates/fspy/tests/node_fs.rs
@branchseer branchseer force-pushed the 11-18-fix_fspy_correctly_report_access_mode_from_node_fs_on_windows branch from 2acc324 to 426f790 Compare November 18, 2025 13:13
@branchseer branchseer changed the title fix(fspy): correctly report access mode from node:fs on Windows fix(fspy): improve intercepting node:fs operations Nov 18, 2025
@branchseer branchseer merged commit 8b137ab into main Nov 19, 2025
6 checks passed
@Brooooooklyn Brooooooklyn deleted the 11-18-fix_fspy_correctly_report_access_mode_from_node_fs_on_windows branch December 11, 2025 06:39
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.

2 participants