Skip to content

Commit 23b2cc8

Browse files
committed
fix - pin OPENCODE_CHANNEL=flex at build time to prevent per-branch DB fragmentation
Without this, every build bakes the current git branch name as the installation channel, causing OpenCode to open a new empty SQLite database each time you rebuild from a different branch (opencode-chore-bolster-install.db, opencode-feat-mcp-awareness.db, etc). Setting OPENCODE_CHANNEL=flex means all Flexion fork builds share opencode-flex.db regardless of which branch was built.
1 parent fb032ac commit 23b2cc8

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

install-flex

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,11 @@ clone_and_build() {
9494
(cd "$CLONE_DIR" && BUN_CONFIG_REGISTRY=https://registry.npmjs.org bun install)
9595

9696
info "Building opencode binary (this takes about a minute)..."
97-
BUN_CONFIG_REGISTRY=https://registry.npmjs.org \
97+
# OPENCODE_CHANNEL=flex ensures every Flexion fork build — regardless of which git
98+
# branch is checked out — bakes "flex" into the binary as the installation channel.
99+
# This means all Flexion builds share a single ~/.local/share/opencode/opencode-flex.db
100+
# instead of creating a new, empty database per branch (e.g. opencode-chore-bolster-install.db).
101+
BUN_CONFIG_REGISTRY=https://registry.npmjs.org OPENCODE_CHANNEL=flex \
98102
bun run --cwd "$CLONE_DIR/packages/opencode" build --single --skip-embed-web-ui
99103

100104
success "Binary built"

0 commit comments

Comments
 (0)