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 12d344d871c Consolidate provenance and exception necessity checks
(#40213)
12d344d871c is described below
commit 12d344d871ce2c71cd13cfaa71278406a460a7c2
Author: Liang Zhang <[email protected]>
AuthorDate: Fri Oct 16 22:54:06 2026 +0800
Consolidate provenance and exception necessity checks (#40213)
---
.codex/harness/agents/cases.toml | 40 ++++++++++++++++++++++++++++++
.codex/skills/code-implementation/SKILL.md | 3 +++
.codex/skills/review-pr/SKILL.md | 4 +++
3 files changed, 47 insertions(+)
diff --git a/.codex/harness/agents/cases.toml b/.codex/harness/agents/cases.toml
index ac2a61958b3..7fda04fef51 100644
--- a/.codex/harness/agents/cases.toml
+++ b/.codex/harness/agents/cases.toml
@@ -3638,3 +3638,43 @@ forbidden_summary_terms = ["A=retain", "B=retain",
"C=retain", "D=delete", "E=cl
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.", "Keep ledger data private and remove only the
exact current-review ledger.", "Before returning a completed review result,
form a self-contained report and automatically run `scripts/review_ledger.py
cleanup --ledger <recorded-ledger>` for the recorded current-review instance,
including Mergeable, Not [...]
+
+[[cases]]
+id = "implementation_preflight_preserves_requirement_provenance"
+group = "implementation requirement provenance"
+description = "Separates original requirements, approved implementation
choices and verified reuse before an exception."
+phase = "implementation preflight"
+ordinary_loop = false
+profile = "code-write"
+semantic_policy_assertions = true
+prompt = "Answer this self-contained pre-edit policy question using only the
supplied records and bound rules; do not inspect files, run commands, edit
anything or produce a Formal Review report. A: U0, the original user message,
says \"Fix the client-loading failure and preserve the supported build
profiles.\" The maintained parent-POM contract assigns dependency-version
ownership to RootVersions. The author's subsequent plan says \"Add child
dependencyManagement at client 1.4 because R [...]
+decision = "proceed"
+required_actions = []
+allowed_actions = []
+forbidden_actions = ["edit_code", "edit_non_code", "run_local_checks",
"measure_performance", "run_pre_handoff_review", "propose_commit_message",
"mutate_git", "mutate_remote"]
+required_reasons = ["read_only_request"]
+required_summary_terms = ["A_origin=approved-design-choice", "A_reuse=viable",
"B_origin=confirmed-user-constraint", "B_exception=admissible"]
+forbidden_summary_terms = ["A_origin=original-requirement",
"A_origin=unapproved-design-choice", "A_origin=project-contract",
"A_reuse=disproved", "A_reuse=unchecked", "B_origin=original-requirement",
"B_origin=author-choice", "B_origin=assumption", "B_exception=forbidden",
"B_exception=unchecked"]
+critical = true
+policy_binding_profile = "code-write"
+policy_assertions = [{source = "code-implementation", statements = ["Before
selecting an implementation, distinguish original user requirements, maintained
project contracts, author design choices and unverified assumptions in the
existing task record, and trace every hard constraint to its original source.",
"Approval to implement a proposal preserves the approved choice but does not
establish that its version pin was an original requirement or that the pin is
necessary; retain the cons [...]
+
+[[cases]]
+id = "review_exception_necessity_and_requirement_provenance"
+group = "review-pr exception necessity"
+description = "Checks unnecessary and justified exceptions, obtainable premise
evidence, ordinary changes and actual approval provenance."
+phase = "review-pr basis and exception necessity"
+ordinary_loop = false
+profile = "review-pr"
+semantic_policy_assertions = true
+prompt = "Answer this self-contained read-only review-policy question using
only the supplied source records, candidate facts and bound rules; do not
inspect files, run commands, edit anything or produce a Formal Review report.
A, B, C and D are independent Code Correctness reviews. Authoritative candidate
scope is established for each. Current-candidate tests and applicable style
checks pass. Every other discovery, evidence, convergence and Completion Gate
is complete, with no independe [...]
+decision = "proceed"
+required_actions = []
+allowed_actions = []
+forbidden_actions = ["edit_code", "edit_non_code", "run_local_checks",
"measure_performance", "run_pre_handoff_review", "propose_commit_message",
"mutate_git", "mutate_remote"]
+required_reasons = ["read_only_request"]
+required_summary_terms = ["A=change-request", "B=continue-review",
"C=mergeable", "D=mergeable", "E_origin=approved-design-choice"]
+forbidden_summary_terms = ["A=continue-review", "A=mergeable",
"A=review-incomplete", "A=needs-discussion", "B=mergeable",
"B=review-incomplete", "B=change-request", "B=needs-discussion",
"C=continue-review", "C=review-incomplete", "C=change-request",
"C=needs-discussion", "D=continue-review", "D=review-incomplete",
"D=change-request", "D=needs-discussion", "E_origin=original-user-constraint",
"E_origin=unapproved-design-choice", "E_origin=repository-contract"]
+critical = true
+policy_binding_profile = "review-pr"
+policy_assertions = [{source = "review-pr", statements = ["Reconstruct those
requirements from original user requests and maintained contracts before
checking the author's proposed solution, distinguishing author choices and
unverified assumptions from confirmed constraints.", "Preserve later user
approvals with their actual provenance instead of treating approval of an
implementation choice as proof of an original version requirement or of its
necessity.", "When such a premise remains u [...]
diff --git a/.codex/skills/code-implementation/SKILL.md
b/.codex/skills/code-implementation/SKILL.md
index 1ff1e7f76ac..0377d5ca1fa 100644
--- a/.codex/skills/code-implementation/SKILL.md
+++ b/.codex/skills/code-implementation/SKILL.md
@@ -23,6 +23,9 @@ Specialized repository Skills compose with this Skill when
they write code. Thei
## Workflow
1. Apply the pre-write gates in `AGENTS.md` and freeze `file -> allowed change
intent -> unmet acceptance criterion`. Infer clearly authorized paths without
asking the user to repeat the request; expand only with exact additional path
and intent authorization.
+ Before selecting an implementation, distinguish original user requirements,
maintained project contracts, author design choices and unverified assumptions
in the existing task record, and trace every hard constraint to its original
source.
+ Approval to implement a proposal preserves the approved choice but does not
establish that its version pin was an original requirement or that the pin is
necessary; retain the constraints and tradeoffs the user actually confirmed
with their sources.
+ For a new local override, compatibility exception or parallel mechanism,
record the verified reason direct reuse cannot meet the accepted requirements.
2. Map every planned production and test change to one unsatisfied acceptance
criterion and identify the supported existing paths that the change can affect.
3. Classify functional and performance risk before the first relevant write.
Preserve supported behavior outside the exact requested change; when the full
non-regression reference is triggered, capture its required baseline before
editing.
4. Implement the smallest clear change under the implementation rules, and
apply the testing rules when their trigger above matches.
diff --git a/.codex/skills/review-pr/SKILL.md b/.codex/skills/review-pr/SKILL.md
index 42ac09cfb87..ca33c5853e5 100644
--- a/.codex/skills/review-pr/SKILL.md
+++ b/.codex/skills/review-pr/SKILL.md
@@ -45,6 +45,8 @@ confirmed findings consolidated by fix boundary,
needs-discussion conditions,
incomplete-evidence gaps, and Completion Gate state.
Record each applicable requirement's source, content version, scope and valid
exceptions in readable basis source material; a task-only requirement applies
only to its authorized task candidate and must not become a universal
repository or public-PR rule.
+Reconstruct those requirements from original user requests and maintained
contracts before checking the author's proposed solution, distinguishing author
choices and unverified assumptions from confirmed constraints.
+Preserve later user approvals with their actual provenance instead of treating
approval of an implementation choice as proof of an original version
requirement or of its necessity.
Keep effective content and delta identity separate from Git revision lineage
so equal local and public candidates retain one code-correctness basis.
Output mode must not affect candidate discovery, proof, classification,
@@ -213,6 +215,8 @@ Apply the Completion Gate to every Formal Review and to a
discussion reply that
- 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.
- Record each substantive changed block's behavior, applicable risk axes and
requirement origins, strongest counter-evidence and current source anchors with
`mark-file --coverage <JSON>`, and attach finding anchors with `add-finding
--anchors <JSON>`.
+- For each newly introduced local override, compatibility exception or
parallel mechanism, use the existing basis sources and block `requirements`,
`counter_evidence` and `anchors` to record its constraint origins, verified
limits of direct reuse and necessity conclusion separately from behavior
correctness.
+- Keep author-only choices and unverified assumptions as `evidence` sources.
- Record partial coverage with pending files and keep unproved findings as
candidates; recording evidence does not establish a completed review.
- Rebuild ledgers with an older schema or stale inputs without inheriting
their completion state.
- 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.