Skip to content

feat(opencode): support v2 native transfer and pinned source-target validation - #15

Closed
tudstudent wants to merge 4 commits into
xhluca:mainfrom
tudstudent:opencode-v2-transfer
Closed

tudstudent wants to merge 4 commits into
xhluca:mainfrom
tudstudent:opencode-v2-transfer

Conversation

@tudstudent

@tudstudent tudstudent commented Oct 9, 2026 •

Copy link
Copy Markdown

OpenCode 2.0 moved from nested legacy parts and import/export --pure to flat typed messages and public session import/export --standalone. This adds a version-aware adapter/native transfer path while keeping the separately pinned 1.17.20 behavior intact. Convert-only output remains legacy unless the target version is explicitly selected.

  • Preserves ordered text, linked tool inputs/results, inline media and readable compaction; private checkpoints/control data and source reasoning variants have explicit omission accounting. Private-only checkpoints do not erase readable history.
  • Uses public native import/export, exact import confirmation and global identity collision checks; no direct SQLite writes. Unsupported schema series fail closed.
  • Addresses review P1: unfinished streamed string input is retained byte-for-byte in the portable input wrapper and archived target tool record, with the original call ID. The source→portable→target regression uses unterminated JSON. This preserves historical input, rather than claiming to resume an executable partial call.
  • Addresses review P2: an opencode-v2 CI profile installs stock @opencode/cli@2.0.23, wires SESSION_MIGRATE_TEST_OPENCODE_V2, and rejects skips in its assigned tests. Credential-free native tests exercise public import/export, dry run/collision checks, cold-process reopening, local fake-provider continuation, tool/compaction replay and same-ID persisted replies.
  • Source and target route variants now include v2 alongside legacy; 19 variants still represent 18 supported harnesses. This branch does not require the Windows cleanup or Codex child follow-ups.

Validation on this exact branch: full locked Linux suite 1,597 passed, 55 skipped; stock v2 selected native gate 3 passed, no skips; legacy 1.17.20 compatibility gate 5 passed, no skips; v2 route/stream focused gate 38 passed. Ruff/formatting, 12 automation unit tests, wheel/sdist and both isolated installed-wheel entrypoints passed. The default suite's skipped native clients were not silently counted as tested; the two assigned native gates actually ran.

Native Windows and all historical native-client/version combinations were not tested. The additional development-guide Docker resume image basic-claude-uv:latest is unavailable here. Synthetic fixtures, isolated HOME/XDG stores and deterministic localhost inference were used; no real sessions, account credentials, production stores or supplier credits. Details: docs/opencode-v2.md.

This is one of three independent, main-based follow-ups split from closed #10 following the maintainer review. @xhluca, this isolates the relevant contract and its validation for review; the other two follow-ups cover separate contracts.

The eligibility bot closed #10 because the author had 64 qualifying contributions against the required 100 older than one calendar month. Splitting does not change that eligibility or claim an exemption; this submission may receive the same automation outcome.

Sibling follow-ups: Windows cleanup: #14; Codex child history: #16. Each targets main independently.

@github-actions

github-actions Bot commented Oct 9, 2026

Copy link
Copy Markdown

🔴 Contributor eligibility requirements not met for @tudstudent.

  • 🟢 Account created: 2011-03-09; age: 5693 days (required: at least six calendar months).
  • 🔴 Contributions dated on or before 2026-09-09: 64 (required: at least 100).

Pull request authors must have a GitHub account at least six calendar months old and at least 100 GitHub contributions dated on or before the date one calendar month before the check.

See the contributor eligibility policy.

Closing this PR because these requirements were not met. This policy is intended to reduce spam from AI agents; it is not an assessment of the quality of your change.

@github-actions github-actions Bot closed this Oct 9, 2026
tudstudent added a commit to tudstudent/session-migrate that referenced this pull request Oct 12, 2026
Address xhluca's PR xhluca#17 findings with ordered portable tool-result blocks, explicit structured-error omissions and native validation before projection. Incorporate read-only v2 catalog discovery and Kilo legacy-schema separation, while retaining upstream contributor-policy checks.

Adapted from TheViniAlmeida's PR xhluca#17 commits 662976e and 2e3671d, which build on our focused PR xhluca#15. Credit and reuse history are documented in docs/opencode-v2.md.

Validation: Linux Python 3.12.3; focused v2/native/catalog/CLI/conversion/inspection/target gate 335 passed, 1 intentional private-store skip with stock OpenCode 2.0.23. Ruff, formatting, contributor-policy tests and whitespace checks pass. No full-suite or Windows-native claim.

