Skip to content

feat(core): publish the reproducibility envelope; document coupling at scale#1085

Merged
zachshallbetter merged 2 commits into
mainfrom
feat/determinism-envelope
Jul 21, 2026
Merged

feat(core): publish the reproducibility envelope; document coupling at scale#1085
zachshallbetter merged 2 commits into
mainfrom
feat/determinism-envelope

Conversation

@zachshallbetter

Copy link
Copy Markdown
Owner

Why

An external integrator evaluated Fundamental without installing it — every belief formed by reading. Three of those beliefs were false, and two were the documentation's fault rather than the reader's.

1 · FieldHandle.guarantees — the envelope is now queryable

The determinism classification, controlled/uncontrolled inputs, repeatability requirements and cross-plane tolerance existed only inside an unexported experimental module. To learn that host-geometry and body-ordering are uncontrolled, you had to read source the project tells you not to depend on.

So the integrator concluded the runtime was byte-identical across Node, native and browser and designed replay and shared-state features on it. Reasonable inference; unavailable information.

field.guarantees
// → { determinism: 'conditionally-deterministic',
//     controlledInputs:   ['injected-rng', 'clock'],
//     uncontrolledInputs: ['host-geometry', 'body-ordering'],
//     requirements: [...], crossPlaneTolerance: 1e-6 }

Additivecheck:api never fails on an addition. Documented in the HANDLE table.

The drift guard

Publishing one fact twice creates a new problem. guarantees.test.ts asserts the published envelope matches the world adapter's contract declaration field by field, so the two cannot diverge silently.

2 · coupling-discipline.md

The rung discipline — couple at the lowest rung that achieves the effect — was arrived at independently by two consumer projects, each hitting the same wall and deriving it from scratch. That is a strong signal it belonged in canon.

Includes the section that was missing entirely: when not to use the field. High-frequency domain telemetry belongs in plain arrays and instanced geometry, not in bodies — a category boundary, not a performance tip.

3 · README signposting

I initially claimed @fundamental-engine/three was invisible in the README. That was wrong — I truncated a grep and concluded from an incomplete view. It is fully documented at line 486 with the exact API.

The weaker claim survives: two competent readers still missed it, at line 486 of a 649-line file. So this is a pointer in the capabilities section, not a rewrite.

Gates

typecheck · check:api (20 protected) · check:docs · check:links · core suite 1115/1115

…t scale

Three fixes, all traceable to one external integrator forming false beliefs from the
available documentation.

FieldHandle.guarantees. The determinism classification, the controlled and uncontrolled
inputs, the requirements for repeatability and the cross-plane tolerance existed only in an
unexported experimental module. A consumer building replay and shared-state features
concluded the runtime was byte-identical across Node, native and browser, and designed on
it. That was a reasonable inference — the real answer was not reachable from the public
API. It is conditionally-deterministic; host-geometry and body-ordering are NOT controlled;
cross-plane agreement is a 1e-6 tolerance, never bit-equality.

Publishing one fact twice creates a drift problem, so guarantees.test.ts asserts the
published envelope matches the world adapter's contract declaration field by field.

coupling-discipline.md. The rung discipline — couple at the lowest rung that achieves the
effect — was arrived at independently by two consumer projects that each hit the same wall
and each had to derive it from scratch. It covers rung selection, sampling cadence, the
measured cost, and the section that was missing entirely: when NOT to use the field.
High-frequency domain telemetry belongs in plain arrays and instanced geometry, not in
bodies. That is a category boundary, not a performance tip.

README signposting. @fundamental-engine/three was already fully documented in the packages
table at line 486 of a 649-line README, with the exact API named. Two independent readers
still recommended hand-building the headless-to-THREE.Points bridge it ships. The entry was
correct; its placement was not, so a pointer now sits in the capabilities section where
someone choosing an architecture will actually look.

typecheck clean; check:api 20 protected entries; check:docs and check:links green; core
suite 1115/1115.
@vercel

vercel Bot commented Jul 20, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
fundamental-engine Ready Ready Preview Jul 21, 2026 12:19am

Request Review

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

Adding a required member to FieldHandle broke every class implementing it. FieldLayer
(three) and FieldField (vanilla) both wrap a core handle and hand-forward its surface, so
each needs a delegating getter — the wrappers change how a field is hosted or drawn, not
what the engine guarantees about reproducing a run.

This was my verification failure, not a surprise. After adding the interface member I ran
pnpm typecheck from inside packages/core, which runs only that package's script, and
reported the result as though it were the recursive gate. The root typecheck and pnpm -r
build were never run. Vercel ran them and found it immediately.

vanilla already ships delegation-drift.test.ts for precisely this class of bug — a handle
member that exists on a real headless handle but was never forwarded on the wrapper. The
guard was right; I did not run it.

Recursive build clean, pnpm typecheck clean from the root, all nine packages' tests pass,
check:api 20 protected entries, check:docs green.
@zachshallbetter
zachshallbetter merged commit 22aaf1e into main Jul 21, 2026
16 checks passed
@zachshallbetter
zachshallbetter deleted the feat/determinism-envelope branch July 21, 2026 00:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant