Skip to content

[codex] reduce SonarCloud maintainability findings#25

Merged
dodok8 merged 4 commits into
mainfrom
issue-24-sonar-maintainability
Jun 25, 2026
Merged

[codex] reduce SonarCloud maintainability findings#25
dodok8 merged 4 commits into
mainfrom
issue-24-sonar-maintainability

Conversation

@dodok8

@dodok8 dodok8 commented Jun 25, 2026

Copy link
Copy Markdown
Collaborator

Summary

Reduce the four open SonarCloud maintainability findings tracked in #24 without changing query parsing, query resolution, REPL behavior, or SQLite schema metadata output.

Closes #24

Scope

  • Split the parser boolean/arithmetic precedence test assertions into focused AST assertion helpers.
  • Split query-resolver expression resolution into narrower compare, null comparison, and membership helpers.
  • Split the REPL input loop into line handling, prompt selection, read error handling, and interrupt handling helpers.
  • Replace the long SQLiteCatalogFieldRow::new positional constructor with purpose-specific implicit_id, scalar, and link constructors.

Spec and plan alignment

List the spec/ and plan/ files checked for this change. If the change
intentionally diverges from them, explain why and include the required document
update in this pull request.

  • spec/query.md: filter expression precedence, null comparison behavior, boolean filters, membership filters, and arithmetic operands are preserved.
  • spec/storage-sqlite.md: _engine_catalog_fields metadata shape and stored values are preserved.
  • plan/query-expression-model-plan.md: expression model responsibilities remain in parser/resolver layers.
  • plan/query-parser-implementation-plan.md: parser precedence test coverage is preserved.
  • plan/sqlite-schema-plan-implementation-plan.md: deterministic catalog field row planning and metadata insert contracts are preserved.
  • plan/cli-and-tooling-plan.md: REPL behavior remains tooling orchestration and does not add new engine behavior.

Tests

List the automated and manual checks performed.

  • cargo test --workspace
  • Other: cargo fmt --check
  • Other: cargo test -p query-parser parser_preserves_boolean_precedence_with_arithmetic
  • Other: cargo test -p query-resolver
  • Other: cargo test -p repl
  • Other: cargo test -p sqlite-schema-plan

Review notes

Call out API boundaries, temporary rules, migration concerns, or follow-up work
that reviewers should inspect closely.

  • This PR is intended as a behavior-preserving refactor for SonarCloud findings only.
  • The resolver changes should preserve the existing error behavior for null comparisons and membership item compatibility.
  • The SQLite schema plan changes intentionally keep metadata table columns, row values, and deterministic ordering unchanged.
  • The REPL changes keep current multiline buffering, exit commands, and two-interrupt exit behavior.

AI assistance

Disclose AI tool usage according to AI_POLICY.md.

  • No AI tools were used.
  • AI tools were used and are disclosed here and in the relevant commit
    messages with Assisted-by trailers.

Tools and models:

  • Codex:gpt-5.5

@sonarqubecloud

Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
65.4% Coverage on New Code (required ≥ 80%)

See analysis details on SonarQube Cloud

@dodok8 dodok8 marked this pull request as ready for review June 25, 2026 05:37
@dodok8 dodok8 merged commit 5255697 into main Jun 25, 2026
1 of 2 checks passed
@dodok8 dodok8 deleted the issue-24-sonar-maintainability branch June 25, 2026 05:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: reduce SonarCloud maintainability findings

1 participant