Commit 74a1f06
fix(copilot): report dispatch from the block handler itself
I claimed last round that nothing could precede the signal. That was
wrong: `executeNode` returns early on a cache hit, initializes loop and
parallel scopes, and handles a sentinel that never reaches a handler — all
after the point it fired. Both reviewers found the same thing.
Move it to the line before `blockExecutor.execute`, which is the handler
call. Nothing separates the two, so unlike every previous position this
one cannot have something in front of it. Fired per block rather than
once, since observers record a boolean and repeats cost nothing.
Also accept functions as carriers of the run markers. They key a WeakMap
exactly as objects do, so excluding them dropped the record for a thrown
function and lost the distinction the markers exist to make.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>1 parent d27d944 commit 74a1f06
3 files changed
Lines changed: 12 additions & 17 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
41 | | - | |
42 | 41 | | |
43 | 42 | | |
44 | 43 | | |
| |||
63 | 62 | | |
64 | 63 | | |
65 | 64 | | |
66 | | - | |
67 | | - | |
68 | | - | |
69 | | - | |
70 | | - | |
71 | | - | |
72 | | - | |
73 | 65 | | |
74 | 66 | | |
75 | 67 | | |
| |||
429 | 421 | | |
430 | 422 | | |
431 | 423 | | |
432 | | - | |
433 | | - | |
434 | | - | |
435 | | - | |
436 | | - | |
437 | | - | |
438 | | - | |
439 | | - | |
440 | 424 | | |
441 | 425 | | |
442 | 426 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
95 | 95 | | |
96 | 96 | | |
97 | 97 | | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
98 | 108 | | |
99 | 109 | | |
100 | 110 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
102 | 102 | | |
103 | 103 | | |
104 | 104 | | |
105 | | - | |
| 105 | + | |
| 106 | + | |
106 | 107 | | |
107 | 108 | | |
108 | 109 | | |
| |||
0 commit comments