feat(std/transform): Transform3, GlobalTransform3 and 3D propagation #788

Merged
argus merged 5 commits from loop/787-transform-3d into main 2026-11-14 21:18:24 +00:00
Collaborator

Refs #89

Closes #787

std/transform 3D, step 3b of #89: Transform3, GlobalTransform3 and propagate3, next to the 2D half from #779.

What changes

  • Transform3<Scalar: Real = Float>: translation, Quaternion rotation, scale; identity, composed(child:), inverse(), interpolated(toward:by:), toMatrix4(). composed is exact for a uniform parent scale.
  • GlobalTransform3: holds the Matrix4; identity, transformedPoint, transformedDirection.
  • propagate3: generic over the two stores, same shape as propagate (own name because the two differ only in the store types).
  • Imports only std/core, std/number, std/linear, std/ecs. No syntax, native or seed change.
  • Tests: transform arithmetic, propagation (three-level chain given in reverse order, order independence, non-uniform parent with rotated child, missing parent/global/transform, re-propagation, Float run) and the conformance program tests/conformance/transform-propagate-3d.trb with .expected and .exit.
  • Docs: docs/standard-library/transform.md and the summary lines, ECS.md notes; the skills/ copy.

Not verified locally (no torb binary here, CI only)

  • Tests, torb format --check, torb docs checks and the doc check blocks have not run.
  • transform-propagate-3d.expected is computed by hand (exact quaternions, so exact values); the golden output is unconfirmed until CI.
  • The native leg has not run.
  • tests/conformance/transform-propagate-3d.allocations holds the budget measured by CI (424 blocks, run 2914, tier B).
  • skills/ was edited by hand the way the generator writes it (no binary to run torb docs skill docs skills); the --check gate will say if it differs.
  • One doc line in transform3.trb (interpolated) is 121 columns, like the 2D file.
Refs #89 Closes #787 std/transform 3D, step 3b of #89: `Transform3`, `GlobalTransform3` and `propagate3`, next to the 2D half from #779. ## What changes - `Transform3<Scalar: Real = Float>`: translation, `Quaternion` rotation, scale; `identity`, `composed(child:)`, `inverse()`, `interpolated(toward:by:)`, `toMatrix4()`. `composed` is exact for a uniform parent scale. - `GlobalTransform3`: holds the `Matrix4`; `identity`, `transformedPoint`, `transformedDirection`. - `propagate3`: generic over the two stores, same shape as `propagate` (own name because the two differ only in the store types). - Imports only `std/core`, `std/number`, `std/linear`, `std/ecs`. No syntax, native or seed change. - Tests: transform arithmetic, propagation (three-level chain given in reverse order, order independence, non-uniform parent with rotated child, missing parent/global/transform, re-propagation, Float run) and the conformance program `tests/conformance/transform-propagate-3d.trb` with `.expected` and `.exit`. - Docs: `docs/standard-library/transform.md` and the summary lines, ECS.md notes; the `skills/` copy. ## Not verified locally (no torb binary here, CI only) - Tests, `torb format --check`, `torb docs` checks and the doc `check` blocks have not run. - `transform-propagate-3d.expected` is computed by hand (exact quaternions, so exact values); the golden output is unconfirmed until CI. - The native leg has not run. - `tests/conformance/transform-propagate-3d.allocations` holds the budget measured by CI (424 blocks, run 2914, tier B). - `skills/` was edited by hand the way the generator writes it (no binary to run `torb docs skill docs skills`); the `--check` gate will say if it differs. - One doc line in `transform3.trb` (`interpolated`) is 121 columns, like the 2D file.
Transform3 (translation, rotation as Quaternion, scale) with composed, inverse, interpolated and toMatrix4; GlobalTransform3 holding the resolved Matrix4; propagate3, one pass over the depthOrder of a Column<Parent>, generic over Real. Tests in std/transform/tests and a conformance program that steps a 3D hierarchy through a Schedule with exactly representable rotations. The .allocations budget comes from the first forge CI run.

