order-implicit-flow-guard.ts 675 B

1234567891011
  1. // The regression guard for keeping the SYNTACTIC controller scan in phase 2's control
  2. // union. `flag` is 1 or 2: a ternary's condition deliberately does not join the data
  3. // contract (the same convention as a computed index key), so the taint oracle sees no
  4. // label on the guard and has nothing to say about it. The syntactic map does — it recorded
  5. // the decider's ask against `flag` when the declaration bound it. Replacing the scan with
  6. // the oracle instead of unioning the two would silently drop this `control` edge.
  7. const flag = (await agent("decider").ask<boolean>("q")) ? 1 : 2;
  8. if (flag) {
  9. return await agent("actor2").ask<string>("go");
  10. }
  11. return "skipped";