Repository navigation
fix(kuna): say why Kuna cannot answer instead of a generic message - #4113
Merged
Merged
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Contributor
[Medium impact] This PR appears safe to merge; no blocking issue was found. SummaryKuna now shows its specific reason when it cannot answer, rather than suggesting that callers abandon a working target.
Reviews (2) · Last reviewed commit: "fix(kuna): say why Kuna cannot answer in..." · Reviewed by Greptile |
Kuna capability gaps such as "no code at this address" or "no function node at this address" were built without a user message, so MCP and the CLI showed only "This analysis is unavailable for the current target. Choose another analysis or target." and kept the reason in details. One Kuna helper now presents the reason as the message for every such gap, and the unsupported-operation reason names call relationships and xrefs, which Kuna now answers. Refs #1957 Co-Authored-By: Claude Opus 5.5 <[email protected]>
kaoru0822-kitauji
force-pushed
the
fix/kuna-unavailable-says-why
branch
from
October 15, 2026 13:12
489f8b0 to
21fc731
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Several Kuna capability gaps were built as
AnalysisCapabilityUnavailableErrorwithout a user message. The MCP/CLI projection then shows its generic text for that tag: "This analysis is unavailable for the current target. Choose another analysis or target." The precise Kuna reason stayed indetails.reason. That text is wrong for these cases: the target is fine, the requested address is just not code, or not a function node. An agent that follows "choose another analysis or target" abandons a target that works. Refs #1957.Problem and expected behavior
Real Kuna 1.833, a small arm64 test program (
odd, built withcc -O1), main b225765:Expected: the message (and the remediation, which the projection derives from it) states the Kuna reason.
Change and scope
kunaUnavailable(operation, reason, options)insrc/kuna/KunaUnavailable.tsbuilds the capability error with the reason as its user message. Every Kuna site that presents its reason as-is now uses it:KunaProjectReader);KunaReferenceQueries);KunaProvider);userMessage: reasonby hand.exportUnavailable) keeps its own composed message.Not included: changing the generic presentation for other providers. Their
AnalysisCapabilityUnavailableErroruses are outside this track.Scope: an ordinary fix within the existing Kuna provider boundary; no maintainer scope decision applies.
Contract and boundary impact
messageandremediation.actioncarry the Kuna reason;code,category,retryableanddetailsare unchanged.Expected effects:
Evidence and regression coverage
Tests added or updated:
kunaCommandFailures.test.tsgets "says why Kuna cannot answer instead of a generic unavailable message". It checks the projectedmessagefor assembly at an import slot, callers at a non-entry address and an unsupported operation (search_strings), withcode: capability_unavailableandretryable: false.Base reproduction: the test fails on the base revision (
git stashofsrc/kuna).Real Kuna 1.833, same calls as above, after the fix:
Response sizes are about the same (645 → 651 and 634 → 620 bytes).
Remaining proof gaps: no Linux run; the closed-session and unconfigured-provider sites are covered by type and source review, not by a dedicated test of their message.
Observed, derived, and inferred claims remain distinguishable.
Artifact identity, source provenance, and failed attempts remain preserved.
Unsupported, incomplete, unavailable, or uncertain outcomes remain visible.
Validation performed
npm run test:focused -- tests/boundary/providers/kuna/*.test.ts: 189 passed twice after rebasing onto main with the Kuna string feature (feat(kuna): add cached string inventory and search #4095); 145 ×2 before. The rebase took main's updated unsupported-operation reason, and the test now useslist_segments, because Kuna answerssearch_stringssince feat(kuna): add cached string inventory and search #4095.npm run check:fast: typecheck and lint passed.npm run docs:check: passed.REA_KUNA_COMMAND=… npm run verify:kuna(real Kuna 1.833, darwin/arm64): passed before the rebase. On the rebased head it fails exactly as main does ("Required string "REA wide marker" was not recovered"), because of a layout-dependent string fixture from feat(kuna): add cached string inventory and search #4095 that is unrelated to this change. fix(kuna): keep the real lane's wide-string marker independent of layout #4116 fixes the fixture, and the lane passes with it.Compatibility, safety, and release
details.reason.Author readiness
Human owner:
Before merge
type(scope): outcome.🤖 Generated with Claude Code