Public: anyone can read this; the crew can change it.
Old reviewed-pull posts say the verdict too #16928
Check · Review · Land · Live done — Landed and live in production.
Old pull.reviewed events that carry a state but no reviewId now find their review and read like new ones, for example asked for changes on : or approved . A new test builds that case. It submits a review, strips reviewId from its event, and expects the feed to say the verdict and first sentence.
-
Reviews
Changes requested — before the latest pushThe idea is right and small, and it reuses listReviews and isReviewState. Two things to fix in one round:
- Tests: only one branch is covered (changes_requested with a single review). Add tests that fail without the matching rules: (a) two reviews by the same author with the same state, where the event is nearest the second, so the nearest-in-time pick is proven; (b) a review by a different author or a different state is not taken, so the post keeps
reviewed a pull request: <title>; (c) an old event with stateapprovedsaysapproved <title>. - The feed is a hot path. oldReview runs one
listReviewsquery per old event on every feed build. Subjects already batches pull lookups; load reviews the same way (listReviewsFor exists in src/core/reviews.ts, batched by issue id) or memoise per pull within one build, so a feed with many old events does not make one query each.
No door change is needed, since only the words of a post change, and the description is accurate. I opened the preview /feed: it answers 200 (11 KB) and shows no reviewed-pull posts of either wording, so the preview does not show the change working; the new tests have to carry that proof.
ApprovedBoth earlier asks are met. (1) Reviews are now read in one batched
listReviewsForcall for all pulls named by old events, not one query per event. (2) Tests now cover nearest-in-time (second take beats first), no match (other author, other state keep the old words) and approved. The change is words-only on a feed post, so there is no door change. The fallback keeps the old text when nothing matches.Two things I would do next:
- Non-blocking:
test/feed-reviewed.test.tsstripsreviewIdinline in the first and third tests, although thestriphelper below does the same. Usestripin both. - Non-blocking: the preview's
/feedhas no old reviewed posts, so the tests are the only proof. Seed one old event on a preview for a manual look.
- Tests: only one branch is covered (changes_requested with a single review). Add tests that fail without the matching rules: (a) two reviews by the same author with the same state, where the event is nearest the second, so the nearest-in-time pick is proven; (b) a review by a different author or a different state is not taken, so the post keeps
-
Checks
shipped production is serving it deploy bb265f4
-
History
- Old reviewed events read their pull's reviews from one batched query, and tests cover nearest-in-time, no match and approved. ba23c5e
- An old pull.reviewed event finds its review by pull, author, state and nearest time, so it says the verdict too. 61fd955
- Sandbox floor with Landlock where bwrap cannot run. (#16888) a3aa32f
- Sentinel: memory-growth was degraded 16 minutes today: The forge's own memory is 4689 MiB, over twice its first-hour 1629 MiB and past the 2176 MiB more its database caches m… (#16906) a233995
- Bridge v1: home becomes operable — select any tile, row or figure and act in place, keyboard first (#16898) 6edf0f6
- Follow upstream's "last checked" speaks the UI's one clock: `time()`, not a hand-rolled HH:MM UTC (#16902) 8fd7cde
- Install scripts off for unreviewed repositories (bun install --ignore-scripts) (#16886) 59dc8a4
- Home: two or three owner-pinned panels with release annotations (#16884) 12309f3
- A check's plan line survives a long log: in the summary when green, in the detail when red (#16889) 0a6deb5
- Main green: the static web loads no data graph again (FLAGS_FILE in a leaf module) (#16912) 42c8c1d
- MCP tools to list, add, grant and remove crew SSH devices (#16863) 8d40736
- Lent runners: a peer forge can lend check compute, scoped to public pulls, budgeted, sampled and revocable (#16836) 4c3cffb
- infra list opens with one paragraph naming every machine, and show finds a machine by name (#16900) 09cecc1
- "tries at /signin close the API door" passes every time on a loaded check machine (#16904) 362a2b5
- Talk's direct lane: small edits go straight to a live preview branch in seconds; the check runs once at Publish (#16832) 1cb0dba
- Status page: backups get their own honest row instead of reading as slow pages (#16891) e8a1cb1
- Nightly drill on the vxrail: the one-click path against production, loud on the step that broke (#16843) 3a83699
- An idle fresh forge has a memory budget test that names where its memory goes (#16883) 3bcfa79
- A front router wakes an asleep forge on its first request and says "waking…" while it does (#16882) 2d3e9b2
- Two timing flakes measured against load: page budgets scale by a same-run calibration; review budget is event-driven (#16879) fee6f7a
Old pull.reviewed events that carry a state but no reviewId now find their review and read like new ones, for example asked for changes on <title>: <first sentence> or approved <title>.
A new test builds that case. It submits a review, strips reviewId from its event, and expects the feed to say the verdict and first sentence. The feed tests I ran pass (feed-reviewed, feed-fold, feed-review-rank) and tsc is clean. The dead-code suite also ran: 2 skipped, 0 failed. The gate passes. I did not run the full suite, which the forge's check runs on push.
- Match rule:
oldReviewinsrc/feed/items.tslooks among the pull's reviews for the same author as the event's actor and the same state, then takes the one nearest in time to the event. - Fallback: when nothing matches, or the state is missing or unknown, the post keeps
reviewed a pull request: <title>. - Reused, no new dependency:
listReviewsandisReviewStatefromsrc/core/reviews.ts, and the existingreviewedPostfrom #5823. - Left out: I did not backfill
reviewIdinto stored events. The match is done at read time, so nothing is migrated. - No door: this only changes the words of a feed post. No page, action, route or tool changed, so there is no
src/tui/ordocs/features/change.
Try it: open /feed on the preview and read an old reviewed-pull post for its verdict.
🤖 Generated with Claude Code
Old pull.reviewed events that have a state but no reviewId now find their review by same pull, same author, same state and nearest in time. Both of juniper's points are addressed. tsc is clean and test/feed-reviewed.test.ts passes (6 tests). The gate is clean and the push went through. I did not run the full suite; the forge's check does that.
- Batched lookup: the feed build now reads the reviews of every pull named by an old reviewed event in one
listReviewsForcall, andoldReviewreads from that result. A feed with many old events no longer makes one query per event. - Nearest in time: two same-author, same-state reviews on one pull, with the event nearest the second. The post reads "Second take.", not "First take.", so it fails if the pick isn't nearest-in-time.
- No match: a review by another author, and a review in another state, each leave the post as
reviewed a pull request: <title>. - Approved: an old event with state
approvedreadsapproved <title>.
The preview's /feed shows no reviewed-pull posts, so the tests are the only proof the change works.
Test setup: the feed shows only the newest event for a pull. So the nearest-in-time test moves the pull's opened event and both reviews to recent, distinct times, and strips reviewId from both review events.
No door change is needed, since only the words of a feed post change.
Try it: open /feed on the preview and read an old reviewed-pull post for its verdict.
🤖 Generated with Claude Code
Old
pull.reviewedevents that carry astatebut noreviewIdnow find their review and read like new ones, for exampleasked for changes on <title>: <first sentence>orapproved <title>.A new test builds that case. It submits a review, strips
reviewIdfrom its event, and expects the feed to say the verdict and first sentence. The feed tests I ran pass (feed-reviewed,feed-fold,feed-review-rank) andtscis clean. The dead-code suite also ran: 2 skipped, 0 failed. The gate passes. I did not run the full suite, which the forge's check runs on push.oldReviewinsrc/feed/items.tslooks among the pull's reviews for the same author as the event's actor and the same state, then takes the one nearest in time to the event.reviewed a pull request: <title>.listReviewsandisReviewStatefromsrc/core/reviews.ts, and the existingreviewedPostfrom #5823.reviewIdinto stored events. The match is done at read time, so nothing is migrated.src/tui/ordocs/features/change.Try it: open
/feedon the preview and read an old reviewed-pull post for its verdict.🤖 Generated with Claude Code
Closes #5853