Skip to content

fix(claude): report unreadable records as incomplete discovery - #395

Merged
abruption merged 2 commits into
mainfrom
fix/394-claude-list-read-errors
Nov 15, 2026
Merged

abruption merged 2 commits into
mainfrom
fix/394-claude-list-read-errors

Conversation

@abruption

@abruption abruption commented Nov 15, 2026 •

Copy link
Copy Markdown
Owner

Summary

A record in a single selected Claude registry can fail with PermissionError, yet listing reports ok=true and exits 0. Discovery already counts the failure internally; ClaudeAdapter.list was checking only the separate profile-error list.

Copy the inventory error list and include the existing session_record_unavailable code when a genuine permission failure was observed. Keep readable session rows and the established partial-discovery status/error shape. Healthy and intentionally ignored non-permission-invalid records retain their prior behavior. Regenerate the standalone artifact.

Refs #394

Type

  • fix
  • test

Validation

  • Before the fix: five focused tests ran; two failed by reproducing false CLI success with an actual owned mode-000 record and a separate injected permission-failure inventory.
  • After the fix: five focused tests passed on Python 3.13.7 and Apple Python 3.9.6; 68 related adapter/Claude-record/profile tests passed. Actual mode-000 testing asserts the kernel denial rather than assuming it from file mode.
  • Healthy-row preservation, existing multi-profile error deduplication, inventory non-mutation, normal empty/successful listing and intentionally ignored malformed-record behavior are checked.
  • Generator --check and whitespace checks passed.
  • Integrated feature verification: 143 MCP tests ran per SDK on Mac (141 passed, two documented skips) and KR Linux (142 passed, Windows-only skip), plus five focused Claude-fix tests per Linux SDK environment. The feature-specific tests are in the separate feat(mcp): add bounded paginated session discovery #393 branch, not this minimal fix.

Independent review

Fresh independent source reviews of this exact adapter/generated/test fix and its #393 integration completed before Draft creation: Claude Code 2.1.325 / requested and metadata-confirmed claude-opus-5-5 (226.331s), and Antigravity CLI 1.5.9 / requested and init-confirmed gemini-4-argon-medium, medium (54.691s). Same 161,293-byte frozen technical input SHA-256 220ebee96deea60d519b34d6b0158dcabe62dd00a999fb268d1ba2a8be22dc04.

Both were fresh, non-interactive read-only calls; Claude tools disabled/plan/no persistence, Antigravity plan+sandbox/600s timeout. Both exited 0 with substantive responses, unchanged input hashes and no fallback. Neither reported a confirmed Draft blocker for the fix. Codex checked the requested caller-impact audit: default multi-agent listing intentionally reports incomplete with retained rows, while doctor and send target resolution use discover directly and are unchanged. This review is supplied-source analysis, not a native-agent or operational certification.

Compatibility and scope

When Claude discovery has a genuine record permission failure, the default multi-agent list can now return exit 1 while retaining readable rows from all agents. Existing MCP list_sessions similarly preserves partial rows and uses its existing error flag; the new #393 page API can report a valid incomplete page. Operators can inspect the inaccessible registry record through their normal permission-management process; this change does not delete files, repair permissions or retry automatically.

Call-graph audit: diagnose_claude and Claude target resolution use discover directly, not ClaudeAdapter.list; this change does not alter those routines. Explicit wake remains Codex-only. No new fields, probes, model turns, sends, receipts/ACKs or operational actions are introduced.

This Draft is the supporting correction for #393; merge order is this fix, then the separately reviewed paged-list Draft. It does not change the runtime version or publish a package, tag or release. Existing immutable artifacts and user installations are untouched.

Codex P2 follow-up — 2026-11-15

Commit 9410607fdb3d3b85b9734d2b50a0ecb6ccff08ab addresses the mode-000 fixture portability finding. The test probes an actual kernel read independently of read_claude_record; when the environment can read the file (for example DAC-bypass privileges), only that actual-denial fixture is skipped. In denial-capable environments, the existing production-reader, healthy-row, partial-status and privacy assertions still run unchanged. Injected permission-error coverage remains unconditional.

A new controlled readable-probe regression verifies the skip branch without treating the production reader as the capability probe. Python 3.13.7 and Apple Python 3.9.6 each ran six tests successfully, including the actual unprivileged denial fixture and controlled bypass branch. No privileged/root process was started for this follow-up. Whitespace checks passed.

This is a test-only post-review correction; runtime and generated source are unchanged. The earlier independent review covered the preceding five-test revision; these fixture refinements were locally validated and are not represented as another external CLI review. Current-head CI and automatic review results remain to be checked.

@abruption abruption added this to the MCP discovery hardening milestone Nov 15, 2026
@abruption abruption added bug Something isn't working priority:P2 Planned reliability, acceptance or feature work; priority does not authorize implementation. labels Nov 15, 2026
@abruption abruption self-assigned this Nov 15, 2026
@abruption
abruption marked this pull request as ready for review November 15, 2026 01:53
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 15, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-15T01:54:33.335242Z be056de Draft marked ready
🔒 Security Review ✅ Completed 2026-11-15T01:56:43.600316Z be056de Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: be056dea90

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@abruption
abruption merged commit 0fc38ee into main Nov 15, 2026
57 checks passed
@abruption
abruption deleted the fix/394-claude-list-read-errors branch November 15, 2026 02:09
@abruption abruption mentioned this pull request Nov 15, 2026
3 tasks done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working priority:P2 Planned reliability, acceptance or feature work; priority does not authorize implementation.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant