Skip to content

AI Deep Review#1036

Merged
kans merged 1 commit into
mainfrom
kans/ai-review
Jul 23, 2026
Merged

AI Deep Review#1036
kans merged 1 commit into
mainfrom
kans/ai-review

Conversation

@kans

@kans kans commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

Add docs/BUG_CATCHING.md — an evidence-based review rubric — and wire risk triage into the CI reviewer

What this is

Two files:

  • docs/BUG_CATCHING.md — a self-contained rubric for reviewing changes in this repo, built from a retrospective across our recent efforts (fan-out, sync-replay, timeout preservability, incremental expansion, the verification-infrastructure phases). Every claim in it is backed by a shipped bug or a named effort; §7 is an index that resolves the shorthand.
  • .claude/skills/ci-review.md — the CI AI reviewer's prompt gains a risk-triage step that mirrors the rubric's §2, so every PR gets scored and HIGH-risk changes get flagged for escalation before merge.

The core arguments

  1. Review has no closure criterion. It samples the behavior space with no coverage model, so "review converged" is undefined — the sync-replay effort ran 15+ rounds without converging, and the fan-out branch produced new high-severity bugs for 5 straight rounds. The rubric budgets two to three rounds, then routes to instruments (differential oracles, cross-version harnesses, fault injection, permutation tables). Review's real job is discovering the verification plan, not substituting for one.

  2. Risk is escape × consequence. Triage scores four escape axes (silence, durability, uncontrolled dimensions — including data volume, consumer distance) against a remediation ladder (redeploy → re-sync → migrate → coordinate → irrecoverable). Silent+durable compounds with detection latency; version-pair dependence is auto-HIGH; ladder rung ≥ 4 is auto-HIGH and flips the defense from detection to prevention.

  3. Cost contracts. On a declared list of hot paths (grant expansion, compaction, the per-checkpoint loop, artifact-open-time work) performance is a correctness property: budgets convert latency into failure and fixed memory converts peak-RSS into OOM livelock. The reviewable object is the cost-curve delta; the enforcement is a whale-scale benchmark gate. Migrations are named as the intersection class that hits every risk factor at once.

  4. Fix-time obligations. Failing test first for every confirmed bug, and the recurrence rule: a bug in a class this document already names must ship the ladder climb (§4), not just the patch — evidenced by converter field loss recurring 19 days after its point fix (fixes toPebble converter to preserve discovered at #997Add new resource attributes to pebble. #1023).

How it's meant to be used

The doc opens with a routing guide and §6 contains a slicing map: orchestrating agents inline only the sections a pass agent needs, rather than pasting the whole document. The CI reviewer does triage-and-route only — it flags HIGH, names the review-blind class and the instrument, and checks whether the PR contains it; it does not attempt the full pass set itself.

Notes for review

@kans
kans requested a review from a team July 23, 2026 22:29
@kans
kans requested a review from mindymo as a code owner July 23, 2026 22:29
Comment thread docs/BUG_CATCHING.md Outdated
@github-actions

github-actions Bot commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

General PR Review: AI Deep Review

Blocking Issues: 0 | Suggestions: 0 | Threads Resolved: 0
Criteria: Criteria status: loaded .claude/skills/ci-review.md from trusted base ad05898ad9c2.
Review mode: full
View review run

Review Summary

This PR is documentation-only: it adds docs/BUG_CATCHING.md (a bug-catching/risk-triage guide) and wires the CI reviewer to it via additive guidance in .claude/skills/ci-review.md. No runtime Go, proto, go.mod/go.sum, or vendored changes are present, so there is no wire, serialized-state, exported-API, or dependency surface to break. The full PR diff was scanned for security and correctness. The prior finding about a missing BLOG_REVIEW_DOES_NOT_CONVERGE.md reference is addressed: no such reference remains; the doc now uses its own §7 case-name index, and all internal section cross-references (§1–§7, §5.1–§5.10, §4 rungs) resolve.

Security Issues

None found.

Correctness Issues

None found.

Suggestions

None.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No blocking issues found.

@kans
kans force-pushed the kans/ai-review branch from 4a3e335 to 3b1f02d Compare July 23, 2026 22:39
@kans
kans enabled auto-merge (squash) July 23, 2026 22:47

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No blocking issues found.

@kans
kans merged commit 1189598 into main Jul 23, 2026
10 checks passed
@kans
kans deleted the kans/ai-review branch July 23, 2026 22:49

@gontzess gontzess left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Have you done some test runs with this? Would be good to a/b test a few things. Regardless this seems great

Before the detailed review, score the change per `docs/BUG_CATCHING.md` §2:
risk is escape times consequence. Score the failure mode, not the subsystem.

Escape axes — how likely a defect ships and persists:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we specify the review agent to delegate a sub agent for each axis? Wonder if that improves depth. Maybe we could a/b test some stuff like this with a complex pr example

Comment thread docs/BUG_CATCHING.md
## 3. The seven mandatory passes

Every non-trivial change gets each of these as a distinct pass. Separate,
separately-prompted reviewer agents per pass work well (see §6). Check §2's routing

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah does this wording lead to sub agent spawning reliably?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unverified. I typically do this manually.

Comment thread docs/BUG_CATCHING.md
@@ -0,0 +1,784 @@
# Bug-catching guidance for baton-sdk

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are we worried about the length of this file? Wonder if the 7 passes should be split into sub pages

@kans kans Jul 23, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, we are, particularly in the case that you want to give different subagents different tasks. Thats loading a lot of the same context repeatedly.

@kans

kans commented Jul 23, 2026

Copy link
Copy Markdown
Contributor Author

@gontzess

Have you done some test runs with this? Would be good to a/b test a few things. Regardless this seems great

Yeah, actually. I tested it against 3 active PRs, including two active PRs from the resync epic (see lack of convergence), the [incremental grant expansion pr](this #1013,) and the last 15 or so PRs. The approaches are generally what I learned shipping the perf improvements work (compaction/expansion), getting pebble to go, and from the first attempt at resync, which crashed and burned. Its also where this pr came from.

@gontzess

Copy link
Copy Markdown
Contributor

@gontzess

Have you done some test runs with this? Would be good to a/b test a few things. Regardless this seems great

Yeah, actually. I tested it against 3 active PRs, including two active PRs from the resync epic (see lack of convergence), the [incremental grant expansion pr](this #1013,) and the last 15 or so PRs. The approaches are generally what I learned shipping the perf improvements work (compaction/expansion), getting pebble to go, and from the first attempt at resync, which crashed and burned. Its also where this pr came from.

Awesome thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants