Skip to content

fix(review-items): Close only the Review items that a thread reply answers - #2525

Merged
dcramer merged 5 commits into
mainfrom
fix/review-item-reply-closes-one
Nov 2, 2026
Merged

dcramer merged 5 commits into
mainfrom
fix/review-item-reply-closes-one

Conversation

@sentry-junior

@sentry-junior sentry-junior Bot commented Nov 2, 2026 •

Copy link
Copy Markdown
Contributor

A person answers one Review item in a thread, and every other open item for them in that thread closes too.

closeReviewItemsAnsweredByReply closed every open action item that the replier could answer in the Conversation, and saved the same reply text as the answer to each. Since #2506, a plain reply in a subscribed thread runs this path too. So one typed reply cleared all open questions with the wrong answers.

Now the decision model checks the reply before anything closes (review-items/reply-match.ts). One completeDecision call (the same decision model as the passive reply router, prompt junior.review_item_reply_match) asks one answers / unrelated question for each open item that the replier can answer. Only items with answers at p >= 0.7 close. If the decision fails or takes more than 10 seconds, all items stay open and the agent still gets the reply. In Slack, the match runs after the ingress lock is released, so a slow decision does not block the thread. The addReviewItem / update tool descriptions and review-items/AGENTS.md describe this.

The matcher calls completeDecision directly. No Slack or dashboard service takes a review-item decision function.

Tests and evals. Which items a reply answers is a model choice, so it is tested in evals, not with a fake:

  • New classifiers eval suite (evals/classifiers/**, hard pass/fail, own config, global setup, and evals-classifiers.yml workflow). review-item-replies.eval.ts checks the exact set of items that a reply answers with the real decision model: picks an option, acknowledgement, follow-up question, one of two similar questions, both questions, a text answer, and an unrelated message. The workflow runs when the suite, the harness, reply-match.ts, or pi/client.ts changes.
  • The Slack integration test has no model fake. It covers the rules that need no model choice: a non-assignee or a Slack author outside the allowed domains cannot close an item, and a retry of a reply that already closed an item delivers it again (card update and the other linked thread).

Card clicks and desk submits were not affected: they close only their own item and do not use the reply path.

Remaining risk: each thread reply makes one decision-model call while the replier has open items in that thread.

via @dcramer.

--

View Session [Sentry]

A typed reply in a thread closed every open action item that the person
could answer in that Conversation, and saved the same text as the answer
to each. A reply cannot show which question it answers, so close an item
only when it is the only open one the person can answer there.

Co-Authored-By: David Cramer <[email protected]>
@vercel

vercel Bot commented Nov 2, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
junior-docs Ready Ready Preview Nov 2, 2026 4:26pm UTC

Request Review

@dcramer

dcramer commented Nov 2, 2026

Copy link
Copy Markdown
Member

Really it should be closing the item thats related right? That could be a small classifier if it needed to be? e.g. our deciison api could run over each open item, and determine if the reply closes that?

Replace the one-open-item rule with a decision model check. One decision
call judges each open item that the replier can answer, so a thread reply
closes only the items it answers and the others stay open. A failed
decision keeps every item open; the agent still gets the reply.

Co-Authored-By: David Cramer <[email protected]>
@sentry-junior sentry-junior Bot changed the title fix(review-items): Close at most one Review item per thread reply fix(review-items): Close only the Review items that a thread reply answers Nov 2, 2026

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 2dc8561. Configure here.

…lock

The decision call ran while Slack ingress held the thread lock, so a slow
call blocked later messages in the thread. Run the close after the lock
is released, and give the decision call a 10 second timeout.
…fake

Reply matching now calls completeDecision directly. The Slack and dashboard
services no longer take a review-item decision service, and the matcher
throws on failure so closeReviewItemsAnsweredByReply owns the fail-open.

A router eval (review-item-replies.eval.ts) checks the exact items that a
reply answers against the real decision model. The integration test drops
its regex fake and covers only the rules that need no model choice: who may
answer, and a retry of a reply that already closed an item.

Co-Authored-By: David Cramer <[email protected]>
@github-actions

github-actions Bot commented Nov 2, 2026 •

Copy link
Copy Markdown
Contributor

1 screenshot change — 1 changed · 0 added · 0 removed

Review screenshots in Frameshift

Conversation Share Details · Desktop
Conversation Share Details · Desktop
Changed

The reply match is a decision model classifier, not turn routing. Move its
eval to evals/classifiers with its own config, global setup, and CI
workflow, and restore the router suite to turn routing only.

Co-Authored-By: David Cramer <[email protected]>
@dcramer
dcramer merged commit c57d875 into main Nov 2, 2026
53 of 54 checks passed
@dcramer
dcramer deleted the fix/review-item-reply-closes-one branch November 2, 2026 16:47

This branch was successfully deployed

1 active deployment
Preview – junior-docs — 7c4eb7f9 Deployed Nov 2, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

risk: high PR risk score: high

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant