Skip to content

chore(harness-opencode): bump pin 1.18.3 → 1.18.5#51

Merged
todie merged 2 commits into
mainfrom
chore/opencode-pin-1.18.5
Jul 25, 2026
Merged

chore(harness-opencode): bump pin 1.18.3 → 1.18.5#51
todie merged 2 commits into
mainfrom
chore/opencode-pin-1.18.5

Conversation

@todie

@todie todie commented Jul 25, 2026

Copy link
Copy Markdown
Member

Closes the investigation opened by #49, where opencode failed with SQLiteError: no such column: replacement_seq.

What actually happened

I misdiagnosed this twice. The evidence settled it — installing 1.18.5 into an isolated prefix and letting each version build a fresh database:

version fresh-DB migrations session_context_epoch
1.18.3 (old pin) 35 7 cols — agent, replacement_seq, revision present
1.18.5 (latest) 38 4 cols — 20260622142730_simplify_session_context_epoch drops them

The user's database was 38 migrations / 4 columns — built by 1.18.5, published 2026-07-24, after the 1.18.3 pin (2026-07-16). So the local install had been ahead of the pin and was later rolled back to it. The 1.18.3 binary then queried a column its own newer database no longer had.

The binary was behind the database, not behind the pin — the reverse of my first diagnosis, and the reason reinstalling 1.18.3 didn't help.

Verification

  • 1.18.5 returns OK through the gateway on a fresh DB and on the existing one.
  • moon check harness-opencode green (9 pass).
  • Pin updated in all four places the 3-way gate covers: install.sh, package.json (@opencode-ai/plugin), README.md, and the repo CLAUDE.md upstream-tracking line.

Honest note

The DB reset performed during #49 was avoidable. Bumping to 1.18.5 would have fixed it without discarding the database, since 1.18.5 is what wrote it. Data lost was negligible (2 sessions, 2 messages) and the file is retained at ~/.local/share/opencode/opencode.db.bak-2026-07-25-schema-mismatch, but the reset was the wrong first move and I should have identified the version that produced the schema before touching data.


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.

todie added 2 commits July 25, 2026 11:53
Closes the investigation opened by the gateway-config repair (#49), where
opencode failed with `SQLiteError: no such column: replacement_seq` and the
cause was misdiagnosed twice before the evidence settled it.

What actually happened, proven by installing 1.18.5 into an isolated prefix and
letting it build a fresh database:

  1.18.3 fresh DB -> 35 migrations, session_context_epoch has 7 columns
                     (agent, replacement_seq, revision present)
  1.18.5 fresh DB -> 38 migrations, session_context_epoch has 4 columns
                     (20260622142730_simplify_session_context_epoch DROPS them)

The user's database was 38 migrations / 4 columns — i.e. built by 1.18.5, which
was published 2026-07-24, after the 1.18.3 pin (2026-07-16). So the local install
had been ahead of the pin at some point and was later rolled back to it. The
1.18.3 binary then queried a column its own newer database no longer had. The
binary was behind the DATABASE, not behind the pin — the reverse of the first
diagnosis.

1.18.5 verified against the gateway both on a fresh database and on the existing
one, and `moon check harness-opencode` is green.

Pin updated in all four places the 3-way gate covers: install.sh, package.json
(@opencode-ai/plugin), README.md, and the repo CLAUDE.md upstream-tracking line.

Worth recording: the DB reset done during #49 was avoidable. Bumping to 1.18.5
would have fixed it without discarding the database, since 1.18.5 is what wrote
it. The old file is retained at
~/.local/share/opencode/opencode.db.bak-2026-07-25-schema-mismatch.
@todie
todie merged commit 86601f2 into main Jul 25, 2026
6 checks passed
@todie
todie deleted the chore/opencode-pin-1.18.5 branch July 25, 2026 17:15
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