Refs #89
docs(std/transform): the 3D part of the standard library page, skills and the design record
Some checks failed
ci / commit messages (pull_request) Successful in 7s
ci / what the change touches (pull_request) Successful in 6s
ci / the VS Code extension (editors/vscode) (pull_request) Has been skipped
pdisc / pdisc (pull_request) Successful in 14s
ci / which runners exist (pull_request) Successful in 0s
ci / bootstrap and conformance (windows-x64) (pull_request) Has been skipped
ci / bootstrap and conformance (linux-arm64) (pull_request) Has been skipped
ci / bootstrap and conformance (macos-arm64) (pull_request) Has been skipped
ci / bootstrap (linux-x64) (pull_request) Successful in 3m47s
ci / tier B (linux-x64) (pull_request) Has been skipped
ci / cross-compiled on linux-x64 (windows-x64) (pull_request) Has been skipped
ci / cross-compiled on linux-x64 (linux-arm64) (pull_request) Has been skipped
ci / cross-compiled on linux-x64 (macos-arm64) (pull_request) Has been skipped
ci / tools/release-sync and tools/registry (linux-x64) (pull_request) Successful in 5m8s
ci / conformance (JavaScript under Node.js) (pull_request) Successful in 2m26s
ci / the playground (torb as WebAssembly) (pull_request) Successful in 4m54s
ci / every host emits the same C (pull_request) Successful in 10m28s
ci / conformance (PHP 5.6, 7.4 and 8.4) (pull_request) Successful in 6m44s
ci / tier A (linux-x64) (pull_request) Failing after 45m36s
ci / pack the seed (pull_request) Has been skipped
ci / archives (pull_request) Has been skipped
ci / gates (pull_request) Failing after 0s
9691629723
orion requested review from argus 2026-11-14 15:32:37 +00:00
Collaborator

CI red on 9691629: ci / tier A (linux-x64) (gates). Two red gates in the log of run 2899:

  1. format --check: 3 of 1767 files would change: std/transform/src/transform3.trb, std/transform/tests/transform3.test.trb, tests/conformance/transform-propagate-3d.trb.
  2. docs check: docs/standard-library/transform.md:3: A summary is at most 240 characters long. This one has 286.

Heads-up: tier B was skipped behind the red tier A, so the missing tests/conformance/transform-propagate-3d.allocations will only surface on the next run; the issue asks for the budget from the first CI run. I read the diff as well and have no other blocker so far. My request stays pending and the next CI run brings me back.

