mirror of
https://github.com/morluto/rea.git
synced 2026-11-05 06:45:22 +00:00
[GH-ISSUE #4575] [Bug] capture-process fails when an observed symlink disappears during a filesystem snapshot #2375
Closed
opened 2026-10-17 21:03:53 +00:00 by bsakaguchi
·
4 comments
No Branch/Tag specified
main
codex/procedure-reference-stacked
release-please--branches--main--components--rea-agents
release-please--branches--main--components--rea-agents--release-notes
codex/kuna-independent-retry
codex/byte-search-overlay-coverage
codex/open-failure-target-receipt
codex/kuna-xref-evidence
codex/ghidra-ambiguous-procedure-recovery
codex/function-source-bundle
codex/trace-function-integration-prototype
codex/snapshot-source-closure
codex/recorded-evidence-array-pages
codex/evidence-recovery-redesign
codex/trace-feature-address-scope
codex/call-discovery-scope
codex/ghidra-literal-candidate-evidence
codex/decompile-directory-independent-retry
codex/retry-provenance-base
codex/value-flow-capability-experiment
codex/ghidra-containing-instruction
cursor/readme-discord-button-ef9f
dependabot/github_actions/actions/setup-node-7.1.0
dependabot/github_actions/actions/upload-artifact-7.0.2
dependabot/npm_and_yarn/npm-minor-and-patch-d8d97ce6df
codex/kuna-1989
fix/8559-native-ui-fixture-ownership
fix/8555-go-verifier-mcp-ownership
codex/provider-capability-recovery
fix/8642-rizin-target-stdin
codex/ghidra-memory-effect-scope
codex/ghidra-annotation-entry-selector
codex/ghidra-readonly-recovery
codex/ghidra-regex-verifier-recovery
codex/evidence-discovery-view-guidance
fix/8545-bulk-append-overflow
fix/8428-navigation-refusal-alternatives
codex/address-context-recovery
codex/matching-member-limitations
codex/unknown-scope-contract
codex/evidence-view-guidance
feat/8373-native-trace-views
codex/ghidra-snapshot-verifier-binding
codex/elf-export-visibility
codex/evidence-view-recovery
codex/native-reference-cli-help
codex/provider-candidate-observation-scope
codex/kuna-session-verification
codex/ghidra-switch-lifetime-guidance
codex/pseudocode-paging-discovery
codex/clarify-evidence-view-support
codex/kuna-xrefs-selector-recovery
codex/context-capacity-recovery
codex/evidence-closure-large-links
codex/same-function-evidence-identity
codex/ghidra-verifier-inspected-jdk
codex/audit-guided-workflows
codex/crash-prompt-retained-dossiers
codex/analysis-view-error-recovery
codex/kuna-verifier-target-selection
codex/ghidra-selected-project-call-coverage
codex/docs-native-analysis-scope
codex/ghidra-java-socket-boundary
codex/ghidra-retained-snapshot-verifier
codex/ghidra-search-inventory-facts
fix/8284-zero-argument-parameter-bindings
fix/8198-ui-action-handler-offset
fix/8257-elf-entry-label-identity
fix/8304-deferred-output-schema-projection
fix/8277-call-path-computed-target-uncertainty
fix/pr-8089-conflicts
fix/ci-static-duplicate-export
dependabot/npm_and_yarn/lint-staged-17.6.0
dependabot/github_actions/actions/download-artifact-8.0.2
dependabot/npm_and_yarn/write-file-atomic-8.0.0
dependabot/npm_and_yarn/canonicalize-5.1.0
dependabot/github_actions/actions/cache/restore-6.1.0
dependabot/npm_and_yarn/toon-format/toon-4.4.0
dependabot/github_actions/actions/deploy-pages-5.0.1
codex/review-fixes-pr-2403
codex/review-fixes-pr-2400
codex/process-terminal-width
codex/test-brittleness-cleanup
verify/7167-browser-connect-macos
fix/7167-browser-connect
feat/native-matching-allowance-setting
feat/browser-scenario-dry-run
test/managed-caller-parameters-20261024
codex/parser-fortythird-boundaries
fix/6926-pinvoke-platform-decorations-20261023
fix/6889-har-body-encoding-20261023
fix/6888-sqlite-schema-budget-20261023
fix/dependency-security-gates-6708
cursor/evidence-overwrite-rebase-b4ac
feat/4057-verify-native-exports
fix/windows-acl-observer-overhead-20261022
cursor/erlang-beam-restack-4476
cursor/pe-certificate-review-bf32
fix/6116-javascript-application-fs-errors
fix/6061-unmapped-runtime-script-unknown
feat/browser-scenario-summary
fix/pe-certificates
codex/verify-3407
cursor/rebase-5699
cursor/rebase-5352
cursor/rebase-5600
cursor/fix-cli-schema-omission-10a8
codex/audit-hopper-shutdown-reasons-20261021
fix/demangle-swift-omitted-record
fix/nib-boolean-value-types
cursor/cancellation-partial-observation-a5ac
fix/ib-object-limit-reasons
fix/electron-fuse-limit-advice
fix/kuna-doctor-dangling-cache
fix/fixed-budget-refusal-advice
fix/js-ipc-listener-dedup
fix/js-return-member-provenance
fix/dmg-integrity-retry-advice
fix/ida-doctor-readiness
fix/kuna-version-probe-output-drain
fix/legacy-swift-runtime-name-matching
fix/dylib-lazy-load-commands
fix/browser-scenario-startup-cancel
fix/swift-nested-punycode-classification
fix/compare-unselected-scopes
fix/objc-method-budget-coverage
fix/dmg-mounted-root-observations
audit/ci-tests-20261019-round2
release/6.7.0
fix/wabt-cleanup-retry-resolution
fix/electron-fuse-elf-pe-architecture
fix/native-plist-descriptor-ownership
fix/kuna-caller-cleanup-ownership
experiment/atomic-codemode-20261016
review/first-contributor-3776
fix/call-resolution-full-read-cycles
fix/member-mutation-selection-repeat
experiment/atomic-re-tools-20261015
perf/member-mutation-lazy-origins
perf/static-network-mutation-index
fix/hopper-startup-lifecycle
audit/3050-windows-proof-20261015
feat/windows-window-capture-2183
audit/3049-windows-proof-20261015
audit/3735-macos-fixtures-20261015
fix/batch-decompile-null-pseudocode
fix/kuna-inventory-honors-jobs
experiment/browser-codemode-tool-design-20261015
fix/hopper-clean-runtime-argv
codex/review-2049-27f1b367
review-fixes/pr-2787-routing
fix/3360-scoped-this-emitters
fix/3367-replaced-global-effects
fix/3838-compact-any-value-items
test/hopper-download-probe-20261015
codex/windows-runtime-creation-red-green-20261015
codex/windows-readonly-root-red-green-20261015
codex/windows-root-share-red-green-20261015
codex/exp-1685-win-mcp-startup
codex/bug-sweep-20261015
investigate/2190-windows-package-phases
investigate/3543-macos-cli-deadline
perf/3281-reverse-tools-feedback-quality
fix/3406-hopper-doctor-fixture
fix/3341-wrapper-require-test-context
fix/3301-owned-uninstall-fixtures
fix/3164-compiler-input-ownership
fix/pcap-cleanup-stdout-newline-20261014
perf/interface-builder-summary
codex/review-fixes-pr-1977
fix/ghidra-effective-jvm-platform
fix/docs-turkish-rust-link-20261013
fix/main-maintenance-ci-20261010
fix/recover-binary-session-process-effects
codex/review-fixes-pr-2457
codex/ci-required-cancellation-gate
fix/main-format-baseline-20261013
fix/setup-preserve-entry-fields
cursor/restore-main-checks-1ffc
fix/ghidra-bridge-hashmap-import
codex/shared-ci-jadx-json-default-20261013
codex/shared-ci-ghidra-test-groups-20261013
codex/shared-ci-java-fixture-format-20261013
codex/fix-intrinsic-invocation-boundaries
test/release-preflight-reusable-jobs
test/js-parameter-provenance-expectation
fix/linux-hopper-verification-current
test/2419-ghidra-elf-probe-size
followup/pr-1544-native-ida
codex/fold-pr-2230-contribution
docs/readme-responsible-use
fix/issue-2064
fix/issue-2050
fix/issue-2053
fix/issue-1968
fix/issue-1945
experiment/codemode-bridge-20261011
fix/tool-effects-negative-wording-1904-20261012
fix/1842-electron-interop-provenance
feat/recover-javascript-multi-input
refactor/website-i18n-prep
fix/nativeaot-pe-virtual-extent
fix/browser-verifier-ci-hang
fix/pe-resources-input-selection
docs/beginner-friendly-guides
docs/beginner-setup-guide
fix/javascript-analysis-worker-1563
fix/1649-ghidra-duplicate-names
fix/javascript-export-keys-integration-1369
test/maintenance-boundary-contracts-20261011
review/javascript-export-keys-1369
review/process-live-progress-1483
test/javascript-1495-growth-ratio
fix/ci-escape-timing
docs/normalized-terminal-geometry-1450
release/6.3.0
archive/release-6.3.0-pr1381
release/6.2.0
fix/electron-preload-dynamic-override
fix/javascript-self-referential-bundler-edges
release/6.1.0
cursor/grok-client-cherry-pick-0b56
feat/signature-posture
feat/dyld-shared-cache
feat/artifact-integrity-policy
feat/pkg-inventory
release/6.0.0
chore/sync-release-5.0.0
release/5.0.0
cursor/cloud-agent-node-787e
fix/javascript-xhr-open-endpoints
review/pr-711-realpath-fallback-wording
cleanup/replay-confinement
codex/test-suite-performance
codex/issue-foundations
codex/address-open-issues-2026-07-20
agent/javascript-vite-rollup-esbuild-adapters
agent/process-cleanup
agent/triage-integration
agent/unknown-commands-registry
feat/mcp-identity-metadata
morlvps/issue_cleanup
codex/installer-redesign
morl/roadmap-investigation-core
morl/roadmap-investigation-docs
release-please--branches--main--components--rea
rea-agents-6.8.0
rea-agents-6.7.0
rea-agents-6.6.0
experiment/atomic-codemode-wait-runtime-20261016
rea-agents-6.5.0
rea-agents-6.4.0
rea-agents-6.3.0
rea-agents-6.2.0
rea-agents-6.1.0
rea-agents-6.0.0
rea-agents-5.0.0
rea-agents-4.1.0
rea-agents-4.0.1
rea-agents-4.0.0
rea-agents-3.2.1
rea-agents-3.2.0
rea-agents-3.1.0
rea-agents-3.0.0
rea-agents-2.7.0
rea-agents-2.6.0
rea-agents-2.5.1
rea-agents-2.5.0
rea-agents-2.4.0
rea-agents-2.3.0
rea-agents-2.2.0
rea-agents-2.1.0
rea-agents-2.0.0
rea-agents-1.7.0
rea-agents-1.6.0
rea-agents-1.5.0
rea-agents-1.4.0
rea-agents-1.3.0
rea-agents-1.2.0
rea-agents-1.1.0
rea-agents-1.0.0
rea-agents-0.5.0
rea-agents-0.4.0
rea-agents-0.3.0
rea-0.2.1
rea-0.2.0
Labels
Clear labels
area: bridge
area: bridge
area: build
area: build
area: build
area: cli
area: domain
area: evidence
area: mcp
area: native
area: providers
area: runtime
area: server
area: setup
area: tests
bug
design
documentation
enhancement
enhancement
enhancement
experiment
help wanted
i18n
invalid
P0: critical
P1: high
P2: medium
P2: medium
P2: medium
P3: low
performance
provider-request
pull-request
Mirrored from GitHub Pull Request
question
roadmap
triage
No labels
area: bridge
area: bridge
area: build
area: build
area: build
area: cli
area: domain
area: evidence
area: mcp
area: native
area: providers
area: runtime
area: server
area: setup
area: tests
bug
design
documentation
enhancement
enhancement
enhancement
experiment
help wanted
i18n
invalid
P0: critical
P1: high
P2: medium
P2: medium
P2: medium
P3: low
performance
provider-request
pull-request
question
roadmap
triage
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
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#2375
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @coygeek on GitHub (Oct 16, 2026).
Original GitHub issue: https://github.com/morluto/rea/issues/4575
Before submitting
Area
Process capture or runtime observation
Observed behavior
capture-processwithfilesystem_observation_pathsfails the entire command when a symlink disappears after its entry lookup and before the follow-upreadlink. The captured program printscapture succeededand exits 0, but REA exits 1 withprocess_capture_failed. The error retains the initial snapshot, terminal output, successful target exit and cleanup report inpartial_observation; the final filesystem snapshot and manifest are unavailable, and no normal capture Evidence is returned.This reproduced in 3/3 deterministic removal trials on each tested build. All 3/3 stable controls on each build returned normal Evidence with
truncated=falseand the readable sibling in the final snapshot.Reproduction
Use the builds listed under REA version. For the source build, run
npm ciandnpm run build:cachedwith the pinned toolchain first. For the published package, install it in an isolated directory. Start in the checkout or installed package root, wherescripts/rea.mjsexists. Use the same Node executable for REA and the target.Set these two variables once, while still in the checkout or installed package root:
readlinkfor the selected symlink. The first read belongs to the initial snapshot; the second belongs to the final snapshot. The helper runs in REA's CLI process, does not synthesize an error, and does not transform REA modules.I ran three controls before three removal trials on each build, with a fresh fixture per invocation. The observed removal signal is the marker on stderr followed by CLI exit 1 and the error projection below. These counts describe this deterministic fixture, not production incidence.
Expected behavior
Return usable partial filesystem Evidence that retains unaffected entries, records incomplete observation with a reason, and classifies effects that cannot be established as unknown. The documented filesystem coverage contract preserves observations around unavailable enumeration and does not infer absence from incomplete coverage. Existing identity-change handling also marks a snapshot incomplete rather than failing the checkpoint. A disappearance after entry lookup should preserve these partial facts.
A path already absent at its initial lookup is a different case and is already handled as observed absence. This report concerns an entry that was observed and then disappeared during a follow-up read.
Impact and scope
The reproduced scope is symlink disappearance during the final snapshot. It prevents normal capture completion and discards the requested final checkpoint even when the target succeeds. Initial state, output, target exit and cleanup remain available in the error's partial observation. All six removal trials reported the owned process group, terminal renderer and temporary root as cleaned. No target data loss or security-boundary crossing was observed.
Directory disappearance at the later directory revalidation is source-derived related scope only; no directory-disappearance CLI trial was executed in this verification. No claim about its incidence is made.
REA version
f22e8e7268, built from the locked dependencies;--versionreturned6.5.0.rea-agents@6.5.0, installed separately;--versionreturned6.5.0. The npm registry and latest GitHub release agreed on this version.Runtime and platform
Node
v24.18.0onDarwin arm64for both builds. The source build used its pinned npm11.16.0. Every CLI trial ran from its fixture with a fresh HOME and temporary directory, in an environment containing only PATH, HOME, TMPDIR and the helper's REPRO_LEAF. No external analysis provider was involved.Target and artifact context
A Node program that prints one line and exits successfully. The selected directory contains the readable regular file
a-siblingand the dangling symlinkz-link. Requested artifacts are process capture Evidence and filesystem before/after snapshots. The preload only coordinates the timing of a real removal in this disposable fixture.Interface
CLI
Earliest failure stage
Capture or observation
Relevant output or evidence
docs/process-capture.md:228–242describes selected filesystem snapshots and unknown effects under incomplete enumeration;docs/process-capture.md:404–419preserves entries around unavailable enumeration.AGENTS.md, Architecture and Cleanup, requires preservation of partial facts and meaningful failure reasons. These passages also exist at the release tag.src/process/capture/FilesystemSnapshot.ts:230–233preserves incomplete observations on identity changes.src/process/capture/FilesystemSnapshot.ts:219–243performs the entry lookup and unguarded follow-upreadlink/lstat;src/process/capture/ProcessHarness.ts:515–528marks the final checkpoint unavailable and rethrows. Source locators refer to the main build unless stated otherwise.The following projection preserves the common result from all six removal trials. Only the generated fixture path is replaced with
<fixture>:Source-derived boundary:
FilesystemSnapshot.ts:50–72handles absence during initial lookup,:300–315preserves omissions aroundopendirfailures, and:333performs another unguarded directory revalidation. The latter directory case is unexecuted scope, not a second observed reproduction.Typed outcome or recovery expected
Proposed restoration check: repeat the same deterministic final-readlink removal and receive normal capture Evidence with an available partial final checkpoint, the readable sibling retained, and explicit incomplete coverage and unknown affected effects with reasons. The stable control must continue to return a complete snapshot with
truncated=false. These are proposed acceptance checks, not a claim that a fix has been implemented.Analysis or suspected cause
Source-derived reasoning: after entry lookup succeeds, the later symlink
readlinkandlstatcan reject with ENOENT. Existing handling covers initial absence, unavailable directory opens and detected identity changes, but does not contain disappearance errors from those follow-up reads. The final checkpoint error then propagates to command failure. The report leaves the recovery representation and implementation to maintainers.Additional context
Related but distinct: #3238 fixed a previously observed selected root becoming unreachable through ENOTDIR; its contributor comment explicitly notes remaining mid-traversal ENOENT races. #2545 fixed unavailable directory opens, rather than these later follow-up reads. #3303 fixed literal symlink-target retention, rather than disappearance. Searches of open and closed issues and PRs found no report covering this reproduced follow-up-read failure. No last-known-good version was established.
@vikas468368-star commented on GitHub (Oct 16, 2026):
hey @coygeek , Can I work on this issue.
@coygeek commented on GitHub (Oct 16, 2026):
Sure, go ahead.
@vikas468368-star commented on GitHub (Oct 16, 2026):
thanks.
@morluto commented on GitHub (Oct 19, 2026):
Fixed on main in c85b44e1b.
The root cause was unguarded follow-up
readlink/lstatafter successful metadata admission. The snapshot owner now returns typed partial observations:entry_unavailableretains path and errno, while a successfully observed identity mismatch recordsidentity_changedwith no invented errno. Unstable symlinks are omitted, observed directory metadata and siblings survive, and incomplete roots keep absence unknown. Cancellation and unexpected I/O failures remain terminal. Root admission metadata is reused; the affected cancellation regression now follows descriptor state instead of countinglstatcalls.Validation: 125 passing focused checks across 13 capture/schema/CLI/MCP files, 4 Windows-only cases skipped on macOS; full typecheck/lint/module and architecture guards, docs checks (5 tests), and discovery of all 1604 test files passed. The compiled public CLI regression performs a real symlink removal during final observation after a successful controlled Node target. Additional production-boundary tests cover real removal/replacement errno, directory revalidation, cancellation including after iterator close, released name budgets, and unexpected-error propagation. Scheduling is controlled; some permission/cancellation faults are injected. The unchanged baseline failed the regression cases before this fix.
Six equivalent stable SDK workflows (catalog discovery, actual controlled Node capture, residual Unknown lookup, awaited cleanup) preserved the filesystem/exit/cleanup oracle. Repeated-process medians: elapsed 3.320→3.295 s, CPU 4.057→3.940 s, sampled process-family RSS 893.6→892.9 MB. Requests remained 109 cl100k-estimated tokens; full serialized SDK replies including discovery were 814161→814065, varying with ambient unrelated-process diagnostics. The 207-tool catalog increased by 14 estimated tokens. These small controls establish no speedup or actual model-context saving; true cold, large/fault costs and other hosts remain unmeasured.
Adapted the symlink-race proposal in #4587 at
fae4e25539969671c82a4d56cfb0b50761b833a3, with contributor credit in the commit; the PR was not merged. The commit marks the expanded omission-reason contract as breaking for strict old-schema clients.The nearby-consumer scan also found and fixed #5135 and #5136. Remaining scope: this does not convert directory iterator/close failures into partial success; their cleanup ownership must be established separately before broadening that catch. No actual failed native directory-close reproduction, Windows/Linux race qualification, or native analysis-engine qualification is claimed.