Skip to content

ci: review the rewrite branch with CodeRabbit, now greptile is retired - #1136

Closed
chappie-daemon wants to merge 1 commit into
rewrite/mainfrom
coderabbit-rewrite-main
Closed

chappie-daemon wants to merge 1 commit into
rewrite/mainfrom
coderabbit-rewrite-main

Conversation

@chappie-daemon

@chappie-daemon chappie-daemon commented Nov 14, 2026 •

Copy link
Copy Markdown
Collaborator

Why

The rewrite's independent reviewer was greptile, run by the factory's static stage. It cannot run any more: its CLI sits on a paid tier the OSS allowance does not cover, the stored key came back revoked, and the service refused a 1,454-line branch as too large to send. Both failures recorded as "provider unavailable", which at a glance reads like a clean round — worse than having no reviewer.

CodeRabbit is already installed on this repository, and its free tier covers public repositories. It reviewed a PR on main here within seconds of being opened. It did not review the rewrite's PRs, because auto review covers the default branch and every rewrite PR targets rewrite/main.

What this adds

.coderabbit.yaml, with the default branch untouched:

  • reviews.auto_review.base_branches: ["^rewrite/main$"] — the one line that gives the rewrite its reviewer back.
  • auto_pause_after_reviewed_commits: 20 (default 5) — a job with fix rounds pushes more than five commits before its review rounds start, and the default pauses exactly then.
  • profile: chill, summaries and walkthroughs on; sequence diagrams and the poem off, since neither has been read.

Notes

  • Nothing else in review policy changes; the repository's own gates remain the merge gate, and no CodeRabbit approval is counted as a human one.
  • sequence_diagrams and auto-summaries in the PR description stay on their defaults except where named above.

Summary by CodeRabbit

  • Chores
    • Updated automated review settings for a development branch. This change does not affect the app’s features or behaviour for end users.

greptile was the factory's static reviewer and its CLI is no longer usable: a
paid tier the OSS allowance does not cover, a key that came back revoked, and a
diff cap that rejected a 1,454-line branch. CodeRabbit is already installed on
this repository and free on public ones, but its auto review covers the default
branch only, and every rewrite pull request targets rewrite/main.

base_branches adds that branch by name. auto_pause_after_reviewed_commits rises
from its default of 5, which a job with fix rounds would exhaust before its
review rounds start.
@changeset-bot

changeset-bot Bot commented Nov 14, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: fc84c54

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@coderabbitai

coderabbitai Bot commented Nov 14, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The pull request adds CodeRabbit review settings for Canadian English, the chill profile, review output options, and automatic reviews on matching base branches.

Changes: CodeRabbit review configuration

Layer / File(s) Summary
Review settings and automatic review conditions
.coderabbit.yaml
The configuration enables summaries and review status, disables sequence diagrams and poems, and enables automatic reviews for base branches matching ^rewrite/main$. It sets automatic pausing to 20 reviewed commits.

Estimated code review effort: 1 (Trivial) | ~5 minutes

Change: Other

Merge Risk: Minimal · up to fc84c

This adds automatic CodeRabbit reviews for pull requests targeting rewrite/main. It has no runtime effect and does not change the existing merge gates, so it is safe to merge.

Architecture risk: Low · up to fc84c

The changed surface does not map to a changed system, dependency edge, entrypoint, or external dependency.

Changed systems: None identified.

Architecture concerns
No architecture-level concerns identified.

Review details

Before / after behavior

  • observed — Modified behavior in .coderabbit.yaml: Adds CodeRabbit configuration with Canadian English, the chill profile, summaries and review status enabled, sequence diagrams and poems disabled, and automatic review enabled for base branches matching ^rewrite/main$; automatic pausing is set to 20 reviewed commits. The accompanying comments describe the replacement and its context.
Pre-merge checks: Passed 4

Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title says the rewrite branch is now reviewed by CodeRabbit because Greptile is retired. The change adds .coderabbit.yaml, which enables CodeRabbit auto-reviews for pull requests targeting rewrite…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title says the rewrite branch is now reviewed by CodeRabbit because Greptile is retired. The change adds .coderabbit.yaml, which enables CodeRabbit auto-reviews for pull requests targeting rewrite/main. The title matches the main change. It also names the Greptile retirement, which is context from the objectives and not a file change, but it does not misstate the change.

Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Recent review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between 509b403 and fc84c54.

Files selected for processing: 1

  • .coderabbit.yaml

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 8 remain after this review.

@greptile-apps

greptile-apps Bot commented Nov 14, 2026 •

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge.

Summary

Adds .coderabbit.yaml to enable automatic reviews for PRs targeting rewrite/main.

  • CodeRabbit now reviews pull requests targeting rewrite/main automatically.

