Skip to content

Remove Any from public APIs - #48

Merged
vim89 merged 5 commits into
mainfrom
no-any-public-api
Oct 6, 2026
Merged

vim89 merged 5 commits into
mainfrom
no-any-public-api

Conversation

@vim89

@vim89 vim89 commented Oct 6, 2026

Copy link
Copy Markdown
Owner

Replaces Any in public signatures with closed types (ContextValue, SqlValue) and removes four unsound casts. Breaking API change: error context is now Map[String, ContextValue] and the dead FieldConstraint.Custom case is deleted.

CI now fails on Any or asInstanceOf in production sources, with a per-file allowlist for the reflection boundaries.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 6, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-06T16:38:11.292910Z 61f2426 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 61f24268b7

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +153 to +157
ValidationError.QualityViolation(
constraint = "nonEmpty",
violatedValue = "data",
message = "Dataset is empty",
),

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Preserve error severity for empty datasets

When data is empty, this constructor omits severity, so QualityViolation defaults to ErrorSeverity.Warning. The replaced QualityConstraint.NotNull used error severity, and this method still returns an invalid result, so consumers that route or alert based on severity will now treat the failed validation as only a warning. Pass severity = ErrorSeverity.Error, as the other rejecting quality validations do.

Useful? React with 👍 / 👎.

@vim89
vim89 force-pushed the no-any-public-api branch from 61f2426 to c4b5ef7 Compare October 6, 2026 16:39
@vim89

vim89 commented Oct 6, 2026

Copy link
Copy Markdown
Owner Author

Fixed. QualityViolation defaults severity to Warning and the constraint it replaced defaulted to Error, so the empty-dataset branch now passes severity = ErrorSeverity.Error explicitly. Added an assertion on it in the existing rejection test.

@vim89
vim89 force-pushed the no-any-public-api branch from c4b5ef7 to eda8f56 Compare October 6, 2026 16:43
@vim89
vim89 merged commit 94de5a9 into main Oct 6, 2026
2 checks passed
@vim89
vim89 deleted the no-any-public-api branch October 6, 2026 16:45
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.

1 participant