Co-authored-by: TheViniAlmeida <eu@thevinialmeida.com>
gabszap pushed a commit to gabszap/session-migrate that referenced this pull request Oct 16, 2026
Address xhluca's PR xhluca#17 findings with ordered portable tool-result blocks, explicit structured-error omissions and native validation before projection. Incorporate read-only v2 catalog discovery and Kilo legacy-schema separation, while retaining upstream contributor-policy checks.

Adapted from TheViniAlmeida's PR xhluca#17 commits 662976e and 2e3671d, which build on our focused PR xhluca#15. Credit and reuse history are documented in docs/opencode-v2.md.

Validation: Linux Python 3.12.3; focused v2/native/catalog/CLI/conversion/inspection/target gate 335 passed, 1 intentional private-store skip with stock OpenCode 2.0.23. Ruff, formatting, contributor-policy tests and whitespace checks pass. No full-suite or Windows-native claim.

Co-authored-by: TheViniAlmeida <eu@thevinialmeida.com>
gabszap pushed a commit to gabszap/session-migrate that referenced this pull request Oct 16, 2026
Address xhluca's PR xhluca#17 findings with ordered portable tool-result blocks, explicit structured-error omissions and native validation before projection. Incorporate read-only v2 catalog discovery and Kilo legacy-schema separation, while retaining upstream contributor-policy checks.

Adapted from TheViniAlmeida's PR xhluca#17 commits 662976e and 2e3671d, which build on our focused PR xhluca#15. Credit and reuse history are documented in docs/opencode-v2.md.

Validation: Linux Python 3.12.3; focused v2/native/catalog/CLI/conversion/inspection/target gate 335 passed, 1 intentional private-store skip with stock OpenCode 2.0.23. Ruff, formatting, contributor-policy tests and whitespace checks pass. No full-suite or Windows-native claim.

Co-authored-by: TheViniAlmeida <eu@thevinialmeida.com>
gabszap pushed a commit to gabszap/session-migrate that referenced this pull request Oct 16, 2026
Address xhluca's PR xhluca#17 findings with ordered portable tool-result blocks, explicit structured-error omissions and native validation before projection. Incorporate read-only v2 catalog discovery and Kilo legacy-schema separation, while retaining upstream contributor-policy checks.

Adapted from TheViniAlmeida's PR xhluca#17 commits 662976e and 2e3671d, which build on our focused PR xhluca#15. Credit and reuse history are documented in docs/opencode-v2.md.

Validation: Linux Python 3.12.3; focused v2/native/catalog/CLI/conversion/inspection/target gate 335 passed, 1 intentional private-store skip with stock OpenCode 2.0.23. Ruff, formatting, contributor-policy tests and whitespace checks pass. No full-suite or Windows-native claim.

Co-authored-by: TheViniAlmeida <eu@thevinialmeida.com>
gabszap pushed a commit to gabszap/session-migrate that referenced this pull request Oct 17, 2026
Address xhluca's PR xhluca#17 findings with ordered portable tool-result blocks, explicit structured-error omissions and native validation before projection. Incorporate read-only v2 catalog discovery and Kilo legacy-schema separation, while retaining upstream contributor-policy checks.

Adapted from TheViniAlmeida's PR xhluca#17 commits 662976e and 2e3671d, which build on our focused PR xhluca#15. Credit and reuse history are documented in docs/opencode-v2.md.

Validation: Linux Python 3.12.3; focused v2/native/catalog/CLI/conversion/inspection/target gate 335 passed, 1 intentional private-store skip with stock OpenCode 2.0.23. Ruff, formatting, contributor-policy tests and whitespace checks pass. No full-suite or Windows-native claim.

Co-authored-by: TheViniAlmeida <eu@thevinialmeida.com>
gabszap pushed a commit to gabszap/session-migrate that referenced this pull request Oct 17, 2026
Address xhluca's PR xhluca#17 findings with ordered portable tool-result blocks, explicit structured-error omissions and native validation before projection. Incorporate read-only v2 catalog discovery and Kilo legacy-schema separation, while retaining upstream contributor-policy checks.

Adapted from TheViniAlmeida's PR xhluca#17 commits 662976e and 2e3671d, which build on our focused PR xhluca#15. Credit and reuse history are documented in docs/opencode-v2.md.

Validation: Linux Python 3.12.3; focused v2/native/catalog/CLI/conversion/inspection/target gate 335 passed, 1 intentional private-store skip with stock OpenCode 2.0.23. Ruff, formatting, contributor-policy tests and whitespace checks pass. No full-suite or Windows-native claim.

Co-authored-by: TheViniAlmeida <eu@thevinialmeida.com>
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