Commit Graph

35 Commits

Author SHA1 Message Date
Danny Kim 419439baf6 Make bot review setup self-contained
Check / deno (pull_request) Successful in 34s
2026-09-14 16:16:36 +09:00
bot 70d71aa4fd Inline comments (#10)
A finding about one line now lands on that line of the diff: the agent writes anchors as JSON, and the review posts them with the body in one call. Bad entries fail the run, and an anchor Gitea refuses falls back to posting the body alone.

Verified with deno fmt, lint and check.

Reviewed-on: #10
Co-authored-by: bot <temeddix@gmail.com>
Co-committed-by: bot <temeddix@gmail.com>
2026-09-14 00:11:35 +00:00
bot 2b51793c92 Review on request (#9)
A pull request comment that asks for a review now posts a real review, not a plain comment: the review file decides, the event no longer does.

Verified with deno fmt, lint and check.

Reviewed-on: #9
Co-authored-by: bot <temeddix@gmail.com>
Co-committed-by: bot <temeddix@gmail.com>
2026-09-13 23:48:04 +00:00
Danny Kim 4ed8b48b7a Verdict words (#8)
The review file starts with `Approved` or `Changes requested` instead of `Yes`/`No`/`With fixes`. The match is still the whole trimmed first line; `run.ts` prepends ✅, 🛑, or 💬 when posting, so the mark never takes part in the match.

Verified: `deno fmt`, `deno lint`, `deno check` pass; a scratch run of the matcher maps `Approved` → APPROVED, `Changes requested` → REQUEST_CHANGES, and `Approved, mostly`, `✅ Approved`, `Yes` → COMMENT.
Reviewed-on: #8
Co-authored-by: Danny Kim <temeddix@gmail.com>
Co-committed-by: Danny Kim <temeddix@gmail.com>
2026-09-13 17:21:34 +00:00
Danny Kim 0d109ebec8 Review file (#7)
The reviewer writes its review to a file whose first line is the verdict, instead of relying on a narration-free final message. Sonnet put `Yes` after three paragraphs of narration on memona #936 (review 595), which the fail-closed verdict posted as a plain comment.

Reviewed-on: #7
Co-authored-by: Danny Kim <temeddix@gmail.com>
Co-committed-by: Danny Kim <temeddix@gmail.com>
2026-09-13 16:54:54 +00:00
Danny Kim a2bc4c9541 Model input (#6)
Optional `model` input. Defaults move to the mid tiers, `claude-sonnet-5` and `gpt-5.6-terra`, since a run follows a fixed template plus the project's checks; a workflow can still pass a bigger model.

Reviewed-on: #6
Co-authored-by: Danny Kim <temeddix@gmail.com>
Co-committed-by: Danny Kim <temeddix@gmail.com>
2026-09-13 16:48:13 +00:00
Danny Kim 75d3593376 Author replies (#5)
The reviewer drops a finding the author has answered in the PR comments as intended or a false alarm, once the code or docs make that clear. Pairs with memona's merge-branch gate loop.

Reviewed-on: #5
Co-authored-by: Danny Kim <temeddix@gmail.com>
Co-committed-by: Danny Kim <temeddix@gmail.com>
2026-09-13 15:35:17 +00:00
Danny Kim 439f2b4e77 Checked-out head (#4)
Checked-out head (#4)

Co-authored-by: Danny Kim <temeddix@gmail.com>
Co-committed-by: Danny Kim <temeddix@gmail.com>
2026-09-13 15:06:27 +00:00
Danny Kim f0506adfea Fail-closed verdict (#3)
Fail-closed verdict (#3)

Co-authored-by: Danny Kim <temeddix@gmail.com>
Co-committed-by: Danny Kim <temeddix@gmail.com>
2026-09-13 14:57:01 +00:00
Danny Kim b8d0093ef2 Superpowers review (#2)
Superpowers review (#2)

Co-authored-by: Danny Kim <temeddix@gmail.com>
Co-committed-by: Danny Kim <temeddix@gmail.com>
2026-09-13 14:30:29 +00:00
Danny Kim 8c2041bbc5 Split tokens (#1)
The agent and the bot are now two accounts, and the runner is one Deno script.

- `author-token` (was `gitea-token`): commits, pushes, and opens pull requests; the agent sees it as `GITEA_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.
- A `pull_request` run posts a review instead of a comment: `REQUEST_CHANGES` when the response mentions `@bot`, `COMMENT` when the run failed, `APPROVED` otherwise. Gitea refuses self-approval, so the two accounts must differ.
- The reviewer checks the whole repository against `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.ts` replaces the three shell scripts plus `jq`, `envsubst`, and `ansifilter`; only `deno` is added to the install step, per the rules' Deno-over-Node policy. A `.gitea` workflow runs `deno fmt`, `lint`, and `check`.

Callers must rename `gitea-token` and add `reviewer-token` (`write:issue` and `write:repository` scopes). A rejection stays until the bot reviews again, so callers that want it lifted after a fix should trigger on `pull_request: [opened, synchronize]`.

Verified with a fake `claude` binary against this PR in an isolated `HOME`: 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).

Reviewed-on: #1
Co-authored-by: Danny Kim <temeddix@gmail.com>
Co-committed-by: Danny Kim <temeddix@gmail.com>
2026-09-13 14:15:23 +00:00
Danny Kim e173c11cac Specify models 2026-08-09 22:41:11 +09:00
Danny Kim a791bc7033 Stream thinking and text from Claude 2026-07-21 02:30:22 +09:00
Danny Kim 66ee427697 Do not make the bot wait for external wakeup 2026-07-21 02:11:47 +09:00
Danny Kim 0a3e650664 Stream Claude output to console 2026-07-21 01:40:42 +09:00
Danny Kim 5039c728cb Add Claude 2026-07-18 02:25:32 +09:00
Danny Kim 4a4b3b9538 Do not give up after waiting other job 2026-07-18 01:52:17 +09:00
Danny Kim e4e9c20b06 Do not exclude the current run 2026-07-16 09:07:13 +09:00
Danny Kim 9cf2a67898 Consider pull request reviews 2026-07-15 03:27:12 +09:00
Danny Kim 4d8982a0dd Wait before chaning for another job 2026-07-14 01:23:16 +09:00
Danny Kim 522d4ffeca Remove caveman requirements 2026-07-12 21:22:46 +09:00
Danny Kim 9f7fad96de Prefer nested lists and ask bot to do a review for pull requests 2026-07-12 19:05:57 +09:00
Danny Kim 5d5104e5ca Fix ISSUE_INDEX 2026-07-11 00:46:57 +09:00
Danny Kim 4f90a910b9 Add review guidelines 2026-07-11 00:08:51 +09:00
Danny Kim e9f0649120 Remove wrong sentence from prompt 2026-07-09 10:51:57 +09:00
Danny Kim 52cadd3874 Add descriptions about screenshots and extra comments 2026-07-09 09:47:44 +09:00
Danny Kim a192aa39d1 Put comments properly 2026-07-09 09:35:34 +09:00
Danny Kim 162ef3cd7b Share the login result via comment 2026-07-09 09:31:14 +09:00
Danny Kim c64f1fdbf6 Filter ANSI characters 2026-07-09 09:21:27 +09:00
Danny Kim 1d3f17e0f2 Pass Codex login request to comment 2026-07-09 09:12:40 +09:00
Danny Kim a47fabc3fd Remove unneeded prompt sentence 2026-07-09 09:01:54 +09:00
Danny Kim 4fa9559fae Tell Codex to fix CI 2026-07-09 08:59:19 +09:00
Danny Kim 8d81a06a9d Fix Codex argument bug 2026-07-09 08:54:12 +09:00
Danny Kim a5ec9b03c0 Include previous issue comments 2026-07-09 08:44:29 +09:00
Danny Kim e53edf1fbb Add initial files 2026-07-09 08:38:07 +09:00