Skip to content

fix(gs): keep upgrade go installs off ~/.local/bin and fail on pre-v3 engram - #118

Merged
barbatdev merged 1 commit into
mainfrom
fix/gs-engram-gobin-guard
Nov 4, 2026
Merged

barbatdev merged 1 commit into
mainfrom
fix/gs-engram-gobin-guard

Conversation

@barbatdev

Copy link
Copy Markdown
Owner

Problem

gentle-shell upgrade --channel main runs gentle-ai's beta upgrade, which ignores GENTLE_AI_ENGRAM_BIN and runs go install github.com/Gentleman-Programming/engram/cmd/engram@main (pre-v3 module path → Engram v1) into the effective GOBIN. On hosts with go env GOBIN=~/.local/bin this replaced the ~/.local/bin/engram symlink with v1, breaking every Engram integration (does not support "instance-id").

Change

  • gs sync exports GOBIN=~/go/bin for every step it runs; its own builds already set GOBIN explicitly.
  • After relinking, gs sync checks ~/.local/bin/engram instance-id and reports INCOMPLETE — failed: engram lacks instance-id (pre-v3) on failure.
  • Docs: docs/gs-sync.md.

Tests

tests/gs_test.sh: two new cases (RED before, GREEN after); full suite passes.

Upstream root cause (gentle-ai internal/update/upgrade/strategy.go, internal/components/engram/download.go) remains to be reported separately.

🤖 Generated with Claude Code

https://claude.ai/code/session_01A9D7phtzRBjJGKsHtaiVWj

… engram

gentle-ai's beta upgrade ignores GENTLE_AI_ENGRAM_BIN and go-installs the
pre-v3 Engram module path into the effective GOBIN. With go env GOBIN set to
~/.local/bin it replaced the engram symlink with Engram v1. gs sync now exports
GOBIN=~/go/bin for its steps and reports INCOMPLETE when ~/.local/bin/engram
lacks instance-id.
@barbatdev
barbatdev merged commit 162d4a0 into main Nov 4, 2026
1 check passed
@barbatdev

Copy link
Copy Markdown
Owner Author

Post-merge QA (glm)

Lens: requirements + adversarial. El fix fija GOBIN para que los installs de go upgrade no caigan en ~/.local/bin y falla de forma explicita con engram pre-v3. Sin hallazgos.

No findings.

Verdict: clean

@barbatdev

Copy link
Copy Markdown
Owner Author

Post-merge QA (deepseek)

Lens: evidence + test design. QA of the merge that landed: gs sync exports GOBIN=~/go/bin for every child step (so gentle-ai's beta go install of the pre-v3 Engram path cannot overwrite the ~/.local/bin/engram symlink) and fails the sync when the relinked engram answers no instance-id. Both behaviours are covered by the two new tests/gs_test.sh cases, and the GOBIN assertion is genuine evidence: the stub records GOBIN as the upgrade actually saw it, so the test fails if the export is missing. Two notes below, one of them a wording issue that survives in the documentation. Context worth recording: bin/gs was deleted one merge later (#119), so any defect here is historic rather than live.

Suggestion (1)

  • The engram check reports "pre-v3" for any failure of ~/.local/bin/engram, including a missing or broken link (bin/gs:469): "$HOME/.local/bin/engram" instance-id >/dev/null 2>&1 || sync_failed 'engram lacks instance-id (pre-v3)' collapses every failure mode into "pre-v3": a host where the relink loop did not produce ~/.local/bin/engram (engram not in this run's build set, or a link left dangling by an interrupted earlier sync) is told its Engram build is old, which sends the reader to the wrong fix. Since the message is also documented in docs/gs-sync.md as the operator-visible symptom, distinguishing "missing" from "lacks instance-id" keeps the diagnostic actionable.

Verdict: clean

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