@bldrs-ai/conway 1.528.1490 → 1.529.1492

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -30,7 +30,7 @@ var import_node_process = require("node:process");
30
30
  var readline = __toESM(require("node:readline"), 1);
31
31
 
32
32
  // compiled/src/version/version.js
33
- var versionString = "Conway v1.528.1490";
33
+ var versionString = "Conway v1.529.1492";
34
34
 
35
35
  // compiled/dependencies/conway-geom/interface/conway_geometry.js
36
36
  var wasmType = "";
@@ -5812,9 +5812,17 @@ var StepModelBase = class _StepModelBase {
5812
5812
  * extract reads `IfcIndexedPolygonalFace.CoordIndex` as integers —
5813
5813
  * following those faces pinned ~78k records per PSB product. If
5814
5814
  * omitted, `!descend` children use this span path (test helper).
5815
+ * @param claimed Optional out-set of the IDs *this call* claimed and
5816
+ * awaited residency for — a strict subset of `seen`. When `seen` is
5817
+ * shared across concurrent walks (a batch of products sharing mapped
5818
+ * geometry), an ID another walk claimed is skipped here and is NOT
5819
+ * resident yet from this call's point of view: that walk's pin holds
5820
+ * the chunk once it lands, but its read is still in flight. Anything
5821
+ * that must synchronously read a record's bytes after this returns
5822
+ * has to iterate `claimed`, never `seen` (conway#526).
5815
5823
  * @return {Promise<Set<number>>} The local IDs that were visited.
5816
5824
  */
5817
- async ensureResidentClosureByLocalID(localID, extraLocalIDs, seen = /* @__PURE__ */ new Set(), descend, leafSpans, spanLeaf) {
5825
+ async ensureResidentClosureByLocalID(localID, extraLocalIDs, seen = /* @__PURE__ */ new Set(), descend, leafSpans, spanLeaf, claimed) {
5818
5826
  if (!this.isSourceExternal) {
5819
5827
  return seen;
5820
5828
  }
@@ -5839,6 +5847,7 @@ var StepModelBase = class _StepModelBase {
5839
5847
  seen.add(id);
5840
5848
  this.pinByLocalID(id);
5841
5849
  wave.push(id);
5850
+ claimed?.add(id);
5842
5851
  }
5843
5852
  frontier.length = 0;
5844
5853
  if (wave.length === 0) {
@@ -14965,7 +14965,7 @@ ${t5.join("\n")}` : "";
14965
14965
  var import_process = require("process");
14966
14966
 
14967
14967
  // compiled/src/version/version.js
14968
- var versionString = "Conway v1.528.1490";
14968
+ var versionString = "Conway v1.529.1492";
14969
14969
 
14970
14970
  // compiled/dependencies/conway-geom/interface/conway_geometry.js
14971
14971
  function pThreadsAllowed() {
@@ -21695,9 +21695,17 @@ var StepModelBase = class _StepModelBase {
21695
21695
  * extract reads `IfcIndexedPolygonalFace.CoordIndex` as integers —
21696
21696
  * following those faces pinned ~78k records per PSB product. If
21697
21697
  * omitted, `!descend` children use this span path (test helper).
21698
+ * @param claimed Optional out-set of the IDs *this call* claimed and
21699
+ * awaited residency for — a strict subset of `seen`. When `seen` is
21700
+ * shared across concurrent walks (a batch of products sharing mapped
21701
+ * geometry), an ID another walk claimed is skipped here and is NOT
21702
+ * resident yet from this call's point of view: that walk's pin holds
21703
+ * the chunk once it lands, but its read is still in flight. Anything
21704
+ * that must synchronously read a record's bytes after this returns
21705
+ * has to iterate `claimed`, never `seen` (conway#526).
21698
21706
  * @return {Promise<Set<number>>} The local IDs that were visited.
21699
21707
  */
21700
- async ensureResidentClosureByLocalID(localID, extraLocalIDs, seen = /* @__PURE__ */ new Set(), descend, leafSpans, spanLeaf) {
21708
+ async ensureResidentClosureByLocalID(localID, extraLocalIDs, seen = /* @__PURE__ */ new Set(), descend, leafSpans, spanLeaf, claimed) {
21701
21709
  if (!this.isSourceExternal) {
21702
21710
  return seen;
21703
21711
  }
@@ -21722,6 +21730,7 @@ var StepModelBase = class _StepModelBase {
21722
21730
  seen.add(id);
21723
21731
  this.pinByLocalID(id);
21724
21732
  wave.push(id);
21733
+ claimed?.add(id);
21725
21734
  }
21726
21735
  frontier.length = 0;
21727
21736
  if (wave.length === 0) {
@@ -93260,6 +93269,24 @@ var IfcGeometryExtraction = class _IfcGeometryExtraction {
93260
93269
  if (!this.model.isSourceExternal) {
93261
93270
  return seen ?? /* @__PURE__ */ new Set();
93262
93271
  }
93272
+ try {
93273
+ return await this.ensureResidentForProductExtractUnguarded_(localID, seen, leafSpans);
93274
+ } catch (error) {
93275
+ logger_default.error(`Error paging product localID ${localID} for extract: ${error instanceof Error ? error.message : String(error)}`);
93276
+ return seen ?? /* @__PURE__ */ new Set();
93277
+ }
93278
+ }
93279
+ /**
93280
+ * {@link ensureResidentForProductExtract} without the per-product
93281
+ * fault containment — split out so the guard cannot accidentally
93282
+ * swallow a failure raised by its own bookkeeping.
93283
+ *
93284
+ * @param localID The product's local ID.
93285
+ * @param seen Optional set to extend.
93286
+ * @param leafSpans Coalesced Faces[] pin ranges — caller unpins.
93287
+ * @return {Promise<Set<number>>} Pinned local IDs.
93288
+ */
93289
+ async ensureResidentForProductExtractUnguarded_(localID, seen, leafSpans) {
93263
93290
  const extra = [];
93264
93291
  const voids = this.productToVoidGeometryMap.get(localID);
93265
93292
  if (voids !== void 0) {
@@ -93277,7 +93304,8 @@ var IfcGeometryExtraction = class _IfcGeometryExtraction {
93277
93304
  const typeID = this.model.typeIDOf(id);
93278
93305
  return !isFace(id) && typeID !== entity_types_ifc_gen_default.IFCPOLYGONALFACESET && typeID !== entity_types_ifc_gen_default.IFCTRIANGULATEDFACESET;
93279
93306
  };
93280
- const visited = await this.model.ensureResidentClosureByLocalID(localID, extra, seen, descend, leafSpans, isFace);
93307
+ const claimed = /* @__PURE__ */ new Set();
93308
+ const visited = await this.model.ensureResidentClosureByLocalID(localID, extra, seen, descend, leafSpans, isFace, claimed);
93281
93309
  const styleExtra = [];
93282
93310
  for (const visitedID of visited) {
93283
93311
  const styled = this.materials.styledItemMap.get(visitedID);
@@ -93290,9 +93318,9 @@ var IfcGeometryExtraction = class _IfcGeometryExtraction {
93290
93318
  }
93291
93319
  }
93292
93320
  if (styleExtra.length > 0) {
93293
- await this.model.ensureResidentClosureByLocalID(localID, styleExtra, visited, descend, leafSpans, isFace);
93321
+ await this.model.ensureResidentClosureByLocalID(localID, styleExtra, visited, descend, leafSpans, isFace, claimed);
93294
93322
  }
93295
- await this.ensureResidentVisitedFacesetPayloads_(visited, leafSpans);
93323
+ await this.ensureResidentVisitedFacesetPayloads_(claimed, visited, leafSpans);
93296
93324
  return visited;
93297
93325
  }
93298
93326
  /**
@@ -93300,16 +93328,35 @@ var IfcGeometryExtraction = class _IfcGeometryExtraction {
93300
93328
  * or more tight address spans. The generic closure visits the
93301
93329
  * faceset but does not scan Faces[].
93302
93330
  *
93303
- * @param visited Faceset local IDs already pinned (and the set to
93304
- * extend with Coordinates).
93331
+ * **Iterates `claimed`, not `visited`, and re-ensures before the
93332
+ * scan** both halves of conway#526. `referencedExpressIDs` is a
93333
+ * SYNCHRONOUS acquire of the faceset's own bytes, and when a batch
93334
+ * prefetches products concurrently through one shared `visited` set
93335
+ * (`extractGeometryBatchAsync`'s Promise.all over 8 products), the
93336
+ * closure walk skips any ID a sibling product already claimed. That
93337
+ * sibling has pinned the range but its read may still be in flight,
93338
+ * so scanning the shared set threw
93339
+ * `StepBufferNotResidentError: STEP source range [...] is not
93340
+ * resident` out of the prefetch and killed the whole load — a pin
93341
+ * reserves a chunk against eviction, it does not make it resident.
93342
+ * Iterating this call's own claims fixes that (and drops the
93343
+ * quadratic re-scan of every sibling's facesets); the `await` below
93344
+ * makes the guarantee local rather than inherited, since a resident
93345
+ * chunk costs only a microtask there.
93346
+ *
93347
+ * @param claimed Faceset local IDs this call claimed and awaited.
93348
+ * @param visited The (possibly shared) visited set — read for
93349
+ * Coordinates de-duplication and extended with the ones pinned here,
93350
+ * so the caller's unpin covers them.
93305
93351
  * @param leafSpans Coalesced Faces[] pin ranges — caller unpins.
93306
93352
  */
93307
- async ensureResidentVisitedFacesetPayloads_(visited, leafSpans) {
93308
- for (const localID of visited) {
93353
+ async ensureResidentVisitedFacesetPayloads_(claimed, visited, leafSpans) {
93354
+ for (const localID of claimed) {
93309
93355
  const typeID = this.model.typeIDOf(localID);
93310
93356
  if (typeID !== entity_types_ifc_gen_default.IFCPOLYGONALFACESET && typeID !== entity_types_ifc_gen_default.IFCTRIANGULATEDFACESET) {
93311
93357
  continue;
93312
93358
  }
93359
+ await this.model.ensureResidentByLocalID(localID);
93313
93360
  const refs = this.model.referencedExpressIDs(localID);
93314
93361
  if (refs.length === 0) {
93315
93362
  continue;
@@ -15943,7 +15943,7 @@ var ParsingBuffer = class {
15943
15943
  };
15944
15944
 
15945
15945
  // compiled/src/version/version.js
15946
- var versionString = "Conway v1.528.1490";
15946
+ var versionString = "Conway v1.529.1492";
15947
15947
 
15948
15948
  // compiled/dependencies/conway-geom/interface/conway_geometry.js
15949
15949
  function pThreadsAllowed() {
@@ -21434,9 +21434,17 @@ var StepModelBase = class _StepModelBase {
21434
21434
  * extract reads `IfcIndexedPolygonalFace.CoordIndex` as integers —
21435
21435
  * following those faces pinned ~78k records per PSB product. If
21436
21436
  * omitted, `!descend` children use this span path (test helper).
21437
+ * @param claimed Optional out-set of the IDs *this call* claimed and
21438
+ * awaited residency for — a strict subset of `seen`. When `seen` is
21439
+ * shared across concurrent walks (a batch of products sharing mapped
21440
+ * geometry), an ID another walk claimed is skipped here and is NOT
21441
+ * resident yet from this call's point of view: that walk's pin holds
21442
+ * the chunk once it lands, but its read is still in flight. Anything
21443
+ * that must synchronously read a record's bytes after this returns
21444
+ * has to iterate `claimed`, never `seen` (conway#526).
21437
21445
  * @return {Promise<Set<number>>} The local IDs that were visited.
21438
21446
  */
21439
- async ensureResidentClosureByLocalID(localID, extraLocalIDs, seen = /* @__PURE__ */ new Set(), descend, leafSpans, spanLeaf) {
21447
+ async ensureResidentClosureByLocalID(localID, extraLocalIDs, seen = /* @__PURE__ */ new Set(), descend, leafSpans, spanLeaf, claimed) {
21440
21448
  if (!this.isSourceExternal) {
21441
21449
  return seen;
21442
21450
  }
@@ -21461,6 +21469,7 @@ var StepModelBase = class _StepModelBase {
21461
21469
  seen.add(id);
21462
21470
  this.pinByLocalID(id);
21463
21471
  wave.push(id);
21472
+ claimed?.add(id);
21464
21473
  }
21465
21474
  frontier.length = 0;
21466
21475
  if (wave.length === 0) {
@@ -944,7 +944,7 @@ var EntityTypesIfcCount = 909;
944
944
  var entity_types_ifc_gen_default = EntityTypesIfc;
945
945
 
946
946
  // compiled/src/version/version.js
947
- var versionString = "Conway v1.528.1490";
947
+ var versionString = "Conway v1.529.1492";
948
948
 
949
949
  // compiled/dependencies/conway-geom/interface/conway_geometry.js
950
950
  var wasmType = "";
@@ -5810,9 +5810,17 @@ var StepModelBase = class _StepModelBase {
5810
5810
  * extract reads `IfcIndexedPolygonalFace.CoordIndex` as integers —
5811
5811
  * following those faces pinned ~78k records per PSB product. If
5812
5812
  * omitted, `!descend` children use this span path (test helper).
5813
+ * @param claimed Optional out-set of the IDs *this call* claimed and
5814
+ * awaited residency for — a strict subset of `seen`. When `seen` is
5815
+ * shared across concurrent walks (a batch of products sharing mapped
5816
+ * geometry), an ID another walk claimed is skipped here and is NOT
5817
+ * resident yet from this call's point of view: that walk's pin holds
5818
+ * the chunk once it lands, but its read is still in flight. Anything
5819
+ * that must synchronously read a record's bytes after this returns
5820
+ * has to iterate `claimed`, never `seen` (conway#526).
5813
5821
  * @return {Promise<Set<number>>} The local IDs that were visited.
5814
5822
  */
5815
- async ensureResidentClosureByLocalID(localID, extraLocalIDs, seen = /* @__PURE__ */ new Set(), descend, leafSpans, spanLeaf) {
5823
+ async ensureResidentClosureByLocalID(localID, extraLocalIDs, seen = /* @__PURE__ */ new Set(), descend, leafSpans, spanLeaf, claimed) {
5816
5824
  if (!this.isSourceExternal) {
5817
5825
  return seen;
5818
5826
  }
@@ -5837,6 +5845,7 @@ var StepModelBase = class _StepModelBase {
5837
5845
  seen.add(id);
5838
5846
  this.pinByLocalID(id);
5839
5847
  wave.push(id);
5848
+ claimed?.add(id);
5840
5849
  }
5841
5850
  frontier.length = 0;
5842
5851
  if (wave.length === 0) {
@@ -8,10 +8,14 @@ import { beforeAll, describe, expect, test } from "@jest/globals";
8
8
  import { IfcGeometryExtraction } from "./ifc_geometry_extraction.js";
9
9
  import { ParseResult } from "../step/parsing/step_parser.js";
10
10
  import IfcStepParser from "./ifc_step_parser.js";
11
+ import IfcStepModel from "./ifc_step_model.js";
11
12
  import ParsingBuffer from "../parsing/parsing_buffer.js";
12
13
  import { ConwayGeometry } from "../../dependencies/conway-geom/index.js";
13
14
  import { ExtractResult } from "../core/shared_constants.js";
14
15
  import { IfcProduct, IfcStyledItem } from "./ifc4_gen/index.js";
16
+ import EntityTypesIfc from "./ifc4_gen/entity_types_ifc.gen.js";
17
+ import { openStreamedIfcModelFromStore } from "./ifc_stream_open.js";
18
+ import { InMemoryStepByteStore, WindowedStepBufferProvider, } from "../step/step_buffer_provider.js";
15
19
  let conwayGeometry;
16
20
  /**
17
21
  * Parse a fresh model from index.ifc (models are stateful; each extraction
@@ -120,3 +124,128 @@ describe("per-product demand extraction (Phase B2)", () => {
120
124
  expect(checked).toBeGreaterThan(0);
121
125
  });
122
126
  });
127
+ // conway#526. `extractGeometryBatchAsync` prefetches a batch of products
128
+ // through one Promise.all over ONE shared `seen` set, so the closure walk
129
+ // skips any record a sibling product already claimed — that sibling has
130
+ // pinned the range, but a pin reserves a chunk against eviction, it does
131
+ // not make it resident, and its read may still be in flight. The faceset
132
+ // payload pass then scanned the shared set and synchronously acquired a
133
+ // record nobody had finished reading:
134
+ //
135
+ // StepBufferNotResidentError: STEP source range [164128495, 164187850)
136
+ // is not resident — call ensureResident before synchronous extraction
137
+ //
138
+ // which escaped the prefetch and aborted the whole load on a large model.
139
+ describe("concurrent windowed product prefetch (conway#526)", () => {
140
+ const CHUNK = 4 * 1024;
141
+ /**
142
+ * A store-backed model over a deliberately cramped window: 4 KiB
143
+ * chunks with 2 resident, so a sibling's chunks are gone by the time
144
+ * anyone else looks for them.
145
+ *
146
+ * @param store The backing store.
147
+ * @return {Promise<IfcStepModel>} The windowed model.
148
+ */
149
+ async function windowedModel(store) {
150
+ const open = await openStreamedIfcModelFromStore(store, { pool: CHUNK });
151
+ expect(open.model).toBeDefined();
152
+ return new IfcStepModel(void 0, open.columns, new WindowedStepBufferProvider(store, CHUNK, 2));
153
+ }
154
+ test("a shared seen set does not make one product read records it never paged", async () => {
155
+ const store = new InMemoryStepByteStore(new Uint8Array(fs.readFileSync("data/index.ifc")));
156
+ const model = await windowedModel(store);
157
+ const extraction = new IfcGeometryExtraction(conwayGeometry, model);
158
+ extraction.quietRecoverableLogging = true;
159
+ extraction.deferDanglingPlacements = true;
160
+ const prepPins = await extraction.ensureResidentForDemandPrep();
161
+ try {
162
+ extraction.prepareDemandExtraction(true);
163
+ }
164
+ finally {
165
+ model.releaseSourceViews(prepPins);
166
+ model.unpinLocalIDs(prepPins);
167
+ }
168
+ const products = [...model.types(IfcProduct)].map((p) => p.localID);
169
+ expect(products.length).toBeGreaterThan(1);
170
+ // The pump's shape: one shared pin set across the batch.
171
+ const pins = new Set();
172
+ const leafSpans = [];
173
+ // Seed the shared set until it holds facesets — not every
174
+ // product carries tessellated geometry, and the payload pass is
175
+ // what this is about.
176
+ let seeded = 0;
177
+ let claimedFacesets = [];
178
+ while (seeded < products.length && claimedFacesets.length === 0) {
179
+ await extraction.ensureResidentForProductExtract(products[seeded++], pins, leafSpans);
180
+ claimedFacesets = [...pins].filter((id) => model.typeIDOf(id) === EntityTypesIfc.IFCPOLYGONALFACESET);
181
+ }
182
+ expect(claimedFacesets.length).toBeGreaterThan(0);
183
+ expect(seeded).toBeLessThan(products.length);
184
+ // Now force the state the production race produced by timing:
185
+ // records that are IN the shared set but NOT resident from the
186
+ // next caller's point of view. Dropping the pins and filling the
187
+ // 2-chunk window with an unrelated range evicts them, which is
188
+ // the same invariant violation as a sibling's read still being
189
+ // in flight — and unlike the race, it happens every run.
190
+ model.releaseSourceViews(pins);
191
+ model.unpinLocalIDs(pins);
192
+ for (const span of leafSpans) {
193
+ model.unpinAddressRange(span.address, span.length);
194
+ }
195
+ leafSpans.length = 0;
196
+ const facesetAt = model.recordAddress(claimedFacesets[0]);
197
+ const far = facesetAt >= CHUNK * 4 ? 0 : store.byteLength - CHUNK * 2;
198
+ await model.ensureResidentRange(far, CHUNK * 2);
199
+ // Pre-#526 the payload pass walked the shared set, synchronously
200
+ // acquired those evicted facesets and threw
201
+ // StepBufferNotResidentError out of the prefetch, killing the load.
202
+ await expect(Promise.all(products.slice(seeded).map((localID) => extraction.ensureResidentForProductExtract(localID, pins, leafSpans)))).resolves.toBeDefined();
203
+ expect(pins.size).toBeGreaterThan(0);
204
+ model.releaseSourceViews(pins);
205
+ model.unpinLocalIDs(pins);
206
+ for (const span of leafSpans) {
207
+ model.unpinAddressRange(span.address, span.length);
208
+ }
209
+ }, 120000);
210
+ test("the closure walk reports only what THIS call claimed", async () => {
211
+ const model = await windowedModel(new InMemoryStepByteStore(new Uint8Array(fs.readFileSync("data/index.ifc"))));
212
+ const products = [...model.types(IfcProduct)].map((p) => p.localID);
213
+ expect(products.length).toBeGreaterThan(1);
214
+ // The invariant the payload pass now rests on: with a shared set,
215
+ // a second walk claims only what the first left unclaimed, so
216
+ // `claimed` is what this call has actually awaited residency for.
217
+ const shared = new Set();
218
+ const firstClaimed = new Set();
219
+ const secondClaimed = new Set();
220
+ await model.ensureResidentClosureByLocalID(products[0], void 0, shared, void 0, void 0, void 0, firstClaimed);
221
+ await model.ensureResidentClosureByLocalID(products[0], void 0, shared, void 0, void 0, void 0, secondClaimed);
222
+ expect(firstClaimed.size).toBeGreaterThan(0);
223
+ expect(secondClaimed.size).toBe(0);
224
+ for (const id of firstClaimed) {
225
+ expect(shared.has(id)).toBe(true);
226
+ }
227
+ model.unpinLocalIDs(shared);
228
+ }, 120000);
229
+ test("a product whose paging fails is skipped, not fatal to the batch", async () => {
230
+ const model = await windowedModel(new InMemoryStepByteStore(new Uint8Array(fs.readFileSync("data/index.ifc"))));
231
+ const extraction = new IfcGeometryExtraction(conwayGeometry, model);
232
+ const products = [...model.types(IfcProduct)].map((p) => p.localID);
233
+ const failing = products[0];
234
+ // A store read that rejects for one product's closure must not take
235
+ // the batch — the pump's Promise.all would otherwise reject and the
236
+ // load dies where a missing product would do.
237
+ const realEnsure = model.ensureResidentClosureByLocalID.bind(model);
238
+ model.ensureResidentClosureByLocalID =
239
+ (localID, ...rest) => {
240
+ if (localID === failing) {
241
+ return Promise.reject(new Error("simulated store read failure"));
242
+ }
243
+ return realEnsure(localID, ...rest);
244
+ };
245
+ const pins = new Set();
246
+ await expect(Promise.all(products.slice(0, 4).map((localID) => extraction.ensureResidentForProductExtract(localID, pins)))).resolves.toBeDefined();
247
+ model.ensureResidentClosureByLocalID = realEnsure;
248
+ model.releaseSourceViews(pins);
249
+ model.unpinLocalIDs(pins);
250
+ }, 120000);
251
+ });
@@ -1188,13 +1188,42 @@ export declare class IfcGeometryExtraction {
1188
1188
  address: number;
1189
1189
  length: number;
1190
1190
  }[]): Promise<Set<number>>;
1191
+ /**
1192
+ * {@link ensureResidentForProductExtract} without the per-product
1193
+ * fault containment — split out so the guard cannot accidentally
1194
+ * swallow a failure raised by its own bookkeeping.
1195
+ *
1196
+ * @param localID The product's local ID.
1197
+ * @param seen Optional set to extend.
1198
+ * @param leafSpans Coalesced Faces[] pin ranges — caller unpins.
1199
+ * @return {Promise<Set<number>>} Pinned local IDs.
1200
+ */
1201
+ private ensureResidentForProductExtractUnguarded_;
1191
1202
  /**
1192
1203
  * Page a faceset's Coordinates record and its Faces[] run as one
1193
1204
  * or more tight address spans. The generic closure visits the
1194
1205
  * faceset but does not scan Faces[].
1195
1206
  *
1196
- * @param visited Faceset local IDs already pinned (and the set to
1197
- * extend with Coordinates).
1207
+ * **Iterates `claimed`, not `visited`, and re-ensures before the
1208
+ * scan** both halves of conway#526. `referencedExpressIDs` is a
1209
+ * SYNCHRONOUS acquire of the faceset's own bytes, and when a batch
1210
+ * prefetches products concurrently through one shared `visited` set
1211
+ * (`extractGeometryBatchAsync`'s Promise.all over 8 products), the
1212
+ * closure walk skips any ID a sibling product already claimed. That
1213
+ * sibling has pinned the range but its read may still be in flight,
1214
+ * so scanning the shared set threw
1215
+ * `StepBufferNotResidentError: STEP source range [...] is not
1216
+ * resident` out of the prefetch and killed the whole load — a pin
1217
+ * reserves a chunk against eviction, it does not make it resident.
1218
+ * Iterating this call's own claims fixes that (and drops the
1219
+ * quadratic re-scan of every sibling's facesets); the `await` below
1220
+ * makes the guarantee local rather than inherited, since a resident
1221
+ * chunk costs only a microtask there.
1222
+ *
1223
+ * @param claimed Faceset local IDs this call claimed and awaited.
1224
+ * @param visited The (possibly shared) visited set — read for
1225
+ * Coordinates de-duplication and extended with the ones pinned here,
1226
+ * so the caller's unpin covers them.
1198
1227
  * @param leafSpans Coalesced Faces[] pin ranges — caller unpins.
1199
1228
  */
1200
1229
  private ensureResidentVisitedFacesetPayloads_;
@@ -1 +1 @@
1
- {"version":3,"file":"ifc_geometry_extraction.d.ts","sourceRoot":"","sources":["../../../src/ifc/ifc_geometry_extraction.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,cAAc,EAEd,cAAc,EACd,sBAAsB,EAEtB,OAAO,EAIP,WAAW,EAUX,wBAAwB,EAOxB,aAAa,EAGb,SAAS,EACT,sBAAsB,EAEtB,cAAc,EACd,iBAAiB,EAcjB,kBAAkB,EAClB,kBAAkB,EAClB,qBAAqB,EACtB,MAAM,gCAAgC,CAAA;AAGvC,OAAO,EAAqB,SAAS,EAAuB,MAAM,4BAA4B,CAAA;AAC9F,OAAO,EAAE,aAAa,EAAqB,MAAM,wBAAwB,CAAA;AACzE,OAAO,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAA;AAC5D,OAAO,EAAE,qBAAqB,EAAoB,MAAM,kBAAkB,CAAA;AAE1E,OAAO,EACL,iBAAiB,EACjB,gBAAgB,EAChB,mBAAmB,EAEnB,oBAAoB,EACpB,8BAA8B,EAC9B,mBAAmB,EACnB,mBAAmB,EACnB,gCAAgC,EAChC,mBAAmB,EACnB,mBAAmB,EACnB,UAAU,EACX,MAAM,sBAAsB,CAAA;AAC7B,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAA;AACxD,OAAO,EAEL,mBAA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;;;;;;;;;OASG;IACI,2BAA2B,CAAE,YAAY,EAAE,gBAAgB,GAAI,IAAI;IA2C1E;;;;;;;;;;;;OAYG;IACH,sBAAsB,CAClB,OAAO,EAAE,UAAU,EACnB,mBAAmB,CAAC,EAAE,CAAC,oBAAoB,EAAE,MAAM,EAAE,CAAC,GAAI,IAAI;IAgMlE;;;;;;;;;;;;;OAaG;IACH,sBAAsB,CAAE,UAAU,CAAC,EAAE,qBAAqB,GACxD;QAAC,aAAa;QAAE,eAAe;KAAC;IAsBlC;;;;;;;;;;OAUG;IACG,2BAA2B,CAC7B,UAAU,CAAC,EAAE,qBAAqB,EAClC,eAAe,GAAE,MAA2C,GAC9D,OAAO,CAAC,CAAC,aAAa,EAAE,eAAe,CAAC,CAAC;IA6B3C;;;;;;;;;;;;;OAaG;IACH,OAAO,CAAE,iCAAiC;CA8F3C"}
@@ -5157,6 +5157,41 @@ export class IfcGeometryExtraction {
5157
5157
  if (!this.model.isSourceExternal) {
5158
5158
  return seen ?? new Set();
5159
5159
  }
5160
+ // Paging failures are contained to their product (conway#526).
5161
+ // `extractGeometryBatchAsync` prefetches a batch through one
5162
+ // Promise.all, so a rejection here used to escape the pump and
5163
+ // abort the entire load — a whole model lost to one unreadable
5164
+ // product. The extract that follows already tolerates a product it
5165
+ // cannot read (its own per-product catch logs and moves on), so
5166
+ // degrading to "this product is missing" is both the smaller
5167
+ // failure and the one the pipeline is already built for.
5168
+ //
5169
+ // Deliberately no retry: a second attempt sharing `seen` would
5170
+ // re-claim nothing and re-ensure nothing, and giving it a fresh set
5171
+ // would double-pin every record it re-walked — pins are refcounted
5172
+ // but the caller unpins once per unique ID, so the surplus would
5173
+ // hold those chunks resident for the model's life and grow the
5174
+ // window without bound.
5175
+ try {
5176
+ return await this.ensureResidentForProductExtractUnguarded_(localID, seen, leafSpans);
5177
+ }
5178
+ catch (error) {
5179
+ Logger.error(`Error paging product localID ${localID} for extract: ` +
5180
+ `${error instanceof Error ? error.message : String(error)}`);
5181
+ return seen ?? new Set();
5182
+ }
5183
+ }
5184
+ /**
5185
+ * {@link ensureResidentForProductExtract} without the per-product
5186
+ * fault containment — split out so the guard cannot accidentally
5187
+ * swallow a failure raised by its own bookkeeping.
5188
+ *
5189
+ * @param localID The product's local ID.
5190
+ * @param seen Optional set to extend.
5191
+ * @param leafSpans Coalesced Faces[] pin ranges — caller unpins.
5192
+ * @return {Promise<Set<number>>} Pinned local IDs.
5193
+ */
5194
+ async ensureResidentForProductExtractUnguarded_(localID, seen, leafSpans) {
5160
5195
  const extra = [];
5161
5196
  const voids = this.productToVoidGeometryMap.get(localID);
5162
5197
  if (voids !== void 0) {
@@ -5179,7 +5214,11 @@ export class IfcGeometryExtraction {
5179
5214
  typeID !== EntityTypesIfc.IFCPOLYGONALFACESET &&
5180
5215
  typeID !== EntityTypesIfc.IFCTRIANGULATEDFACESET;
5181
5216
  };
5182
- const visited = await this.model.ensureResidentClosureByLocalID(localID, extra, seen, descend, leafSpans, isFace);
5217
+ // IDs THIS call claimed and awaited, as opposed to `visited`, which
5218
+ // is the caller's shared set when a batch prefetches concurrently.
5219
+ // Only the former may be read synchronously afterwards (conway#526).
5220
+ const claimed = new Set();
5221
+ const visited = await this.model.ensureResidentClosureByLocalID(localID, extra, seen, descend, leafSpans, isFace, claimed);
5183
5222
  const styleExtra = [];
5184
5223
  for (const visitedID of visited) {
5185
5224
  const styled = this.materials.styledItemMap.get(visitedID);
@@ -5192,9 +5231,9 @@ export class IfcGeometryExtraction {
5192
5231
  }
5193
5232
  }
5194
5233
  if (styleExtra.length > 0) {
5195
- await this.model.ensureResidentClosureByLocalID(localID, styleExtra, visited, descend, leafSpans, isFace);
5234
+ await this.model.ensureResidentClosureByLocalID(localID, styleExtra, visited, descend, leafSpans, isFace, claimed);
5196
5235
  }
5197
- await this.ensureResidentVisitedFacesetPayloads_(visited, leafSpans);
5236
+ await this.ensureResidentVisitedFacesetPayloads_(claimed, visited, leafSpans);
5198
5237
  return visited;
5199
5238
  }
5200
5239
  /**
@@ -5202,17 +5241,39 @@ export class IfcGeometryExtraction {
5202
5241
  * or more tight address spans. The generic closure visits the
5203
5242
  * faceset but does not scan Faces[].
5204
5243
  *
5205
- * @param visited Faceset local IDs already pinned (and the set to
5206
- * extend with Coordinates).
5244
+ * **Iterates `claimed`, not `visited`, and re-ensures before the
5245
+ * scan** both halves of conway#526. `referencedExpressIDs` is a
5246
+ * SYNCHRONOUS acquire of the faceset's own bytes, and when a batch
5247
+ * prefetches products concurrently through one shared `visited` set
5248
+ * (`extractGeometryBatchAsync`'s Promise.all over 8 products), the
5249
+ * closure walk skips any ID a sibling product already claimed. That
5250
+ * sibling has pinned the range but its read may still be in flight,
5251
+ * so scanning the shared set threw
5252
+ * `StepBufferNotResidentError: STEP source range [...] is not
5253
+ * resident` out of the prefetch and killed the whole load — a pin
5254
+ * reserves a chunk against eviction, it does not make it resident.
5255
+ * Iterating this call's own claims fixes that (and drops the
5256
+ * quadratic re-scan of every sibling's facesets); the `await` below
5257
+ * makes the guarantee local rather than inherited, since a resident
5258
+ * chunk costs only a microtask there.
5259
+ *
5260
+ * @param claimed Faceset local IDs this call claimed and awaited.
5261
+ * @param visited The (possibly shared) visited set — read for
5262
+ * Coordinates de-duplication and extended with the ones pinned here,
5263
+ * so the caller's unpin covers them.
5207
5264
  * @param leafSpans Coalesced Faces[] pin ranges — caller unpins.
5208
5265
  */
5209
- async ensureResidentVisitedFacesetPayloads_(visited, leafSpans) {
5210
- for (const localID of visited) {
5266
+ async ensureResidentVisitedFacesetPayloads_(claimed, visited, leafSpans) {
5267
+ for (const localID of claimed) {
5211
5268
  const typeID = this.model.typeIDOf(localID);
5212
5269
  if (typeID !== EntityTypesIfc.IFCPOLYGONALFACESET &&
5213
5270
  typeID !== EntityTypesIfc.IFCTRIANGULATEDFACESET) {
5214
5271
  continue;
5215
5272
  }
5273
+ // Cheap when already resident (a Map hit and a microtask), and
5274
+ // the difference between a guarantee and an assumption when the
5275
+ // window has churned since this record was claimed.
5276
+ await this.model.ensureResidentByLocalID(localID);
5216
5277
  const refs = this.model.referencedExpressIDs(localID);
5217
5278
  if (refs.length === 0) {
5218
5279
  continue;
@@ -289,12 +289,20 @@ export default abstract class StepModelBase<EntityTypeIDs extends number, BaseEn
289
289
  * extract reads `IfcIndexedPolygonalFace.CoordIndex` as integers —
290
290
  * following those faces pinned ~78k records per PSB product. If
291
291
  * omitted, `!descend` children use this span path (test helper).
292
+ * @param claimed Optional out-set of the IDs *this call* claimed and
293
+ * awaited residency for — a strict subset of `seen`. When `seen` is
294
+ * shared across concurrent walks (a batch of products sharing mapped
295
+ * geometry), an ID another walk claimed is skipped here and is NOT
296
+ * resident yet from this call's point of view: that walk's pin holds
297
+ * the chunk once it lands, but its read is still in flight. Anything
298
+ * that must synchronously read a record's bytes after this returns
299
+ * has to iterate `claimed`, never `seen` (conway#526).
292
300
  * @return {Promise<Set<number>>} The local IDs that were visited.
293
301
  */
294
302
  ensureResidentClosureByLocalID(localID: number, extraLocalIDs?: Iterable<number>, seen?: Set<number>, descend?: (localID: number) => boolean, leafSpans?: {
295
303
  address: number;
296
304
  length: number;
297
- }[], spanLeaf?: (localID: number) => boolean): Promise<Set<number>>;
305
+ }[], spanLeaf?: (localID: number) => boolean, claimed?: Set<number>): Promise<Set<number>>;
298
306
  /**
299
307
  * Hold a record's source range against windowed LRU eviction until
300
308
  * {@link unpinByLocalID}. No-op while the source is fully resident.