Rule 11.17
On this page

Rule 11.17

Chapter 11, Targets and the oracle Test

A raw row must name one documented escape hatch, and the escape hatches are exactly these: Frame.encoder, RenderPass.raw, Texture.texture, Sampler.sampler, Runtime.device, createRuntime({ device }), a host GPUBuffer, GPUTexture, GPUTextureView, GPUSampler, WebGLBuffer, WebGLTexture or WebGLSampler passed as a binding, a target or a geometry buffer, RenderPipeline.draw(pass, …) and ComputePipeline.dispatch(target, …) into the host’s own encoders, and Runtime.submit(…encoders). Each is documented in its JSDoc as an escape hatch. Removing one, or narrowing what it accepts, is a breaking change (Rule 13.9).

DeviceInfo (change 0083; Rules 11.8 and 11.11) contains copied metadata and no native handles. It neither replaces nor narrows an escape hatch. Wrapping a host device reads its own available identity and otherwise preserves unavailable identity; it never probes a different device to infer the host’s identity.

The rule text and the parts under it are the compiler's own English, as the design document writes them.

Rationale

an escape hatch is the promise that a capability the runtime does not spell is still reachable without leaving the runtime; a host builds on it, so it is part of the public surface and not a convenience that may go.

Derives from

Rule 11.11; src/runtime/runtime.ts (Frame.encoder, RenderPass.raw, Runtime.device), src/runtime/resources.ts (Texture.texture, Sampler.sampler), src/runtime/program.ts (the host objects a binding and a Geometry take); Rule 13.9.

How it is verified

Checked by a test. A test, a gate script or a CI workflow names this rule, and the traceability check fails when a file listed below stops naming it.

Where the rule says the compiler enforces it:

capability-coverage.test.ts, which fails on a raw row that names nothing in the list, and src/api-surface.test.ts, which already fails on a removed export.

The files that verify it at commit 91c2fe31, each at the first line that names the rule:

See also

Source

The rule at commit 91c2fe31:

Edit this page Report a problem