fix(bux): free-Codex install symlink + self-healing config (ENG-4785)#266
Merged
Conversation
…oop ttyd (ENG-4785) bux-ttyd.service execs /usr/local/bin/bux-agent-shell (ENG-4785), but only bootstrap.sh symlinked it. A fresh `install.sh` box starts bux-ttyd without ever running bootstrap, so the ExecStart target was missing and ttyd crash-looped. (The pr-reviewer caught this on #265, but the fix commit didn't make it into the merge due to a GitHub PR-head sync lag — re-landing it.) Symlink placed before the ttyd (re)start block so it exists when the service first starts.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Two free-Codex bootstrap-correctness fixes found while debugging the staging dogfood.
1. install.sh symlink (fresh-box ttyd crash-loop)
bux-ttyd.serviceexecs/usr/local/bin/bux-agent-shell(the agent launcher from #265), but onlybootstrap.shsymlinked it. A freshinstall.shbox startsbux-ttydwithout running bootstrap, so the ExecStart target was missing → ttyd crash-looped. (The pr-reviewer flagged this on #265; the fix commit missed that merge due to a GitHub PR-head sync lag — re-landing here.) Symlink added in install.sh, before the ttyd start block.2. Self-healing free-Codex config (the "profile not found" bug)
The old guard appended the
browser-use-freeblocks only when the provider header was absent, so a box with a partial/old config was never repaired:[profiles.browser-use-free]table → Codex: "profile browser-use-free not found" (the TG error you saw)wire_api = "chat"→ Codex config load errorNow bootstrap strips every existing
browser-use-freetable (provider,.auth, profile) and re-appends fresh ones every run, so an outdated box self-heals on the next/update— no manual config deletion needed. Implemented as apython3heredoc (run as the bux user) instead of awk-inside-bash -cto avoid a nested-quote minefield;CP_BASEpassed via env. Preserves other tables ([features] goals) and the top-levelprofileselector.Tested: stale
chatconfig heals to a valid single-blockresponsesconfig (tomllib-parsed); fresh-box and idempotent (run-twice) cases verified;bash -nclean.Why this matters
Removes the manual "delete
~/.codex/config.tomlbefore re-bootstrapping" retest step — the current staging box (with the stalewire_api="chat"block) will now self-repair on/update.