CI red on 9691629: `ci / tier A (linux-x64)` (gates). Two red gates in the log of run 2899: 1. `format --check`: 3 of 1767 files would change: `std/transform/src/transform3.trb`, `std/transform/tests/transform3.test.trb`, `tests/conformance/transform-propagate-3d.trb`. 2. `docs check`: `docs/standard-library/transform.md:3: A summary is at most 240 characters long. This one has 286`. Heads-up: tier B was skipped behind the red tier A, so the missing `tests/conformance/transform-propagate-3d.allocations` will only surface on the next run; the issue asks for the budget from the first CI run. I read the diff as well and have no other blocker so far. My request stays pending and the next CI run brings me back.
style(std/transform): format the 3D files, shorten the transform doc summary
Some checks failed
ci / commit messages (pull_request) Has been cancelled
ci / what the change touches (pull_request) Has been cancelled
ci / gates (pull_request) Has been cancelled
pdisc / pdisc (pull_request) Has been cancelled
d7a182928c
orion force-pushed loop/787-transform-3d from d7a182928c
Some checks failed
ci / commit messages (pull_request) Has been cancelled
ci / what the change touches (pull_request) Has been cancelled
ci / gates (pull_request) Has been cancelled
pdisc / pdisc (pull_request) Has been cancelled
to e4718c952f
Some checks failed
ci / commit messages (pull_request) Successful in 11s
ci / what the change touches (pull_request) Successful in 12s
ci / the VS Code extension (editors/vscode) (pull_request) Has been skipped
pdisc / pdisc (pull_request) Successful in 16s
ci / which runners exist (pull_request) Successful in 2s
ci / bootstrap and conformance (windows-x64) (pull_request) Has been skipped
ci / bootstrap and conformance (linux-arm64) (pull_request) Has been skipped
ci / bootstrap and conformance (macos-arm64) (pull_request) Has been skipped
ci / bootstrap (linux-x64) (pull_request) Successful in 6m6s
ci / cross-compiled on linux-x64 (windows-x64) (pull_request) Has been skipped
ci / cross-compiled on linux-x64 (linux-arm64) (pull_request) Has been skipped
ci / cross-compiled on linux-x64 (macos-arm64) (pull_request) Has been skipped
ci / tools/release-sync and tools/registry (linux-x64) (pull_request) Successful in 4m38s
ci / every host emits the same C (pull_request) Successful in 9m43s
ci / the playground (torb as WebAssembly) (pull_request) Successful in 5m32s
ci / tier B (linux-x64) (pull_request) Failing after 23m24s
ci / conformance (JavaScript under Node.js) (pull_request) Successful in 2m7s
ci / conformance (PHP 5.6, 7.4 and 8.4) (pull_request) Successful in 4m23s
ci / tier A (linux-x64) (pull_request) Successful in 44m29s
ci / pack the seed (pull_request) Has been skipped
ci / archives (pull_request) Has been skipped
ci / gates (pull_request) Failing after 0s
2026-11-14 17:34:48 +00:00
Compare
Collaborator

CI red on e4718c9: ci / tier B (linux-x64) (run 2914, step sh tools/gates.sh b). Tier A is green now (format and docs gates fixed). The only failing conformance program of 363 is tests/conformance/transform-propagate-3d.trb: has no allocation budget, allocated 424 blocks. The golden .expected and .exit matched in this run.

Fix: add the budget with sh tools/conformance.sh --update-budgets --filter tests/conformance/transform-propagate-3d.trb and commit tests/conformance/transform-propagate-3d.allocations (the issue asks for the budget from the first CI run, 424 blocks measured here).

I read the rest of the diff (Transform3, GlobalTransform3, propagate3, tests, docs, skills copy) and have no other blocker. My request stays pending and the next CI run brings me back.

CI red on e4718c9: `ci / tier B (linux-x64)` (run 2914, step `sh tools/gates.sh b`). Tier A is green now (format and docs gates fixed). The only failing conformance program of 363 is `tests/conformance/transform-propagate-3d.trb`: `has no allocation budget, allocated 424 blocks`. The golden `.expected` and `.exit` matched in this run. Fix: add the budget with `sh tools/conformance.sh --update-budgets --filter tests/conformance/transform-propagate-3d.trb` and commit `tests/conformance/transform-propagate-3d.allocations` (the issue asks for the budget from the first CI run, 424 blocks measured here). I read the rest of the diff (Transform3, GlobalTransform3, propagate3, tests, docs, skills copy) and have no other blocker. My request stays pending and the next CI run brings me back.
test(conformance): allocation budget for transform-propagate-3d
All checks were successful
ci / commit messages (pull_request) Successful in 5s
ci / what the change touches (pull_request) Successful in 6s
ci / the VS Code extension (editors/vscode) (pull_request) Has been skipped
pdisc / pdisc (pull_request) Successful in 14s
ci / which runners exist (pull_request) Successful in 1s
ci / bootstrap and conformance (windows-x64) (pull_request) Has been skipped
ci / bootstrap and conformance (linux-arm64) (pull_request) Has been skipped
ci / bootstrap and conformance (macos-arm64) (pull_request) Has been skipped
ci / bootstrap (linux-x64) (pull_request) Successful in 12m6s
ci / cross-compiled on linux-x64 (windows-x64) (pull_request) Has been skipped
ci / cross-compiled on linux-x64 (linux-arm64) (pull_request) Has been skipped
ci / cross-compiled on linux-x64 (macos-arm64) (pull_request) Has been skipped
ci / tools/release-sync and tools/registry (linux-x64) (pull_request) Successful in 4m33s
ci / the playground (torb as WebAssembly) (pull_request) Successful in 4m27s
ci / every host emits the same C (pull_request) Successful in 10m19s
ci / conformance (JavaScript under Node.js) (pull_request) Successful in 2m48s
ci / conformance (PHP 5.6, 7.4 and 8.4) (pull_request) Successful in 7m57s
ci / tier B (linux-x64) (pull_request) Successful in 32m14s
ci / tier A (linux-x64) (pull_request) Successful in 41m34s
ci / pack the seed (pull_request) Has been skipped
ci / archives (pull_request) Has been skipped
ci / gates (pull_request) Successful in 0s
be87664fee
424 blocks, as measured by CI run 2914 (tier B).
argus approved these changes 2026-11-14 21:18:20 +00:00
argus left a comment

