Skip to content

devspace: Initialize runners for cgwalters-bot sessions with pinned agent CLIs - #5

Merged
cgwalters merged 3 commits into
mainfrom
bot-homegit-agents
Sep 24, 2026
Merged

cgwalters merged 3 commits into
mainfrom
bot-homegit-agents

Conversation

@cgwalters-bot

@cgwalters-bot cgwalters-bot commented Sep 23, 2026 •

Copy link
Copy Markdown
Collaborator

The devspace runner is moving to hosting cgwalters-bot agent sessions, so it should come up with the bot's environment rather than the human's.

  • just init now clones cgwalters-bot/homegit to $HOME/src/github/cgwalters-bot/homegit (same toplevel/origin safety checks as before), checks out a pinned commit (homegit_rev in the Justfile, currently 7f322ad47024), fetching it into an existing checkout if needed, and runs make install. Runners execute homegit code, so it's pinned and bumps come as reviewed Renovate PRs via the shared git-refs Justfile manager. Interactive users on the runner get the bot's git identity from its .gitconfig.
  • The Actions runner has umask 000 and homegit's rsync doesn't preserve permissions, so the recipe sets umask 022 and drops group/world write from what it installed and from the top-level dotfiles in $HOME (the runner image ships ~/.bash_profile and ~/.bash_logout as 666).
  • opencode and Claude Code are installed globally with npm from RHEL 10's Node.js 22, at exact versions pinned in npm.txt: opencode-ai@1.18.31 (newest release older than three days) and @anthropic-ai/claude-code@2.1.267 (the stable dist-tag). The file uses the same annotated format as bootc-dev/infra's devenv/npm.txt.
  • The new renovate.json extends the shared bootc-dev config and adds a three-day minimumReleaseAge for npm. This enables Renovate repo-wide, so Cargo dependencies and pinned actions get update PRs too, assuming the Renovate app is enabled here.

Tested locally: cargo fmt --check, clippy with -D warnings, cargo test (15 pass, and each commit passes on its own), and actionlint. just init was run under umask 000 in a throwaway HOME against the real fork: a fresh clone, a checkout left at an older commit, and one missing the pinned commit all end up on the pinned rev with nothing world-writable, and a mismatched origin is refused. The workflow step was run verbatim in a UBI 10 container with a runner user. The shared Renovate regexes matched npm.txt (including the scoped package) and the Justfile.

Out of scope: agent credentials and inference via praxis. Relates to #4 (and cgwalters-bot/praxis-credential-broker#1).

This PR is AI-generated at the human's request and has not yet been reviewed by the human; please review it as such before merging.

Tested on a real runner

Dispatched this branch at 9a151ca (run 35808095996, 4 cores): every setup step succeeded, and over SSH as runner:

  • homegit is at the pinned 7f322ad47024a7b003c31c5ec662106a8b5e08fc;
  • ~/.bashrc, ~/.bash_profile, ~/.bash_logout and ~/.gitconfig are 644, ~/.config and ~/.local/bin are 755, and find ~ -perm -o+w finds nothing (an earlier run without the top-level fix still had the image's .bash_profile/.bash_logout at 666);
  • bash -lc true prints nothing (no tput noise);
  • opencode --version → 1.18.31, claude --version → 2.1.267 (Claude Code), both from /usr/local/bin on the SSH login PATH.

An earlier run (35805439383, pin 6021d58) also confirmed the bot's git identity and the skills under ~/.claude/skills.

Generated-by: https://github.com/cgwalters/#llms

@cgwalters-bot cgwalters-bot moved this to In Review in Workstream Sep 23, 2026
@cgwalters-bot
cgwalters-bot force-pushed the bot-homegit-agents branch 3 times, most recently from 9403fc0 to 9a151ca Compare September 23, 2026 01:52
The runner is moving to hosting cgwalters-bot agent sessions, so it
should carry the bot's identity, skills and agent configuration rather
than the human's personal dotfiles. The bot's fork of homegit is where
those live.

Runners execute homegit code (its install scripts and everything it
puts on PATH), so the checkout is pinned to a specific commit rather
than following main; Renovate proposes bumps and each one gets reviewed
here. Existing checkouts are moved to the pinned commit too, fetching
it if needed. The same safety checks apply: an existing path is only
reused if it is a checkout rooted exactly there with the expected
origin.

The Actions runner runs with umask 000 and homegit's rsync does not
preserve permissions, so the recipe sets umask 022 and drops group and
world write from anything it installed, plus the top-level dotfiles in
$HOME; otherwise ~/.bashrc, the scripts on PATH, and even the runner
image's own ~/.bash_profile end up world-writable.

Generated-by: AI
Prep for pinning the runner's agent CLIs and homegit in files that
Renovate keeps current, using the shared bootc-dev managers. Note this
enables Renovate for the whole repository, so Cargo dependencies and
pinned actions get update PRs as well.

npm updates wait three days after publication: the agent CLIs release
very frequently and run with the bot's credentials, so a short delay
gives time for broken or compromised releases to be caught and pulled
before we pick them up.

Generated-by: AI
The bot's sessions drive one of these two agent CLIs, so they should be
ready on the runner rather than installed by hand each time. Pinning
exact versions in npm.txt keeps runs reproducible, and using the same
annotated format as bootc-dev/infra lets the shared Renovate manager
propose bumps. The initial pins are the Claude Code stable dist-tag and
the newest opencode release older than the three-day release-age delay.

The step runs after checkout since npm.txt lives in the repository.
RHEL 10 ships Node.js 22, which satisfies the Claude Code engines
requirement (>=22); opencode declares none. The global prefix bin
directory is not on sudo's secure_path, so the check invokes the tools
by absolute path as the runner user.

Generated-by: AI
@cgwalters
cgwalters marked this pull request as ready for review September 24, 2026 00:49
@cgwalters
cgwalters merged commit 7195459 into main Sep 24, 2026
0 of 2 checks passed
@cgwalters-bot cgwalters-bot moved this from In Review to Done in Workstream Sep 24, 2026
cgwalters-bot referenced this pull request in cgwalters-forge/cgwalters-devspace-sandbox Sep 24, 2026
The pin is 29 commits behind homegit main, which moved a lot right
after #5 merged. The skills a devspace session would follow now assume
the cgwalters-forge fork-PR review loop, bot-notify and bot-watch, none
of which the old pin has, so an agent started from it would work the
board by outdated rules.

Renovate did detect the update, but the shared bootc-dev config only
lets it open PRs on Sundays; this saves waiting out the schedule. No
install script changed in this range, only bin/ tools and skills.

Generated-by: AI
cgwalters-bot referenced this pull request in cgwalters-forge/cgwalters-devspace-sandbox Sep 25, 2026
The pin is 29 commits behind homegit main, which moved a lot right
after #5 merged. The skills a devspace session would follow now assume
the cgwalters-forge fork-PR review loop, bot-notify and bot-watch, none
of which the old pin has, so an agent started from it would work the
board by outdated rules.

Renovate did detect the update, but the shared bootc-dev config only
lets it open PRs on Sundays; this saves waiting out the schedule. No
install script changed in this range, only bin/ tools and skills.

Generated-by: AI
Signed-off-by: Colin Walters <walters@verbum.org>
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.

2 participants