This is an automated email from the ASF dual-hosted git repository.
terrymanu pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/shardingsphere.git
The following commit(s) were added to refs/heads/master by this push:
new e37ce2d64e9 Refine review-pr qualified negative reporting (#40319)
e37ce2d64e9 is described below
commit e37ce2d64e99f151cc33f9702725496a82b6b65b
Author: Liang Zhang <[email protected]>
AuthorDate: Wed Oct 21 21:03:02 2026 +0800
Refine review-pr qualified negative reporting (#40319)
---
.codex/harness/agents/cases.toml | 46 ++++++++++++++++++++--
.codex/skills/review-pr/SKILL.md | 31 +++++++++------
.../review-pr/references/review-coordination.md | 6 ++-
3 files changed, 67 insertions(+), 16 deletions(-)
diff --git a/.codex/harness/agents/cases.toml b/.codex/harness/agents/cases.toml
index 10178e95912..0ba06bce19f 100644
--- a/.codex/harness/agents/cases.toml
+++ b/.codex/harness/agents/cases.toml
@@ -2656,7 +2656,7 @@ phase = "review-pr mandatory style verification"
ordinary_loop = true
profile = "review-pr"
semantic_policy_assertions = true
-prompt = "Checkstyle and Spotless passed for public PR head `aaa111`. The PR
then added a commit, and the latest authoritative head is now `bbb222`; the
accurate new candidate is available and the remaining review found no issue.
Complete the Code Correctness Review without querying CI, editing, or changing
Git or remote state."
+prompt = "Checkstyle and Spotless passed for public PR head `aaa111`. The PR
then added a commit, and the latest authoritative head is now `bbb222`; the
accurate new candidate is available and the remaining review found no issue.
The new commit changed Java files governed by both tools, invalidating their
earlier passing results for those inputs; neither check has run on the changed
inputs. The current decision point is running the invalidated style checks.
Subsequent review completion a [...]
decision = "proceed"
required_actions = ["inspect_local", "run_local_checks"]
allowed_actions = ["inspect_local", "run_local_checks", "wrap_high_output"]
@@ -4501,7 +4501,7 @@ required_summary_terms =
["A=obtain-one-fresh-assessment", "A_verdict=no-formal-
forbidden_summary_terms = ["A=stop-not-converged",
"A_verdict=review-incomplete", "B=review-incomplete", "C=mergeable",
"D=claim-completed-dual-review", "E=obtain-seventh-assessment",
"E_verdict=review-incomplete", "F=stop-not-converged",
"G=count-coordinator-and-checks"]
critical = true
policy_binding_profile = "review-pr"
-policy_assertions = [{source = "review-pr-coordination", statements = ["Permit
at most six complete independent assessments in at most five stages for one
unchanged review basis: two in the first stage and one in each subsequent
stage.", "Coordinator result reviews, evidence checks and verification reports
do not count toward this limit.", "If confirmation remains unfinished, verify
available evidence and obtain only one fresh independent complete assessment at
a time while fewer than si [...]
+policy_assertions = [{source = "review-pr-coordination", statements = ["Permit
at most six complete independent assessments in at most five stages for one
unchanged review basis: two in the first stage and one in each subsequent
stage.", "Coordinator result reviews, evidence checks and verification reports
do not count toward this limit.", "If confirmation remains unfinished, verify
available evidence and obtain only one fresh independent complete assessment at
a time while fewer than si [...]
[[cases]]
id = "review_confirmation_requires_fresh_adjacent_agreement"
@@ -4521,7 +4521,7 @@ required_summary_terms = ["A=complete", "B=complete",
"C=continue", "D=complete"
forbidden_summary_terms = ["A=continue", "B=require-identical-reports",
"C=complete-on-stable-adjudication", "D=require-another-report",
"E=require-stable-classification", "F=continue-on-metadata-change",
"G=publish-completed-result"]
critical = true
policy_binding_profile = "review-pr"
-policy_assertions = [{source = "review-pr-coordination", statements = ["Permit
at most six complete independent assessments in at most five stages for one
unchanged review basis: two in the first stage and one in each subsequent
stage.", "Confirm the overall assessment as soon as complete current-basis
coverage and required verification are established, every known candidate has
an evidence-based disposition, the supporting evidence and counter-evidence are
sufficient, and no unresolved [...]
+policy_assertions = [{source = "review-pr-coordination", statements = ["Permit
at most six complete independent assessments in at most five stages for one
unchanged review basis: two in the first stage and one in each subsequent
stage.", "Confirm the overall assessment as soon as complete current-basis
coverage and required verification are established, every known candidate has
an evidence-based disposition, the supporting evidence and counter-evidence are
sufficient, and no unresolved [...]
[[cases]]
id = "review_confirmation_restarts_after_basis_change"
@@ -4543,6 +4543,46 @@ critical = true
policy_binding_profile = "review-pr"
policy_assertions = [{source = "review-pr-coordination", statements = ["A
changed effective candidate, requirement, rule version or outcome-sensitive
external fact invalidates the affected prior assessments; never combine results
from different bases to pass this gate.", "Start fresh confirmation on the
changed basis while retaining the original task baseline, attributed scope,
historical candidates and original assessments.", "Obtain a new initial pair on
the changed basis; earlier basi [...]
+[[cases]]
+id = "review_proven_blocker_without_session_confirmation"
+group = "review-pr independent review coordination"
+description = "Publishes a qualified negative review from immutable
current-candidate proof when bookkeeping cannot finish."
+phase = "read-only qualified negative publication"
+ordinary_loop = false
+profile = "review-pr"
+semantic_policy_assertions = true
+prompt = "Produce the final copy-ready English Formal Review report using only
these synthetic facts; do not inspect files, run commands or edit anything.
Candidate C1 has an authoritative two-file inventory, Foo.java and Bar.java,
and the accepted contract requires Foo to return one result for a supported
nonempty input. Immutable current-candidate source and an execution record show
entry -> Foo computation -> consumer returning zero instead. The coordinator
has verified candidate iden [...]
+decision = "proceed"
+required_actions = []
+allowed_actions = []
+forbidden_actions = ["inspect_local", "edit_code", "edit_non_code",
"run_local_checks", "run_pre_handoff_review", "propose_commit_message",
"mutate_git", "mutate_remote"]
+required_reasons = ["read_only_request"]
+required_summary_terms = ["```markdown", "### Result", "Review Result: Not
Mergeable", "Feedback Mode: Change Request", "Review Status: Not Converged",
"Confirmed Blocking Issues: 1", "### Blocking Issues", "Evidence", "Impact",
"Required Change", "### Coverage", "Foo", "Bar"]
+forbidden_summary_terms = ["Review Result: Mergeable", "Review Result: Review
Incomplete", "Task Status: Completed"]
+critical = true
+policy_binding_profile = "review-pr"
+policy_assertions = [{source = "review-pr", statements = ["In Formal Review
Mode, when a concrete failure prevents completing the required review or the
current basis reaches its confirmation limit, automatically publish `Not
Mergeable` if at least one current-candidate finding passes the Finding Proof
Gate and substantive coordinator review.", "The coordinator must verify
candidate identity, source versions, the full failing path and strongest
counter-evidence; unresolved facts or diffe [...]
+
+[[cases]]
+id = "review_negative_result_requires_current_proof"
+group = "review-pr independent review coordination"
+description = "Separates proved negative conclusions from disagreement, stale
evidence, unresolved challenges and early stopping."
+phase = "read-only negative result boundary assessment"
+ordinary_loop = false
+profile = "review-pr"
+semantic_policy_assertions = true
+prompt = "Answer this self-contained read-only policy question using only the
supplied facts and bound rules; do not inspect files, run commands, edit
anything or produce a Formal Review report. The states below are independent.
A: three pairs have exhausted the unchanged-basis confirmation limit. One
current code blocker satisfies all five Finding Proof Gate conditions and
coordinator verification; differences concern only another finding and cannot
invalidate the blocker. Choose A=not- [...]
+decision = "proceed"
+required_actions = []
+allowed_actions = []
+forbidden_actions = ["inspect_local", "edit_code", "edit_non_code",
"run_local_checks", "run_pre_handoff_review", "propose_commit_message",
"mutate_git", "mutate_remote"]
+required_reasons = ["read_only_request"]
+required_summary_terms = ["A=not-mergeable-with-not-converged",
"B=no-formal-result", "C=no-formal-result", "D=continue-proof", "E=mergeable",
"F=needs-discussion", "G=continue-review"]
+forbidden_summary_terms = ["A=no-formal-result", "B=not-mergeable",
"C=reuse-old-blocker", "D=not-mergeable", "E=not-converged",
"F=code-change-request", "G=stop-at-first-blocker"]
+critical = true
+policy_binding_profile = "review-pr"
+policy_assertions = [{source = "review-pr", statements = ["In Formal Review
Mode, when a concrete failure prevents completing the required review or the
current basis reaches its confirmation limit, automatically publish `Not
Mergeable` if at least one current-candidate finding passes the Finding Proof
Gate and substantive coordinator review.", "The coordinator must verify
candidate identity, source versions, the full failing path and strongest
counter-evidence; unresolved facts or diffe [...]
+
[[cases]]
id = "review_confirmation_shares_read_only_and_coding_route"
group = "review-pr independent review coordination"
diff --git a/.codex/skills/review-pr/SKILL.md b/.codex/skills/review-pr/SKILL.md
index b63796d27e3..5e21e01578f 100644
--- a/.codex/skills/review-pr/SKILL.md
+++ b/.codex/skills/review-pr/SKILL.md
@@ -79,10 +79,9 @@ unchanged basis.
5. Treat every concern as a candidate until it passes the Finding Proof Gate.
6. Do not turn uncertainty, inaccessible evidence, tool failure, skipped
verification, or uninspected counter-evidence into a blocker.
-7. In Formal Review, do not select a verdict, stop at the first blocker, or
publish findings before the Completion Gate.
- Consolidate findings by independent fix boundary and return the complete
- current-head set once. Only an explicit request for status, narrow review,
or
- early high-risk blockers authorizes a partial result.
+7. In Formal Review, complete the required review and do not stop at the first
blocker.
+ Consolidate findings by independent fix boundary and return the complete
current-head set once after the Completion Gate.
+ Before that gate, publish only an explicitly requested status, narrow
review or early high-risk blocker, or the qualified negative result defined in
the Formal Decision Contract.
8. Follow `AGENTS.md` for repository authority, evidence, scope, safety, and
sensitive data, and follow the applicable canonical references below for
implementation, testing, contract, non-regression, and verification criteria.
## Repository Code Policy References
@@ -138,7 +137,7 @@ Map the gate result before applying the remaining Formal
Decision Contract.
- If Checkstyle or Spotless fails on an applicable PR-impact file, return `Not
Mergeable` with `Feedback Mode: Change Request`.
- A style-check failure result must include `Feedback Mode: Change Request`
and the blocking-issue count in `### Result`, then identify each failed check
and affected PR-impact file in `### Blocking Issues`.
- A style-check failure result must also include `### Coverage` with the
effective candidate SHA, authoritative files accounted for, failed command,
exit code, and affected PR-impact file.
-- If environment, dependency, candidate-materialization, tool, or
coverage-proof failure leaves any applicable PR-impact file unverified, return
`Review Incomplete`.
+- If environment, dependency, candidate-materialization, tool, or
coverage-proof failure leaves any applicable PR-impact file unverified, apply
the Formal Decision Contract's qualified negative rule; otherwise return
`Review Incomplete`.
- If a module-scoped command fails only on unchanged files, narrow the check
reliably or compare the base and effective candidate before attribution; do not
classify the PR from that module failure alone.
- If a check has no applicable PR-impact file, record `Not Applicable` and the
repository-configuration basis in `### Coverage`.
- Only successful current-candidate evidence for both checks, or an explicit
not-applicable determination for either check, permits the remaining Formal
Decision Contract to select `Mergeable`.
@@ -200,7 +199,7 @@ All three discovery lenses may share the same current
source material, but each
9. Run a convergence pass across the complete candidate and its affected
behavior and contracts, including the latest delta.
If it finds a new independent candidate, return to step 6; otherwise freeze
the assessment after the Completion Gate.
-If an outcome-sensitive decisive fact passes the Review Incomplete Proof Gate,
return the mode-appropriate incomplete result.
+If an outcome-sensitive decisive fact passes the Review Incomplete Proof Gate,
apply the Formal Decision Contract to the proven findings and remaining gap.
Otherwise continue the review or request a split; do not produce a complete
verdict from a partial review.
## Completion Gate and Scripts
@@ -247,16 +246,23 @@ Sources use `rule`, `requirement` or `evidence` roles;
`--anchors` takes an anch
Use `base` for original content and `candidate` for effective content; text
blocks need an anchor overlapping their changed lines, whole-object binary,
mode or rename changes omit the line bounds, and `source` anchors require the
declared source's matching origin and path.
-If the gate cannot pass because a gap satisfies the Review Incomplete Proof
Gate, return `Review Incomplete` in Formal Review and state the incomplete
evidence without a formal verdict in a discussion reply.
+If the gate cannot pass because a gap satisfies the Review Incomplete Proof
Gate, apply the Formal Decision Contract's qualified negative rule before
selecting the incomplete result.
+When no qualified negative result applies, return `Review Incomplete` in
Formal Review and state the incomplete evidence without a formal verdict in a
discussion reply.
When confirmed blockers coexist with a proven gap that could hide more
blockers, list them as confirmed partial facts but do not present them as the
complete change-request set.
## Formal Decision Contract
-Map the canonical assessment to Formal Review only after the Completion Gate
-evaluation and Independent Review Coordination:
+In Formal Review Mode, when a concrete failure prevents completing the
required review or the current basis reaches its confirmation limit,
automatically publish `Not Mergeable` if at least one current-candidate finding
passes the Finding Proof Gate and substantive coordinator review.
+The coordinator must verify candidate identity, source versions, the full
failing path and strongest counter-evidence; unresolved facts or differences
must not be capable of invalidating that finding.
+This qualified negative result also applies when local Git objects, ledgers or
session validation are unavailable but admissible immutable evidence
independently proves the finding.
+Use the existing feedback-mode rules for the proven findings, including `Needs
Discussion` for an evidenced required maintainer decision.
+A candidate, disputed, withdrawn or stale finding, a tool failure, or
non-convergence alone cannot justify this result.
+The exception permits a qualified negative report while full coverage or
confirmation remains unfinished; it does not permit `Mergeable`, an exhaustive
finding-set claim, a successful ledger or session-validation claim, or
coding-task completion.
-1. If the gate fails because a gap satisfies the Review Incomplete Proof Gate,
use `Review Incomplete`, even when some blockers are already confirmed.
-2. If the Mandatory Style Verification Gate is incomplete for any applicable
PR-impact file, use `Review Incomplete`, even when some blockers are already
confirmed.
+For a complete result, evaluate the Completion Gate and Independent Review
Coordination, then apply the following mapping:
+
+1. If the gate fails because a gap satisfies the Review Incomplete Proof Gate
and no qualified negative result applies, use `Review Incomplete`.
+2. If the Mandatory Style Verification Gate is incomplete for any applicable
PR-impact file and no qualified negative result applies, use `Review
Incomplete`.
3. If Checkstyle or Spotless fails on an applicable PR-impact file, use `Not
Mergeable` with `Feedback Mode: Change Request`.
4. If admissible evidence disproves the problem model, expected behavior,
ownership, protocol or SQL semantics, compatibility assumption, accepted
project commitment, or solution direction, or establishes that a new project
commitment still requires a maintainer decision, use `Not Mergeable` with
`Feedback Mode: Needs Discussion`.
5. If at least one candidate passes the Finding Proof Gate, use `Not Mergeable`
@@ -306,6 +312,9 @@ Use this format for both public-PR and local-candidate
reviews.
- `Not Mergeable`: `### Result` with exactly one `Review Result: Not
Mergeable` line, one `Feedback Mode`, a `Blocking Issues: N` line, and a
concise reason; `### Blocking Issues`; `### Coverage`.
- `Review Incomplete`: `### Result` with exactly one `Review Result: Review
Incomplete` line and a concise reason; `### Confirmed Issues` when any are
already proven; `### Verified Facts`; `### Required Evidence`; `### Coverage`.
+For a qualified negative result, use the `Not Mergeable` structure with
`Review Status: Not Converged` and `Confirmed Blocking Issues: N` in place of
`Blocking Issues: N`.
+State that the findings are a confirmed subset, and report the actual
completed and unreviewed coverage, unresolved differences, failed or
unavailable checks, and the reason confirmation could not finish.
+
For each blocking issue include:
- `Evidence`: current public or sanitized verification anchor.
diff --git a/.codex/skills/review-pr/references/review-coordination.md
b/.codex/skills/review-pr/references/review-coordination.md
index 9f810a28560..a1bca4edfd8 100644
--- a/.codex/skills/review-pr/references/review-coordination.md
+++ b/.codex/skills/review-pr/references/review-coordination.md
@@ -68,7 +68,8 @@ A newly proved finding or an evidence-based change in status,
classification, di
The coordinator must retain and compare prior adjudications even though fresh
reviewers must not receive them.
Do not select an arbitrary matching subset of reports or impose an unagreed
stage or time limit.
Do not extend the six-assessment limit without explicit user authorization.
-If confirmation remains unfinished after six assessments or a concrete failure
prevents continuing confirmation, report `Review Status: Not Converged`, that
reason, the confirmed facts and unresolved differences without a formal `Review
Result` line or a mergeability conclusion.
+If confirmation remains unfinished after six assessments or a concrete failure
prevents continuing confirmation, report `Review Status: Not Converged`, the
reason, confirmed facts and unresolved differences, and apply the main Skill's
qualified negative rule.
+When no current blocker satisfies that rule, omit a formal `Review Result`
line or mergeability conclusion unless the Review Incomplete Proof Gate
establishes an incomplete result.
Disagreement, exhausted review attempts or an unavailable isolation mechanism
do not satisfy the Review Incomplete Proof Gate.
When authoritative scope cannot be established, preserve the Review Incomplete
Proof Gate's missing-scope evidence route and state explicitly that complete
independent code reviews could not start.
@@ -102,7 +103,8 @@ Individual reports may differ from that final adjudication
only with recorded ev
Before publishing a completed Formal Review result or an overall readiness
conclusion in a discussion reply, run `scripts/review_ledger.py
validate-session --session <JSON>` after the coordinator's substantive result
review.
The command is read-only and validates records, references and evidence
freshness; it neither launches reviewers nor proves their isolation or semantic
correctness.
If session validation fails, inspect the exact failure and correct only an
unsupported record or missing evidence; never rewrite an original assessment or
change issue mappings merely to obtain a pass.
-Only the coordinator emits the final report under the Output Contract after
validation succeeds.
+Only the coordinator emits the final report under the Output Contract.
+Complete confirmation requires successful session validation; when it cannot
finish, follow the main Skill's qualified negative rule without claiming
validation succeeded.
## Review-Material Lifecycle