[GH-ISSUE #4905] [Bug] Registration discovery silently omits unreadable configuration targets #3044

Closed
opened 2026-10-31 00:35:24 +00:00 by bsakaguchi · 1 comment
Owner

Originally created by @morluto on GitHub (Oct 17, 2026).
Original GitHub issue: https://github.com/morluto/rea/issues/4905

Before submitting

  • Searched open/closed registration permission and doctor unreadable reports.
  • No credentials or sensitive target data included.

Area

Setup, packaging, or upgrade

Observed behavior

Registration inspection silently omits a configured Claude Code client when its configuration symlink points into an unreadable directory. The file exists; no invalid or unavailable diagnostic is returned.

Reproduction

Executed npm run test:focused -- tests/boundary/filesystem/clientRegistrationStatus.test.ts at d0253c99d: one new control failed,22 existing controls passed. An isolated HOME contains .claude.json pointing to owned inert JSON under an owned directory; directory search permissions are removed before inspection and restored in finally. Expected Claude Code state invalid; actual matching status undefined. Executed once on macOS arm64 as non-root; no real client configuration touched.

Expected behavior

Preserve observed presence and uncertainty. Inspection must report an unreadable configuration, rather than interpret failed lookup as absent. AGENTS.md requires unresolved identity/applicability to remain unknown instead of absent.

Impact and scope

Observed shared registration inspection omits the client. Doctor and update maintenance consume this inspection (source-derived); no real doctor CLI or actual update executed in this reproduction. Real-world frequency and native Windows/Linux: NOT_ENOUGH_INFO.

REA version

6.5.0 source d0253c99d6.

Runtime and platform

Node24.18.0, macOS arm64, non-root; native temporary filesystem permissions.

Target and artifact context

Owned inert JSON only; no provider or target execution.

Interface / Earliest failure stage

Shared doctor/update registration discovery; setup/provider admission.

Relevant output or evidence

New assertion: expected status {client:"claude_code",state:"invalid",command:[]}; received undefined. ClientRegistrationStatus.ts presence uses access and catches every exception as false before parsing the configuration.

Analysis

Source-derived: presence and readability share one boolean, losing both symlink entry facts and non-missing filesystem errors. Probe entry metadata once, preserve errors separately from confirmed absence, and let the existing configuration owner diagnose readable versus unreadable contents. Maintenance must not grant mutation authority for invalid/unresolved registrations.

Originally created by @morluto on GitHub (Oct 17, 2026). Original GitHub issue: https://github.com/morluto/rea/issues/4905 ### Before submitting - [x] Searched open/closed registration permission and doctor unreadable reports. - [x] No credentials or sensitive target data included. ### Area Setup, packaging, or upgrade ### Observed behavior Registration inspection silently omits a configured Claude Code client when its configuration symlink points into an unreadable directory. The file exists; no invalid or unavailable diagnostic is returned. ### Reproduction Executed `npm run test:focused -- tests/boundary/filesystem/clientRegistrationStatus.test.ts` at d0253c99d: one new control failed,22 existing controls passed. An isolated HOME contains `.claude.json` pointing to owned inert JSON under an owned directory; directory search permissions are removed before inspection and restored in finally. Expected Claude Code state invalid; actual matching status undefined. Executed once on macOS arm64 as non-root; no real client configuration touched. ### Expected behavior Preserve observed presence and uncertainty. Inspection must report an unreadable configuration, rather than interpret failed lookup as absent. AGENTS.md requires unresolved identity/applicability to remain unknown instead of absent. ### Impact and scope Observed shared registration inspection omits the client. Doctor and update maintenance consume this inspection (source-derived); no real doctor CLI or actual update executed in this reproduction. Real-world frequency and native Windows/Linux: NOT_ENOUGH_INFO. ### REA version 6.5.0 source d0253c99d65afbbd12732a2fdaf711640574e17f. ### Runtime and platform Node24.18.0, macOS arm64, non-root; native temporary filesystem permissions. ### Target and artifact context Owned inert JSON only; no provider or target execution. ### Interface / Earliest failure stage Shared doctor/update registration discovery; setup/provider admission. ### Relevant output or evidence New assertion: expected status `{client:"claude_code",state:"invalid",command:[]}`; received undefined. `ClientRegistrationStatus.ts` presence uses `access` and catches every exception as false before parsing the configuration. ### Analysis Source-derived: presence and readability share one boolean, losing both symlink entry facts and non-missing filesystem errors. Probe entry metadata once, preserve errors separately from confirmed absence, and let the existing configuration owner diagnose readable versus unreadable contents. Maintenance must not grant mutation authority for invalid/unresolved registrations.
bsakaguchi 2026-10-31 00:35:24 +00:00
  • closed this issue
  • added the
    triage
    bug
    labels
Author
Owner

@morluto commented on GitHub (Oct 17, 2026):

Fixed in d818c3d2639d3115edb8a5269a754101aea6c3bd and pushed to main.

Registration discovery now probes entry metadata independently of target readability. Only confirmed missing entries count as absent; denied or otherwise unresolved metadata becomes a named invalid diagnostic. Existing symlink entries are passed to the configuration reader, which preserves its permission diagnostic. The superseded catch-all boolean helper was removed. Invalid/unresolved registrations remain outside automatic maintenance.

Executed on macOS arm64 / Node24.18.0: 73 tests passed across four focused files, including native permission-denied target/metadata controls, dangling entries, maintenance exclusion, and the public doctor command with unchanged files. Typecheck/lint, formatting and pre-push checks passed. The original control failed on d0253c99d (22 other controls passed).

Six completed isolated public doctor comparisons produced identical aligned status replies and unchanged configs. Two warm-repeat medians per build: elapsed 1.2299→1.2226s; wait4 CPU 1.2553→1.2643s; sampled process-family RSS 493.5→497.0MiB. Estimated cl100k request/reply/progress tokens25/117/0 unchanged. No speedup, significance, true-cold or whole-agent token claim;10ms family samples can miss transient/reparented processes. Failure controls are separate correctness checks, not equivalent performance answers.

Native Windows/Linux permission behavior and actual user installations were not verified; POSIX permission tests skip Windows/root. No provider/target execution or heavy profiler/test run.

<!-- gh-comment-id:6242887355 --> @morluto commented on GitHub (Oct 17, 2026): Fixed in `d818c3d2639d3115edb8a5269a754101aea6c3bd` and pushed to main. Registration discovery now probes entry metadata independently of target readability. Only confirmed missing entries count as absent; denied or otherwise unresolved metadata becomes a named invalid diagnostic. Existing symlink entries are passed to the configuration reader, which preserves its permission diagnostic. The superseded catch-all boolean helper was removed. Invalid/unresolved registrations remain outside automatic maintenance. Executed on macOS arm64 / Node24.18.0: **73 tests passed across four focused files**, including native permission-denied target/metadata controls, dangling entries, maintenance exclusion, and the public doctor command with unchanged files. Typecheck/lint, formatting and pre-push checks passed. The original control failed on d0253c99d (22 other controls passed). Six completed isolated public doctor comparisons produced identical aligned status replies and unchanged configs. Two warm-repeat medians per build: elapsed 1.2299→1.2226s; wait4 CPU 1.2553→1.2643s; sampled process-family RSS 493.5→497.0MiB. Estimated cl100k request/reply/progress tokens25/117/0 unchanged. No speedup, significance, true-cold or whole-agent token claim;10ms family samples can miss transient/reparented processes. Failure controls are separate correctness checks, not equivalent performance answers. Native Windows/Linux permission behavior and actual user installations were not verified; POSIX permission tests skip Windows/root. No provider/target execution or heavy profiler/test run.
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#3044
No description provided.