array-push-all.ts 538 B

12345678910
  1. // Heap mutator (Array.push) accumulating Nodes into an array, then a NON-literal
  2. // (portless) Promise.all over that array, then a downstream aggregator. Confirms
  3. // taint survives push and portless join routing: a -> join, b -> join, join -> c,
  4. // plus the additive direct edges a -> c and b -> c, then c -> sink.
  5. const arr: Node<string>[] = [];
  6. arr.push(agent("a").ask<string>("x"));
  7. arr.push(agent("b").ask<string>("y"));
  8. const all = await Promise.all(arr);
  9. const c = await agent("c").ask<string>(`merge ${all.join(" ")}`);
  10. return c;