[PR #4587] [CLOSED] fix(process): handle disappearing symlinks during filesystem snapshot (#4575) #6324

Closed
opened 2026-10-31 01:13:34 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/morluto/rea/pull/4587
Author: @rudrakshagarwal4200-ai
Created: 10/16/2026
Status: ❌ Closed

Base: main ← Head: rudrakshagarwal4200-ai-patch-2


📝 Commits (1)

  • fae4e25 Improve error handling for symbolic links

📊 Changes

1 file changed (+17 additions, -2 deletions)

View changed files

📝 src/process/capture/FilesystemSnapshot.ts (+17 -2)

📄 Description

Summary

Fixes #4575.

In src/process/capture/FilesystemSnapshot.ts, when a symlink is removed by the target process after entry lookup (lstatIfPresent) but before the follow-up readlink or lstat, the uncaught ENOENT error propagated to abort the entire capture-process command.

Fix

Wrapped the follow-up readlink(path) and lstat(path) in a try/catch block that catches ENOENT, marks the snapshot as truncated = true, and records "identity_changed" in enumerationReasons, matching the existing concurrent modification semantics without throwing an unhandled exception.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/morluto/rea/pull/4587 **Author:** [@rudrakshagarwal4200-ai](https://github.com/rudrakshagarwal4200-ai) **Created:** 10/16/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `rudrakshagarwal4200-ai-patch-2` --- ### 📝 Commits (1) - [`fae4e25`](https://github.com/morluto/rea/commit/fae4e25539969671c82a4d56cfb0b50761b833a3) Improve error handling for symbolic links ### 📊 Changes **1 file changed** (+17 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `src/process/capture/FilesystemSnapshot.ts` (+17 -2) </details> ### 📄 Description ### Summary Fixes #4575. In `src/process/capture/FilesystemSnapshot.ts`, when a symlink is removed by the target process after entry lookup (`lstatIfPresent`) but before the follow-up `readlink` or `lstat`, the uncaught `ENOENT` error propagated to abort the entire `capture-process` command. ### Fix Wrapped the follow-up `readlink(path)` and `lstat(path)` in a `try/catch` block that catches `ENOENT`, marks the snapshot as `truncated = true`, and records `"identity_changed"` in `enumerationReasons`, matching the existing concurrent modification semantics without throwing an unhandled exception. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-31 01:13:34 +00:00
bsakaguchi changed title from [PR #4587] [CLOSED] fix(process): handle disappearing symlinks during filesystem snapshot (#4575) to [PR #4587] fix(process): handle disappearing symlinks during filesystem snapshot (#4575) 2026-11-03 13:32:45 +00:00
bsakaguchi changed title from [PR #4587] fix(process): handle disappearing symlinks during filesystem snapshot (#4575) to [PR #4587] [CLOSED] fix(process): handle disappearing symlinks during filesystem snapshot (#4575) 2026-11-03 14:34:31 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
morluto/rea#6324
No description provided.