Skip to content

Verify cross-check blockers in callees and block panics in safe APIs - #59

Merged
masih merged 3 commits into
mainfrom
masih/1795431982-verify-cross-check-blockers
Nov 23, 2026
Merged

masih merged 3 commits into
mainfrom
masih/1795431982-verify-cross-check-blockers

Conversation

@masih

@masih masih commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

The shadow comparison in PLT-1654 traced two Next Gen review errors to the reconcile and severity rules rather than to missing context. On sei-protocol/sei-chain#4882 the review kept a cross-check's iterator-aliasing claims as blockers after checking them only against the diff hunk; it never opened SplitMVCCKey, which copies its input, so all four blockers were false. On sei-protocol/sei-chain#4902 the cross-check found that a second Close() panics in a type whose docs say every method is safe to call concurrently, and the review kept it as a suggestion because it did not read a godoc safety promise as the "stated contract" the blocking rule already names.

So when the review has the source tree, a cross-check's blocker now has to be confirmed in the definitions its argument depends on before it is kept, and a claim the review cannot confirm there drops to at most a suggestion that says what it could not check. The checklist also spells out that a panic or data race through an exported API documented as safe for that use breaks a stated contract. Both are prompt wording only; the scout read, the full-read guard for large diffs and the cross-check labels are unchanged.

The cost of the first rule is that a real blocker in code the sandbox cannot open, such as a dependency with no module cache, gets demoted to a suggestion; the second can add blockers where a doc's promise of safety is aspirational. A config-reachability severity rule tried alongside these was left out because it also demoted the real MockApp stall on sei-protocol/sei-chain#4919.

@devin-ai-integration
devin-ai-integration Bot marked this pull request as ready for review November 23, 2026 11:17

@seidroid seidroid 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.

The change adds two prompt rules. Before keeping a cross-check's blocker, the reviewer has to confirm it against the callee definitions in tree/, and a panic or data race through an exported API documented as safe now counts as breaking a stated contract. Both are wording changes, the new {{tree}} placeholder always gets a value, and tsc and npm test pass, so nothing blocks; the one scout reading (found nothing) agrees and adds nothing to keep or drop.

1 nit, not posted on the code

Nits

  • src/prompt.ts:104 — reconcileStep now tells the reviewer to open tree/ even when req.hasTree is false, where it would demote every cross-check blocker. That case can't happen today because job.ts always passes hasTree: true, but the Request type still allows it.

Seidroid Review · the review wrote approve · run

@seidroid seidroid 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.

Nothing material has changed since my last review: the diff still adds the same two prompt rules (confirm a cross-check's blocker in the callee definitions in tree/, and count a panic or data race in an API documented as safe as breaking a stated contract) plus the {{tree}} value, and nothing blocks. My earlier nit still applies and is repeated below; the one scout reading (found nothing) agrees and adds nothing. pr.diff is 62 lines, not the 19 the prompt gave, and my earlier read count of 19 was wrong.

1 nit, not posted on the code

Nits

  • src/prompt.ts:104 — reconcileStep tells the reviewer to open tree/ even when req.hasTree is false, where it would demote every cross-check blocker. That can't happen today because job.ts always passes hasTree: true, but the Request type still allows it.

Seidroid Review · the review wrote approve · run

@devin-ai-integration

Copy link
Copy Markdown

On the reconcileStep nit: fixed. The callee paragraph now lives in prompts/reconcile-tree.md and is added only when hasTree is true, the same way readStep adds the shell, so a review without a tree keeps the old reconcile wording. The prompt test now also checks that the paragraph is missing when hasTree: false.

@masih

masih commented Nov 23, 2026

Copy link
Copy Markdown
Contributor Author

@seidroid review

@seidroid seidroid 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.

The callee-confirmation rule now lives in prompts/reconcile-tree.md and is added only when req.hasTree is set, with a test for the no-tree case, which fixes my earlier nit about it pointing to tree/ when there is none. Nothing blocks: tsc is clean and npm test passes, and the one scout reading (found nothing) agrees and adds nothing.

Seidroid Review · the review wrote approve · run

@masih
masih merged commit ffc0939 into main Nov 23, 2026
12 checks passed
@masih
masih deleted the masih/1795431982-verify-cross-check-blockers branch November 23, 2026 11:48
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