Skip to content

fix(opencode): preserve tool results and validate native input - #3

Merged
TheViniAlmeida merged 1 commit into
nextfrom
fix/opencode-v2-transfer
Oct 10, 2026
Merged

TheViniAlmeida merged 1 commit into
nextfrom
fix/opencode-v2-transfer

Conversation

@TheViniAlmeida

@TheViniAlmeida TheViniAlmeida commented Oct 10, 2026 •

Copy link
Copy Markdown
Owner

OpenCode v2 tool results previously reordered interleaved captions/images and collapsed text segments without reporting losses. Structured tool errors silently lost their type/status/response, and malformed native control/session fields could pass after projection.

Preserve ordered portable tool blocks in capable destinations; count flattening in legacy OpenCode/Kilo. Count omitted structured-error fields separately without copying diagnostics into opaque metadata. Validate original native fields and control variants before dropping or defaulting them. Include the review reproductions and a cold-export checkpoint regression in the existing native CI gate.

Validation: 1744 passed, 55 skipped locally with stock OpenCode2.0.22, Python3.14.4 and isolated HOME/XDG. Independent review approved with 542 passes, zero skips. Ruff, shell/diff checks, wheel/sdist build and five new native cases importing the built wheel passed. The 55 skips are unavailable exact historical clients or opt-in private-store gates. Local stock2.0.23 and Windows execution remain unvalidated; this PR runs the existing exact stock2.0.23 CI gate.

Same adapter correction published for upstream review in xhluca/session-migrate#17, commit 2e3671dcf402159bcb456380409a103cfaaf19cf. No changes to profiles, migration UI or global installation in this diff.

@TheViniAlmeida
TheViniAlmeida merged commit de70214 into next Oct 10, 2026
23 checks passed
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.

1 participant