Commit Graph
6 Commits
  • refactor(ci): add an adversarial pass and name the analyst briefing
    REVIEW.md told the reviewer which repository rules to check but never to try
    breaking the change, so the conditions this panel actually meets went
    unexamined. "Try to break it" adds six, each tied to a mechanism here rather
    than to a generic checklist: an upgrade over an operator's existing rows and
    the rollback that reads them again, a restart that drops in-memory state under
    the cron jobs, a sub-node racing the master on the same row, an operation
    applied twice, an inbound or client at the empty and the thousand end, and a
    dependency that is down. It closes with the gate that running a case is not
    reporting it - each one still has to clear the verification bar below it, so
    the section cannot become a licence for hypotheticals.
    
    repo-context.md said nothing about which bot reads it. Only the issue analyst
    does, since the review job's briefing moved inline in acf3603d, so it becomes
    issue-analyst-context.md and its title names the analyst instead of "the Claude
    bot". bot_context_test.go pins that path in a constant, so the rename carries
    through the constant, the four test names and the two comments that named the
    old file - one of which still said "the bot prompts", plural.
    
    Backticks come off mtg-multi in the new section: the same test file reads any
    hyphenated backticked token in REVIEW.md as a CI job name, and fails on one
    ci.yml does not define.
  • refactor(ci): split the issue analyst out and brief the review job from a file
    The issue analyst moves verbatim from claude-bot.yml into its own
    claude-issue-analyst.yml, so claude-bot.yml now holds only the pull-request
    side: review, @claude mentions and conflict resolution.
    
    The review job's briefing was a single 2,600-character quoted string inside
    claude_args, unreadable and unreviewable. It now lives in
    .github/claude/review-job.md, assembled at run time with a "This run"
    section that hands the reviewer the pinned head SHA, the pull request and
    the exact check-runs command, and reaches the CLI through
    --append-system-prompt-file. The agent-mode action sets no system-prompt
    append of its own, so the file flag cannot collide with one.
    
    Findings no longer carry the fix: REVIEW.md and the brief both forbid
    suggestion blocks, patches and replacement snippets, overriding the
    code-review skill's --comment step, which attaches a committable suggestion
    to any small fix. A finding states what is wrong, where, what triggers it
    and what breaks; the maintainer decides the change.
  • chore(build): bump Go toolchain to 1.27.0
    Go 1.27.0 shipped on 2026-08-19. Raise the go directive and the builder
    image so Docker and release builds pick it up; every CI job already reads
    the version from go.mod, and golangci-lint v2.13.1 release binaries are
    themselves built with go1.27.0, so the lint job needs no pin change.
  • feat(ci): give the review bot a severity scale and a tally
    REVIEW.md said what blocks and what does not, but never how to mark a finding,
    so every review invented its own shape and none carried a severity. It now
    names the three markers the hosted Code Review service uses - Important, Nit,
    Pre-existing - and keys them to what the pull request did rather than to how
    alarming a defect looks alone: a defect it introduces or worsens is Important,
    one it merely brought into view is Pre-existing and cannot be a reason to hold
    it. Pre-existing was missing entirely, and checking what this panel emits means
    reading far outside the diff, so those findings had nowhere to go except a
    wrong Important or silence.
    
    The volume cap said how many and never which. It now collapses a nit repeated
    across files into one finding, prefers a nit in code the pull request wrote
    over one in code it only moved, caps pre-existing findings at three, and states
    that Important findings are never capped - a section listing two caps otherwise
    reads as licence to trim what matters. The review opens with a tally so the
    author sees the shape before the detail.
    
    Two contradictions went with it. The file told the reviewer to skip what CI
    enforces and then to check that a new i18n key reaches all 13 locales, which
    i18n-dead-keys.test.ts pins in both directions - the rule moves to "Do not
    report" with the reason. "Anything CI already enforces: npm audit" overstated
    what runs; CI audits production dependencies at high and above, so a
    dev-dependency advisory is out of scope by design.
    
    The reviewer could not read its own CI. Only postgres-durable-first runs
    against PostgreSQL, and XRAY_E2E_BINARY and XUI_SCALE_TEST are set by no job,
    so a dialect or migration change can carry a wall of green while the paths it
    touches never executed. That belongs to the verification bar, next to the rule
    that a behaviour claim needs a file:line citation, and "CI passed" now needs a
    run actually read. Also names the two house choices no linter defends: neither
    golangci-lint nor oxlint rejects a testify or Tailwind import.
    
    Both kinds of claim rot on a rename, so a test pins them the way
    repo-context.md's claims are already pinned - the CI jobs REVIEW.md names must
    exist in ci.yml, the skip gates it calls unset must stay unset, and the locale
    count must match the directory.
    
    The review itself moves from high to max effort, and the prompt records why it
    names REVIEW.md at all: the code-review skill reads CLAUDE.md on its own but
    not REVIEW.md, so dropping that clause would silently stop the file applying.
    Drops a CLAUDE.md reference to tools/seedperf/, which no longer exists - the
    review reads that file as project context, so a stale path there misleads it.
  • refactor(ci): replace the in-house review lanes with the official code-review skill
    The four pull_request_target review jobs in claude-bot.yml (Senior
    Developer / QA / Tester / Arbiter and their shared rubric) are replaced by
    a single review job running the official code-review plugin - the same
    skill behind Anthropic's hosted Code Review and the review workflow
    /install-github-app generates. The hosted service needs a Team/Enterprise
    organisation, so the plugin runs in CI on the maintainer's subscription
    instead: inline findings on PR open and ready-for-review, plus manual
    (re-)review when the owner or a collaborator comments "@claude review".
    
    The official example triggers on pull_request, but GitHub withholds
    secrets from fork runs and essentially every 3x-ui pull request is from a
    fork, so the job keeps the lanes' pull_request_target posture: the
    workspace is the base revision and nothing from the pull request is
    checked out or executed.
    
    What the lanes uniquely knew is distilled into REVIEW.md, handed to the
    skill via --append-system-prompt and pinned by bot_context_test.go the way
    repo-context.md is: the runtime.Runtime dispatch rule, migration and
    upgrade safety, the four-step route contract chain including the unchecked
    docs copy, the i18n rule, the three link implementations, and the
    wire-format verification bar. The mention job now ignores "@claude
    review" comments on pull requests so the review trigger does not also
    wake the generic bot, and the lane-only rubric file goes with the lanes.
    
    The remaining prompts also lose their tone micro-rules (no emoji, no
    exclamation marks, no filler) and the workflow's comment banners are
    removed.