Skip to main content

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. A vertex that carries its own sketch-source creation anchor is compared by that anchor under complete history, like a face or edge. Protocol v2 can also resolve a vertex without a direct anchor semantically when both complete snapshots provide the same fully anchored incident-edge set; if only one side is fully anchored, the vertex does not match. When neither side has a direct anchor or a fully anchored incident-edge set, or either snapshot has partial history, 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, tests/topology-signatures.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. On the stock OCCT runtime, the transform torture file captures an exact box vertex, round-trips Document v6, resolves the vertex by semantic-lineage after translation and resizing, and consumes it through topology.edges.adjacentTo(...) in a fillet. The coincident-vertex row uses synthetic protocol-v2 snapshots in tests/topology-signatures.test.ts, covering both capture and resolution under partial and complete history. The owned exact matrix repeats vertex persistence on the owned facade runtime. Run them with:
After building or otherwise supplying the matched owned facade ABI 0.9 runtime, run the ABI 0.6 exact-evolution matrix it retains with:
Pass -- --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.