mirror of
https://github.com/morluto/rea.git
synced 2026-11-05 06:45:22 +00:00
[GH-ISSUE #5081] [Bug] Denied Linux process stat reads drop descendants without marking sampling partial #3118
Closed
opened 2026-10-31 00:36:51 +00:00 by bsakaguchi
·
1 comment
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#3118
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 18, 2026).
Original GitHub issue: https://github.com/morluto/rea/issues/5081
Before submitting
Area
Process capture or runtime observation
Observed behavior
A mocked filesystem-boundary probe through production
startProcessSamplershows that a denied stat read for an already discovered descendant removes that process and its subtree while returningsampling_partial: false,sampling_failures: 0andfirst_sampling_failure: null. The aggregate truncation helper returns false when other coverage is complete. A denied command read instead retains the row with an empty command and the same failure-free coverage. Stat and command permission errors are the primary failure here; an additional task-enumeration control exercises the shared classifier.This was executed against source with synthetic procfs data, matching root identity/run-token fixtures and Linux platform selection. No real Linux permission policy, PTY capture, CLI or MCP session was exercised.
Reproduction
In a checkout of the revision below with its locked dependencies installed, save the following as
src/process/capture/procReadCoverage.test.ts. It mocks filesystem reads below the production error classifier; the sampler, identity checks, traversal and coverage logic are real. The synthetic tree is 100 → 200 → 300 and its sample limit is 20.Use a scratch config to run only this probe, with one worker and a scratch cache:
All six cases passed in one focused run. The assertions describe the current behavior; passing them confirms the defect rather than a correction. Remove the added test and scratch directory afterward.
Expected behavior
Retain readable observations and expose denied-read uncertainty with a meaningful diagnostic and partial process coverage. An unreadable identity need not produce a trusted process row. The request does not require bypassing identity checks or event-complete sampling.
AGENTS.md:19 requires preserving omission, uncertainty, partial facts and meaningful failure reasons. docs/process-capture.md:420 describes process partial coverage and its aggregate truncation signal.
Impact and scope
A procfs permission failure loses process data or a command without retaining the reason or marking the failed observation partial. This hides a known read failure beyond the documented possibility of missing short-lived descendants. The mocked boundary reproduced this in each permission case; a generic EIO control correctly recorded a sampling failure and partial coverage.
NOT_ENOUGH_INFO: real Linux permission configurations that produce these errors for an in-scope descendant, frequency in live captures, downstream comparison effects, and a practical caller workaround were not established.
REA version
Source
3537e58c1ab29309f06eabf50bc52adba9817a0c, package manifest 6.7.0. Relevant sampler, coverage and capture-consumer source is identical to the publishedrea-agents-6.7.0tag; that release runtime was not executed.Runtime and platform
Node v26.12.0; macOS 27.0.1 arm64; locked Vitest v5.0.3. Linux platform, filesystem and run-token lookup were mocked. No native provider or real process target was used.
Target and artifact context
Synthetic procfs records for a stable three-process tree. Matching root group/session identity and a fixture run token satisfy the sampler initialization guards. No actual process is launched or signaled.
Interface
Other
Earliest failure stage
Capture or observation
Relevant output or evidence
Observed reduced output from the six-case mocked-boundary run:
All permission cases returned a null first failure; the command case returned an empty command for PID 200. Recorded mock read paths confirm PID 300 was never inspected when its ancestor or child enumeration was omitted.
The error collapse is at src/process/capture/ProcessSampling.ts:62; stat/command readers at lines 113-137 and task/children readers at lines 152-175 use it. src/process/capture/ProcessSampling.ts:220 drops unavailable stat rows, blanks unavailable commands and substitutes an empty child list. The BFS at lines 259-305 then omits the subtree. src/process/capture/ProcessSampling.ts:501 never records swallowed errors as partial coverage or sampling failures.
SOURCE-ONLY caller propagation: src/process/capture/ProcessHarness.ts:318 starts this sampler; lines 509-510 await its result; src/process/capture/ProcessHarness.ts:585 passes its coverage to capture construction. src/process/capture/ProcessCaptureLifecycle.ts:338 uses that coverage for truncation and the incomplete-sampling limitation. The probe directly executes the same src/domain/process/processCaptureCoverage.ts:99 aggregate helper with otherwise empty coverage. Final capture assembly itself was not executed.
Typed outcome or recovery expected
Expose a failed/unavailable process read and partial sampling coverage while preserving readable observations.
sampling_failures,first_sampling_failureandsampling_partialcurrently report no such gap. Exact diagnostic representation is a maintainer design choice; no weakened identity or ownership checks are requested.Analysis or suspected cause
EACCES/EPERM are grouped with ENOENT/ESRCH and converted to
undefinedbefore the sampler can retain their meaning. That value means a skipped row, empty command or empty child list depending on the read. The existing root-child enumeration fallback topsat sampler lines 267-268 does not cover denied descendant reads. The generic sampled-process limitation remains present; this report concerns a known read failure being erased.Additional context
Open and closed issues were searched. #180 concerns enumerating non-leader-thread children; #2543 concerns evidence retained after ownership cleanup failures. Neither covers permission-read accounting in this sampler. No earlier known-good version or real Linux permission reproduction was established.
@morluto commented on GitHub (Oct 19, 2026):
Fixed on
mainin ba866a26ecbe179a717e746cbc0d1605ae616ad5, including the related finalization gap #5194.Procfs reads now distinguish expected disappearance from unavailable observations. Typed read outcomes compose successful rows/children with a count, first diagnostic and internal interruption fact, so denied stat/command/task reads and ordinary I/O failures cannot silently erase their meaning or readable siblings. Root token-read failures are retained. Linux fallback uses
psonly to discover candidate edges, then checks identity/parentage and commands through procfs; a failed fallback preserves the stable root. Contradictory PID payloads fail attribution.Shutdown awaits issued operations and retains completed identity brackets. The existing public
sampling_failurescounts failed read observations plus at most one interrupted pass; its first diagnostic preserves an actual read failure and appends interruption context when both occur. Partial coverage is derived once from the producer facts. No capture-schema field was added: the previous strict reader accepts a fresh CLI capture and an interrupted-coverage schema fixture. Coverage consumers and documentation were updated together; the superseded untyped readers and duplicate root preflight were removed.Validation: nine selected regressions fail on baseline
e8da7e1ed; 22 sampler regressions pass on the fix. The final selection passes 123 tests across 12 files, including real macOS CLI/MCP capture, cancellation, cleanup, process-only comparison uncertainty, and converted MCP schema checks. Fullnpm run check,npm run docs:check(5 consistency tests), and discovery (1,635 files exactly once) pass. Independent source review found no remaining concrete counterexample in this slice.Six alternating completed CLI captures checked identical fixture/executable inputs, terminal markers, normal exit and verified owned cleanup. Two repeated-process medians per version: elapsed 1.949 → 2.069 s; process-family CPU 1.839 → 1.833 s; sampled family RSS 515,031,040 → 516,833,280 bytes; estimated full-reply cl100k tokens 2,063 → 2,064 (7,642 bytes in both). PIDs/timestamps vary. These small samples establish no speedup or full-agent token benefit; no true cold run was performed.
Linux permission behavior is verified through deterministic procfs boundary fixtures, not a real Linux permission policy; Docker was unavailable. Windows is unverified. Native
readdirhas no cancellation option, so shutdown awaits an issued read rather than abandoning it. Context7 and external DeepWiki were used for navigation and checked against the pinned Node filesystem API. Sampling remains sampled, not event-complete. The separate ownership race #4322 remains open.