diff --git a/tools/pr-review-advisor/analyze.mts b/tools/pr-review-advisor/analyze.mts index ea3bed66388..13103ddbe8e 100755 --- a/tools/pr-review-advisor/analyze.mts +++ b/tools/pr-review-advisor/analyze.mts @@ -1840,7 +1840,9 @@ Do not produce final JSON or update the finding ledger in this turn. Reply with Use the PR diff already fetched by the scope/risk stage as shared conversation evidence, and call read-only repository tools when a citation needs confirmation. First classify linked issue text as binding acceptance or non-binding context using the system rubric, then map only binding clauses to code evidence. Review caller/callee contracts, state transitions, negative and error paths, behavior drift, documentation or migration gaps, and any fallback, recovery, tolerant parsing, monkeypatch, workaround, or compatibility behavior against the source-of-truth questions in the system rubric. Apply the simplification ladder only where it preserves correctness and trust boundaries. Leave detailed security and test-depth review to their dedicated turns. -Do not produce final JSON or update the finding ledger in this turn. Reply with at most 8 concise, evidence-backed stage-analysis bullets; if this domain is not applicable, include that limitation in one bullet. +When the diff adds, modifies, or removes a conditional that gates an operation, a function whose comments or tests describe an invariant, or a guard that prior code or checked-in tests treat as required — whether or not the PR summary labels it as a correctness guarantee — identify any guarantee the change makes or depends on (fail-closed check, locality invariant, ordering constraint, capacity gate, idempotency guarantee, atomicity or rollback boundary, rate or auth gate) and enumerate the specific ways it could be silently bypassed: alternate code branches (e.g. cache-hit paths that skip the check), combined input states (e.g. multiple env vars set simultaneously with documented precedence that differs from implementation), external system contract assumptions (e.g. what "unix://" actually proves about daemon locality), error path bypasses (e.g. an upstream call throws and the guard is skipped entirely), TOCTOU windows (e.g. state changes between the check and the operation it guards), and default or absent value assumptions (e.g. null vs empty vs absent behaving differently at a boundary). For each bypass path, verify against the diff whether it is closed, explicitly opted out under a maintainer decision (author_association OWNER/MEMBER/COLLABORATOR) or documented non-goal, or unaddressed; unauthorized opt-outs remain unaddressed. When the implementation makes assumptions about an external system's behavior (env var precedence, API semantics, filesystem guarantees), verify the assumption against upstream documentation using read-only tools, not just internal code consistency; if upstream documentation is unavailable or ambiguous, flag the assumption as unverified rather than treating it as confirmed. + +Do not produce final JSON or update the finding ledger in this turn. Reply with at most 8 concise, evidence-backed stage-analysis bullets; if this domain is not applicable, include that limitation in one bullet. Bypass analysis (from the paragraph above) must fit within 2–3 of those bullets — consolidate multiple bypass paths under one bullet per guarantee rather than one bullet per path, so the remaining budget covers caller/callee contracts, state transitions, behavior drift, and other correctness checks. `, }, {