Split tokens #1
Reference in New Issue
Block a user
Delete Branch "split-tokens"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The agent and the bot are now two accounts, and the runner is one Deno script.
author-token(wasgitea-token): commits, pushes, and opens pull requests; the agent sees it asGITEA_TOKEN, and commits use that account's login and email.reviewer-token: posts comments and reviews as the bot; withheld from the agent's environment so it can never approve as the bot.pull_requestrun posts a review instead of a comment:REQUEST_CHANGESwhen the response mentions@bot,COMMENTwhen the run failed,APPROVEDotherwise. Gitea refuses self-approval, so the two accounts must differ.commons/code-rules, which is fetched and embedded in the prompt, and requests changes for violations even when the diff did not cause them.run.tsreplaces the three shell scripts plusjq,envsubst, andansifilter; onlydenois added to the install step, per the rules' Deno-over-Node policy. A.giteaworkflow runsdeno fmt,lint, andcheck.Callers must rename
gitea-tokenand addreviewer-token(write:issueandwrite:repositoryscopes). A rejection stays until the bot reviews again, so callers that want it lifted after a fix should trigger onpull_request: [opened, synchronize].Verified with a fake
claudebinary against this PR in an isolatedHOME: git author configured from the token, prompt rendered with rules and comment history, events streamed, reviewer token absent from the agent's environment, review posted (then deleted).