Repository navigation
fix(kuna): suggest no restart when a fixed buffer stopped the export - #4104
Merged
Merged
Conversation
A failed export's capability error appended "restart REA, then reopen the target" to every resource-constraint remediation. Since output overflows became fixed `memory` bounds, an export whose own output overflowed REA's buffer was told both that repeating fails the same way and that a restart would help. The restart sentence now follows only settings-backed remediations such as the cache size. Refs #1957 Co-Authored-By: Claude Opus 5.5 <[email protected]>
Contributor
[Medium impact] The PR appears safe to merge. SummaryRemoves restart advice when a failed Kuna export exceeded a fixed output buffer.
Reviews (1) · Last reviewed commit: "fix(kuna): suggest no restart when a fix..." · Reviewed by Greptile |
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. |
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
#4070 made requests that need a failed export return a non-retryable error. For a resource-constraint cause, that error appends the cause's remediation and then "REA reads Kuna settings when it starts, so restart REA, then reopen the target." #4098 then classified output overflows as fixed
memorybounds, with the remediation "REA buffers at most N bytes of kuna output, so repeating this request for this target fails the same way." After both merged, an export stopped by its own output overflow tells the caller in one message that repeating fails the same way and that a restart will help. No setting controls those buffers, so the restart cannot help. Refs #1957.Problem and expected behavior
Trigger (fake Kuna):
kuna decompile-projectwrites more than REA's 8 MiB export output buffer, then aprocedure_assemblyoranalyze_functionrequest in that session. Before, the message ended as follows. This text is reconstructed from the code; the base-revision test failure confirms the restart sentence:Expected: no restart advice for a fixed buffer. The cache-capacity remediation (
REA_KUNA_CACHE_MAX_BYTES) is a setting and keeps it.Change and scope
In
exportUnavailable, the restart sentence follows a resource-constraint remediation only when the cause's resource is notmemory. One conditional. Timeout and other failures are unchanged.Test cleanup in the same file: the failed-export cases now carry their expected projected
detailsinstead of branching on the cause's type, and each case has a distinct name; two cases used to share the title "(AnalysisResourceConstraintError)". The fake Kuna gains anoisyexport mode, 9 MiB of stdout before its summary.Not reproduced with real Kuna: a real export's stdout is one summary line, so its 8 MiB buffer cannot be reached on the targets I have. The other fixed buffer on this path, the 128 MiB inventory, is reached by no app here; Telegram's inventory is 124 MB.
Scope: an ordinary fix within the existing Kuna provider boundary; no maintainer scope decision applies.
Contract and boundary impact
KunaSessionClient.exportUnavailable(failed-export message).Expected effects:
Evidence and regression coverage
Tests added or updated: "reports a failed export as not retryable in its session" gets a fourth case,
fixed output buffer. It checks the exact message ending (no restart sentence) and the projectedresource: "memory"withreported_limits.output_limit_bytes: 8388608. The other three cases keep their expectations, now as per-casedetails.Base reproduction: on the base revision (
git stashofsrc/kuna) only the new case fails, because its message ends with the restart sentence.Remaining proof gaps: no real-Kuna reproduction (see above); no Linux run.
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: 145 passed, two consecutive runs.kunaProvider.test.ts.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,cleanup: "complete".Compatibility, safety, and release
Author readiness
Human owner:
Before merge
type(scope): outcome.🤖 Generated with Claude Code