Reviews (1) · Last reviewed commit: "ci: review the rewrite branch with CodeR..." · Reviewed by Greptile

cameri added a commit that referenced this pull request Nov 16, 2026
The last slice of #864 (closed): the rig that produces
`docs/rewrite/benchmarks.md`, which the
cutover gate (#869) reads before it can retire the TypeScript
implementation. Filed as #1131
because 864 closed with the store slice.

## What is here

- **`crates/nostream-storage/examples/bench.rs`** — one workload, held
as named constants in the
file and echoed into the artifact, run through `Arc<dyn
EventRepository>` so the same call sites
measure either backend: a deterministic corpus, bulk load, a per-call
ingest, five read shapes,
nearest-rank percentiles, and a JSON artifact whose deterministic part
is identical across runs
of a seed while every host- and run-dependent value lives in one
`volatile` block.
- **`--verify`** — the oracle. It asserts the corpus's exact expected
totals per shape (200 / 20 000 /
99 602 / 20 000 / 1 020 000 at 50 000 events), non-empty windows per
iteration, percentile
  ordering and repeat agreement. Timings are never asserted.
- **`--repeats N`** — median/p10/p90 per shape and per rate, so a
contended host is visible rather
  than hidden by a point estimate.
- **`docs/rewrite/benchmarks.md`** +
**`docs/rewrite/benchmarks/lmdb-50k-seed7.json`** — the
recording, its conditions, its arithmetic and the decisions D1–D9 that
define what it measures
  and what it does not.
- **Two CI steps** in the existing `rust-checks` job: the benchmark unit
tests (which
`cargo test --workspace` does not run, measured) and the Postgres arm
where a database exists.
- One empty changeset, as `CLAUDE.md` requires, and the ADR 0012
amendment that retires "the
  benchmark rig, which does not exist".

## The recording, and what it is worth

One host, four cores, `Intel i7-10700T @ 2.00GHz`, load 43.32 at the
first of three repeats, release
profile, 50 000 events, seed 7, `--repeats 3`, regenerated after the
round-6 fixes (load 48.79). `create` (one write per call, the relay's
own path)
runs at a 256 ops/s median; `create_many` (500 per call) at 31.2 ms p95
per batch. The bands are in the document and in the artifact.

**The band is the host.** The performance lens measured one repeat's 1
000 ingests at 125.5 s
against 4.4 s and 6.3 s in the other two on this box; the document
records the spreads and says a
wider band is a busier host, not a slower store.

## What it does not measure, and why

- **The Rust/Postgres column**: no database on the host that ran this.
The harness has the arm and
CI reaches it; `benchmarks.md` carries the column as `not measured` with
the command.
- **The TypeScript/Postgres column**: filed as #1132 — `src/` on this
branch is 3.11.0 diverged
from `origin/main`, and the job's member has no Docker, no `psql`, no
`node_modules`.
- **NIP-50 `search`**: both arms honour it only with `nip50.enabled`,
and the harness opens either
backend without settings, so a `search` row would time a plain filtered
read with the query
  dropped. D9 says so, with the code.
- Retention, transactions, concurrency above one and the wire: D9.

## Review history

Four rounds, three reworks, on a job whose estimate was $2.40 and whose
actual is stated below.

| round | verdicts | what it found |
|---|---|---|
| 1 | code PASS, security PASS, ux/architecture/performance CHANGES |
`count` timed an **empty range 49 times of 50** and `author_kind` 40 of
200; `--verify` asserted only `rows > 0`, so it passed both;
`per_second` mixed batches/s with events/s, inverting a 69× ratio; the
example's unit tests were run by no gate; `--out` failed after the whole
measurement |
| 2 | performance PASS, four CHANGES | `--store` with `--repeats > 1`
**never refused a populated store** — the guard inspected
`<dir>/lmdb/data.mdb` while the run opened
`<dir>/repeat-<n>/lmdb/data.mdb`; without `--verify` a second run exited
0 with `create_many rows 0` |
| 3 | security/ux/performance PASS, code/architecture CHANGES | four
false or uncited sentences in the document: an uncited multiplier, a
disk sentence contradicting its own arithmetic, NIP-50 as "not on the
base", and a kind list missing 30000–39999 |
| 4 | code/architecture CHANGES (docs-only delta) | the round-3 fix
introduced two new false claims in D9; the operator authorised one
micro-fix rather than an issue |
| 5 | code PASS (single-lens confirmation) | both D9 sentences now name
the dispatch arms they mean, verified line by line |
| 6 | after the PR opened — Greptile, five findings | the P1: `--verify`
failed **correct** runs through a `.max(1)` clamp; `--out` refused on
the wrong path; profile-dependent seed arithmetic; repeat read-backs
unchecked; a workload block that could not tell two by-id workloads
apart |
| 7 | docs-only | the regenerated document quoted two figures from the
artifact it replaced (48/24416, absent from the JSON) and a stale date;
both corrected against the committed artifact |

The approver then **escalated on five citation anchors in the job
record** — `recon.md` ×4 and `spec.md` ×1 — none of them in the branch:
`EnvFlags::empty()` is `backend.rs:110`, not `:145`; `LmdbBackend` is
declared in `lmdb/mod.rs`, not `backend.rs`; "The harness map" is
`nip-parity.md:963`; the `maxLimit` refusal is `subscribe.rs:596-604`.
Corrected against the tree and re-approved. The check is now filed as a
script so it stops being an approver's habit: cameri/skills#302.

**The pattern worth carrying:** every round's defect was a claim about
*coverage* rather than a
wrong answer — an oracle weaker than the defect it was written to catch,
a guard validating a path
the run did not use, an exclusion list hiding an unmeasurable shape.
None of them was visible by
reading the happy path.

## Rework after the automated review (round 6)

The PR's automated reviewer found five things after the PR opened, one
of them a P1. All five were verified against the code and all five were
true:

- **P1 — the oracle failed correct runs.** `--verify` compared
`timing.per_second.max(1)` against the truth, so any shape whose integer
rate rounds to 0 failed. It now asserts `ops > 0` as a boolean and
treats a zero rounded rate as a measurement. **The oracle has now been
wrong in both directions**: too weak in round 1 (`rows > 0` passed an
empty range) and too strict here.
- `--out` refused on its *parent* rather than its destination, so `--out
/tmp` passed and failed after the whole run. Refused at the destination,
with a writability probe that never truncates an existing artifact.
- Seed arithmetic panicked in a debug build and wrapped in release, so
the same seed chose different rows per profile. Now `wrapping_*`, with
`u64::MAX` covered in both profiles.
- Only the first repeat's read-back count was checked; every repeat's is
now kept and compared, naming the repeat.
- The workload block could not distinguish two by-id workloads;
`by_id_stride` and `by_id_offset` are in `workload.reads` (**schema
2**), and **the committed artifact was regenerated by the document's own
command** rather than edited.

The regenerated run was taken at load 48.79 (the previous at 43.32):
reads moved 10–21% slower, `create_many` 26% faster, every shape count
unchanged. The document was rewritten to those figures and D4's "widest
band" claim went with the artifact it described.

## Static stage

Four rounds, the clippy provider `ran` clean each time over the
repository's own CI commands —
including `cargo check -p nostream-storage --no-default-features
--all-targets` and the strict
`-D clippy::unwrap_used -D clippy::expect_used -D clippy::panic` — the
flags an earlier job's shim
never ran. `Greptile Review` is `unavailable` for this job: the shared
key is rejected, and the
branch exceeds the service's diff cap in any case. `CodeRabbit` reviews
`rewrite/main` PRs once
#1136 lands.

## Known limits

- One host, one profile, one seed, one corpus size. The document says so
in its first screen.
- The 200 000-event ceiling and the 4 KiB/event projection are the
harness's policy, not a
measurement; `--allow-large-corpus` lifts the first, the document prints
the projection.
- D9's exclusion prose has three known wording defects, each filed with
its exact replacement:
#1138 (28 935 listed as an exception to a predicate it satisfies), #1139
("the same call with a
different row" holds for `create`, not for delete/vanish's extra store
work), #1140 ("Nothing
else is cited" is contradicted by four later citations, each correctly
labelled).
- No Postgres run executed here; the CI step is written and not yet
exercised.
- No Postgres run was executed in this environment; the CI step is
written and not yet exercised.
@chappie-daemon

Copy link
Copy Markdown
Collaborator Author

Closing: the premise is wrong. Greptile is not retired — only its CLI is unavailable to the factory's static stage. The GitHub app is live and reviewed this very PR, approving it at fc84c54 with its usual auto-approve marker, so a .coderabbit.yaml that exists to replace a reviewer that is still reviewing is not needed.

What remains true is narrower than the PR body claims, and it belongs in the factory, not in review policy:

  • The factory's static stage cannot run Greptile, because the CLI needs a paid tier and the stored key came back revoked, and the service refused a 1,454-line branch as too large to send. Those are failures of that invocation path.
  • The app's review of a PR is unaffected, which is the path the rewrite's PRs actually use.

CodeRabbit's base-branch expansion would have added a second reviewer on rewrite/main — a policy change, not a repair — and that is a decision to make on its merits rather than as a workaround for a diagnosis that turned out to be wrong.

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.

1 participant