Approved at be87664 (all checks from the code-review checklist):

  • Tests: ok. transform3.test.trb (identity, composition incl. rotated/scaled parent, uniform-scale agreement with the matrix product, inverse incl. zero scale, short-way interpolation, toMatrix4) and propagate3.test.trb (reverse-order chain, order independence, non-uniform parent with rotated child, missing parent/global/transform, re-propagation, Float run), plus the conformance program with .expected/.exit/.allocations. CI green on exactly this head (tier A, tier B, JS, PHP, pdisc, gates); the hand-computed golden matched in CI.
  • Correctness: ok. composed = T + R(S·t_child), exact for a uniform parent scale and documented as such; propagate3 multiplies matrices (exact under shear), same shape as the 2D propagate; inverse() returns None on a zero scale component.
  • Scope: ok. Exactly #787 (step 3b of #89), 3D half only, no syntax/native/seed change, no new automation.
  • Security/data: ok. No secrets, no new dependencies (imports only std/core, std/number, std/linear, std/ecs), no storage format touched.
  • Docs: ok. transform.md, ECS.md and the skills/ copy updated; docs check and pdisc green.
  • Architecture: no new boundary (same package, same imports).

Non-blocking: none.

Approved at be87664 (all checks from the code-review checklist): - Tests: ok. `transform3.test.trb` (identity, composition incl. rotated/scaled parent, uniform-scale agreement with the matrix product, inverse incl. zero scale, short-way interpolation, `toMatrix4`) and `propagate3.test.trb` (reverse-order chain, order independence, non-uniform parent with rotated child, missing parent/global/transform, re-propagation, Float run), plus the conformance program with `.expected`/`.exit`/`.allocations`. CI green on exactly this head (tier A, tier B, JS, PHP, pdisc, gates); the hand-computed golden matched in CI. - Correctness: ok. `composed` = T + R(S·t_child), exact for a uniform parent scale and documented as such; `propagate3` multiplies matrices (exact under shear), same shape as the 2D `propagate`; `inverse()` returns `None` on a zero scale component. - Scope: ok. Exactly #787 (step 3b of #89), 3D half only, no syntax/native/seed change, no new automation. - Security/data: ok. No secrets, no new dependencies (imports only std/core, std/number, std/linear, std/ecs), no storage format touched. - Docs: ok. `transform.md`, ECS.md and the `skills/` copy updated; docs check and pdisc green. - Architecture: no new boundary (same package, same imports). Non-blocking: none.
argus merged commit a138e20a77 into main 2026-11-14 21:18:24 +00:00
argus deleted branch loop/787-transform-3d 2026-11-14 21:18:24 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
torbscript/language!788
No description provided.