Commit Graph

10 Commits

Author SHA1 Message Date
naps62-yolo 51fd18b23e feat(pr): hidden agent-meta marker on posted bodies (#16)
ci / nix (push) Successful in 8s
ci / lint (push) Successful in 9s
2026-08-21 16:36:40 +01:00
Miguel Palhas aaee17b0f9 feat(pr-daemon): outside reviewer on your own PRs, rotated by least use
A PR is never reviewed by the harness that wrote it. With `selfReview`
on, an own PR gets both roles: `land` on the head branch and `review-pr`
on a local pull/N/head checkout, which is what keeps routing unambiguous
with two sessions on one PR.

The reviewer is drawn from a configured roster of harness+model+effort
combinations, excluding the author's harness, picking among the
least-used so every combination keeps getting exercised and a new entry
goes out immediately. Each pick is appended to a JSONL ledger, which is
what makes rating them possible later.

Drafts never get a reviewer; the draft-to-ready flip spawns one.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-19 21:42:38 +01:00
Miguel Palhas de37048f12 feat(pr-daemon): rev- prefix on review sessions, drop filler from slugs
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-19 21:17:12 +01:00
Miguel Palhas d231902bf4 feat(pr-daemon): name sessions after the PR, group by repo
Titles were gt-/gh-prefixed and carried the repo, which duplicates how
the sidebar is already organised. Number first so it sorts, then a slug
of the PR title.

Routing no longer looks at the title at all -- a PR title can be edited
under a running session -- and matches the worktree branch instead,
covering both the head branch and the local pull/N/head one.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-19 21:15:15 +01:00
Miguel Palhas 663a5ee235 fix(pr-daemon): watch "*" in the webhook allowlist, log drops
The webhook allowlist never matched the "*" repo pattern, so every gitea
delivery was dropped as unwatched. Each drop returns 202, which the forge
records as a successful delivery, and only accepts and signature failures
were logged -- so a delivery that arrived and was discarded looked exactly
like no delivery at all.

Gitea also flags a PR comment with is_pull rather than nesting a
pull_request link the way github does.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-19 21:10:48 +01:00
Miguel Palhas 69522ce961 fix(pr-daemon): accept gitea event and action names
Gitea sends action `synchronized` where GitHub sends `synchronize`, so
pushes to a PR branch were filtered out as noise.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-19 20:55:16 +01:00
Miguel Palhas 35b4823edc fix(pr-daemon): prompt new sessions immediately, pin TMUX_TMPDIR
A started session waited for the next tick to get its opening prompt, and
the pending flag lived in memory, so a restart in between left it sitting
empty with nothing to do.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-19 19:06:32 +01:00
Miguel Palhas b2fdcda66d fix(pr-daemon): log held hints
A hint withheld because the session is busy left no trace, which reads
identical to no event at all.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-19 19:02:38 +01:00
Miguel Palhas f189abd4ee fix(pr-daemon): match worktrees, accept bot identity, log rejects
Three bugs the first live run surfaced:

aoe reports `worktree.main_repo_path` with a trailing slash, so the
session lookup never matched and the daemon created a second session for
a PR that already had one.

The gitea token belongs to a separate bot account, so PRs opened by
agents looked like someone else's work and got `review-pr` instead of
`land`. `self` now takes a list of logins per forge.

A webhook whose signature fails logged nothing, which makes a mismatched
secret indistinguishable from no deliveries at all.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-19 19:00:13 +01:00
Miguel Palhas 787f133fdc feat: PR daemon + reviewer/author skill split
One systemd daemon watches GitHub and Gitea and routes each PR to an aoe
session: `land` for PRs you authored, `review-pr` for everyone else's.
It reads metadata only and sends a single inert hint line, so untrusted
PR text never passes through the thing that types into agent prompts.

Routing is derived from `aoe list --json --all` by worktree branch, so
no claim files and no daemon database. Dedupe stays in the session via
`pr-<N>-seen`, which makes hints idempotent and a swallowed send
self-healing.

`land` loses its watcher machinery to the daemon and keeps the policy
and per-event handlers; `pr-common` holds what both skills share.

Review sessions run non-yolo without trusted hooks and never run the
branch's code.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-19 18:51:43 +01:00