terrymanu commented on PR #39733: URL: https://github.com/apache/shardingsphere/pull/39733#issuecomment-5550589483
### Result **Review Result: Mergeable** The local candidate satisfies the code-scope correctness, coding-standard, and policy-gate requirements. No required changes were found. ### Evidence - Repository-wide Maven Checkstyle completed successfully with exit code 0. - Direct Checkstyle validation of the 34 migrated Java files completed successfully with exit code 0. - Two negative test cases correctly triggered the right-hand null comparison and ternary-expression rules. Exit code 2 was expected. - File-filtered Spotless completed successfully with exit code 0 and produced no additional changes. - Maven package verification for the 18 affected modules and their dependencies completed successfully with exit code 0. - `git diff --check` completed successfully with exit code 0. - The final policy evaluation passed 122/122 cases with a 100% pass rate, exit code 0, no critical regressions, and all source-read traces passing. - Baseline-free bootstrap validation completed successfully with exit code 0. - The Skill quick validator exited with code 1 because PyYAML is unavailable in the local Python environment. Its validation scope was covered by the successful policy inventory, reference graph, binding validation, semantic canaries, and bootstrap validation; therefore, this does not leave an outcome-sensitive evidence gap. - The Java changes only swap the operands of `==` and `!=`, or negate a ternary condition while swapping its two branches. Functional behavior and performance remain unchanged. - No dependencies, security boundaries, public interfaces, SPIs, or SQL syntax behavior were introduced or changed. ### Coverage - Candidate type: standalone local candidate. - Baseline: `987b54b0d42b33021a18ec981f357925a59d9fc8`. - Task delta: 39 files. Three pre-existing `__pycache__` directories were excluded. - Root-cause, blast-radius, tests/runtime, and convergence review passes were completed. All 39 files were accounted for, with no findings. - SQL Parser coverage included the ClickHouse, Doris, Hive, MySQL, Oracle, and PostgreSQL visitors. These changes only perform behavior-preserving expression migrations and do not alter accepted SQL syntax. - CI was not reviewed. This result establishes code-scope merge readiness only. Task delta mapping: - `.codex/harness/agents/cases.toml` → Added expression canaries and corrected brittle text assertions → Validates both implementation and standalone audit entry points → Required by the policy gate. - `.codex/harness/agents/policy-sources.toml` → Registered and routed the Java expression rules → Ensures applicable entry points load the rules → Required for policy binding. - `.codex/skills/coding-standards/SKILL.md` → Loads the expression rules during implementation and standalone audits → Prevents AI-generated violations and supports compliance audits → Required for workflow routing. - `.codex/skills/coding-standards/references/rules/java-expressions.md` → Defines comparison ordering for semantically resolved named constants → Covers semantic decisions that Checkstyle cannot determine reliably → Required for semantic validation. - `src/resources/checkstyle.xml` → Prohibits null on the right side of `==` and `!=`, and prohibits direct `null != value` ternary conditions → Provides automatic syntax enforcement → Required to implement the rules. - `database/exception/dialect/mysql/.../MySQLDialectExceptionMapper.java` → Behavior-preserving normalization of a null-based ternary expression → Satisfies the new Checkstyle rule → Required. - `database/protocol/dialect/firebird/.../FirebirdPacketCodecEngine.java` → Behavior-preserving normalization of a null-based ternary expression → Satisfies the new Checkstyle rule → Required. - `database/protocol/dialect/firebird/.../FirebirdBatchRegistry.java` → Moved null to the left side of comparisons → Satisfies the new Checkstyle rule → Required. - `database/protocol/dialect/firebird/.../FirebirdStringBinaryProtocolValue.java` → Behavior-preserving normalization of a null-based ternary expression → Satisfies the new Checkstyle rule → Required. - `database/protocol/dialect/firebird/.../FirebirdPrepareStatementReturnPacket.java` → Behavior-preserving normalization of a null-based ternary expression → Satisfies the new Checkstyle rule → Required. - `database/protocol/dialect/firebird/.../FirebirdFetchResponsePacket.java` → Moved null to the left side of a comparison → Satisfies the new Checkstyle rule → Required. - `database/protocol/dialect/firebird/.../FirebirdGenericResponsePacket.java` → Moved null to the left side of comparisons → Satisfies the new Checkstyle rule → Required. - `database/protocol/dialect/firebird/.../FirebirdSRPAuthenticationData.java` → Moved null to the left side of a comparison → Satisfies the new Checkstyle rule → Required. - `features/sharding/core/.../ShardingRule.java` → Behavior-preserving normalization of a null-based ternary expression → Satisfies the new Checkstyle rule → Required. - `infra/spi/.../OrderedSPILoader.java` → Behavior-preserving normalization of a null-based ternary expression → Satisfies the new Checkstyle rule → Required. - `kernel/data-pipeline/core/.../DataConsistencyCheckUtils.java` → Behavior-preserving normalization of a null-based ternary expression → Satisfies the new Checkstyle rule → Required. - `kernel/data-pipeline/core/.../MatchingTableInventoryChecker.java` → Behavior-preserving normalization of null-based ternary expressions → Satisfies the new Checkstyle rule → Required. - `kernel/data-pipeline/core/.../PipelineExecuteEngine.java` → Behavior-preserving normalization of a null-based ternary expression → Satisfies the new Checkstyle rule → Required. - `kernel/data-pipeline/scenario/consistency-check/.../ConsistencyCheckJobAPI.java` → Behavior-preserving normalization of a null-based ternary expression → Satisfies the new Checkstyle rule → Required. - `kernel/sql-federation/compiler/.../SQLStatementCompilerEngine.java` → Behavior-preserving normalization of a null-based ternary expression → Satisfies the new Checkstyle rule → Required. - `kernel/sql-federation/compiler/.../BinaryOperationExpressionConverter.java` → Moved null to the left side of a comparison → Satisfies the new Checkstyle rule → Required. - `kernel/sql-federation/compiler/.../SelectStatementConverter.java` → Behavior-preserving normalization of a null-based ternary expression → Satisfies the new Checkstyle rule → Required. - `mode/core/.../RegisterCenterMetaDataContextsInitFactory.java` → Moved null to the left side of a comparison → Satisfies the new Checkstyle rule → Required. - `parser/sql/engine/dialect/clickhouse/.../ClickHouseStatementVisitor.java` → Behavior-preserving normalization of null-based ternary expressions → Satisfies the new Checkstyle rule → Required. - `parser/sql/engine/dialect/doris/.../DorisStatementVisitor.java` → Behavior-preserving normalization of a null-based ternary expression → Satisfies the new Checkstyle rule → Required. - `parser/sql/engine/dialect/doris/.../DorisDALStatementVisitor.java` → Behavior-preserving normalization of null-based ternary expressions → Satisfies the new Checkstyle rule → Required. - `parser/sql/engine/dialect/doris/.../DorisDDLStatementVisitor.java` → Moved null to the left side of comparisons and normalized ternary expressions without changing behavior → Satisfies the new Checkstyle rule → Required. - `parser/sql/engine/dialect/doris/.../DorisDMLStatementVisitor.java` → Behavior-preserving normalization of null-based ternary expressions → Satisfies the new Checkstyle rule → Required. - `parser/sql/engine/dialect/hive/.../HiveStatementVisitor.java` → Behavior-preserving normalization of a null-based ternary expression → Satisfies the new Checkstyle rule → Required. - `parser/sql/engine/dialect/mysql/.../MySQLStatementVisitor.java` → Behavior-preserving normalization of a null-based ternary expression → Satisfies the new Checkstyle rule → Required. - `parser/sql/engine/dialect/oracle/.../OracleDDLStatementVisitor.java` → Behavior-preserving normalization of a null-based ternary expression → Satisfies the new Checkstyle rule → Required. - `parser/sql/engine/dialect/postgresql/.../PostgreSQLDDLStatementVisitor.java` → Behavior-preserving normalization of a null-based ternary expression → Satisfies the new Checkstyle rule → Required. - `parser/sql/statement/core/.../SubqueryExtractor.java` → Moved null to the left side of a comparison → Satisfies the new Checkstyle rule → Required. - `parser/sql/statement/core/.../LiteralExpressionSegment.java` → Behavior-preserving normalization of a null-based ternary expression → Satisfies the new Checkstyle rule → Required. - `parser/sql/statement/core/.../BuildIndexStatement.java` → Behavior-preserving normalization of a null-based ternary expression → Satisfies the new Checkstyle rule → Required. - `proxy/backend/dialect/mysql/.../MySQLShowProcessListExecutor.java` → Behavior-preserving normalization of a null-based ternary expression → Satisfies the new Checkstyle rule → Required. - `proxy/frontend/dialect/firebird/.../FirebirdFetchStatementCommandExecutor.java` → Moved null to the left side of a comparison → Satisfies the new Checkstyle rule → Required. - `proxy/frontend/dialect/firebird/.../FirebirdPrepareStatementCommandExecutor.java` → Moved null to the left side of comparisons → Satisfies the new Checkstyle rule → Required. - `proxy/frontend/dialect/postgresql/.../PostgreSQLComDescribeExecutor.java` → Behavior-preserving normalization of a null-based ternary expression → Satisfies the new Checkstyle rule → Required. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
