Repository navigation
Choose the run and review agents in make setup, and build the schedules from them - #212
Merged
Merged
Conversation
The four run.sh jobs now pass --agent bravebot and --agent-bin, resolved to an absolute path when the schedules are installed. The binary is a node script, so its directory is also put on the run's PATH: cron's PATH has no nvm directory and the agent died with "env: 'node': No such file".
…es from them The four run.sh jobs hardcoded one agent, and every review session ran claude whatever the deployment used. make setup now asks which agent run.sh drives (bot.agent) and which one the scheduled reviews run (reviewer.agent), stores bravebot's absolute path (bot.bravebotBin) because cron's PATH has no nvm directory, and offers to install the schedules (all, run, review or none) once the config is written. make schedules reads those keys when it installs: a run.sh line gets --agent <name> --agent-bin <absolute path> for any agent but claude, and the block's PATH gets the binary's directory so a node shebang resolves. Claude deployments render the same crontab as before. reviewer.agent is read when a review job fires, through scripts/lib/review-agent.sh, which review-session.sh and reply-to-pings.sh now share. bravebot cannot be held by claude's allowlist in a one-shot run, so its review session uses --dangerously-skip-permissions with deny rules, a write-confining sandbox, a closed network and a fixed tool list. docs/review-agents.md says what that leaves weaker.
ubuntu-latest now resolves to 26.04, which actions/setup-python has no Python 3.9 build for, so the 3.9 job failed in setup in six seconds and ran neither lint nor tests. The 3.9 job exists to verify the floor pyproject.toml declares, so the runner is pinned to an image that still carries it.
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.
User impact:
make setupnow asks which agent runs./run.shand which runs the scheduled reviews, andmake schedulesbuilds the cron jobs from the answers.The problem
Which agent the cron jobs use was not a setting. The
run.shlines in every profile'sschedules.shcarried no agent flag, so scheduled runs used whateverbot.agentsaid at fire time, and the review sweeps always ran claude. Pointing a deployment at bravebot meant editing a profile by hand, and even then the run died under cron: bravebot is a#!/usr/bin/env nodescript under nvm, which cron's PATH does not have.Reproduce
config.json, runmake setupand walk through it."agent": "bravebot"inconfig.jsonby hand and run./scripts/sync-schedules.sh --print.The
run.shlines end./run.sh 30with no agent flag and the block'sPATHhas no nvm directory. Expected: the lines name the agent and the binary's absolute path, and thePATHcan findnode.python3 -m pytest tests/test_agent_config.pycovers the rendered crontab and the review command for each agent.The fix
make setupasks for an agent for./run.shand one for the scheduled reviews, asks for bravebot's absolute path when either is bravebot, and ends by offering to install the schedules (all, run, review or none, defaulting to what is installed). The answers are stored asbot.agent,reviewer.agentandbot.bravebotBin.make schedulesreads them when it installs. Everyrun.shline gets--agent <name> --agent-bin <absolute path>for any agent but claude, so a claude deployment renders the same crontab as before, and the block'sPATHgets the binary's directory. The install stops if the binary cannot be found. The review agent is read when each review job fires, through one helper thatreview-session.shandreply-to-pings.shshare, so changing it needs no reinstall.Setup now ends like this:
And a run line, with bravebot configured:
What is weaker when bravebot reviews
claude's review session runs under an allowlist and
--permission-mode dontAsk, so anything not listed is refused andrunis limited to one script. A one-shot bravebot run has nobody to ask: an action needing approval ends the run on status 4, andallowrules decide nothing. The only mode in which a review can write its results file is--dangerously-skip-permissions, which also marks every file the session reads as trusted. The command adds read deny rules for credentials, write deny rules for the bot directory, a sandbox writable only in the work directory, a closed network and a fixed tool list with no fetch tools.docs/review-agents.mdlists what is left weaker and what bravebot would need to close it.Test plan
make lint— passedmake test— passedmake check-reviewdog— no findings (opengrep and pip-audit could not run on this machine)PATHhas the nvm directorymake setuprun interactively end to end (not done)