Repository navigation
Conversation
Expose the reporter contract and read-only scan report types independently from scan metric collection and delivery.
DerGut
force-pushed
the
rest-scan-report-serialization
branch
2 times, most recently
from
November 24, 2026 11:00
b747d3a to
9ece629
Compare
DerGut
force-pushed
the
rest-scan-report-serialization
branch
from
November 24, 2026 14:20
9ece629 to
10a84bb
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Which issue does this PR close?
Works toward #1466. Depends on #3709; the serialization changes are separate from the reporter API commit.
What changes are included in this PR?
REST reporters need an Iceberg-compatible JSON request from the format-neutral reports introduced in #3709. The REST catalog crate owns the crate-private
ReportMetricsRequestand itsFrom<&ScanReport>conversion andSerializeimplementation. The adapter is internal to the REST reporter, all wire-format helpers are private to that crate, and the core crate is unchanged from #3709. There is no dependency on #3732 or #3736.The format follows the REST specification. Metric names use Java's constants, including
total-file-size-in-bytesandtotal-delete-file-size-in-bytes; the spec permits arbitrary metric names, while its examples use shorter names. Predicates use the spec-supportedterm/valuerepresentation emitted by Java. Unfiltered scans encodefilter: true, and empty metadata is omitted.HTTP delivery, catalog registration, and predicate sanitization remain follow-ups. Filter literals are serialized as supplied; signed-int64 overflow and non-finite or out-of-range temporal literals return serialization errors.
Are these changes tested?
All 110 REST crate unit tests pass, including nine serialization tests covering the complete request, predicate operators, primitive literal representations, empty fields, and numeric/temporal boundaries. Formatting and Clippy pass. The golden REST request validates against the pinned OpenAPI
ReportMetricsRequestschema.AI Disclosure
AI assisted implementation and validation. Review should focus on conversion through the report getters, predicate wire compatibility, and the rejection policy for numeric overflow and non-finite literals. Tests construct REST request values because #3709's report types have no public constructors; scan-production and HTTP integration remain untested by this prototype.