Skip to content

Commit f046cbe

Browse files
Alexboiboiclaude
andcommitted
Settle the pinning half of the instancing question
Whether an instance records a hash is not open, and the precedent is in the repo rather than in an argument: mesh_source already carries sha256 for exactly this situation, and meshes.py says why -- "sha256 is for telling a person their STL changed". A definition document is an STL with parameters, so it gets the same treatment. Two reasons it matters more than it first sounds. An instance puts part of the scene in a file that can change underneath it, so without a hash the same document stops describing the same scene over time. And docs/fem.md 12.1 keys the FEM cache on field-affecting events, so an unpinned instance lets the cache return a solve computed for geometry that is no longer there -- a wrong number with a solver's name on it, arriving through the back door. What stays open is narrower: what a mismatch does. Meshes warn. Instances may want to refuse until the reference is re-pinned, because a changed mesh gives you a visibly different shape while a changed definition can move a field a few percent and look entirely normal. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
1 parent 3f2d182 commit f046cbe

1 file changed

Lines changed: 17 additions & 5 deletions

File tree

docs/instancing.md

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -92,11 +92,23 @@ the feature that makes code-as-truth unnecessary, which is `docs/direction.md`
9292

9393
## 5. Open questions
9494

95-
1. **Version pinning and updates.** The `sha256` above pins a definition, which
96-
is what reproducibility requires — but then updating a part is an explicit
97-
re-pin, like a lockfile. Is that the right ergonomics, or does it need a
98-
"check for updates" affordance? Godot does not pin and instances break;
99-
Onshape pins to a version and updating is deliberate. Onshape looks right.
95+
1. **What a hash mismatch does.** _Whether_ to record one is not open: an
96+
instance puts part of the scene in a file that can change underneath it, so
97+
without a hash the same document stops describing the same scene over time —
98+
and `docs/fem.md` §12.1 keys the FEM cache on field-affecting events, so an
99+
unpinned instance lets the cache hand back a solve computed for geometry that
100+
is no longer there. The precedent is already in the repo rather than in an
101+
argument: `mesh_source` carries `sha256` for exactly this, and `meshes.py`
102+
says why — _"sha256 is for telling a person their STL changed"_. A definition
103+
document is an STL with parameters.
104+
105+
What is open is the response. Meshes **warn**. Instances may want to
106+
**refuse** until the reference is re-pinned, lockfile-style, because a
107+
changed mesh gives you a visibly different shape while a changed definition
108+
can move a field a few percent and look entirely normal. Godot does not pin
109+
at all and its instances break; Onshape pins to a version and updating is
110+
deliberate.
111+
100112
2. **Nested instances.** A definition containing an instance. Needs cycle
101113
detection — `move_object` already cycle-checks a reparent, so the idea
102114
exists, but this one spans files.

0 commit comments

Comments
 (0)