Repository navigation
Add the ray-traced scene profile: types, validator, receipt, fixtures - #160
Conversation
Implement the first Geordi slice of the accepted fixed-point and ray-traced scene profile design, in Rust only and without a renderer. geordi-ir gains the geordi-fixed-q32.32/1 number type, which deserializes only from JSON integers in -(2^53 - 1)..=2^53 - 1, and the geordi-ray-traced-scene/1 DTOs, parser and validator with stable GEORDI_E_RT_* diagnostics. The validator checks every version 1 rule in the design, including the exact i128 trace-domain check on transformed mesh bounds. It also verifies mesh asset hashes, computes canonical scene and receipt hashes and the raw RGBA8 image hash, and defines the geordi-ray-traced-render-receipt/1 type with a builder, parser and validator. geordi-renderer gains a ray-tracing runtime profile with a negotiation check, and a checked public RenderedImage::from_rgba8 constructor. Fixtures: one valid triangle-only scene with a binary PLY mesh and 60 failure fixtures, each with its expected code and path recorded. The profile is not claimed: no proof gate has run. Refs #153
Codex Review Summary: ❌ FailedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 2 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
Identities are recognized at runtime negotiation, not by the artifact validator, and -0 is rejected rather than normalized. Both were choices made while implementing #153; the accepted design now says so.
Closes #153
What this adds
The first Geordi slice of the accepted design
docs/design/2026-11-fixed-point-and-ray-traced-scene-profiles.md(Part C). It is Rust only and contains no renderer.geordi-ir:GeordiFixedQ32_32forgeordi-fixed-q32.32/1. It deserializes only from a JSON integer token in-(2^53 - 1)..=2^53 - 1. There are DTOs forgeordi-ray-traced-scene/1(meshes by hash and layout, instances with column-major affine transforms, the pinhole camera withtanHalfFovY, diffuse materials, the directional light and the uniform sky, film, and render settings).parse_geordi_ray_traced_scene,validate_geordi_ray_traced_sceneandvalidate_geordi_ray_traced_scene_mesh_assetsreport stableGEORDI_E_RT_*diagnostics with JSON paths. The module also has the canonical scene JSON andsceneHash, the raw-RGBA8imageHash, and thegeordi-ray-traced-render-receipt/1type with a builder, parser, validator, canonical JSON and receipt hash.geordi-renderer:GeordiRayTracedRuntimeProfilewithassert_ray_traced_runtime_profile, which works likeassert_native_runtime_profile.RenderedImage::from_rgba8is a public checked constructor that rejects a byte length other thanwidth * height * 4and overflow of that product.RenderedImage::image_hashreturns the image hash. Existing behaviour is unchanged.fixtures/ray-traced-scene/: one valid triangle-only scene (two instances of a binary little-endian PLY unit quad) and 60 failure fixtures, one rule each. Each failure's stage, code and path are recorded infailures/expected-diagnostics.json, and a test checks them exactly.docs/ray-traced-scene-profile.md, a new section indocs/ERROR_CODES.md, and updates to the docs and design indexes,STATUS.md, theREADME.mdstatus and nonclaims, andCHANGELOG.md.Not claimed: Geordi does not claim
geordi/ray-traced-3d/1. None of the design's proof gates has run.Interpretations to review
Most of the design is implemented as written. These points needed a choice. Each one is also stated in the reference page.
name/N. Recognizing an identity is left toassert_ray_traced_runtime_profile, which is how B5 assigns it ("A runtime profile declares the integrator, sampler and tone curve identities it implements"). The reference fixture usesfixture-placeholder-sampler/1andfixture-placeholder-tone-curve/1, which no runtime implements. When Bunny publishes its identities, they can become a recognized list in Geordi.-0is rejected, not normalized.serde_jsonreads-0as a float, so it cannot be told apart from-0.0or-0e0, which the profile rejects. The design (A2) says-0is normalized to0; canonical writers never emit it.$, with the line and column in the message, becauseserde_jsongives no JSON path and addingserde_path_to_errorwould be a new dependency. Fractions, exponents,-0and out-of-range integers carry exact JSON paths.geordi/ray-traced-3d/1and each feature its content uses. Declaring an unused feature is accepted.min <= maxon every axis. This is a small rule the design implies but does not state.sceneHashis the hash of the existing Rust canonical JSON form (geordi_sha256_from_canonical_json_value: sorted keys, two-space indent, final newline). The committed reference scene is stored in that form.GeordiRuntimeUnsupportedProfileError(no code, as the native path), and also checks mesh layout identities.Verification
All Rust gates ran in the
geordidev container (rust 1.96.0) at the head commit:cargo fmt --check,cargo clippy --locked --workspace --all-targets -- -D warnings, andcargo test --locked --workspace.The tests use these oracles:
json.dumps(sort_keys=True, indent=2);hashlibandshasum;Deliberate mutations, each restored afterwards:
<=changed to<: 2 tests fail;<changed to<=: 4 tests fail;>=changed to>: 2 tests fail.The TypeScript and docs gates run in CI only. A local Python copy of the documentation hygiene rules passes.