Commit ae1f62d
authored
improvement(provenance): make the incompleteness reason set closed and complete (#6559)
The reason a resolved-secret registry latched is the only thing that names
which guard tripped, and a refusal surfaces many frames later as one fixed
sentence. Two gaps had opened in that set.
`workspace-scope-missing` no longer has a producer: the `!context.workspaceId`
guard in the copilot table tool went away when `importRowsForModel` was
rewritten, and every operation now returns early on a missing workspace before
provenance import is reachable. The literal and its warn-classification test
case go with it — the test constructed the reason itself, so it asserted on
something nothing emits.
ResolvedSecretTraceProvenanceAccumulator had no reason concept at all, so its
three guards latched anonymously. That matters more there than on the registry:
the wire format carries only `complete`, so the consumer can only ever say
`source-provenance-incomplete`, and the guard is unrecoverable. Give it the
same required `reason` and name all three — a file source with no workspace
identity, a workspace file whose sidecar reads unknown, and an MCP tool that
timed out. A latch from `record()` stays silent, since it reflects a bundle
whose own registry already reported and subflow aggregation runs it per
iteration.
Fold the error/warn/by-design split into one `reportIncompleteness`. It was
copied across both registry latches and would have been copied a third time
here, and a copy that can be updated alone lets one reason be a fault in one
place and routine in another.
Also give the async workflow tool path its own import origin instead of
latching with none, and close `UnrecordedDurableProvenanceCause`, which was a
free-form string carrying a TSDoc claim that it was always a static literal.1 parent 81e04a8 commit ae1f62d
6 files changed
Lines changed: 113 additions & 28 deletions
File tree
- apps/sim
- app/api
- mcp/tools/execute
- tools/file/manage
- executor/utils
- lib
- copilot/request/tools
- execution
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
327 | 327 | | |
328 | 328 | | |
329 | 329 | | |
330 | | - | |
| 330 | + | |
331 | 331 | | |
332 | 332 | | |
333 | 333 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
295 | 295 | | |
296 | 296 | | |
297 | 297 | | |
298 | | - | |
| 298 | + | |
299 | 299 | | |
300 | 300 | | |
301 | 301 | | |
302 | 302 | | |
303 | | - | |
| 303 | + | |
304 | 304 | | |
305 | 305 | | |
306 | 306 | | |
| |||
Lines changed: 37 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
144 | 144 | | |
145 | 145 | | |
146 | 146 | | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
147 | 181 | | |
148 | 182 | | |
149 | 183 | | |
| |||
1474 | 1508 | | |
1475 | 1509 | | |
1476 | 1510 | | |
1477 | | - | |
1478 | 1511 | | |
1479 | 1512 | | |
| 1513 | + | |
| 1514 | + | |
| 1515 | + | |
1480 | 1516 | | |
1481 | 1517 | | |
1482 | 1518 | | |
| |||
Lines changed: 50 additions & 19 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
| 46 | + | |
46 | 47 | | |
47 | 48 | | |
48 | 49 | | |
| |||
60 | 61 | | |
61 | 62 | | |
62 | 63 | | |
63 | | - | |
64 | 64 | | |
65 | 65 | | |
| 66 | + | |
| 67 | + | |
66 | 68 | | |
67 | 69 | | |
68 | 70 | | |
69 | 71 | | |
70 | 72 | | |
71 | 73 | | |
72 | | - | |
73 | | - | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
74 | 78 | | |
75 | 79 | | |
76 | 80 | | |
| |||
122 | 126 | | |
123 | 127 | | |
124 | 128 | | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
125 | 146 | | |
126 | 147 | | |
127 | 148 | | |
| |||
624 | 645 | | |
625 | 646 | | |
626 | 647 | | |
| 648 | + | |
627 | 649 | | |
628 | 650 | | |
629 | 651 | | |
| |||
677 | 699 | | |
678 | 700 | | |
679 | 701 | | |
680 | | - | |
681 | | - | |
| 702 | + | |
| 703 | + | |
| 704 | + | |
| 705 | + | |
| 706 | + | |
| 707 | + | |
| 708 | + | |
| 709 | + | |
| 710 | + | |
| 711 | + | |
| 712 | + | |
| 713 | + | |
| 714 | + | |
| 715 | + | |
682 | 716 | | |
| 717 | + | |
| 718 | + | |
| 719 | + | |
| 720 | + | |
| 721 | + | |
683 | 722 | | |
684 | 723 | | |
685 | 724 | | |
| |||
1583 | 1622 | | |
1584 | 1623 | | |
1585 | 1624 | | |
1586 | | - | |
1587 | | - | |
1588 | | - | |
| 1625 | + | |
| 1626 | + | |
1589 | 1627 | | |
1590 | 1628 | | |
1591 | 1629 | | |
1592 | 1630 | | |
1593 | | - | |
1594 | | - | |
1595 | | - | |
1596 | | - | |
| 1631 | + | |
1597 | 1632 | | |
1598 | 1633 | | |
1599 | 1634 | | |
| |||
2038 | 2073 | | |
2039 | 2074 | | |
2040 | 2075 | | |
2041 | | - | |
2042 | | - | |
2043 | | - | |
| 2076 | + | |
| 2077 | + | |
2044 | 2078 | | |
2045 | 2079 | | |
2046 | 2080 | | |
2047 | 2081 | | |
2048 | | - | |
2049 | | - | |
2050 | | - | |
2051 | | - | |
| 2082 | + | |
2052 | 2083 | | |
2053 | 2084 | | |
2054 | 2085 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
308 | 308 | | |
309 | 309 | | |
310 | 310 | | |
311 | | - | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
312 | 314 | | |
313 | 315 | | |
314 | 316 | | |
| |||
328 | 330 | | |
329 | 331 | | |
330 | 332 | | |
331 | | - | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
332 | 337 | | |
333 | | - | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
334 | 341 | | |
335 | 342 | | |
336 | 343 | | |
| |||
Lines changed: 13 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
72 | 72 | | |
73 | 73 | | |
74 | 74 | | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
75 | 87 | | |
76 | 88 | | |
77 | | - | |
78 | | - | |
| 89 | + | |
79 | 90 | | |
80 | 91 | | |
81 | 92 | | |
| |||
0 commit comments