Repository navigation
VN35: validated paths to individual component instances - #13
Merged
Merged
Conversation
The mesh loader wrote a file's measured facts (vertices, triangles, parts, joints, clips, clipFrames, frameOrigin, bounds) onto the node it found with getGraph().nodes[nodeId]. An inner node's id is flattened (instance/inner), the document does not hold it, so the write never happened and the node compiled as the one-vertex stand-in: it drew nothing. The facts now land as that instance's overrides of the inner node (state.componentOverrides, keyed internalParameterPath), which flattening already applies over the definition. Each instance keeps its own size, two instances can load different files, and the shared definition is untouched. - setParameters gains an optional internalNodeId, on the precedent of setNodeChannelMask's: one op through the bus, so undo, audit and the revision check come with it. A non-instance and a nested path are refused by name (parameter.internal.notComponent / .nested). - "Already sized" reads the flattened node (definition plus overrides). - Ids are split and joined through domain/components/addressing.ts (enteredThrough, toInstance), per T1695b's gate. - One level only: an override key is <node>/<key>, so a mesh inside a nested component is refused as mesh.unsizable. mesh.component is retired. Tests: the literal bug on Dawn (the app's loader hook sizes two instances of one component loading different files, and each Geometry renders only its own instance's mesh); undo of the measure; the definition untouched; the nested refusal. Red-verified against the old lookup. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
COMP-model stage 1 (proposal 01 §4). B41 renumbers the names inside the
second and later instances of a component, so an outer reference could
reach in only by a bare name, and a bare name binds the first copy. Three
instances of a Projector component could not be bound by one Render.
- `op('instance/node')`, `../node`, and path-valued source references
(every SOURCE_REFERENCE_PARAMETERS entry). Relative only. A segment is
a node's name as written in its own graph. Parsing and the walk live in
addressing.ts, the one joiner.
- Resolved once, at flatten (path-references.ts): each path is rewritten
to its target's unique flat label, so synthesis, the op() reader,
liveness and channels are unchanged. A path that reaches nothing stays
as written and is refused by name.
- Bare names resolve as before. New warning compiler/reference-cross-scope
when one reaches INTO an instance the referrer is not in, with the path
to write and how many copies carry the name. Reading outward is silent.
No shipped example raises it; stage-previz-8 raises 52.
- §V128: a rename moves the head of a path written in its graph. B41's
uniquing does not touch paths.
- `/` is refused in labels at the exact doors (node.label.separator); the
suggestion is TD's validName form (roleFromText). node.rename already
converts it.
Gate (Dawn, projector-paths.gpu.test.ts): one Projector component placed
three times through the app's commands, each with its own aim and pure
colour; the outer Render binds all three by path and each third of the
stage is lit in its own colour only. Red-verified with the pass removed.
The bare name, the old way, lights the left third alone and now warns.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Merge current main into VN35 without reinstating the superseded VN33 writer. Keep authored scopes through parameter projection, resolve single source paths whole, and validate draft reference cycles through the shared command context. Cover parameter commands, definition sessions, rename, dry run and repair.
This was referenced Oct 8, 2026
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.
An outer Render or expression can now address a particular component copy by
instance/node, and an internal reference can climb with../node. This preserves drmbt's VN35 feature from #5 while retaining main's validated descendant writes and nested mesh support.The three reproduced review defects are fixed:
CommandContext. Root edits and definition sessions project hypothetical drafts using the same compiler function; parameter commands, rename, dry runs and unrelated repair are covered. Existing authored-graph cycle checks remain in place.Also reconcile #5 with current main without restoring #4's unchecked writer or nested refusal, reject
.path segments as documented, provide the GPU fixture's required flattened context, dispose its runtime, and add a CPU proof of the three-projector setup through real commands and compiler bindings.Validation: focused compiler, command, component and mesh-loader tests pass; typecheck, full lint (four existing warnings), build and 290 first-import checks pass. The broader gates pass except the devices-only helper timeout reproduced on the unchanged baseline; the updated frame-path guard passes separately. Real Dawn pixel verification is unavailable in this sandbox (no adapter); the tests continue to fail explicitly when required GPU support is absent.
This replaces #5 because the connector cannot update drmbt's fork. The repair commit has the original VN35 commit and current main as parents, preserving contributor history and #6's ancestry. After merge, #5 will be closed with an explanatory link; #6 can be evaluated against this implementation without requiring #4 to merge as written.
All work was isolated from the separate mapping integration. No local Git history or mapping changes were altered.