Skip to content

Fix DocumentationSearch asset compatibility recovery - #189

Merged
lynnswap merged 5 commits into
mainfrom
codex/fix-documentation-search-asset-selection
Aug 9, 2026
Merged

Fix DocumentationSearch asset compatibility recovery#189
lynnswap merged 5 commits into
mainfrom
codex/fix-documentation-search-asset-selection

Conversation

@lynnswap

@lynnswap lynnswap commented Aug 9, 2026

Copy link
Copy Markdown
Owner

Purpose

Recover DocumentationSearch when Xcode advertises the tool but its selected documentation asset cannot initialize the text embedding model.

The proxy previously treated the latest installed documentation asset as universally executable and passed through Text encoding failed tool errors without attempting the installed-asset recovery path.

Changes

  • Classify confirmed text encoder and embedding-model initialization failures as documentation provider failures.
  • Exclude assets that require a newer host OS, rank the remaining assets for the target Xcode and host OS, retry only the confirmed model-initialization failure family within the original request deadline, and remember the successful candidate.
  • Use the same host-compatible selection when repairing Xcode's documentation search configuration, and skip the persistent defaults write when no eligible asset exists.
  • Reject nonpositive search timeouts before invoking the helper.
  • Preserve an installed-asset fallback when a concurrent stale native response completes later, and retire stale routes only after their canonical owner changes.
  • Add regression coverage for asset eligibility, selection, retry boundaries, success caching, provider replacement, and concurrent promotion.

Testing

  • swift test --filter DocumentationProviderTests -Xswiftc -strict-concurrency=minimal (126 tests)
  • scripts/check.sh:
    • swift test --no-parallel -Xswiftc -strict-concurrency=minimal (1,033 tests)
    • XCODE_MCP_RUN_PROCESS_TESTS=1 swift test --no-parallel --filter XcodeMCPProcessRuntimeTests -Xswiftc -strict-concurrency=minimal (24 tests)
    • XCODE_MCP_RUN_PROCESS_TESTS=1 swift test --no-parallel --filter ProxyStdioAdapterTests -Xswiftc -strict-concurrency=minimal (13 tests)
  • git diff --check
  • Two live EstimationTechnique searches against an isolated branch server; both returned OK with the Vision documentation result.
  • Branch-wide Codex review against the pinned main base completed with no findings after four rounds.

Treat text encoder initialization failures as provider failures, select and retry documentation assets by Xcode and host compatibility, and preserve the installed fallback across concurrent native responses.

@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: cfc4319c28

ℹ️ 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".

Comment thread Sources/XcodeMCPProxyRuntime/Session/DocumentationProvider.swift Outdated
Prioritize assets that do not target a newer host OS and prevent the service repairer from persisting an ineligible configuration when no host-compatible asset exists.

@lynnswap lynnswap left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Already looking forward to the next diff.

Reviewed commit: 2c0710c3c7

ℹ️ 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".

@lynnswap
lynnswap merged commit b251cec into main Aug 9, 2026
9 checks passed
@lynnswap
lynnswap deleted the codex/fix-documentation-search-asset-selection branch August 9, 2026 08:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant