[GH-ISSUE #5628] [Bug] Typed WASM interface decoding tells callers to retry a fixed representation budget #3409

Closed
opened 2026-10-31 00:40:04 +00:00 by bsakaguchi · 2 comments
Owner

Originally created by @cursor[bot] on GitHub (Oct 20, 2026).
Original GitHub issue: https://github.com/morluto/rea/issues/5628

Before submitting

  • I searched the open and closed issues for a related report.
  • I removed credentials, tokens, private paths, and sensitive target data.

Area

Native analysis or decompilation

Observed behavior

Source-derived. WasmInterfaceBudget.reserve throws AnalysisResourceConstraintError with resource: "capacity" and no retryable override or remediationAction. Projection therefore sets retryable: true and the capacity fallback "Wait for an active analysis to complete, then retry within the reported admission limits." The allowance is WASM_INTERFACE_REPRESENTATION_BYTES. Repeating the same typed-interface growth hits the same fixed count.

This is the same recovery pattern as #5506, which covers WASM comparison. This report is the inspect_wasm_artifact decoder budget in src/wasm/WasmInterfaceBudget.ts.

No CLI or MCP reproduction of this decoder path was run for this report.

Reproduction

NOT_ENOUGH_INFO for a runtime reproduction. The producing constructor is src/wasm/WasmInterfaceBudget.ts (reserve). src/domain/analysisErrorProjection.ts treats capacity as retryable unless retryable is explicitly false, and src/domain/analysisErrorPresentation.ts supplies the wait-and-retry sentence when remediationAction is absent.

Expected behavior

Keep the refusal and the reported byte allowance. Mark it non-retryable and say that waiting for another analysis does not raise the fixed typed-interface inventory. #5506 is the comparison sibling.

Impact and scope

Source-derived recovery defect for one WASM inspection budget. Impact on real modules and frequency are unknown. No incorrect successful decode was observed.

REA version

Source on main at the time of the audit (6.7.0 line).

Runtime and platform

NOT_ENOUGH_INFO. No runtime reproduction.

Target and artifact context

NOT_ENOUGH_INFO. No target was inspected for this report.

Interface

MCP and CLI share the projected analysis error once the provider throws it. Which public command reaches WasmInterfaceBudget was not replayed.

Earliest failure stage

Provider result projection

Relevant output or evidence

Source only. The constructor does not set remediationAction.

Typed outcome or recovery expected

resource_constraint, retryable: false, recovery that names the fixed typed WASM interface inventory.

Analysis or suspected cause

The capacity resource kind is reused for a deterministic representation cap. The projection default assumes capacity means occupied admission.

Additional context

Prepared while auditing #5556 and #5506. A focused source test was added with the fix; that test is not a reproduction of the original CLI text.

Originally created by @cursor[bot] on GitHub (Oct 20, 2026). Original GitHub issue: https://github.com/morluto/rea/issues/5628 ### Before submitting - [x] I searched the open and closed issues for a related report. - [x] I removed credentials, tokens, private paths, and sensitive target data. ### Area Native analysis or decompilation ### Observed behavior Source-derived. `WasmInterfaceBudget.reserve` throws `AnalysisResourceConstraintError` with `resource: "capacity"` and no `retryable` override or `remediationAction`. Projection therefore sets `retryable: true` and the capacity fallback "Wait for an active analysis to complete, then retry within the reported admission limits." The allowance is `WASM_INTERFACE_REPRESENTATION_BYTES`. Repeating the same typed-interface growth hits the same fixed count. This is the same recovery pattern as #5506, which covers WASM comparison. This report is the `inspect_wasm_artifact` decoder budget in `src/wasm/WasmInterfaceBudget.ts`. No CLI or MCP reproduction of this decoder path was run for this report. ### Reproduction NOT_ENOUGH_INFO for a runtime reproduction. The producing constructor is `src/wasm/WasmInterfaceBudget.ts` (`reserve`). `src/domain/analysisErrorProjection.ts` treats capacity as retryable unless `retryable` is explicitly false, and `src/domain/analysisErrorPresentation.ts` supplies the wait-and-retry sentence when `remediationAction` is absent. ### Expected behavior Keep the refusal and the reported byte allowance. Mark it non-retryable and say that waiting for another analysis does not raise the fixed typed-interface inventory. #5506 is the comparison sibling. ### Impact and scope Source-derived recovery defect for one WASM inspection budget. Impact on real modules and frequency are unknown. No incorrect successful decode was observed. ### REA version Source on `main` at the time of the audit (6.7.0 line). ### Runtime and platform NOT_ENOUGH_INFO. No runtime reproduction. ### Target and artifact context NOT_ENOUGH_INFO. No target was inspected for this report. ### Interface MCP and CLI share the projected analysis error once the provider throws it. Which public command reaches `WasmInterfaceBudget` was not replayed. ### Earliest failure stage Provider result projection ### Relevant output or evidence Source only. The constructor does not set `remediationAction`. ### Typed outcome or recovery expected `resource_constraint`, `retryable: false`, recovery that names the fixed typed WASM interface inventory. ### Analysis or suspected cause The capacity resource kind is reused for a deterministic representation cap. The projection default assumes capacity means occupied admission. ### Additional context Prepared while auditing #5556 and #5506. A focused source test was added with the fix; that test is not a reproduction of the original CLI text.
Author
Owner

@matbrgz commented on GitHub (Oct 20, 2026):

Cross-referencing with canonical issue #5504 ([Bug] Rust compiler-hash capacity refusals incorrectly tell callers to retry) and siblings #5505, #5506, #5537, #5556, #5630, #5631, #5632. Addressed by maintainer PR #5633. All relate to naming fixed allowances on resource-constraint recovery rather than advising callers to retry unchanged requests. Cataloged under Cluster AJ in consolidation tracker #4330.

<!-- gh-comment-id:6297496104 --> @matbrgz commented on GitHub (Oct 20, 2026): Cross-referencing with canonical issue #5504 (`[Bug] Rust compiler-hash capacity refusals incorrectly tell callers to retry`) and siblings #5505, #5506, #5537, #5556, #5630, #5631, #5632. Addressed by maintainer PR #5633. All relate to naming fixed allowances on resource-constraint recovery rather than advising callers to retry unchanged requests. Cataloged under Cluster AJ in consolidation tracker #4330.
Author
Owner

@morluto commented on GitHub (Oct 21, 2026):

Closing as fixed on main by github.com/morluto/rea@ef59174c1e, retained at 67a6477f01.

Typed WASM interface decoding now names its fixed byte allowance and marks the error non-retryable rather than advising waiting for active capacity. The decoder budget and comparison regressions assert the corrected projection and valid controls.

This audit inspected the current producer, regression source, issue discussion and main ancestry. Tests/runtime reproductions were not rerun, and no additional real-provider or platform coverage is implied.

<!-- gh-comment-id:6324335781 --> @morluto commented on GitHub (Oct 21, 2026): Closing as fixed on main by https://github.com/morluto/rea/commit/ef59174c1edd6ed9adb0722b86a5b9a57217e310, retained at 67a6477f011ae358fc333e5a6e26c86d932654ed. Typed WASM interface decoding now names its fixed byte allowance and marks the error non-retryable rather than advising waiting for active capacity. The decoder budget and comparison regressions assert the corrected projection and valid controls. This audit inspected the current producer, regression source, issue discussion and main ancestry. Tests/runtime reproductions were not rerun, and no additional real-provider or platform coverage is implied.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
morluto/rea#3409
No description provided.