heap-aliasing-depth-cap.ts 508 B

1234567
  1. // Field chain 10 deep — beyond VALUE_DEPTH_CAP=8. The write lands at the leaf of
  2. // the LIVE structure; reads clone (which folds structure past the cap into occs).
  3. // The flow must survive the fold.
  4. // Expected: ask#1 -> ask#2 data; ask#2 -> sink.
  5. const o = { l1: { l2: { l3: { l4: { l5: { l6: { l7: { l8: { l9: { leaf: "" } } } } } } } } } };
  6. o.l1.l2.l3.l4.l5.l6.l7.l8.l9.leaf = await agent("writer").ask<string>("secret");
  7. return agent("reader").ask<string>(`use ${o.l1.l2.l3.l4.l5.l6.l7.l8.l9.leaf}`);