Skip to content

fix(claude): discover native sessions in Orca account-scoped profiles - #319

Merged
abruption merged 3 commits into
mainfrom
fix/317-claude-profile-discovery
Oct 19, 2026
Merged

abruption merged 3 commits into
mainfrom
fix/317-claude-profile-discovery

Conversation

@abruption

Copy link
Copy Markdown
Owner

Summary

Fixes #317. Assigned to the v1.2.1 patch-candidate milestone; this PR does not bump the runtime version or authorize publication.

  • Discover native Claude registry metadata in known same-user Orca account-scoped profiles on macOS when neither CLAUDE_CONFIG_DIR nor ANTHROPIC_CONFIG_DIR explicitly selects a root. Explicit-root precedence and scope remain unchanged. Linux/Windows automatic Orca-profile inventory is not added.
  • Bound profile inventory (128 immediate entries), aggregate registry-directory entries (4096), and individual registry records (1 MiB). Inspect registry metadata only: no credentials, transcripts, native-agent launch, or automatic submission.
  • Preserve healthy listing rows on partial discovery failure, but refuse target selection while the inventory is incomplete or conflicting. Canonical aliases are scanned once; distinct live records claiming the same process/inbox are not silently selected by scan order.
  • Keep the original registry directory, selected record filename, process metadata and inbox binding privately attached to the selected row. Revalidate before native writes; a changed selection is a typed no-effect refusal, including local/remote handoff. No new public profile-path fields or frozen handoff schema changes.
  • Preserve ordinary padded/Unicode PID record filenames, Unix socket aliases, single-root doctor permission classifications and optional-field behavior. Update the CLI reference in all four existing languages.

Validation

Final pre-PR source is identified in the final independent-review record below, based on published v1.2.0/main 4fc526f36afc65bb6ec460439eb0986c09ecc8ee.

  • macOS arm64, Python 3.13.7 with existing isolated relay/MCP test dependencies: final full suite 1294 tests OK, 19 skipped, first run after the endpoint-alias conflict fix, with dev mode, faulthandler and ResourceWarning-as-error. See the non-test-failing shutdown diagnostics below.
  • Related Python 3.13 tests: 235 OK, 1 skipped; Python 3.9.6: 130 OK, 1 skipped; documentation: 62 OK before the last source/test-only endpoint fix (documentation unchanged afterward).
  • Standalone generation and git diff --check: pass. Frozen handoff document/fixture hashes remain unchanged.
  • New profile fixtures cover explicit roots, known profiles, bounds, unsafe directories, partial failures, ambiguity, original-record/inbox revalidation, generation binding, diagnostics and zero-write local/remote handoff refusals. In-memory removal of typed refusal details causes the three intended handoff assertions to fail; no production file was mutated by that check.
  • Metadata-only acceptance on a second macOS machine: the installed baseline omitted a live native Claude registry; streamed candidate source discovered it as alive/reachable with an available generation token. Explicit default-root selection excluded the account-scoped profile as intended. No install, configuration change, session input or model call was performed for this acceptance.

The final full test log includes asyncio slow-task debug messages, expected negative-test diagnostics, and an asyncio/websockets accept/teardown AssertionError followed by ignored unclosed-socket/transport ResourceWarning diagnostics, despite the test runner reporting OK/exit 0. The first-run log is retained without rerunning to hide these observations. Their causal relationship to this patch is unproven; this is not a warning-free claim and does not resolve the separately tracked shutdown/CI diagnostics in #316. Synthetic inbox/SSH/handoff fixtures do not establish new live send/ACK or Windows native-profile acceptance. Windows reparse-point/cloud-placeholder compatibility has not been established by native acceptance.

Independent pre-PR review

The independent-cli-review workflow was used before PR creation: separate non-interactive Claude Code and Codex CLI processes, the same immutable sanitized stdin packet, no reviewer tools/tests/network/writes, and pre/post SHA-256 verification. Reviewers did not receive one another's outputs. Source findings were checked against the implementation.

The first review identified record-filename/socket-alias compatibility, permission reporting and no-effect refusal issues; these were fixed. A follow-up identified different live records claiming the same actual socket through different aliases; the final commit adds an inode-based Unix conflict index and an order-independent regression test.

Final source 4cd202af4b6a2f0b5e7daa1e7f9d960eb7a67217 was independently re-reviewed before PR creation:

  • Claude Code 2.1.303, requested and metadata-confirmed claude-opus-5-5; Codex CLI 0.163.0, isolated default model (actual model name not exposed).
  • Parallel, non-interactive, static review; both exit 0 with completed final responses. No reviewer tools, tests, network actions or file edits.
  • Final narrow packet: 24,684 bytes, SHA-256 e55e99b092277ec831469df586178e391ef80d8c4b3b1869842316f283bf074d, identical before/after both runs.
  • Both found no mandatory correction in the final increment. Optional hardlink/additional negative fixtures and bounded worst-case conflict-index complexity were distinguished from confirmed defects. Root checked the cited source, generator consistency, scanner consumers and metadata-only acceptance; this is not proof of universal race-free/native delivery.
  • Earlier review packets were kept separately: initial aa57133c339454ef8cec41d3f68be3c0c19d7c99cd6deb378a0b49ab8d9e718b, first follow-up 63c6b76a115267f5216ef1a401fc25af9d1c06510456a2b671b79c9cbb125742. Subsequent review packets did not include one another's reviewer outputs.

Scope limits

No merge, tag, release, package publication, global installation, native message experiment or operations change. Queued/posted remains submission evidence, not receipt or completion. Existing inactive-target and no-automatic-retry policies remain in force. PR creation supplies the configured automatic Codex review; no review mention is added.

@abruption abruption added this to the v1.2.1 milestone Oct 19, 2026
@abruption abruption added bug Something isn't working priority:P2 Planned reliability, acceptance or feature work; priority does not authorize implementation. labels Oct 19, 2026
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 19, 2026 •

Copy link
Copy Markdown

Codex Review Summary

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

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-19T04:28:29.219607Z 4cd202a PR opened
🔒 Security Review ✅ Completed 2026-10-19T04:34:42.684264Z 4cd202a PR opened
ℹ️ 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.

@abruption
abruption merged commit ba00540 into main Oct 19, 2026
28 checks passed
@abruption
abruption deleted the fix/317-claude-profile-discovery branch October 19, 2026 04:45
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.

fix(claude): discover native sessions in Orca account-scoped profiles

1 participant