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 0cbdde72383 Refine implementation and review policy with discovery
regression cases (#40214)
0cbdde72383 is described below
commit 0cbdde72383415d3b33be763daddf362dc89b944
Author: Liang Zhang <[email protected]>
AuthorDate: Sat Oct 17 13:13:56 2026 +0800
Refine implementation and review policy with discovery regression cases
(#40214)
---
.codex/harness/agents/cases.toml | 490 ++++++++++++++++++++-
.codex/harness/agents/test_run.py | 24 +
.../references/rules/implementation.md | 4 +
.codex/skills/coding-standards/SKILL.md | 3 +-
.../references/rules/java-line-wrapping.md | 16 +-
.codex/skills/review-pr/SKILL.md | 12 +-
.../review-pr/references/review-corrections.md | 10 +-
7 files changed, 541 insertions(+), 18 deletions(-)
diff --git a/.codex/harness/agents/cases.toml b/.codex/harness/agents/cases.toml
index 7fda04fef51..d24ee1a6066 100644
--- a/.codex/harness/agents/cases.toml
+++ b/.codex/harness/agents/cases.toml
@@ -3325,7 +3325,7 @@ required_summary_terms = ["Previous Finding", "Current
Status: Withdrawn", "Reas
forbidden_summary_terms = ["Review Result: Not Mergeable", "Review Result:
Review Incomplete", "Current Status: Retained", "Current Status: Changed to
Review Incomplete"]
critical = true
policy_binding_profile = "review-pr"
-policy_assertions = [{source = "review-pr", statements = ["For a standalone
local candidate, use the active task's original working-tree baseline plus only
its attributed local commits, index changes, and working-tree changes as the
effective candidate. Use the frozen task boundary and task-delta audit as
authoritative scope, exclude unrelated local changes, and do not require a
public head, GitHub metadata, or public lineage.", "Return every review output
as one complete copy-ready Mark [...]
+policy_assertions = [{source = "review-pr", statements = ["For a standalone
local candidate, use the active task's original working-tree baseline plus only
its attributed local commits, index changes, and working-tree changes as the
effective candidate. Use the frozen task boundary and task-delta audit as
authoritative scope, exclude unrelated local changes, and do not require a
public head, GitHub metadata, or public lineage.", "Return every review output
as one complete copy-ready Mark [...]
required_summary_prefix = "```markdown\n"
[[cases]]
@@ -3597,7 +3597,7 @@ required_summary_terms = ["origin=previous-review-miss",
"current=change-request
forbidden_summary_terms = ["origin=introduced-by-latest-commits",
"origin=exposed-by-previous-fix", "origin=changed-review-basis",
"current=continue-review", "current=mergeable", "current=review-incomplete",
"current=needs-discussion", "prior-verdict=evidence"]
critical = true
policy_binding_profile = "review-pr"
-policy_assertions = [{source = "review-pr", statements = ["For a proven
previous-review miss, contradictory assessments on an unchanged basis, a
triggered high-risk review criterion, or an explicit user request for
independent review, obtain an independent read-only assessment through this
workflow and the Completion Gate using the current basis and complete effective
candidate without the previous verdict or an expected finding count.", "Never
use a previous Formal Review result as\nevi [...]
+policy_assertions = [{source = "review-pr", statements = ["For a proven
previous-review miss, contradictory assessments on an unchanged basis, a
triggered high-risk review criterion, or an explicit user request for
independent review, obtain an independent read-only assessment through this
workflow and the Completion Gate using the current basis and complete effective
candidate without the previous verdict or an expected finding count.", "Never
use a previous Formal Review result as\nevi [...]
[[cases]]
id = "review_ledger_reuses_facts_without_inheriting_completion"
@@ -3678,3 +3678,489 @@ forbidden_summary_terms = ["A=continue-review",
"A=mergeable", "A=review-incompl
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 [...]
+
+[[cases]]
+id = "discovery_01"
+group = "synthetic source and consumer discovery"
+description = "Checks two implementations against an existing optional
capability and a supported provider."
+phase = "read-only source and consumer analysis"
+ordinary_loop = false
+profile = "review-pr"
+semantic_policy_assertions = true
+prompt = '''
+Answer this self-contained read-only source-analysis question using only the
supplied synthetic records and bound rules. Do not inspect files, run commands,
edit anything, or produce an overall PR verdict. Java fragments omit unrelated
declarations and imports; assess the supplied behavior and the stated task
delta. U0 requests that the existing exporter collect every registered count
capability while remaining runnable with optional modules absent. The
maintained core owns Source and Co [...]
+```java
+interface Source { }
+interface CountCapability { int count(); }
+final class OtherPool implements Source, CountCapability {
+ public int count() { return 7; }
+}
+final class LabelSource implements Source { }
+```
+A, Collector.collectCounts:
+```java
+List<Integer> collectCounts(List<Source> sources) {
+ List<Integer> result = new ArrayList<>();
+ for (Source each : sources) {
+ if (each.getClass().getSimpleName().equals("VendorPool")) {
+ result.add(((CountCapability) each).count());
+ }
+ }
+ return result;
+}
+```
+B, Collector.collectCounts:
+```java
+List<Integer> collectCounts(List<Source> sources) {
+ List<Integer> result = new ArrayList<>();
+ for (Source each : sources) {
+ if (each instanceof CountCapability) {
+ result.add(((CountCapability) each).count());
+ }
+ }
+ return result;
+}
+```
+Give A.current, B.current and required as compact lists of integers. Give
A.status and B.status as keep or change. Identify the responsible expression
for any difference and evaluate the strongest reason the optional-class failure
no longer occurs. Report exactly one assignment per requested marker in the
summary, then explain each decision using the relevant code and consumer
contract. Do not repeat an alternative assignment for a marker.
+'''
+decision = "proceed"
+required_actions = []
+allowed_actions = []
+forbidden_actions = ["inspect_local", "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.current=[]", "B.current=[7]", "required=[7]",
"A.status=change", "B.status=keep"]
+required_summary_term_groups = [["getSimpleName", "VendorPool"]]
+forbidden_summary_terms = ["A.status=keep", "B.status=change"]
+critical = true
+policy_binding_profile = "review-pr"
+policy_assertions = [{source = "review-pr", statements = ["`Full path`: trace
the relevant production or test entry path end to end; inspect setup, wrappers,
earlier calls, generators, and consuming runtime.", "`Counter-evidence`: check
the strongest evidence that could disprove the finding, especially author or
maintainer replies and version-specific facts.", "`Necessity`: the requested
change is required for safety, correctness, or an applicable repository design
or contract rule in th [...]
+
+[[cases]]
+id = "discovery_02"
+group = "synthetic source and consumer discovery"
+description = "Distinguishes module-owned metric knowledge from a maintained
shared sample contract."
+phase = "read-only source and consumer analysis"
+ordinary_loop = false
+profile = "review-pr"
+semantic_policy_assertions = true
+prompt = '''
+Answer this self-contained read-only source-analysis question using only the
supplied synthetic records and bound rules. Do not inspect files, run commands,
edit anything, or produce an overall PR verdict. Java fragments omit unrelated
declarations and imports; assess the supplied behavior and the stated task
delta. U0 requests moving optional-module metric production into its existing
provider owner while preserving the generic collector. The maintained contract
says every provider choo [...]
+A:
+```java
+interface SampleProvider {
+ String IDLE = "pool_idle";
+ String ACTIVE = "pool_active";
+ List<Sample> samples();
+}
+final class GenericCollector {
+ List<Sample> collect(List<SampleProvider> providers) {
+ Map<String, String> names = Map.of("idle", SampleProvider.IDLE,
"active", SampleProvider.ACTIVE);
+ List<Sample> result = new ArrayList<>();
+ for (SampleProvider each : providers) {
+ for (Sample sample : each.samples()) {
+ if (names.containsKey(sample.name())) {
+ result.add(new Sample(names.get(sample.name()),
sample.value()));
+ }
+ }
+ }
+ return result;
+ }
+}
+```
+B:
+```java
+interface SampleProvider {
+ String TYPE = "gauge";
+ List<Sample> samples();
+}
+final class PoolProvider implements SampleProvider {
+ public List<Sample> samples() { return List.of(new Sample("pool_idle",
2)); }
+}
+final class GenericCollector {
+ List<Sample> collect(List<SampleProvider> providers) {
+ List<Sample> result = new ArrayList<>();
+ for (SampleProvider each : providers) {
+ result.addAll(each.samples());
+ }
+ return result;
+ }
+}
+```
+With only CacheProvider registered, give A.current, B.current and required as
compact [name:value] lists. Give A.status, B.status and shared.status as keep
or change, where shared.status assesses the current location of B's TYPE
constant. Explain which declarations or expressions matter to ownership, and
whether the maintained shared wire-format constant should be moved into every
provider. Report exactly one assignment per requested marker in the summary,
then explain each decision usin [...]
+Also give A.owners and B.owners as compact lists of declaration owners that
require correction, in source declaration order; use [] when none require
correction. Write assignments as marker=value without quotation marks or
backticks around scalar values; lists must be compact, with no internal spaces.
+'''
+decision = "proceed"
+required_actions = []
+allowed_actions = []
+forbidden_actions = ["inspect_local", "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.current=[]", "B.current=[cache_hits:3]",
"required=[cache_hits:3]", "A.status=change", "B.status=keep",
"shared.status=keep", "A.owners=[SampleProvider,GenericCollector]",
"B.owners=[]"]
+required_summary_term_groups = [["TYPE", "gauge"]]
+forbidden_summary_terms = ["A.status=keep", "B.status=change",
"shared.status=change", "A.owners=[]",
"B.owners=[SampleProvider,GenericCollector]"]
+critical = true
+policy_binding_profile = "review-pr"
+policy_assertions = [{source = "review-pr", statements = ["`Full path`: trace
the relevant production or test entry path end to end; inspect setup, wrappers,
earlier calls, generators, and consuming runtime.", "`Counter-evidence`: check
the strongest evidence that could disprove the finding, especially author or
maintainer replies and version-specific facts.", "`Necessity`: the requested
change is required for safety, correctness, or an applicable repository design
or contract rule in th [...]
+
+[[cases]]
+id = "discovery_03"
+group = "synthetic source and consumer discovery"
+description = "Judges detail, count and optional empty exports from their
consumers rather than return-type similarity."
+phase = "read-only source and consumer analysis"
+ordinary_loop = false
+profile = "review-pr"
+semantic_policy_assertions = true
+prompt = '''
+Answer this self-contained read-only source-analysis question using only the
supplied synthetic records and bound rules. Do not inspect files, run commands,
edit anything, or produce an overall PR verdict. Java fragments omit unrelated
declarations and imports; assess the supplied behavior and the stated task
delta. U0 requests implementing the three existing export contracts. Workers
are ordered [Worker("a"), Worker("b")]. D is a detail export whose maintained
consumer displays each wor [...]
+```java
+List<String> exportD(List<Worker> workers) { return
List.of(Integer.toString(workers.size())); }
+String displayD(List<Worker> workers) { return String.join(",",
exportD(workers)); }
+List<String> exportC(List<Worker> workers) { return
List.of(Integer.toString(workers.size())); }
+int readC(List<Worker> workers) { return
Integer.parseInt(exportC(workers).get(0)); }
+List<String> exportE(List<Worker> workers) { return List.of(); }
+String displayE(List<Worker> workers) { return exportE(workers).isEmpty() ?
"unavailable" : String.join(",", exportE(workers)); }
+```
+Give D.current and D.required as the displayed strings, C.current and
C.required as integers, and E.current and E.required as the displayed strings.
Give D.status, C.status and E.status as keep or change. Explain the minimum
correction, if any, using each export's actual consumer. Report exactly one
assignment per requested marker in the summary, then explain each decision
using the relevant code and consumer contract. Do not repeat an alternative
assignment for a marker.
+Write assignments as marker=value without quotation marks or backticks around
scalar values; lists must be compact, with no internal spaces.
+'''
+decision = "proceed"
+required_actions = []
+allowed_actions = []
+forbidden_actions = ["inspect_local", "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 = ["D.current=2", "D.required=a,b", "C.current=2",
"C.required=2", "E.current=unavailable", "E.required=unavailable",
"D.status=change", "C.status=keep", "E.status=keep"]
+forbidden_summary_terms = ["D.status=keep", "C.status=change",
"E.status=change"]
+critical = true
+policy_binding_profile = "review-pr"
+policy_assertions = [{source = "review-pr", statements = ["`Full path`: trace
the relevant production or test entry path end to end; inspect setup, wrappers,
earlier calls, generators, and consuming runtime.", "`Necessity`: the requested
change is required for safety, correctness, or an applicable repository design
or contract rule in the selected focus, not merely cleaner or preferable."]},
{source = "implementation-rules", statements = ["Before designing
state-dependent output, establi [...]
+
+[[cases]]
+id = "discovery_04"
+group = "synthetic source and consumer discovery"
+description = "Computes output across module states and checks the production
initialization path."
+phase = "read-only source and consumer analysis"
+ordinary_loop = false
+profile = "review-pr"
+semantic_policy_assertions = true
+prompt = '''
+Answer this self-contained read-only source-analysis question using only the
supplied synthetic records and bound rules. Do not inspect files, run commands,
edit anything, or produce an overall PR verdict. Java fragments omit unrelated
declarations and imports; assess the supplied behavior and the stated task
delta. U0 requests count samples from every loaded provider through the
existing registry. The maintained contract returns no sample for an unloaded
module; each loaded provider con [...]
+A:
+```java
+final class GaugeBuilder {
+ private static final List<Provider> sources = new ArrayList<>();
+ static Gauge build(String name, int value, Provider provider) {
+ sources.add(provider);
+ return new Gauge(name, value);
+ }
+ static List<Integer> collect() {
+ List<Integer> result = new ArrayList<>();
+ for (Provider provider : sources) {
+ int total = 0;
+ for (Instance each : provider.instances()) { total +=
each.count(); }
+ result.add(total);
+ }
+ return result;
+ }
+}
+final class Collector {
+ List<Integer> collect(Registry registry) { return GaugeBuilder.collect(); }
+}
+```
+B:
+```java
+final class Collector {
+ List<Integer> collect(Registry registry) {
+ List<Integer> result = new ArrayList<>();
+ for (Provider provider : registry.providers()) {
+ int total = 0;
+ for (Instance each : provider.instances()) { total +=
each.count(); }
+ result.add(total);
+ }
+ return result;
+ }
+}
+```
+Give A.current, B.current and required as compact nested lists in P,Q,R order.
Give A.status and B.status as keep or change. Trace startup to the data source
and evaluate the necessity and ownership of any new entry point, registration
or call-order dependency; do not infer output from module or class presence
alone. Report exactly one assignment per requested marker in the summary, then
explain each decision using the relevant code and consumer contract. Do not
repeat an alternative ass [...]
+'''
+decision = "proceed"
+required_actions = []
+allowed_actions = []
+forbidden_actions = ["inspect_local", "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.current=[[],[],[]]", "B.current=[[],[0],[0]]",
"required=[[],[0],[0]]", "A.status=change", "B.status=keep"]
+required_summary_term_groups = [["sources", "GaugeBuilder.collect"],
["startup", "Startup"]]
+forbidden_summary_terms = ["A.status=keep", "B.status=change"]
+critical = true
+policy_binding_profile = "review-pr"
+policy_assertions = [{source = "review-pr", statements = ["`Full path`: trace
the relevant production or test entry path end to end; inspect setup, wrappers,
earlier calls, generators, and consuming runtime.", "`Counter-evidence`: check
the strongest evidence that could disprove the finding, especially author or
maintainer replies and version-specific facts.", "`Necessity`: the requested
change is required for safety, correctness, or an applicable repository design
or contract rule in th [...]
+
+[[cases]]
+id = "discovery_05"
+group = "synthetic source and consumer discovery"
+description = "Verifies unfinished and completed work before judging TODO
deletion."
+phase = "read-only source and consumer analysis"
+ordinary_loop = false
+profile = "review-pr"
+semantic_policy_assertions = true
+prompt = '''
+Answer this self-contained read-only source-analysis question using only the
supplied synthetic records and bound rules. Do not inspect files, run commands,
edit anything, or produce an overall PR verdict. Java fragments omit unrelated
declarations and imports; assess the supplied behavior and the stated task
delta. U0 requests parsing comma-separated fields while allowing commas inside
double quotes. The maintained scope excludes escapes and malformed input. For
input text equal to the [...]
+```java
+List<String> parse(String text) {
+ // TODO support commas inside quoted fields
+ return List.of(text.split(","));
+}
+```
+A replaces it with this body and removes the TODO:
+```java
+List<String> parse(String text) {
+ return Arrays.asList(text.split(","));
+}
+```
+B replaces it with this body and removes the TODO:
+```java
+List<String> parse(String text) {
+ List<String> result = new ArrayList<>();
+ StringBuilder field = new StringBuilder();
+ boolean quoted = false;
+ for (char each : text.toCharArray()) {
+ if ('"' == each) {
+ quoted = !quoted;
+ } else if (',' == each && !quoted) {
+ result.add(field.toString());
+ field.setLength(0);
+ } else {
+ field.append(each);
+ }
+ }
+ result.add(field.toString());
+ return result;
+}
+```
+The unchanged consumer uses String.join("|", parse(text)). Give A.count and
B.count as result sizes. Give A.status and B.status as complete or incomplete,
and A.todo and B.todo as keep or remove for the original TODO. Explain the
actual parsing behavior and any necessary remaining work rather than inferring
completion from the return-expression form. Report exactly one assignment per
requested marker in the summary, then explain each decision using the relevant
code and consumer contract [...]
+'''
+decision = "proceed"
+required_actions = []
+allowed_actions = []
+forbidden_actions = ["inspect_local", "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.count=3", "B.count=2", "A.status=incomplete",
"B.status=complete", "A.todo=keep", "B.todo=remove"]
+required_summary_term_groups = [["split", "delimiter"], ["a,b|c", "quoted"]]
+forbidden_summary_terms = ["A.status=complete", "B.status=incomplete",
"A.todo=remove", "B.todo=keep"]
+critical = true
+policy_binding_profile = "review-pr"
+policy_assertions = [{source = "review-pr", statements = ["`Full path`: trace
the relevant production or test entry path end to end; inspect setup, wrappers,
earlier calls, generators, and consuming runtime.", "`Necessity`: the requested
change is required for safety, correctness, or an applicable repository design
or contract rule in the selected focus, not merely cleaner or preferable."]},
{source = "implementation-rules", statements = ["Do not leave placeholders,
TODO implementations, [...]
+
+[[cases]]
+id = "discovery_06"
+group = "synthetic source and consumer discovery"
+description = "Keeps narrow write authority separate from cumulative review
coverage and attributes later findings."
+phase = "read-only source and consumer analysis"
+ordinary_loop = false
+profile = "review-pr"
+semantic_policy_assertions = true
+prompt = '''
+Answer this self-contained read-only source-analysis question using only the
supplied synthetic records and bound rules. Do not inspect files, run commands,
edit anything, or produce an overall PR verdict. Java fragments omit unrelated
declarations and imports; assess the supplied behavior and the stated task
delta. Original U0 requires both public routes to publish count= followed by
the current registry count. T0 is the original task baseline. The task then
changes Source.java, Rendere [...]
+```java
+// Source.java, latest task candidate
+int count(Registry registry) { return registry.workers().size(); }
+// Renderer.java, latest task candidate
+String render(int value) { return "count=" + value; }
+// Controller.java at T0
+String metrics(Registry registry) { return
renderer.render(source.count(registry)); }
+String admin(Registry registry) { return
renderer.render(source.count(registry)); }
+// Controller.java, candidate A after an earlier task round and still current
+String metrics(Registry registry) { return renderer.render(0); }
+String admin(Registry registry) { return renderer.render(0); }
+// Controller.java, independent candidate B instead retains the T0 bodies
+```
+A previous correctness review examined A with the same U0, full cumulative
scope and code shown here, and reported no remaining issues. A later review
reports the metrics result. Separately classify histories H2, H3 and H4: H2's
previous correctness review saw the T0 Controller bodies, and only its latest
task patch changes them to A; H3 kept the approved all-workers count
implementation, then a new explicit user acceptance requirement changed the
requested output to active-workers-only; [...]
+Write assignments as marker=value without quotation marks or backticks around
scalar values; lists must be compact, with no internal spaces.
+'''
+decision = "proceed"
+required_actions = []
+allowed_actions = []
+forbidden_actions = ["inspect_local", "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 = ["write.files=[Source.java,Renderer.java]",
"review.files=[Source.java,Renderer.java,Controller.java]",
"A.metrics=count=0", "A.admin=count=0", "required=count=2", "A.status=change",
"B.status=keep", "A.problem-routes=[metrics,admin]",
"A.origin=previous-review-miss", "H2.origin=new-code",
"H3.origin=requirement-change", "H4.origin=review-scope-change",
"Controller.edit=not-authorized", "prior.conclusion=correct"]
+required_summary_term_groups = [["authorization", "authorized", "permission"]]
+forbidden_summary_terms = ["A.status=keep", "B.status=change",
"A.origin=new-code", "H3.origin=previous-review-miss",
"H4.origin=previous-review-miss", "Controller.edit=authorized",
"prior.conclusion=retain"]
+critical = true
+policy_binding_profile = "review-pr"
+policy_assertions = [{source = "review-pr", statements = ["Record the current
round's authorized files and change intents separately from the full cumulative
task-owned candidate and affected behavior and contracts to review.", "A narrow
fix authorization limits writes without shrinking that review scope or treating
earlier task-owned changes as unrelated existing code."]}, {source =
"review-pr-corrections", statements = ["Correct both unsupported findings and
an unsupported overall read [...]
+
+[[cases]]
+id = "discovery_07"
+group = "synthetic source and consumer discovery"
+description = "Measures three complete task-modified invocations around the
written Java line boundary."
+phase = "read-only source and consumer analysis"
+ordinary_loop = false
+profile = "review-pr"
+semantic_policy_assertions = true
+prompt = '''
+Answer this self-contained read-only source-analysis question using only the
supplied synthetic records and bound rules. Do not inspect files, run commands,
edit anything, or produce an overall PR verdict. Java fragments omit unrelated
declarations and imports; assess the supplied behavior and the stated task
delta. U0 adds worker-count diagnostics in the three invocations below. A, B
and C are all task-modified Java statements, shown with their actual
indentation; each is inside a metho [...]
+A:
+```java A
+ metricsReporter.record("alpha", activeWorkers, pendingWorkers,
closedWorkers, delayedWorkers, failureWorkers, retryWorkers, selectedWorkers,
dispatchedWorkers, completedWorkers,
+ resultCount);
+```
+B:
+```java B
+ metricsReporter.record("alpha", activeWorkers, pendingWorkers,
closedWorkers, delayedWorkers, failureWorkers, retryWorkers, selectedWorkers,
dispatchedWorkers, completedWorkers,
+ resultsCount);
+```
+C:
+```java C
+ metricsReporter.record("alpha", activeWorkers, pendingWorkers,
closedWorkers, delayedWorkers, failureWorkers, retryWorkers, selectedWorkers,
dispatchedWorkers, completedWorkers,
+ returnedCount);
+```
+Give A.length, B.length and C.length as the reconstructed single-line
character counts. Give A.layout, B.layout and C.layout as keep or change, and
identify any required correction. Explain how indentation, the complete
syntactic unit and the automatic-check results affect the decision. Report
exactly one assignment per requested marker in the summary, then explain each
decision using the relevant code and consumer contract. Do not repeat an
alternative assignment for a marker.
+'''
+decision = "proceed"
+required_actions = []
+allowed_actions = []
+forbidden_actions = ["inspect_local", "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.length=199", "B.length=200", "C.length=201",
"A.layout=change", "B.layout=change", "C.layout=keep"]
+forbidden_summary_terms = ["A.layout=keep", "B.layout=keep", "C.layout=change"]
+critical = true
+policy_binding_profile = "review-pr"
+policy_assertions = [{source = "coding-standards", statements = ["Treat
passing Checkstyle and Spotless as evidence only for the rules those tools
enforce; neither result replaces the manual recheck.", "Measure the length of
applicable Java constructs as required by the line-wrapping rules."]}, {source
= "java-line-wrapping", statements = ["Before reconstructing a multi-line
construct, identify the complete declaration header, statement, or expression
and distinguish layout line breaks f [...]
+
+[[cases]]
+id = "discovery_08"
+group = "synthetic source and consumer discovery"
+description = "Checks assignment, structural lambda, list and builder forms
without reporting untouched code."
+phase = "read-only source and consumer analysis"
+ordinary_loop = false
+profile = "review-pr"
+semantic_policy_assertions = true
+prompt = '''
+Answer this self-contained read-only source-analysis question using only the
supplied synthetic records and bound rules. Do not inspect files, run commands,
edit anything, or produce an overall PR verdict. Java fragments omit unrelated
declarations and imports; assess the supplied behavior and the stated task
delta. U0 updates local labels and processing actions. The repository Java
line-wrapping rules govern these fragments. A, B, C, D and F are task-added
structures. E existed unchange [...]
+A:
+```java A
+ Map<String, List<String>> values =
+
repository.load("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"b");
+```
+B:
+```java B
+ tasks.forEach(each -> {
+ update(each);
+ publish(each);
+ });
+```
+C:
+```java C
+ List<String> labels = Arrays.asList(
+
"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
+
"bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb");
+```
+D:
+```java D
+ Gauge gauge = Gauge.builder()
+
.name("nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn")
+
.help("hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh")
+ .build();
+```
+E:
+```java E
+ reporter.record(
+ "ok");
+```
+F:
+```java F
+ tasks.forEach(each ->
+ publish(each));
+```
+Give A.layout through F.layout as keep, change or outside-scope. For each
decision identify the applicable unit and wrapping form; explain which newlines
may be reconstructed and give the required correction only where the task
requires one. Report exactly one assignment per requested marker in the
summary, then explain each decision using the relevant code and consumer
contract. Do not repeat an alternative assignment for a marker.
+'''
+decision = "proceed"
+required_actions = []
+allowed_actions = []
+forbidden_actions = ["inspect_local", "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.layout=keep", "B.layout=keep", "C.layout=keep",
"D.layout=keep", "E.layout=outside-scope", "F.layout=change"]
+forbidden_summary_terms = ["A.layout=change", "B.layout=change",
"C.layout=change", "D.layout=change", "E.layout=change", "E.layout=keep",
"F.layout=keep"]
+critical = true
+policy_binding_profile = "review-pr"
+policy_assertions = [{source = "coding-standards", statements = ["Do not
invent rules from preference or nearby code, and do not report pre-existing
violations outside task scope.", "Treat passing Checkstyle and Spotless as
evidence only for the rules those tools enforce; neither result replaces the
manual recheck."]}, {source = "java-line-wrapping", statements = ["Apply the
specific wrapping forms below before the general rules for line-break count and
preceding-line content.", "A speci [...]
+
+[[cases]]
+id = "discovery_09"
+group = "synthetic source and consumer discovery"
+description = "Calculates a production frame length despite passing automatic
checks and complete ledger records."
+phase = "read-only source and consumer analysis"
+ordinary_loop = false
+profile = "review-pr"
+semantic_policy_assertions = true
+prompt = '''
+Answer this self-contained read-only source-analysis question using only the
supplied synthetic records and bound rules. Do not inspect files, run commands,
edit anything, or produce an overall PR verdict. Java fragments omit unrelated
declarations and imports; assess the supplied behavior and the stated task
delta. U0 requests simplifying a packet header calculation while preserving the
maintained wire protocol. The protocol defines the first two bytes as one
unsigned big-endian length [...]
+```java
+// Before the task, Decoder.length
+int length(byte[] header) { return ((header[0] & 0xff) << 8) | (header[1] &
0xff); }
+// Candidate A, Decoder.length
+int length(byte[] header) { return (header[0] << 8) | header[1]; }
+// Candidate B, Decoder.length
+int length(byte[] header) { return ((header[0] & 0xff) << 8) | (header[1] &
0xff); }
+// Unchanged production consumer
+int readLength(byte[] header) {
+ int length = decoder.length(header);
+ if (length < 0) { throw new IllegalArgumentException("negative length"); }
+ return length;
+}
+```
+Give A.length, B.length and required as integers; A.consumer and B.consumer as
accept or reject; and A.status and B.status as keep or change. Explain the
relevant Java byte calculation and what each supplied verification fact
actually proves. Report exactly one assignment per requested marker in the
summary, then explain each decision using the relevant code and consumer
contract. Do not repeat an alternative assignment for a marker.
+Also classify ledger.proof as coverage-only or behavioral-correctness, and
checks.proof as checked-properties-only or consumer-contract. State exactly one
unquoted assignment for each. Write assignments as marker=value without
quotation marks or backticks around scalar values; lists must be compact, with
no internal spaces.
+'''
+decision = "proceed"
+required_actions = []
+allowed_actions = []
+forbidden_actions = ["inspect_local", "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.length=-32767", "B.length=32769",
"required=32769", "A.consumer=reject", "B.consumer=accept", "A.status=change",
"B.status=keep", "ledger.proof=coverage-only",
"checks.proof=checked-properties-only"]
+required_summary_term_groups = [["sign", "signed"], ["ledger"]]
+forbidden_summary_terms = ["A.status=keep", "B.status=change",
"A.consumer=accept", "B.consumer=reject",
"ledger.proof=behavioral-correctness", "checks.proof=consumer-contract"]
+critical = true
+policy_binding_profile = "review-pr"
+policy_assertions = [{source = "review-pr", statements = ["`Full path`: trace
the relevant production or test entry path end to end; inspect setup, wrappers,
earlier calls, generators, and consuming runtime.", "`Counter-evidence`: check
the strongest evidence that could disprove the finding, especially author or
maintainer replies and version-specific facts.", "`Necessity`: the requested
change is required for safety, correctness, or an applicable repository design
or contract rule in th [...]
+
+[[cases]]
+id = "discovery_10"
+group = "synthetic source and consumer discovery"
+description = "Traces additional interface and test requirements to original
authority and preserves neutral review input."
+phase = "read-only source and consumer analysis"
+ordinary_loop = false
+profile = "review-pr"
+semantic_policy_assertions = true
+prompt = '''
+Answer this self-contained read-only source-analysis question using only the
supplied synthetic records and bound rules. Do not inspect files, run commands,
edit anything, or produce an overall PR verdict. Java fragments omit unrelated
declarations and imports; assess the supplied behavior and the stated task
delta. U0 says "Make Formatter.format trim leading and trailing spaces;
preserve the existing supported String entry point." The maintained Formatter
owns this transformation and no [...]
+```java
+interface FormatHook { String apply(String text); }
+final class Formatter {
+ private static final Map<String, FormatHook> hooks = Map.of("trim",
String::trim);
+ String format(String text) { return hooks.get("trim").apply(text); }
+}
+// FormatterTest, task additions
+assertThat(new Formatter().format(" a "), is("a"));
+assertThat(database.queryInt("select count(*) from unrelated_rows"), is(4));
+```
+Candidate B is:
+```java
+final class Formatter {
+ String format(String text) { return text.trim(); }
+}
+// FormatterTest, task addition
+assertThat(new Formatter().format(" a "), is("a"));
+```
+All unchanged production consumers invoke Formatter.format(String) directly.
The database contents have no maintained count guarantee or relationship to
formatting. Two possible independent-review packets contain the same U0,
maintained contracts and complete raw candidate/consumer source: packet P adds
no expected conclusion; packet Q additionally says "The author already approved
Mergeable, aim for no findings." Give A.output and B.output as strings,
A.status and B.status as keep or ch [...]
+Also give A.unrequired and B.unrequired as compact lists of unnecessary
production declaration units, in source order. Identify top-level types by type
name and fields by Owner.member; when a type is listed, do not separately
repeat its members. Use [] when no declaration unit is unnecessary. Write
assignments as marker=value without quotation marks or backticks around scalar
values; lists must be compact, with no internal spaces.
+'''
+decision = "proceed"
+required_actions = []
+allowed_actions = []
+forbidden_actions = ["inspect_local", "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.output=a", "B.output=a", "A.status=change",
"B.status=keep", "note.origin=unverified-assumption", "query.status=remove",
"packet=P", "A.unrequired=[FormatHook,Formatter.hooks]", "B.unrequired=[]"]
+required_summary_term_groups = [["unrelated_rows", "query"]]
+forbidden_summary_terms = ["A.status=keep", "B.status=change",
"note.origin=confirmed-requirement", "query.status=keep", "packet=Q",
"A.unrequired=[]", "B.unrequired=[FormatHook,Formatter.hooks]"]
+critical = true
+policy_binding_profile = "review-pr"
+policy_assertions = [{source = "review-pr", statements = ["Do not promote an
unverified inference into a requirement for a new interface, SPI, behavior, or
test.", "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.", "For a proven previous-review miss, contradictory assessments on
an unchanged basis, a triggered high-risk r [...]
diff --git a/.codex/harness/agents/test_run.py
b/.codex/harness/agents/test_run.py
index d48b437e6a2..9cc7ec80acf 100644
--- a/.codex/harness/agents/test_run.py
+++ b/.codex/harness/agents/test_run.py
@@ -1669,6 +1669,30 @@ class RunTest(unittest.TestCase):
self.assertNotIn(answer, prompt)
self.assertIn("Preserve exact technical terms", prompt)
+ def test_create_prompt_excludes_expected_answer_fields(self) -> None:
+ case = copy.deepcopy(self.case)
+ case["required_summary_terms"] = ["hidden_required_answer"]
+ case["forbidden_summary_terms"] = ["hidden_forbidden_answer"]
+ case["required_summary_term_groups"] = [["hidden_group_answer"]]
+ case["required_summary_prefix"] = "hidden_prefix_answer"
+ prompt = run.create_prompt([case], "sha256")
+ for answer in (
+ "hidden_required_answer", "hidden_forbidden_answer",
"hidden_group_answer", "hidden_prefix_answer"):
+ with self.subTest(answer=answer):
+ self.assertNotIn(answer, prompt)
+
+ def test_discovery_java_fixture_lengths_include_indentation(self) -> None:
+ case = run.load_cases(["discovery_07"])[0]
+ for marker, expected_length in (("A", 199), ("B", 200), ("C", 201)):
+ with self.subTest(marker=marker):
+ source = case["prompt"].split(f"```java {marker}\n",
1)[1].split("\n```", 1)[0]
+ lines = source.splitlines()
+ self.assertEqual(2, len(lines))
+ self.assertTrue(lines[0].startswith(" " * 8))
+ reconstructed = lines[0].rstrip() + " " + lines[1].lstrip()
+ self.assertEqual(expected_length, len(reconstructed))
+ self.assertTrue(all(len(line) <= 200 for line in lines))
+
def test_create_prompt_distinguishes_local_checks_from_smoke_actions(self)
-> None:
prompt = run.create_prompt([self.case], "sha256")
self.assertIn("Use `run_local_checks` when the case explicitly asks to
run or rerun a focused unit test", prompt)
diff --git
a/.codex/skills/code-implementation/references/rules/implementation.md
b/.codex/skills/code-implementation/references/rules/implementation.md
index 3521efe3a2d..9ebe282c3c6 100644
--- a/.codex/skills/code-implementation/references/rules/implementation.md
+++ b/.codex/skills/code-implementation/references/rules/implementation.md
@@ -23,14 +23,18 @@ Apply this file to every production, test, script, or other
implementation artif
- Treat semantic and contract correctness, correct behavior and module
ownership, verified compatibility and real boundaries, and every applicable
authority, safety, scope, and architecture gate as prerequisites for each
design choice. No design preference may compromise them.
- Before choosing an implementation, inspect the current behavior owner,
relevant architecture and sibling modules for existing capabilities and
patterns that fit the required responsibilities, contracts and dependency
boundaries.
+- Before designing state-dependent output, establish the expected result for
each supported state from confirmed requirements and consumers, distinguishing
an unloaded module, a loaded module without instances, and instances with a
zero count when applicable.
+ Check details, counts, and empty results against those requirements and
consumers; the same Java return type does not establish the same data contract.
- Among designs that satisfy these prerequisites, first preserve the
maintained architecture already present in the repository, including its
behavior owners, module boundaries, and design patterns, unless the user
explicitly requires an authorized architecture change. Prefer direct reuse,
then composition or delegation, then an existing extension point. Do not invent
a boundary when no maintained precedent exists. If the existing architecture
cannot express the required behavior, apply [...]
- Second, within the preserved architecture or an explicitly authorized
architecture change, use the smallest clear implementation, prioritize local
readability over line count, and minimize conceptual surface. Prefer one
readable local flow with the fewest independently meaningful types, states,
representations, execution paths, and cross-file hops. Consider testability
next, then optional extensibility, formal symmetry, or structural completeness.
Lower design priorities must not compr [...]
- A new abstraction must own production behavior, state, or a contract that
existing types cannot express and must represent a real, stable variation or
boundary. Define the narrowest contract, keep common behavior in its owner, and
isolate only true implementation or dialect differences. Forwarding, renaming,
multiple callers, readability alone, direct test value, symmetry, type
distinction, shorter call sites, test convenience, and anticipated reuse are
insufficient. Reuse alone never [...]
+ Before adding an interface, SPI, public method, registration mechanism, or
bridge, identify why existing capabilities cannot express the confirmed
requirement, why the proposed owner owns it, and which confirmed acceptance
criterion fails without the addition.
- Do not introduce package-private top-level helper types by default. Keep a
small single-owner helper private and nested; add a top-level helper only when
the approved production behavior, state, or contract cannot reasonably be owned
by an existing type.
- Do not add production types, widen visibility, remove `final`, or change
constructors or signatures for test convenience. Avoid accumulating multiple
nested collaborators inside one owner.
- Keep only constructors with distinct production semantics or framework,
reflection, serialization, or SPI requirements. Update callers explicitly
instead of adding convenience or compatibility overloads. Before adding or
changing a constructor, inspect nearby production conventions for visibility,
Lombok, validation, and tests. Before handoff, scan changed call sites for
unused or compatibility-only constructors.
- Before handoff, inspect every method or constructor parameter added or made
unused by the current task. Remove a parameter that the effective candidate
does not use and update every in-scope caller unless the signature is required
by a public API, override, interface, SPI, reflection, serialization, callback,
framework, or compatibility contract. Keep a contract-required parameter,
record the exact contract, and apply the architecture and scope gates before
changing that signature.
- Apply
`.codex/skills/code-implementation/references/rules/artifact-removal-and-contract-impact.md`
before classifying code as unused or removable. Make the change converge on
one coherent model: correct or replace the existing owner before adding a
parallel path, then remove superseded in-scope representations, paths,
adapters, shims, tests, configuration, and other obsolete code after verifying
usages and contracts. Keep coexistence only for a verified compatibility
contract. If conve [...]
+ Remove an existing TODO only when its work is complete or current code and
contracts prove it obsolete.
- When adding a database, dialect, plugin, or module, reuse the applicable
framework and extension mechanisms. Keep derived dialects aligned with shared
behavior and isolate only real differences. If no maintained precedent exists,
record the search evidence before using the architecture gate.
- Reuse or create an SPI only when its contract matches the required
production behavior. One caller, one implementation, code sharing, type
distinction, symmetry, anticipated reuse, or test convenience does not
establish an SPI contract.
diff --git a/.codex/skills/coding-standards/SKILL.md
b/.codex/skills/coding-standards/SKILL.md
index 13c065bb4ac..dbba7a4edc6 100644
--- a/.codex/skills/coding-standards/SKILL.md
+++ b/.codex/skills/coding-standards/SKILL.md
@@ -66,7 +66,8 @@ Read only the references whose conditions below match the
affected files and tas
- Do not invent rules from preference or nearby code, and do not report
pre-existing violations outside task scope.
- Run the applicable formatting and standards checks required by the
repository workflow.
- Do not run `apply`, `format`, or another file-modifying command unless the
current task authority and repository rules authorize every possible write.
-- Do not build a complete file inventory or perform physical-line accounting
in this mode.
+- Do not build a complete file inventory or count physical lines to report
audit coverage in this mode.
+ Measure the length of applicable Java constructs as required by the
line-wrapping rules.
This mode constrains the current task; it is not a repository-wide audit.
diff --git
a/.codex/skills/coding-standards/references/rules/java-line-wrapping.md
b/.codex/skills/coding-standards/references/rules/java-line-wrapping.md
index 24f33c94f22..568bf0758a8 100644
--- a/.codex/skills/coding-standards/references/rules/java-line-wrapping.md
+++ b/.codex/skills/coding-standards/references/rules/java-line-wrapping.md
@@ -22,17 +22,21 @@ Apply these rules to Java declaration headers, statements,
and expressions.
## Line-Length Decision
- Count every character in the physical line, including its leading
indentation.
-- Reconstruct a multi-line declaration header, statement, or expression in
normal one-line Java form by removing only layout line breaks and indentation
and preserving the tokens and required spaces.
-- Keep the reconstructed form on one physical line when it contains no more
than 200 characters.
-- Wrap the reconstructed form only when it would contain more than 200
characters.
+- Before reconstructing a multi-line construct, identify the complete
declaration header, statement, or expression and distinguish layout line breaks
from structural line breaks.
- Do not treat braces and the bodies of classes, methods, control-flow
statements, switch rules, or multi-statement lambdas as removable layout line
breaks.
- Do not reconstruct comments, Javadocs, text blocks, or string contents in a
way that changes their tokens, content, or semantics.
+- Reconstruct the complete declaration header, statement, or expression in
normal one-line Java form while retaining its first line's actual leading
indentation.
+ Remove only layout line breaks and continuation indentation, preserving the
tokens and required spaces.
+- Keep the reconstructed form on one physical line when it contains no more
than 200 characters.
+- Wrap the reconstructed form only when it would contain more than 200
characters.
- In Implementation Guidance Mode, apply these rules to every declaration
header, statement, or expression added or modified by the task, but do not
reformat untouched surrounding code.
- In Standalone Compliance Audit Mode, apply these rules to every Java
declaration header, statement, and expression in the exact audit scope.
## Wrapping Forms
-- Use the fewest line breaks that keep every physical line within 200
characters, except for the list, builder, and resource forms defined below.
+- Apply the specific wrapping forms below before the general rules for
line-break count and preceding-line content.
+- A specific form does not permit layout line breaks when the complete
reconstructed form contains no more than 200 characters.
+- Use the fewest line breaks that keep every physical line within 200
characters, subject to the applicable specific form below.
- Keep as much complete content as possible on the preceding line and break
only at the applicable syntactic boundary.
- Indent expression continuations by eight additional spaces unless a
declaration rule below requires alignment with the first parameter.
- Keep a closing parenthesis, bracket, or statement terminator on the same
line as the last item or expression that it closes.
@@ -55,6 +59,6 @@ Apply these rules to Java declaration headers, statements,
and expressions.
- Use Checkstyle `LineLength` to detect physical Java lines longer than 200
characters.
- Do not treat passing Checkstyle as proof that a multi-line construct needed
wrapping or used the required wrapping form.
- Do not treat passing Spotless as proof of compliance because the repository
formatter preserves existing wrapped lines.
-- For every multi-line candidate in scope, reconstruct and measure its normal
one-line form before deciding whether the line breaks are allowed.
-- Report a construct whose reconstructed form contains no more than 200
characters as a violation and use the reconstructed single line as the minimum
correction.
+- For every multi-line candidate in scope, distinguish structural line breaks
from layout line breaks, then reconstruct and measure the complete unit
wherever only layout would change.
+- Report layout line breaks in a construct whose reconstructed form contains
no more than 200 characters as a violation and use the reconstructed single
line as the minimum correction.
- When the reconstructed form exceeds 200 characters, verify every physical
line, wrapping boundary, continuation indentation, operator position, and
closing delimiter against the applicable wrapping form.
diff --git a/.codex/skills/review-pr/SKILL.md b/.codex/skills/review-pr/SKILL.md
index ca33c5853e5..b4650d8a4f2 100644
--- a/.codex/skills/review-pr/SKILL.md
+++ b/.codex/skills/review-pr/SKILL.md
@@ -46,6 +46,7 @@ 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.
+Do not promote an unverified inference into a requirement for a new interface,
SPI, behavior, or test.
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.
@@ -272,6 +273,8 @@ unclear.
- First classify the local candidate as standalone or as targeting an existing
public PR.
- For a standalone local candidate, use the active task's original
working-tree baseline plus only its attributed local commits, index changes,
and working-tree changes as the effective candidate. Use the frozen task
boundary and task-delta audit as authoritative scope, exclude unrelated local
changes, and do not require a public head, GitHub metadata, or public lineage.
+- Record the current round's authorized files and change intents separately
from the full cumulative task-owned candidate and affected behavior and
contracts to review.
+ A narrow fix authorization limits writes without shrinking that review scope
or treating earlier task-owned changes as unrelated existing code.
- For a local candidate targeting an existing PR, use the latest public PR
head plus authorized local commits, index changes, and working-tree changes as
the effective candidate. Verify with read-only Git that local `HEAD` equals or
descends from the public head; if that relationship cannot be established,
record the unavailable lineage as an incomplete gap, and if the refs prove
divergence, resolve the correct review basis before selecting a verdict.
- Review a PR-backed local candidate from the public PR merge-base through the
working tree, use the union of GitHub files and the authorized local delta, and
exclude unrelated local changes.
- Apply Code Correctness Review through the canonical assessment, including
the same proof and completion gates, triggered high-risk criteria, convergence
loop, and Formal Decision Contract.
@@ -280,7 +283,8 @@ unclear.
## Multi-Round and Challenged Findings
-Read [review-corrections.md](references/review-corrections.md) for previous
feedback, finding-fix commits, or challenged findings. Re-evaluate the latest
head, test prior findings against challenger evidence, withdraw unsupported
blockers, and classify later findings under that reference.
+Read [review-corrections.md](references/review-corrections.md) for previous
feedback, finding-fix commits, challenged findings, or a disputed overall
readiness conclusion.
+Re-evaluate the latest head, test prior findings against challenger evidence,
withdraw unsupported blockers, and classify later findings under that reference.
## Output Contract
@@ -325,7 +329,5 @@ Do not force a formal verdict.
### Correction
-Begin with `### Correction`, then `Previous Finding`, `Current Status`
-(`Retained`, `Withdrawn`, or `Changed to Review Incomplete`), and `Reason`.
-Follow with the applicable current result while keeping exactly one formal
-`Review Result` line when a formal result is requested.
+Begin with `### Correction`, then `Previous Finding or Conclusion`, `Current
Status` (`Retained`, `Withdrawn`, or `Changed to Review Incomplete`), and
`Reason`.
+Follow with the applicable current result while keeping exactly one formal
`Review Result` line when a formal result is requested.
diff --git a/.codex/skills/review-pr/references/review-corrections.md
b/.codex/skills/review-pr/references/review-corrections.md
index 30fc1dced44..ec4c4b835b3 100644
--- a/.codex/skills/review-pr/references/review-corrections.md
+++ b/.codex/skills/review-pr/references/review-corrections.md
@@ -17,7 +17,7 @@
# Review Corrections and Multi-Round Review
-Read this reference when review feedback already exists, new commits address
previous findings, or an author, maintainer, or user challenges a finding.
+Read this reference when review feedback already exists, new commits address
previous findings, an author, maintainer, or user challenges a finding, or a
previous overall readiness conclusion is challenged or disproved.
## Multi-Round Review
@@ -26,7 +26,8 @@ For standalone local corrections, inherit the main Skill's
task baseline, attrib
Do not expose private review notes, local chat iterations, raw inventory, or
internal scratch state.
Before changing an overall conclusion, compare the prior and current effective
candidates, requirement sources and versions, applicable exceptions, review
focus, evidence identities and finding sets; candidate-type or Git revision
labels and a different previous verdict do not establish a changed basis.
-Correct a proven earlier error rather than preserving an unsupported previous
verdict for consistency.
+Correct both unsupported findings and an unsupported overall readiness
conclusion, including a previous claim that no issues remain.
+Do not preserve an unsupported previous verdict for consistency.
For every prior public finding, classify the latest head as:
@@ -57,8 +58,9 @@ Classify every finding first reported after an earlier formal
review:
- `Established by a changed review basis`: a proven applicable requirement,
selected focus or decisive fact changed and newly supports a finding that the
prior basis did not support.
Prove the classification from the previous and current effective candidates
and their applicable requirements, focus and decisive facts.
+Identify a changed requirement or review scope separately and cite the
decision establishing it; a later rejection of an earlier approved design does
not by itself prove an earlier code defect.
Do not describe an earlier-candidate problem as newly introduced.
-For a previous-review miss, acknowledge it directly, rerun the full Completion
Gate, and return the complete remaining blocker set rather than publishing only
the late finding.
+For a previous-review miss, acknowledge it directly and inspect the complete
effective candidate for the same omitted structure before rerunning the full
Completion Gate and returning the complete remaining blocker set.
## Challenged Findings
@@ -82,7 +84,7 @@ Run the final finding audit again before publishing another
blocking result.
When correcting a previously reported conclusion, use the selected mode's
output contract and begin with:
-- `Previous Finding`
+- `Previous Finding or Conclusion`
- `Current Status`: `Retained`, `Withdrawn`, or `Changed to Review Incomplete`
- `Reason`