mirror of
https://github.com/hasso5703/alzeo.git
synced 2026-12-06 12:54:19 +01:00
Until now the repo installed no opencode: it took whatever was on PATH, and opencode installs its own patch releases unless "autoupdate" says otherwise (read out of its binary: only false, "notify" or a minor/major release stop it), so two boxes installed a week apart ran two versions. The reference box sat on 1.18.27 while 1.18.32 was out. Four things the repo does were read out of one opencode binary and checked against its behaviour: the compaction threshold oc-fit-limits.py sizes for, the hidden 32,000-token output cap the oc launcher lifts, the overflow phrases the proxy answers with so a refusal makes opencode compact, and --yolo / OPENCODE_PERMISSION for the Agent tab. OPENCODE_VERSION=1.18.32 with OPENCODE_SHA256, GitHub's digest of opencode-linux-arm64.tar.gz. Checked against 1.18.27 before pinning: the 21 overflow phrases and 3 exclusions verbatim in both binaries; max_tokens 182,000 with the launcher's variable and 32,000 without, on both, recorded on a fake OpenAI endpoint with isolated config, data and cache; the code around compaction and OPENCODE_PERMISSION identical once the bundler's chunk names are set aside; serve --hostname and the hidden --yolo on both. install.sh, step 7: none found, the release asset is downloaded, checked against its sha256 and installed where opencode's own installer puts it, with its PATH line in ~/.bashrc; an older one there is replaced the same way; an older one from npm, brew or bun goes through `opencode upgrade`, which knows its method; a newer one is kept and said so, because going back a version can leave sessions a newer opencode wrote unreadable. A download that does not match is not installed, a version without its checksum is refused, and nothing about opencode fails the rest of the install. OPENCODE_PIN=0 keeps whatever you have. The generated config and the user's get "autoupdate": "notify" (oc-merge-limits.py --autoupdate, a targeted edit that keeps comments; a stricter false is kept). The Agent tab says when the opencode it serves is not the pinned one, read from install.sh so the two cannot disagree. uninstall.sh lists an opencode this repo installed and leaves it. CI downloads the pinned asset and checks its sha256 on every run (and fails with a wrong one, checked). docs/opencode.md said the 1M starting pair sits under the worst measured pool; it does not (832,993 to 922,094 over sixteen boots), which is why it is fitted after each boot. Tests: eleven on the installer's own lines in a throwaway HOME with a fake curl and fake opencode binaries (absent, pinned, older in place, older from npm, newer, bad checksum, pin off, version without checksum), the merge, and the cockpit's read of the pin. The checksum, no-downgrade and opt-out guards were each undone once and their tests failed. CI 61/61. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>