[GH-ISSUE #3208] [Bug] Unqualified doctor checks report a canonical client skill as missing or stale #1144

Closed
opened 2026-10-15 18:31:29 +00:00 by bsakaguchi · 1 comment
Owner

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

Before submitting

  • I searched the open and closed issues for a related report.
  • I removed credentials, tokens, private paths, and sensitive target data.

Area

Setup, packaging, or upgrade

Observed behavior

After setup --skill-client claude_code --skill=true --yes --json installs the bundled workflow successfully, plain doctor --json reports its identity aligned, but the documented installed-workflow check doctor --skill --json reports it missing with null installed version and tool count. Adding --client claude_code to that check reports the same unchanged installed skill aligned.

Creating only an empty $HOME/.cursor directory makes plain doctor report the installed skill stale. Its version remains 42 and tool count remains 207. Doctor adds a failing skill:identity check with classification: "config_drift" and tells the caller to update the installed skill. All seven installed managed files remain byte-identical to the bundled workflow. Refreshing only the selected Claude Code skill returns ready with aligned identity, but plain doctor still reports stale and bare --skill still reports missing. Removing the empty Cursor marker restores plain doctor's aligned result; bare --skill remains missing.

The skill-only installation has no MCP registration, so plain doctor and the explicit client-scoped doctor can also fail separate registration or environment checks. This report does not attribute the full-audit exit code solely to the false skill diagnostic. In the reproduced bare --skill case, its only failing required check was skill:identity.

Reproduction

  1. From a clean checkout at 58300885207133422af235e0f2b10658cf958b03, prepare locked dependencies and the runtime:

    npm ci
    npm run build:cached
    
  2. Start a shell with only PATH and the checkout location inherited, then create the isolated home inline. Keep all subsequent commands in this shell. Do not enable set -e, because several diagnostic commands intentionally exit 1.

    env -i PATH="$PATH" REA_REPRO_CHECKOUT="$PWD" bash --noprofile --norc
    cd "$REA_REPRO_CHECKOUT"
    repro_root="$(mktemp -d)"
    export HOME="$repro_root/home"
    export XDG_CONFIG_HOME="$HOME/config"
    export XDG_CACHE_HOME="$HOME/cache"
    export XDG_DATA_HOME="$HOME/data"
    mkdir -p "$HOME"
    node scripts/rea.mjs setup --skill-client claude_code --skill=true --yes --json
    

    Setup returns ready, aligned skill identity, version 42, and tool count 207.

  3. Compare the three diagnostic selections without changing installed files:

    node scripts/rea.mjs doctor --json
    node scripts/rea.mjs doctor --skill --json
    node scripts/rea.mjs doctor --client claude_code --skill --json
    

    Plain doctor reports aligned skill identity. Bare --skill reports missing identity, null version and tool count, and a failing required skill:identity check. The explicit client check reports aligned skill identity and a passing skill check, but exits 1 for its missing Claude Code registration.

  4. Create an empty marker for an unselected client and repeat the unqualified checks:

    mkdir "$HOME/.cursor"
    node scripts/rea.mjs doctor --json
    node scripts/rea.mjs doctor --skill --json
    

    Plain doctor now reports the installed skill stale. Bare --skill remains missing.

  5. Refresh only the selected skill and repeat those checks:

    node scripts/rea.mjs setup --skill-client claude_code --skill=true --yes --json
    node scripts/rea.mjs doctor --json
    node scripts/rea.mjs doctor --skill --json
    

    Setup returns ready and aligned identity, but neither false doctor result clears.

  6. Remove only the empty marker and repeat the same checks:

    rmdir "$HOME/.cursor"
    node scripts/rea.mjs doctor --json
    node scripts/rea.mjs doctor --skill --json
    

    Plain doctor returns to aligned identity without a skill failure. Bare --skill still reports missing.

Expected behavior

docs/installation.md:32-42 says newly detected clients remain unselected and setup installs the bundled workflow with selected integrations. docs/installation.md:118-136 describes selected skill destinations, independent refresh, leaving other copies untouched, and the identity.skill.state readiness field. docs/installation.md:285-313 defines the unscoped audit and advertises bare doctor --skill --json as the installed-workflow readiness check. doctor --help says --skill requires the installed skill identity to be aligned.

Both unqualified commands should identify the existing canonical selected skill and preserve its installed version and tool count. An absent workflow at an unselected destination should not turn that installed copy into missing or stale identity or require updating its unchanged bytes. Separate missing-registration diagnostics may remain in the full audit.

Impact and scope

This is a P2 diagnostic defect. A supported client-skill installation fails the documented installed-workflow readiness check, and an unrelated empty client marker introduces a false stale result. The recommended update succeeds without satisfying either false diagnostic. The verifier observed no changes to installed skill bytes, target-analysis failure, data loss, or security-boundary crossing.

For a configured selected client, the verifier observed doctor --client claude_code --skill --json report aligned identity, healthy: true, and exit 0 even with the Cursor marker present. With a skill-only installation, that scoped command still verifies aligned skill identity but exits 1 for the separate missing registration. Selected-skill setup also successfully verifies that destination and returns ready.

REA version

6.4.0 (main at 5830088520)

Runtime and platform

macOS arm64. Initial verification used Node.js v26.10.0; the merge-round replay used Node.js v24.21.0. Both used the baseline checkout's prepared dependencies and built runtime. No analysis engine is required.

Target and artifact context

The seven-file bundled reverse-engineer-anything workflow installed only for Claude Code, with no shared skill copy. The second input is an empty Cursor marker directory. No target binary or analysis artifact is required.

Interface

CLI

Earliest failure stage

Setup or provider admission

Relevant output or evidence

The following excerpts summarize the reproduced skill identity fields and failing check:

After selected Claude Code skill setup:
  setup status: ready
  doctor --json: installed_version="42", installed_tool_count=207, state=aligned
  doctor --skill --json: installed_version=null, installed_tool_count=null, state=missing
  doctor --client claude_code --skill --json: installed_version="42", installed_tool_count=207, state=aligned

After creating only an empty Cursor marker:
  doctor --json: installed_version="42", installed_tool_count=207, state=stale
  doctor --skill --json: installed_version=null, installed_tool_count=null, state=missing

False stale check:
{"name":"skill:identity","ok":false,"classification":"config_drift","detail":"Installed REA skill identity is stale.","remediation":"Run rea setup to update the installed REA skill."}

After selected-skill refresh:
  setup status: ready; skill state: aligned
  doctor --json: skill state: stale
  doctor --skill --json: skill state: missing

After removing only the empty marker:
  doctor --json: skill state: aligned
  doctor --skill --json: skill state: missing

All seven managed files retained their SHA-256 hashes and matched the bundled files byte for byte.

Typed outcome or recovery expected

Before and after marker creation, both unqualified checks should report aligned skill identity, version 42, and tool count 207, with no failing skill diagnostic. Bare --skill should have a passing required skill check, healthy required scope, and exit 0 in this skill-only case. Plain doctor may still fail unrelated registration or environment checks. A selected-skill refresh should agree with both diagnostics and should not require creating an unselected shared copy.

Keep explicit client selection and separate registration readiness. A genuinely empty home must still report missing identity and fail bare --skill. An actual changed managed file in the selected copy must still report stale and fail its required skill check; restoring its bundled bytes must restore alignment. The verifier reproduced both negative controls through public CLI commands.

Analysis or suspected cause

Source-derived reasoning at the baseline explains the reproduced destination-selection errors. src/cli/setupCommands.ts:105-134 enters the doctor workflow. src/application/ClientRegistrationStatus.ts:134,162-165,446-450 includes marker-only clients in registration observations. src/application/Doctor.ts:279-285,523-530 passes every detected client into skill comparison for the audit. src/application/SupportedClients.ts:512-516,812-850 resolves Cursor to the shared personal skill destination. src/application/SetupSkill.ts:266-286,454-507 treats the absent shared files as noncanonical while retaining metadata from the installed Claude Code copy.

For bare --skill, src/cli/setupCommands.ts:303-315 builds explicit scope with empty registration clients. src/application/DoctorScope.ts:38-49 preserves that scope. Doctor's identity selection passes the empty client list to src/application/SupportedClients.ts:819-829, which resolves shared storage only. The absent shared manifest then produces missing identity through src/application/SetupSkill.ts:454-486.

Additional context

Related #1711 fixed setup's final readiness check for independently selected skill destinations; this report concerns standalone unqualified doctor checks that still misidentify the same installed workflow after setup succeeds. P2 reflects incorrect actionable readiness information with an observed scoped workaround and intact installed files.

Originally created by @coygeek on GitHub (Oct 14, 2026). Original GitHub issue: https://github.com/morluto/rea/issues/3208 ### Before submitting - [x] I searched the open and closed issues for a related report. - [x] I removed credentials, tokens, private paths, and sensitive target data. ### Area Setup, packaging, or upgrade ### Observed behavior After `setup --skill-client claude_code --skill=true --yes --json` installs the bundled workflow successfully, plain `doctor --json` reports its identity aligned, but the documented installed-workflow check `doctor --skill --json` reports it missing with null installed version and tool count. Adding `--client claude_code` to that check reports the same unchanged installed skill aligned. Creating only an empty `$HOME/.cursor` directory makes plain doctor report the installed skill stale. Its version remains `42` and tool count remains `207`. Doctor adds a failing `skill:identity` check with `classification: "config_drift"` and tells the caller to update the installed skill. All seven installed managed files remain byte-identical to the bundled workflow. Refreshing only the selected Claude Code skill returns `ready` with aligned identity, but plain doctor still reports stale and bare `--skill` still reports missing. Removing the empty Cursor marker restores plain doctor's aligned result; bare `--skill` remains missing. The skill-only installation has no MCP registration, so plain doctor and the explicit client-scoped doctor can also fail separate registration or environment checks. This report does not attribute the full-audit exit code solely to the false skill diagnostic. In the reproduced bare `--skill` case, its only failing required check was `skill:identity`. ### Reproduction 1. From a clean checkout at `58300885207133422af235e0f2b10658cf958b03`, prepare locked dependencies and the runtime: ```sh npm ci npm run build:cached ``` 2. Start a shell with only PATH and the checkout location inherited, then create the isolated home inline. Keep all subsequent commands in this shell. Do not enable `set -e`, because several diagnostic commands intentionally exit 1. ```sh env -i PATH="$PATH" REA_REPRO_CHECKOUT="$PWD" bash --noprofile --norc cd "$REA_REPRO_CHECKOUT" repro_root="$(mktemp -d)" export HOME="$repro_root/home" export XDG_CONFIG_HOME="$HOME/config" export XDG_CACHE_HOME="$HOME/cache" export XDG_DATA_HOME="$HOME/data" mkdir -p "$HOME" node scripts/rea.mjs setup --skill-client claude_code --skill=true --yes --json ``` Setup returns `ready`, aligned skill identity, version `42`, and tool count `207`. 3. Compare the three diagnostic selections without changing installed files: ```sh node scripts/rea.mjs doctor --json node scripts/rea.mjs doctor --skill --json node scripts/rea.mjs doctor --client claude_code --skill --json ``` Plain doctor reports aligned skill identity. Bare `--skill` reports missing identity, null version and tool count, and a failing required `skill:identity` check. The explicit client check reports aligned skill identity and a passing skill check, but exits 1 for its missing Claude Code registration. 4. Create an empty marker for an unselected client and repeat the unqualified checks: ```sh mkdir "$HOME/.cursor" node scripts/rea.mjs doctor --json node scripts/rea.mjs doctor --skill --json ``` Plain doctor now reports the installed skill stale. Bare `--skill` remains missing. 5. Refresh only the selected skill and repeat those checks: ```sh node scripts/rea.mjs setup --skill-client claude_code --skill=true --yes --json node scripts/rea.mjs doctor --json node scripts/rea.mjs doctor --skill --json ``` Setup returns `ready` and aligned identity, but neither false doctor result clears. 6. Remove only the empty marker and repeat the same checks: ```sh rmdir "$HOME/.cursor" node scripts/rea.mjs doctor --json node scripts/rea.mjs doctor --skill --json ``` Plain doctor returns to aligned identity without a skill failure. Bare `--skill` still reports missing. ### Expected behavior `docs/installation.md:32-42` says newly detected clients remain unselected and setup installs the bundled workflow with selected integrations. `docs/installation.md:118-136` describes selected skill destinations, independent refresh, leaving other copies untouched, and the `identity.skill.state` readiness field. `docs/installation.md:285-313` defines the unscoped audit and advertises bare `doctor --skill --json` as the installed-workflow readiness check. `doctor --help` says `--skill` requires the installed skill identity to be aligned. Both unqualified commands should identify the existing canonical selected skill and preserve its installed version and tool count. An absent workflow at an unselected destination should not turn that installed copy into missing or stale identity or require updating its unchanged bytes. Separate missing-registration diagnostics may remain in the full audit. ### Impact and scope This is a P2 diagnostic defect. A supported client-skill installation fails the documented installed-workflow readiness check, and an unrelated empty client marker introduces a false stale result. The recommended update succeeds without satisfying either false diagnostic. The verifier observed no changes to installed skill bytes, target-analysis failure, data loss, or security-boundary crossing. For a configured selected client, the verifier observed `doctor --client claude_code --skill --json` report aligned identity, `healthy: true`, and exit 0 even with the Cursor marker present. With a skill-only installation, that scoped command still verifies aligned skill identity but exits 1 for the separate missing registration. Selected-skill setup also successfully verifies that destination and returns `ready`. ### REA version 6.4.0 (main at 58300885207133422af235e0f2b10658cf958b03) ### Runtime and platform macOS arm64. Initial verification used Node.js v26.10.0; the merge-round replay used Node.js v24.21.0. Both used the baseline checkout's prepared dependencies and built runtime. No analysis engine is required. ### Target and artifact context The seven-file bundled `reverse-engineer-anything` workflow installed only for Claude Code, with no shared skill copy. The second input is an empty Cursor marker directory. No target binary or analysis artifact is required. ### Interface CLI ### Earliest failure stage Setup or provider admission ### Relevant output or evidence The following excerpts summarize the reproduced skill identity fields and failing check: ```text After selected Claude Code skill setup: setup status: ready doctor --json: installed_version="42", installed_tool_count=207, state=aligned doctor --skill --json: installed_version=null, installed_tool_count=null, state=missing doctor --client claude_code --skill --json: installed_version="42", installed_tool_count=207, state=aligned After creating only an empty Cursor marker: doctor --json: installed_version="42", installed_tool_count=207, state=stale doctor --skill --json: installed_version=null, installed_tool_count=null, state=missing False stale check: {"name":"skill:identity","ok":false,"classification":"config_drift","detail":"Installed REA skill identity is stale.","remediation":"Run rea setup to update the installed REA skill."} After selected-skill refresh: setup status: ready; skill state: aligned doctor --json: skill state: stale doctor --skill --json: skill state: missing After removing only the empty marker: doctor --json: skill state: aligned doctor --skill --json: skill state: missing All seven managed files retained their SHA-256 hashes and matched the bundled files byte for byte. ``` ### Typed outcome or recovery expected Before and after marker creation, both unqualified checks should report aligned skill identity, version `42`, and tool count `207`, with no failing skill diagnostic. Bare `--skill` should have a passing required skill check, healthy required scope, and exit 0 in this skill-only case. Plain doctor may still fail unrelated registration or environment checks. A selected-skill refresh should agree with both diagnostics and should not require creating an unselected shared copy. Keep explicit client selection and separate registration readiness. A genuinely empty home must still report missing identity and fail bare `--skill`. An actual changed managed file in the selected copy must still report stale and fail its required skill check; restoring its bundled bytes must restore alignment. The verifier reproduced both negative controls through public CLI commands. ### Analysis or suspected cause Source-derived reasoning at the baseline explains the reproduced destination-selection errors. `src/cli/setupCommands.ts:105-134` enters the doctor workflow. `src/application/ClientRegistrationStatus.ts:134,162-165,446-450` includes marker-only clients in registration observations. `src/application/Doctor.ts:279-285,523-530` passes every detected client into skill comparison for the audit. `src/application/SupportedClients.ts:512-516,812-850` resolves Cursor to the shared personal skill destination. `src/application/SetupSkill.ts:266-286,454-507` treats the absent shared files as noncanonical while retaining metadata from the installed Claude Code copy. For bare `--skill`, `src/cli/setupCommands.ts:303-315` builds explicit scope with empty registration clients. `src/application/DoctorScope.ts:38-49` preserves that scope. Doctor's identity selection passes the empty client list to `src/application/SupportedClients.ts:819-829`, which resolves shared storage only. The absent shared manifest then produces missing identity through `src/application/SetupSkill.ts:454-486`. ### Additional context Related #1711 fixed setup's final readiness check for independently selected skill destinations; this report concerns standalone unqualified doctor checks that still misidentify the same installed workflow after setup succeeds. P2 reflects incorrect actionable readiness information with an observed scoped workaround and intact installed files.
bsakaguchi 2026-10-15 18:31:29 +00:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

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

Resolved on main by ba33c706d.

Unqualified doctor now audits the installed managed skill identity.

Rechecked on main b8510ee00 in the current focused run: 20 test files passed, 225 tests passed and one platform-dependent test skipped. Relevant regression coverage: tests/acceptance/setup/unqualifiedDoctorSkill.test.ts.

<!-- gh-comment-id:6174975348 --> @morluto commented on GitHub (Oct 14, 2026): Resolved on main by ba33c706d. Unqualified doctor now audits the installed managed skill identity. Rechecked on main b8510ee00 in the current focused run: 20 test files passed, 225 tests passed and one platform-dependent test skipped. Relevant regression coverage: tests/acceptance/setup/unqualifiedDoctorSkill.test.ts.
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#1144
No description provided.