Repository navigation
Not planned
Labels
known-downstream-workaroundsDownstream consumer pain or workaround observed in real-world OSS reposwontfixThis will not be worked on
Description
Part of #138
Popularity: 1/7 corpus consumers (holoscan-sdk)
Problem
nvidia-holoscan/holoscan-sdk evaluated reflect-cpp (v0.25.0) for its configuration I/O layer (holoscan::config_io), but deliberately keeps reflect-cpp test-only as a differential validator (verify_reflect_generic) over already-canonicalized JSON bytes rather than using it on the production parse path. Holoscan's configuration specification requires five strict parser/semantic guarantees that reflect-cpp does not provide out of the box:
- Explicit
i64/u64/f64lexical numeric-kind model (no inferred number coercion; rejecting JSON integers into floats and distinguishing1vs1.0, signed vs unsigned 64-bit, and out-of-range literals viaYYJSON_READ_NUMBER_AS_RAW). - Decoded duplicate-key rejection (e.g. rejecting
{"plain":0,"\u0070lain":1}askDuplicateKey). - Caller-supplied resource limits (
max_source_bytes,max_depth,max_nodes,max_string_bytes,max_container_entries). - Lossless source spans (tracking raw byte ranges for surgical in-place
replace()preserving unchanged formatting/escapes). - Structured machine-readable errors (
ConfigErrorCode,ConfigOperationStage, byte offset / path) instead of flaterror().what()strings.
Observed Downstream Workarounds
nvidia-holoscan/holoscan-sdk (358c772f)
CMakeLists.txt#L507-L518: gatesholoscan_add_dependency(reflectcpp)strictly behindif(HOLOSCAN_BUILD_TESTS AND BUILD_TESTING):reflect-cppis differential test evidence for the MR !4537 typed-backend direction. It is neither a production parse pass nor a production package/build dependency.src/config/reflect_backend.cpp#L16-L31: feeds only Holoscan-owned canonical JSON intorfl::json::read<rfl::Generic>and maps any failure to a generickCodecFailurewrappingparsed.error().what():// The Holoscan lexer has already frozen duplicate-key, numeric-kind, reserved-escape, and // resource-limit semantics. reflect-cpp is intentionally a secondary generic/typed backend: // parsing only Holoscan-owned canonical bytes prevents its inferred number model from becoming // public configuration authority while still exercising the MR !4537 integration path.
src/config/json_yyjson.cpp#L400-L413: production JSON parser callsyyjson_read_optsdirectly withYYJSON_READ_NUMBER_AS_RAW, mapsyyjson_read_errto structuredConfigErrorCode+error.pos, and buildsLosslessScalarSpanrecords.tests/config/test_io.cpp:#L135-L160: canonical envelope typing (u64/i64/f64) +detail::verify_reflect_genericdifferential check.#L162-L168: decoded duplicate key rejection ({"plain":0,"\u0070lain":1}).#L202-L242: raw number kind preservation (i64,u64,f64,-0.0normalization, out-of-rangekOutOfRange).#L244-L276: lossless byte-span round-trip with RFC 6901 decoded paths.#L278-L312: caller-supplied parse limits (max_source_bytes,max_depth,max_nodes,max_string_bytes,max_container_entries).
Triage Status & Related Fork Work
- Triage decision: Holoscan strict YAML 1.2 scalars, lexical numeric-kind, reserved envelopes, and DOM node budgets (out of scope) #131 (
CLOSED,wontfix): Already triaged the Holoscan-specific strict config semantics as out of scope / wrong layer forreflect-cpp(strict YAML 1.2 scalar policy, lexical numeric-kind /uint64_tinrfl::Generic, Holoscan reserved-escape envelopes, lossless source spans, and post-DOMmax_nodes/max_string_bytes/max_container_entriesbudgets). - Extracted in-scope fork work:
- Duplicate-key rejection: fork PR Add opt-in rfl::NoDuplicateKeys processor for JSON and YAML #128 (
rfl::NoDuplicateKeysfor JSON and YAML). - Recursion-depth protection: fork PR Add opt-in rfl::MaxDepth<N> processor for recursion-depth DoS protection #130 (
rfl::MaxDepth<N>, parked in Map (Backlog — Easy & Landable / Parked for After Main Effort) #116). uint64>INT64_MAXsilent wraparound fix: fork PR Fix silent wraparound when reading uint64 > INT64_MAX as signed integer in JSON #132.- Structured diagnostics: Prototype ErrorDetail::code vocabulary and validator rule-ID propagation #104, Add additive ErrorDetail::causes for per-branch std::variant / AnyOf failures #74, Opt-in <rfl/error_format.hpp>: TreeFormatter, LeafHook, and RFC 6901 JSON Pointer #75, and fork PRs Add format-agnostic rfl::ErrorKind to rfl::ErrorDetail #70 (
rfl::ErrorKindonrfl::ErrorDetail) and Add machine-readable Error::code() and ErrorDetail for validator errors #120 (Error::code()— tracked in Triage & Design Notes (Fork-Only): Speculative Schema / Contract APIs #136).
- Duplicate-key rejection: fork PR Add opt-in rfl::NoDuplicateKeys processor for JSON and YAML #128 (
Upstream Overlap
- Structured parse errors: expose each failure's field path, not only a joined message munich-data-engineering/reflect-cpp#765 / Expose the location of each parse failure via rfl::Error::details() munich-data-engineering/reflect-cpp#766 (closed/fixed via merged PR, partial, post-
v0.25.0) — Added structured per-failure field paths viarfl::Error::details()(no machine-readable error codes or byte offsets). - Reading should fail if integer values are out of range munich-data-engineering/reflect-cpp#682 / Reject out-of-range JSON integer values munich-data-engineering/reflect-cpp#746 (closed/fixed via merged PR, partial, post-
v0.25.0) — Rejects out-of-range narrow integer values in JSON (still lacks a full lexicali64/u64/f64model). - Do not allow the reading of floats as integers and vice versa munich-data-engineering/reflect-cpp#387 (merged, partial) — Disallowed reading JSON floats as integers and vice versa.
- Unfiled upstream: Decoded duplicate-key rejection, caller-supplied resource limits (
max_depth,max_nodes, etc.), and lossless source spans.
Metadata
Metadata
Assignees
Labels
known-downstream-workaroundsDownstream consumer pain or workaround observed in real-world OSS reposwontfixThis will not be worked on
Activity
clockblocker commentedon Nov 29, 2026
Triage decision: closing as
wontfix(not planned) — already triagedwontfixin #131.Rationale: Holoscan's strict YAML 1.2 scalar / lexical-numeric / lossless-span / reserved-envelope / DOM resource-budget layer belongs in a dedicated configuration parser, not inside
reflect-cpp.Tracking for extracted slices:
upstream-queue): The valid JSONuint64 > INT64_MAXsigned-integer silent-wraparound bug is addressed in fork PR Fix silent wraparound when reading uint64 > INT64_MAX as signed integer in JSON #132 and queued in Draft PR Upstream PR Queue (sorted by mergeability score) #191 (Rank Make optional and default-valued fields work inside rfl::Short, rfl::Positional and rfl::Description #3, commit89c36611, score 93/100).discuss/ssot: Speculative prototypes remain preserved off the adoption queue — PR Add opt-in rfl::NoDuplicateKeys processor for JSON and YAML #128 (rfl::NoDuplicateKeys), PR Add opt-in rfl::MaxDepth<N> processor for recursion-depth DoS protection #130 (rfl::MaxDepth<N>), PR Add format-agnostic rfl::ErrorKind to rfl::ErrorDetail #70 (rfl::ErrorKind), and PR Add machine-readable Error::code() and ErrorDetail for validator errors #120 (Error::code()).