Repository navigation
feat(sdk): builtin field tables, unprojectPixel and ImageAnnotations additions (0.36.0) - #204
Open
facontidavide wants to merge 1 commit into
Open
facontidavide wants to merge 1 commit into
facontidavide wants to merge 1 commit into
Conversation
…additions (0.36.0) The header-only part of the derived-objects SDK work, split out of #202 so it can be released before the host contract, which stays in #202 for the next minor. - Builtin field tables (pj_base/builtin/*_fields.hpp, field_table.hpp, field_table_registry.hpp): one generic description of each builtin struct's members, so script binders and agents see the same fields. Buffer layouts never report more records than their bytes hold, and numeric setters saturate instead of converting out of range. - PinholeIntrinsics / unprojectPixel (depth_image_utils.hpp): unproject through the full inverse of K, validated once per image. Skew and projective terms are honoured, so a float32-rounded K is accepted. - ImageAnnotations: an optional timestamp and image topic on the wire (additive; a 0.35 reader skips them). - Object-topic metadata: pj_snapshot, and pj_derived documented as an open value set (the key means "produced by a host data processor", the value names the processor kind). Host contract: unchanged (no floor impact). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
facontidavide
force-pushed
the
feat/sdk-0.36-header-only
branch
from
October 14, 2026 08:59
a739689 to
063050e
Compare
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.
Changed lines
About 1,400 of the production lines are the field tables, carried over from #202 and #203 as reviewed there.
Goals
Release 0.36.0 as the header-only part of the derived-objects SDK work, split out of #202 as agreed with its author:
What ships:
field_table.hpp,field_table_registry.hpp, and one*_fields.hppfor each of the eight tabled builtins. They give one generic description of each struct's members, so the Luau and Python binders and an agent see the same fields.PinholeIntrinsics/unprojectPixel(depth_image_utils.hpp).timestampandimage_topicon the wire.pj_snapshotandpj_derived.Host contract: unchanged. No new
feature_floors.jsonentry;check_feature_floors.pypasses unchanged.Two decided changes beyond #202:
unprojectPixeluses the full inverse of K. It used to reject K unless the skew and projective terms were exactly 0 and 1, so a K that went through float32 was rejected (spacing near 1.0 is about 1.2e-7). It now rejects only a non-finite or singular K, a non-finite result, or a ray with z <= 0.PinholeIntrinsicskeeps K⁻¹ private, so the representation is not frozen by the tag.pj_derivedis an open value set. The key means "produced by a host data processor", and the value names the kind ("on_demand"today; a host may stamp others, such as"markers").How to evaluate
main, and nothing shipped references a host-contract declaration. Review withgit diff 7793f4d5a..HEAD: the remaining differences are the two decided changes, the review fixes below, and docs or CHANGELOG text reworded to drop host-contract references.record_count = 0when the declared size exceeds the bytes. A truncated recording, or a script settingwidthbeforedata, otherwise leads a binder to read out of bounds.set_numbersaturates. NaN becomes 0 and out-of-range values clamp to the integer or enum range, replacing undefined float-to-integer conversion (on x86color.r = 300used to give 44).fromKrequires a finite determinant.unprojectat K or depth around 1e±100. Not reachable with pixel-scale K and metric depth.INT64_MINannotation timestamp round-trip. This is pre-existing shared timestamp code, and the value is not realistic.@since 0.36.0tags, itsfeature_floors0.36.0 group and the 0.36.0 CHANGELOG entries move to the next minor.plugin_data_api.hshould drop the__markers__/prefix test in favour of thepj_derivedkey.Test plan
./build.sh --debug(ASan) and./test.sh: 98/98 passunprojectPixel(3 of 11 new tests failed before the change), buffer-layout clamping, setter saturation, determinant checktools/feature_floors/check_feature_floors.py: OK, no new floor entriespre-commitcleanabidiffadditions-only for a MINOR) runs on this PRFollow-up: the two remaining P3 findings of the Codex review
splitTimestampwritesINT64_MINas seconds-9223372037, nanos145224192, butcombineTimestamprejected seconds belowINT64_MIN / 1e9before adding the nanos. So the decoder refused a payload our own encoder produced.combineTimestampnow delegates to the existingPJ::combineSecondsAndNanos(time_math.hpp), which/simplifypointed out already does this. Every decoder that reads a protobuf Timestamp gets the fix.-9223372037with nanos145224192–999999999. Everything else behaves as before, and the wire format is unchanged.RoundTrip_TimestampExtremesandTimestampOutsideInt64NanosIsRejectedfailed before the fix./simplify, then Codex (no findings, "Ship") and Opus (one test-hygiene fix: theroundTriphelper now fails cleanly instead of dereferencing an empty result).image_annotations_format.mdsay the timestamp andimage_topicare serialized.🤖 Generated with Claude Code