Skip to content

fix: keep a Band tool's identity for an oversized integer payload - #894

Open
bandzalkin wants to merge 1 commit into
mainfrom
fix/oversized-integer-device-write-identity-INT-1896
Open

bandzalkin wants to merge 1 commit into
mainfrom
fix/oversized-integer-device-write-identity-INT-1896

Conversation

@bandzalkin

Copy link
Copy Markdown
Contributor

Why

normalize_omp_mcp_device_call parses an executed device write's JSON payload and only catches json.JSONDecodeError. json.loads raises a bare ValueError when an integer literal exceeds the interpreter's digit limit, so that payload escapes the normalizer and fails the turn instead of reaching the tool as a refused call under the tool's own name. Both the ACP-bridged and the native OMP adapter go through this function.

What

Catch ValueError (the superclass) so an oversized-integer payload is treated like any other malformed write. The regression test fails on main and passes with the fix.

Scope

One except clause in band.integrations.omp; no behavior change for payloads that already parsed. Carved out of #763.

json.loads raises a bare ValueError, not JSONDecodeError, when an integer
literal exceeds the interpreter's digit limit. That payload escaped the
device-write normalizer and failed the turn instead of reaching the tool
as a refused call under its own name.
@linear-code

linear-code Bot commented Oct 21, 2026

Copy link
Copy Markdown

INT-1896

bandzalkin added a commit to bandzalkin/band-sdk-python that referenced this pull request Oct 21, 2026
bandzalkin added a commit to bandzalkin/band-sdk-python that referenced this pull request Oct 21, 2026
github-actions Bot pushed a commit to bandzalkin/band-sdk-python that referenced this pull request Oct 21, 2026
github-actions Bot pushed a commit to bandzalkin/band-sdk-python that referenced this pull request Oct 21, 2026
github-actions Bot pushed a commit to bandzalkin/band-sdk-python that referenced this pull request Oct 21, 2026
@bandzalkin
bandzalkin marked this pull request as ready for review October 22, 2026 01:54
github-actions Bot pushed a commit to bandzalkin/band-sdk-python that referenced this pull request Oct 22, 2026
@bandzalkin bandzalkin changed the title fix(omp): keep a Band tool's identity for an oversized integer payload fix: keep a Band tool's identity for an oversized integer payload Oct 22, 2026
github-actions Bot pushed a commit to bandzalkin/band-sdk-python that referenced this pull request Oct 22, 2026
github-actions Bot pushed a commit to bandzalkin/band-sdk-python that referenced this pull request Oct 22, 2026

This branch has not been deployed

No deployments
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.

2 participants