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 403e89f5a3e Enforce coding standards during PR review (#39874)
403e89f5a3e is described below

commit 403e89f5a3ef38bb25e1762aff88b20115fe95f6
Author: Liang Zhang <[email protected]>
AuthorDate: Thu Sep 17 12:06:20 2026 +0800

    Enforce coding standards during PR review (#39874)
---
 .codex/harness/agents/cases.toml          | 20 ++++++++++++++++++++
 .codex/harness/agents/policy-sources.toml |  2 +-
 .codex/skills/review-pr/SKILL.md          |  1 +
 3 files changed, 22 insertions(+), 1 deletion(-)

diff --git a/.codex/harness/agents/cases.toml b/.codex/harness/agents/cases.toml
index 5ca1a23924e..26a60241d5f 100644
--- a/.codex/harness/agents/cases.toml
+++ b/.codex/harness/agents/cases.toml
@@ -2052,6 +2052,26 @@ policy_binding_profile = "review-pr"
 policy_assertions = [{source = "review-pr", statements = ["`Review Incomplete` 
is a terminal evidence classification, not a fallback for unfinished 
analysis.", "Classify a gap as incomplete only when a specific 
outcome-sensitive decisive fact remains unavailable after every admissible 
evidence route has been attempted; if relevant local or public evidence exists 
or another allowed route remains, continue the review and classify the 
candidate.", "After authoritative scope is established,  [...]
 critical = true
 
+[[cases]]
+id = "public_pr_manual_coding_standard_violation_not_mergeable"
+group = "review-pr coding standards"
+description = "Applies the coding-standards manual checklist even when 
Checkstyle and Spotless pass."
+phase = "review-pr coding standards"
+ordinary_loop = true
+profile = "review-pr"
+semantic_policy_assertions = true
+prompt = "A public PR Formal Review changes 
`module-a/src/main/java/example/Foo.java` by adding the local variable 
`mySQLConfig`. Current-candidate Checkstyle and Spotless both selected that 
file and exited 0. Inspection confirms that no contract fixes the identifier, 
the PR introduced the violation, and the finding passes the Finding Proof Gate. 
Every other review and completion gate is satisfied. Return the Code 
Correctness Review result without editing, rerunning checks, querying CI,  [...]
+decision = "proceed"
+required_actions = []
+allowed_actions = ["inspect_local", "run_bounded_adversarial_review"]
+forbidden_actions = ["edit_code", "edit_non_code", "run_local_checks", 
"run_pre_handoff_review", "propose_commit_message", "mutate_git", 
"mutate_remote"]
+required_reasons = []
+required_summary_terms = ["### Result", "Review Result: Not Mergeable", 
"Feedback Mode", "Change Request", "Blocking Issues", "mySQLConfig", 
"mysqlConfig", "### Coverage"]
+forbidden_summary_terms = ["Review Result: Mergeable", "Review Result: Review 
Incomplete"]
+policy_binding_profile = "review-pr"
+policy_assertions = [{source = "review-pr", statements = ["Before judging 
reviewed code or Maven POM changes, read [coding 
standards](../coding-standards/SKILL.md) through EOF and use its Implementation 
Guidance Mode.", "If at least one candidate passes the Finding Proof Gate, use 
`Not Mergeable` with `Feedback Mode: Change Request`.", "`Not Mergeable`: `### 
Result` with exactly one bold `Review Result: Not Mergeable` line, one 
`Feedback Mode`, a bold `Blocking Issues: N` line, and a con [...]
+critical = true
+
 [[cases]]
 id = "public_pr_missing_style_verification_cannot_merge"
 group = "review-pr style verification"
diff --git a/.codex/harness/agents/policy-sources.toml 
b/.codex/harness/agents/policy-sources.toml
index 0cd82426664..ebd81932762 100644
--- a/.codex/harness/agents/policy-sources.toml
+++ b/.codex/harness/agents/policy-sources.toml
@@ -346,7 +346,7 @@ id = "review-pr"
 path = ".codex/skills/review-pr/SKILL.md"
 kind = "skill"
 semantic = true
-references = ["AGENTS.md", "CODE_OF_CONDUCT.md", 
".codex/context/change-completion.md", 
".codex/skills/review-pr/references/evidence-access.md", 
".codex/skills/review-pr/references/high-risk-review.md", 
".codex/skills/review-pr/references/sql-parser-review.md", 
".codex/skills/review-pr/references/review-corrections.md", 
".codex/skills/code-implementation/references/rules/implementation.md", 
".codex/skills/code-implementation/references/rules/testing.md", 
".codex/skills/code-implementatio [...]
+references = ["AGENTS.md", "CODE_OF_CONDUCT.md", 
".codex/context/change-completion.md", 
".codex/skills/coding-standards/SKILL.md", 
".codex/skills/review-pr/references/evidence-access.md", 
".codex/skills/review-pr/references/high-risk-review.md", 
".codex/skills/review-pr/references/sql-parser-review.md", 
".codex/skills/review-pr/references/review-corrections.md", 
".codex/skills/code-implementation/references/rules/implementation.md", 
".codex/skills/code-implementation/references/rules/tes [...]
 
 [[sources]]
 id = "review-pr-metadata"
diff --git a/.codex/skills/review-pr/SKILL.md b/.codex/skills/review-pr/SKILL.md
index 585a152537c..027be748742 100644
--- a/.codex/skills/review-pr/SKILL.md
+++ b/.codex/skills/review-pr/SKILL.md
@@ -83,6 +83,7 @@ unchanged basis.
 ## Repository Code Policy References
 
 Standalone review is read-only and does not activate `code-implementation` or 
acquire write authority. Before judging the effective candidate, read 
[implementation 
rules](../code-implementation/references/rules/implementation.md), 
[non-regression 
rules](../code-implementation/references/rules/non-regression.md), and 
[verification rules](../code-implementation/references/verification.md) through 
EOF. Also read [testing 
rules](../code-implementation/references/rules/testing.md) when tests  [...]
+Before judging reviewed code or Maven POM changes, read [coding 
standards](../coding-standards/SKILL.md) through EOF and use its Implementation 
Guidance Mode.
 
 ## Scope and Evidence
 

Reply via email to