Skip to content

fix(opencode): match registered session lookups by exact ID - #166

Merged
MoonCaves merged 1 commit into
mainfrom
fix/opencode-production-only-tick1289
Nov 17, 2026
Merged

MoonCaves merged 1 commit into
mainfrom
fix/opencode-production-only-tick1289

Conversation

@MoonCaves

Copy link
Copy Markdown
Owner

OpenCode’s registered full-ID lookup can select a longer prefix row before the requested session. The caller then rejects that row and reports no matching session.

Use the existing Hermes bound equality query at both OpenCode lookup sites. Preserve the existing schema fallback and session metadata. This does not add native ses_* admission to the CLI.

All 176 accepted test files remain unchanged. The retained donor and target lookup tests do not cover prefix rejection; an isolated SQLite CLI probe reproduces the failure on the accepted base and the expected resume command on this candidate.

Validation: independent review, Go 1.24 build/vet/lint, retained race tests and provenance review. The complete Go 1.24 race suite passed using the installed GNU coreutils tool directory on PATH. The runner’s Apple nohup fails console detachment; the same focused test fails on accepted main and passes on both base and candidate using installed GNU coreutils.

This is a narrowed replacement candidate for the production change in #164. That draft’s added tests and prior review state are not carried forward.

Reuse the accepted Hermes bound equality unit for both existing OpenCode
session-table queries. Preserve schema fallback and metadata behavior.
Retain all accepted tests; existing donor and target lookup tests pass,
but do not supply persistent prefix-rejection coverage.

Prior-Art: MoonCaves/rawclaw internal/source/hermes/hermes.go L86-L90 (MIT) @e0420b85a30f2b4f562d72e531bcab64f23b6aa9 -> internal/source/opencode/opencode.go
Prior-Art: MoonCaves/rawclaw internal/source/source.go L60-L61 (MIT) @e0420b85a30f2b4f562d72e531bcab64f23b6aa9 -> internal/source/opencode/opencode.go
Prior-Art: MoonCaves/rawclaw internal/cli/cli.go L675-L683 (MIT) @e0420b85a30f2b4f562d72e531bcab64f23b6aa9 -> internal/source/opencode/opencode.go
@MoonCaves
MoonCaves marked this pull request as ready for review November 17, 2026 16:28
@MoonCaves
MoonCaves merged commit 1bb1b20 into main Nov 17, 2026
3 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