Skip to content

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

Merged
wan9chi merged 8 commits into
mainfrom
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
wan9chi merged 8 commits into
mainfrom
11-18-fix_fspy_correctly_report_access_mode_from_node_fs_on_windows

Conversation

@wan9chi

@wan9chi wan9chi commented Nov 18, 2025

Copy link
Copy Markdown
Member

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

@wan9chi
wan9chi marked this pull request as ready for review November 18, 2025 13:08

wan9chi commented Nov 18, 2025

Copy link
Copy Markdown
Member Author

# Conflicts:
#	crates/fspy/tests/node_fs.rs
@wan9chi
wan9chi 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
@wan9chi wan9chi changed the title fix(fspy): correctly report access mode from node:fs on Windows fix(fspy): improve intercepting node:fs operations Nov 18, 2025
@wan9chi
wan9chi 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