Persistent-topology torture suite
InvariantCAD’s persistent-topology contract is fail-closed: a run passes when a reference resolves to exactly one compatible current face, edge, or exact B-Rep vertex, and also when an unsupported identity is rejected with the documented missing or ambiguous diagnostic. Success never means guessing from a kernel index or enumeration order. The published corpus exercises protocol-v2 primary descriptor@6 on both the
known stock OCCT runtime and the matched owned facade ABI 0.9 runtime, which
retains the ABI 0.6 exact-evolution matrix. Each runtime also exposes its exact
protocol-v1 compatibility floor:
descriptor @4 for stock and owned ABI 0.2–0.4, or descriptor @5 for owned
ABI 0.5+. The v1 fixtures pin their original face/edge evidence and byte
behavior, while v2 adds vertices and edge↔vertex evidence. None of these
profiles claims that every topology edit already has durable identity.
The real-kernel cycles additionally compare the OCCT arena shape count with its
baseline after success and failure cleanup. Detached evidence is serialized only
after the capture evaluation is disposed, so the corpus also guards against
accidentally retaining evaluation-scoped keys or native shapes.
The exact cases intentionally pin identity-only inheritance plus one narrow
generated-class rule. A
PRESERVED or MODIFIED successor may retain an
already-proven role/source anchor. GENERATED never copies that source identity.
For fillet and chamfer only, an identity-less result face receives the operation’s
blend/bevel class role when the complete native graph proves an incoming
edge-to-face GENERATED relation. The reducer does not inspect surface type,
result order, or selected-edge indices. Generated and residual-created edges,
residual-created faces, vertex-caused faces, and generated shell/offset topology
remain unnamed. Vertices have no semantic role vocabulary at all. Protocol v2
can nevertheless resolve a vertex semantically when both complete snapshots
provide the same fully anchored incident-edge set. Otherwise it falls back to
point plus incident-edge geometry, and a parameter change may fail missing.
Distinct coincident vertices remain separate candidates and fail ambiguous when
their evidence cannot distinguish them.
The version boundaries are tested independently. Document v6 admits vertex
references and queries while v1–v5 stay frozen. Signature protocol v2 adds
vertex evidence while protocol-v1 reference bytes, evidence construction, and
matching stay frozen. OCCT descriptor @6 is primary and @4/@5 are exact
v1 compatibility profiles. The current owned facade ABI is 0.9: it retains the
ABI 0.6 modeling/history surface, ABI 0.7 bounded artifact transport, and ABI
0.8’s fixed 128 MiB cumulative native allocation-request budget, then adds
exact owned-profile BinTools-v4 structural preflight only for the
repository-private candidate. None of those candidate transport changes alters
the persistent-topology contract or supplies comprehensive durable identity for
indistinguishable symmetric topology. The separate exact indexed
topology-evolution protocol remains version 1.
The source-repository fixtures are
tests/topology-persistence-torture-transform.test.ts,
tests/topology-persistence-torture-chains.test.ts,
tests/topology-reference-evaluator.test.ts,
tests/topology-reference-explanations.test.ts, and
tests/topology-signatures-occt.test.ts, plus the real document-owned loft/sweep
coverage in tests/topology-reference-occt.test.ts. The owned exact matrix is
scripts/test-public-occt-persistence.ts.
Run them with:
-- --runtime-dir DIRECTORY to use a verified runtime outside the default
.artifacts/occt-facade directory. pnpm test:occt-facade-bundle runs the same
matrix against the runtime inside the freshly verified package-neutral bundle.
The ordinary full-test, coverage, build, declaration, and packed-consumer gates
remain required; these focused commands are only the fastest way to exercise
the persistence boundary while developing it.