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 50cd58771c4 Rename review helper scripts and update references (#40352)
50cd58771c4 is described below

commit 50cd58771c484f5f6b281a349aff9c3f7c27ffbb
Author: Liang Zhang <[email protected]>
AuthorDate: Fri Oct 23 01:33:37 2026 +0800

    Rename review helper scripts and update references (#40352)
---
 .codex/harness/agents/cases.toml                           |  4 ++--
 .codex/skills/review-pr/SKILL.md                           |  6 +++---
 .codex/skills/review-pr/references/review-coordination.md  |  4 ++--
 .codex/skills/review-pr/scripts/build_review_inventory.py  |  2 +-
 .../scripts/{review_ledger.py => manage_review_ledger.py}  |  2 +-
 .../scripts/{review_common.py => resolve_review_scope.py}  |  0
 .../skills/review-pr/tests/test_build_review_inventory.py  |  2 +-
 ...{test_review_ledger.py => test_manage_review_ledger.py} | 14 +++++++-------
 ...{test_review_common.py => test_resolve_review_scope.py} |  6 +++---
 9 files changed, 20 insertions(+), 20 deletions(-)

diff --git a/.codex/harness/agents/cases.toml b/.codex/harness/agents/cases.toml
index c7f9757d5ec..b6c7277ae9e 100644
--- a/.codex/harness/agents/cases.toml
+++ b/.codex/harness/agents/cases.toml
@@ -2684,7 +2684,7 @@ required_reasons = []
 required_summary_terms = ["### Result", "Review Result: Mergeable", "### 
Evidence", "### Coverage"]
 forbidden_summary_terms = ["Review Result: Review Incomplete", "Review Result: 
Not Mergeable"]
 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,  [...]
+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]]
@@ -4035,7 +4035,7 @@ required_summary_terms = ["A=cleanup", "B=cleanup", 
"C=cleanup", "D=preserve", "
 forbidden_summary_terms = ["A=retain", "B=retain", "C=retain", "D=delete", 
"E=claim-cleanup-success", "assessment=change-verdict", 
"F=skip-cleanup-or-hide-error", "G=cleanup", "H=cleanup"]
 critical = true
 policy_binding_profile = "review-pr"
-policy_assertions = [{source = "review-pr", statements = ["Use the existing 
private system temporary directory and record the exact ledger path returned by 
initialization for this review."]}, {source = "review-pr-coordination", 
statements = ["Keep ledger data private and let the coordinator retain the 
owned ledgers, original results, session records and input materials throughout 
confirmation.", "For a read-only review, form a self-contained report and clean 
the owned materials after res [...]
+policy_assertions = [{source = "review-pr", statements = ["Use the existing 
private system temporary directory and record the exact ledger path returned by 
initialization for this review."]}, {source = "review-pr-coordination", 
statements = ["Keep ledger data private and let the coordinator retain the 
owned ledgers, original results, session records and input materials throughout 
confirmation.", "For a read-only review, form a self-contained report and clean 
the owned materials after res [...]
 
 [[cases]]
 id = "implementation_preflight_preserves_requirement_provenance"
diff --git a/.codex/skills/review-pr/SKILL.md b/.codex/skills/review-pr/SKILL.md
index 62d68d03c90..f3826ee316a 100644
--- a/.codex/skills/review-pr/SKILL.md
+++ b/.codex/skills/review-pr/SKILL.md
@@ -164,7 +164,7 @@ publish non-blocking observations unless they materially 
help the user.
 
 `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, record each incomplete gap in the 
ledger with the missing fact, unavailable-evidence proof, affected full path, 
strongest alternatives checked, outcome impact, scope proof, and affected 
files, then run `scripts/review_ledger.py validate-incomplete --ledger 
<ledger>` before selecting the result.
+After authoritative scope is established, record each incomplete gap in the 
ledger with the missing fact, unavailable-evidence proof, affected full path, 
strongest alternatives checked, outcome impact, scope proof, and affected 
files, then run `scripts/manage_review_ledger.py validate-incomplete --ledger 
<ledger>` before selecting the result.
 If authoritative scope cannot be established, state the exact unavailable 
scope fact and attempted routes in `### Required Evidence`; do not fabricate 
ledger scope.
 
 ## Behavior Clusters and Risk Triage
@@ -213,7 +213,7 @@ Apply the Completion Gate to every Formal Review and to a 
discussion reply that
 - Complete the Mandatory Style Verification Gate against the latest effective 
candidate for every public PR or PR-backed local candidate.
 - Leave no unresolved gap that could change the blocker set and require a 
latest-candidate convergence pass with zero new independent candidates.
 - Use `scripts/build_review_inventory.py --format json` when local refs are 
available; its Markdown is only a bounded summary.
-- Use `scripts/review_ledger.py` for each independent assessment; it accounts 
for review state but does not judge correctness.
+- Use `scripts/manage_review_ledger.py` for each independent assessment; it 
accounts for review state but does not judge correctness.
 - Initialize a new ledger for each round that requires one, from the full 
current inventory with pending file statuses and no inherited review passes.
 - Use the existing private system temporary directory and record the exact 
ledger path returned by initialization for this review.
 - Initialize with `--review-basis <JSON>` containing the selected focus and 
readable sources identified by role and origin, so the ledger binds their 
actual content versions to the effective candidate, original baseline and 
authoritative files.
@@ -226,7 +226,7 @@ Apply the Completion Gate to every Formal Review and to a 
discussion reply that
 - Validate the current basis and coverage before selecting a result; a passing 
ledger proves mechanical coverage and evidence freshness, while the reviewer 
must still establish semantic proof under the existing gates.
 - For a standalone local candidate with index or working-tree changes, provide 
the same exact task-path file to both scripts with `--candidate-files <path>`. 
The scripts resolve those paths from the computed merge-base through the 
working tree, include matching untracked files, and fail when a listed path is 
unchanged.
 - Mutate one ledger sequentially; do not run ledger commands concurrently.
-- Batch related updates to one reviewer ledger with `scripts/review_ledger.py 
batch --ledger <ledger> --operations <JSON>`, where the JSON is a nonempty 
ordered array of argument arrays for `mark-file`, `add-finding` and `add-pass`, 
using their existing flags and input files without `--ledger`.
+- Batch related updates to one reviewer ledger with 
`scripts/manage_review_ledger.py batch --ledger <ledger> --operations <JSON>`, 
where the JSON is a nonempty ordered array of argument arrays for `mark-file`, 
`add-finding` and `add-pass`, using their existing flags and input files 
without `--ledger`.
 - Each batch applies the existing operations in order and writes once only 
after all per-operation checks and both freshness checks pass.
 - Batch freshness checks verify the current basis and captured source anchors 
before applying operations and again before writing; any failed operation or 
freshness check leaves the original ledger unchanged.
 - Batching does not replace final ledger or session validation.
diff --git a/.codex/skills/review-pr/references/review-coordination.md 
b/.codex/skills/review-pr/references/review-coordination.md
index 5a55472eccf..6755d2fb1e6 100644
--- a/.codex/skills/review-pr/references/review-coordination.md
+++ b/.codex/skills/review-pr/references/review-coordination.md
@@ -101,7 +101,7 @@ Do not treat an earlier basis's frozen evidence as current 
or require it to pass
 The final cumulative adjudication must satisfy the completion conditions, 
contain no unresolved candidate and match the proposed session result and 
feedback mode.
 Individual reports may differ from that final adjudication only with recorded 
evidence-based dispositions that explain each difference.
 
-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.
+Before publishing a completed Formal Review result or an overall readiness 
conclusion in a discussion reply, run `scripts/manage_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.
@@ -113,7 +113,7 @@ Keep ledger data private and let the coordinator retain the 
owned ledgers, origi
 Independent reviewers return their recorded materials without cleaning them.
 For a read-only review, form a self-contained report and clean the owned 
materials after result review and session validation finish.
 For an enclosing coding task, retain them across `Not Mergeable` findings and 
candidate changes until that task completes or its failure or cancellation is 
handled.
-At cleanup, automatically run `scripts/review_ledger.py cleanup --ledger 
<recorded-ledger>` for each exact recorded review instance, including 
Mergeable, Not Mergeable, Review Incomplete and unconverged sessions.
+At cleanup, automatically run `scripts/manage_review_ledger.py cleanup 
--ledger <recorded-ledger>` for each exact recorded review instance, including 
Mergeable, Not Mergeable, Review Incomplete and unconverged sessions.
 Before cleaning a ledger, remove only temporary input materials created and 
explicitly recorded for this review, preserving declared sources owned by the 
repository, the user or another review.
 Apply the same exact-path ownership rule to the recorded original-result and 
session files.
 On a handled failure or cancellation, attempt the same cleanup for resources 
whose ownership is established, preserve the original failure and report any 
cleanup failure or remaining resources.
diff --git a/.codex/skills/review-pr/scripts/build_review_inventory.py 
b/.codex/skills/review-pr/scripts/build_review_inventory.py
index b9b3582ca71..1906637853c 100755
--- a/.codex/skills/review-pr/scripts/build_review_inventory.py
+++ b/.codex/skills/review-pr/scripts/build_review_inventory.py
@@ -26,7 +26,7 @@ import sys
 from collections import defaultdict
 from typing import Iterable
 
-from review_common import (
+from resolve_review_scope import (
     ChangedFile, categorize, compare_github_files, final_paths, get_repo_root, 
parse_name_status, resolve_candidate_changes, run_git,
 )
 
diff --git a/.codex/skills/review-pr/scripts/review_ledger.py 
b/.codex/skills/review-pr/scripts/manage_review_ledger.py
similarity index 99%
rename from .codex/skills/review-pr/scripts/review_ledger.py
rename to .codex/skills/review-pr/scripts/manage_review_ledger.py
index 66e73bb6595..074149a761b 100755
--- a/.codex/skills/review-pr/scripts/review_ledger.py
+++ b/.codex/skills/review-pr/scripts/manage_review_ledger.py
@@ -35,7 +35,7 @@ from collections import Counter
 from pathlib import Path, PurePosixPath
 from typing import Any, Iterable
 
-from review_common import (
+from resolve_review_scope import (
     categorize, compare_github_files, get_repo_root, parse_name_status, 
resolve_candidate_changes, run_git,
 )
 
diff --git a/.codex/skills/review-pr/scripts/review_common.py 
b/.codex/skills/review-pr/scripts/resolve_review_scope.py
similarity index 100%
rename from .codex/skills/review-pr/scripts/review_common.py
rename to .codex/skills/review-pr/scripts/resolve_review_scope.py
diff --git a/.codex/skills/review-pr/tests/test_build_review_inventory.py 
b/.codex/skills/review-pr/tests/test_build_review_inventory.py
index 0e8ebf44565..1cedd393aa6 100644
--- a/.codex/skills/review-pr/tests/test_build_review_inventory.py
+++ b/.codex/skills/review-pr/tests/test_build_review_inventory.py
@@ -27,7 +27,7 @@ if str(SCRIPTS_DIR) not in sys.path:
     sys.path.insert(0, str(SCRIPTS_DIR))
 
 import build_review_inventory as inventory
-import review_common as common
+import resolve_review_scope as common
 
 
 class BuildReviewInventoryTest(unittest.TestCase):
diff --git a/.codex/skills/review-pr/tests/test_review_ledger.py 
b/.codex/skills/review-pr/tests/test_manage_review_ledger.py
similarity index 99%
rename from .codex/skills/review-pr/tests/test_review_ledger.py
rename to .codex/skills/review-pr/tests/test_manage_review_ledger.py
index 4a39c91d3a0..3f6033524f9 100644
--- a/.codex/skills/review-pr/tests/test_review_ledger.py
+++ b/.codex/skills/review-pr/tests/test_manage_review_ledger.py
@@ -33,10 +33,10 @@ SCRIPTS_DIR = Path(__file__).resolve().parents[1] / 
"scripts"
 if str(SCRIPTS_DIR) not in sys.path:
     sys.path.insert(0, str(SCRIPTS_DIR))
 
-import review_ledger as ledger
+import manage_review_ledger as ledger
 
 
-class ReviewLedgerTest(unittest.TestCase):
+class ManageReviewLedgerTest(unittest.TestCase):
 
     def setUp(self):
         temporary = tempfile.TemporaryDirectory()
@@ -467,7 +467,7 @@ class ReviewLedgerTest(unittest.TestCase):
         self.create_valid_ledger()
         content = self.ledger_file.read_bytes()
         output, error = StringIO(), StringIO()
-        arguments = ["review_ledger.py", "cleanup", "--ledger", 
str(self.ledger_file)]
+        arguments = ["manage_review_ledger.py", "cleanup", "--ledger", 
str(self.ledger_file)]
         with patch.object(sys, "argv", arguments), patch.object(Path, 
"unlink", side_effect=PermissionError("cleanup denied")), \
                 redirect_stdout(output), redirect_stderr(error):
             self.assertEqual(1, ledger.main())
@@ -541,7 +541,7 @@ class ReviewLedgerTest(unittest.TestCase):
                 actual[section][key] = value
                 self.ledger_file.write_text(json.dumps(actual), 
encoding="utf-8")
                 output = StringIO()
-                with patch.object(sys, "argv", ["review_ledger.py", 
"validate", "--ledger", str(self.ledger_file)]), redirect_stderr(output):
+                with patch.object(sys, "argv", ["manage_review_ledger.py", 
"validate", "--ledger", str(self.ledger_file)]), redirect_stderr(output):
                     self.assertEqual(1, ledger.main())
                 self.assertEqual(f"error: Malformed review coverage ledger 
{diagnostic}\n", output.getvalue())
 
@@ -1265,7 +1265,7 @@ class ReviewLedgerTest(unittest.TestCase):
         original_files = {path: path.read_bytes() for path in 
self.private_root.rglob("*.json")}
         for command in (["validate-session", "--session", str(session_file)],
                         ["validate", "--ledger", 
json.loads(Path(actual["reviews"][0]["path"]).read_text(encoding="utf-8"))["ledger"]]):
-            with self.subTest(command=command[0]), patch.object(sys, "argv", 
["review_ledger.py", *command]), redirect_stdout(StringIO()):
+            with self.subTest(command=command[0]), patch.object(sys, "argv", 
["manage_review_ledger.py", *command]), redirect_stdout(StringIO()):
                 self.assertEqual(0, ledger.main())
         self.assertEqual(original_files, {path: path.read_bytes() for path in 
original_files})
         original = json.loads(json.dumps(actual))
@@ -1289,7 +1289,7 @@ class ReviewLedgerTest(unittest.TestCase):
                 else:
                     actual[invalid] = []
                 session_file.write_text(json.dumps(actual), encoding="utf-8")
-                with patch.object(sys, "argv", ["review_ledger.py", 
"validate-session", "--session", str(session_file)]), \
+                with patch.object(sys, "argv", ["manage_review_ledger.py", 
"validate-session", "--session", str(session_file)]), \
                         redirect_stdout(StringIO()), 
redirect_stderr(StringIO()):
                     self.assertEqual(1, ledger.main())
 
@@ -1341,7 +1341,7 @@ class ReviewLedgerTest(unittest.TestCase):
         session_file = self.private_root / "rejected-session.json"
         session_file.write_text(json.dumps(session), encoding="utf-8")
         output = StringIO()
-        with patch.object(sys, "argv", ["review_ledger.py", 
"validate-session", "--session", str(session_file)]), \
+        with patch.object(sys, "argv", ["manage_review_ledger.py", 
"validate-session", "--session", str(session_file)]), \
                 redirect_stdout(output), redirect_stderr(StringIO()):
             self.assertEqual(1, ledger.main())
         self.assertNotIn("OK:", output.getvalue())
diff --git a/.codex/skills/review-pr/tests/test_review_common.py 
b/.codex/skills/review-pr/tests/test_resolve_review_scope.py
similarity index 95%
rename from .codex/skills/review-pr/tests/test_review_common.py
rename to .codex/skills/review-pr/tests/test_resolve_review_scope.py
index 0493a0f772a..84c9f92569d 100644
--- a/.codex/skills/review-pr/tests/test_review_common.py
+++ b/.codex/skills/review-pr/tests/test_resolve_review_scope.py
@@ -26,11 +26,11 @@ SCRIPTS_DIR = Path(__file__).resolve().parents[1] / 
"scripts"
 if str(SCRIPTS_DIR) not in sys.path:
     sys.path.insert(0, str(SCRIPTS_DIR))
 
-import review_common as common
-from review_common import ChangedFile, categorize, compare_github_files, 
parse_name_status
+import resolve_review_scope as common
+from resolve_review_scope import ChangedFile, categorize, 
compare_github_files, parse_name_status
 
 
-class ReviewCommonTest(unittest.TestCase):
+class ResolveReviewScopeTest(unittest.TestCase):
 
     def test_parse_name_status(self):
         actual = 
parse_name_status("M\tmodule/Foo.java\nR100\told.md\tnew.md\nC75\tsource.yml\tcopy.yml\n")

Reply via email to