Skip to content

fix(provider-selection): name whether a rejection came from availability or target support - #7220

Merged
gensokyo-dev merged 3 commits into
morluto:mainfrom
dxqlovestudy:fix/provider-rejection-origin
Oct 26, 2026
Merged

gensokyo-dev merged 3 commits into
morluto:mainfrom
dxqlovestudy:fix/provider-rejection-origin

Conversation

@dxqlovestudy

@dxqlovestudy dxqlovestudy commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Fixes #7214. CLI and MCP provider-selection errors now distinguish local readiness rejections (origin: "availability") from observed target-support refusals (origin: "target"). Original provider IDs, codes, reasons, diagnostics, candidate ordering and explicit provider choices are preserved. The shared error owner makes one defensive diagnostic copy.

An availability-only error describes recorded readiness failures and the absence of a reported target refusal. It does not claim that the host has no configured providers, or infer target support. This includes invalid existing registrations and an explicit unavailable provider alongside a ready alternative. Documentation uses the same distinction.

Validation

Integrated current main b45a83368 and reviewed head 9eb726b1f:

  • 116 focused registry, error-projection and pwntools input-limit tests pass. A new configured-but-unavailable/ready-alternative regression first failed on the original PR message, then passed. Mixed rejections retain the existing message.
  • npm run check:fast and npm run docs:check pass. One concurrent build attempt was refused by the existing artifact lock; documentation validation completed the required artifacts afterward.
  • Actual packaged CLI analyze /usr/bin/true --provider ida --json and stdio MCP open_binary were run with a private HOME in two cases: no IDA registration, and an invalid existing registration. Both adapters retain matching error projections, respectively not_configured/configured:false and open_options_invalid/configured:true; every recorded rejection gains its producer-derived origin. Exact main was run as the control and lacks these origin fields.
  • Two cases across both adapters, 2-CPU affinity: control 14.697 s wall / 10.666 s CPU / 323.41 MiB sampled process-family peak; changed final compiled head 11.492 s / 10.765 s / 321.90 MiB. These are single contended samples, not a speedup claim. MCP replies grow from 3226/3242 to 3424/3440 bytes; no report or extra analysis call is added. Agent token usage was not measured. Complete probe responses remain local evidence.

No IDA/Ghidra process was launched, no remote endpoint was contacted, and no native Windows DOS reproduction is claimed. This fixes diagnostic provenance, not DOS admission. Hosted CI 40349759511: source tests, static checks, docs, package build, real binary-layout/recorded-crash/web-network checks, SQLite versions, Linux native baseline, and four portable shards pass. Shard 4 fails four ADB MCP cases; the actual merge-base main d9908fd7a has the identical four assertions and diagnostic in its own CI job. The same four cases pass locally on both original main b45 (59.131 s, 1870 MiB peak) and this PR (54.573 s, 2023 MiB peak). Three fail-fast-canceled shards remain unverified. This is an authorized baseline-failure bypass, not a green-CI claim.

Fresh Codex review reports no findings and Greptile is 5/5 at 9eb726b1f; the previous thread is resolved with root cause, structural fix, validation and limitations.

Author readiness

Human owner: @dxqlovestudy

  • I reviewed the final diff and relevant existing code, understand the change and its edge cases, and take responsibility for the complete PR, including AI-assisted work.
  • I checked the evidence above, confirmed it supports the current change, and recorded meaningful validation gaps.
  • I declare this PR ready for initial maintainer review.

Before merge

  • This PR addresses a concrete problem or an agreed enhancement.
  • Material scope and authority questions are resolved, and any required maintainer scope decision covers the final diff.
  • The PR has one focused outcome and the title follows type(scope): outcome.
  • Related issue is linked, or the reason for not linking one is stated above.
  • Tests cover changed observable behavior and meaningful failure paths.
  • Owning docs, contracts, and generated metadata are updated where needed.
  • User-visible CLI/MCP changes include representative output.
  • I checked the final diff for secrets, unrelated cleanup, and unsupported claims.

…ity or target support

`provider_unavailable` flattened availability and target-support refusals into
one `details.rejections[]` list, so a provider that was never configured read
like one that had refused the target's format. On a Windows host with a DOS
image that turned "the Windows admission set is PE-only" into "install IDA".

Each rejection now records its origin: `availability` entries carry no
information about the target, `target` entries record a refused kind, format,
architecture, or role. When every rejection is availability-only, the user
message says no configured provider refused the target instead of pointing at
a provider that refused it. The mixed and target-only cases keep the previous
wording.

The field is additive in `details.rejections[]`; selection reasons, candidate
IDs, codes, and diagnostics are unchanged. `pwntools-elf` reports its
configuration failure as an availability rejection.

Refs morluto#7214
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 26, 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-26T15:34:18.618076Z 9eb726b Manual request
ℹ️ 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.

@greptile-apps

greptile-apps Bot commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge, with the previous wording issue fixed and no new blocking findings.

Summary

The PR labels provider rejections by their source and gives availability-only failures a more precise message.

  • Provider rejections now say whether they came from local readiness or target support.

Reviews (2) · Last reviewed commit: "fix(provider-selection): describe readin..." · Reviewed by Greptile

Comment thread src/domain/providerSelectionError.ts Resolved
@gensokyo-dev

Copy link
Copy Markdown
Collaborator

@codex review

Updated on current main. The configured-provider finding is fixed at the shared error owner, with a regression covering an invalid selected registration and a ready alternative. 116 focused tests, static checks, docs, and real ELF CLI/MCP error projections pass; full evidence and coverage limits are in the description.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. You're on a roll.

Reviewed commit: 9eb726b1f9

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

@gensokyo-dev
gensokyo-dev merged commit 4da7e46 into morluto:main Oct 26, 2026
40 of 47 checks passed
@github-actions github-actions Bot mentioned this pull request Oct 26, 2026
3 tasks done
@morluto morluto added area: providers Provider and capability discovery, including provider proposal triage bug Something isn't working labels Nov 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: providers Provider and capability discovery, including provider proposal triage bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] provider_unavailable names not_configured providers as if they had refused the target

3 participants