Repository navigation
Rotate /go review accounts through docket's account list - #253
Merged
Merged
Conversation
The review runner reads claude_config_dir and claude_fallback_config_dirs from docket's config.toml and orders them as docket's account.Pick does. It skips accounts that docket's limits.jsonl shows as over a usage limit. On a usage limit with an unchanged checkout, it retries on the next account, then on this session's account when the list leaves it out. Removes GO_REVIEW_CLAUDE_CONFIG_DIR. Claude-Session: https://claude.ai/code/session_013PZWPUEwzpVAms9RexAz8t
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.
When the account that
/goreviews under hits its usage limit, the review falls back to whatever account the/gosession runs on. docket already keeps an ordered list of review accounts and a log of which ones are over a limit, so the two tools disagree about which account to use. A/goreview also starts on an account docket already knows is limited, waits for claude to refuse it, and only then retries.The review runner now reads
claude_config_dirandclaude_fallback_config_dirsfrom docket'sconfig.tomland orders them the way docket'saccount.Pickdoes. It skips accounts thatlimits.jsonlshows as still limited. On a usage limit with an unchanged checkout, it retries on the next account, and after the list on the session's own account if the list leaves it out. It reads docket's log but never writes to it. The rotation rule is a Python port of docket's Go code, so a change to docket's rotation needs the same change here.GO_REVIEW_CLAUDE_CONFIG_DIRis gone, and the runner now needs Python 3.11 fortomllib.Test plan
python3 ai/skills/go/scripts/tests/test_run_review.pypasses, including new tests for rotation order, recorded limits, the default-account spellings, and an unreadable or relative config.ai/tests/test-canonical-skills.sh,test-skill-spec.sh, andtest-plain-writing-contract.shpass.~/.claude-automationlimited, the runner picks~/.claude, the same account docket picks./gothrough its Review step while an account is limited and confirm the review lands on the backup account.https://claude.ai/code/session_013PZWPUEwzpVAms9RexAz8t