Commit 095fc99
committed
fix(provenance): store an absence apart from a refusal
Relaxing a stored `unknown` assumed it always meant "nobody recorded this". It did not. The
sidecar collapsed two opposite claims into one value: bytes nobody recorded, and bytes a writer
refused on purpose — a child of an archive whose parent provably held secrets, a generated
asset whose safety decision came back false, a transcode whose scanner knew secrets were
present and could not locate them. Relaxing the second would have walked known-secret-bearing
content through every model boundary at once.
The decision type already told them apart: a registry that never ran is `safe: true`, while
every refusal is `safe: false`. Only storage lost it. Writers now persist `unrecorded` and
`unknown` separately, readers relax the first and refuse the second, and the constraint is
widened to accept it.
Only workspace files store this distinction, deliberately. Every other durable surface produces
a non-exact sidecar from one condition — an incomplete incoming bundle or registry — which is
always an absence. Files are the only surface that derives one stored object from another, so
they are the only one that can refuse on purpose. The shared policy is unchanged and uniform:
read an absence and audit it, refuse a taint.
Also aligns the metadata batch classifier, which answered `unknown` where the single-file reader
answers `unrecorded`, leaving two classifiers describing one policy differently.1 parent 11cc0f0 commit 095fc99
9 files changed
Lines changed: 20256 additions & 25 deletions
File tree
- apps/sim/lib
- copilot/request/tools
- execution
- uploads/contexts/workspace
- packages/db
- migrations
- meta
- script-migrations
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
578 | 578 | | |
579 | 579 | | |
580 | 580 | | |
581 | | - | |
| 581 | + | |
| 582 | + | |
| 583 | + | |
| 584 | + | |
| 585 | + | |
| 586 | + | |
582 | 587 | | |
583 | 588 | | |
584 | 589 | | |
| |||
589 | 594 | | |
590 | 595 | | |
591 | 596 | | |
592 | | - | |
| 597 | + | |
593 | 598 | | |
594 | 599 | | |
595 | 600 | | |
| |||
Lines changed: 13 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
12 | 25 | | |
13 | 26 | | |
14 | 27 | | |
| |||
Lines changed: 50 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
153 | 153 | | |
154 | 154 | | |
155 | 155 | | |
156 | | - | |
157 | | - | |
158 | | - | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
159 | 159 | | |
160 | | - | |
| 160 | + | |
161 | 161 | | |
162 | 162 | | |
163 | 163 | | |
164 | 164 | | |
165 | 165 | | |
166 | 166 | | |
167 | 167 | | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
168 | 181 | | |
169 | 182 | | |
170 | 183 | | |
171 | 184 | | |
172 | 185 | | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
173 | 199 | | |
174 | 200 | | |
175 | 201 | | |
| |||
305 | 331 | | |
306 | 332 | | |
307 | 333 | | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
308 | 345 | | |
309 | 346 | | |
310 | 347 | | |
| |||
348 | 385 | | |
349 | 386 | | |
350 | 387 | | |
| 388 | + | |
351 | 389 | | |
352 | 390 | | |
353 | 391 | | |
| |||
362 | 400 | | |
363 | 401 | | |
364 | 402 | | |
365 | | - | |
366 | | - | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
367 | 409 | | |
368 | 410 | | |
369 | 411 | | |
| |||
720 | 762 | | |
721 | 763 | | |
722 | 764 | | |
723 | | - | |
| 765 | + | |
724 | 766 | | |
725 | 767 | | |
726 | 768 | | |
| |||
1331 | 1373 | | |
1332 | 1374 | | |
1333 | 1375 | | |
1334 | | - | |
| 1376 | + | |
1335 | 1377 | | |
1336 | 1378 | | |
1337 | 1379 | | |
| |||
Lines changed: 37 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
242 | 242 | | |
243 | 243 | | |
244 | 244 | | |
245 | | - | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
246 | 251 | | |
247 | 252 | | |
248 | 253 | | |
| |||
422 | 427 | | |
423 | 428 | | |
424 | 429 | | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
425 | 437 | | |
426 | 438 | | |
427 | | - | |
| 439 | + | |
428 | 440 | | |
429 | 441 | | |
430 | | - | |
| 442 | + | |
431 | 443 | | |
432 | 444 | | |
433 | 445 | | |
| |||
449 | 461 | | |
450 | 462 | | |
451 | 463 | | |
| 464 | + | |
452 | 465 | | |
453 | 466 | | |
454 | 467 | | |
455 | 468 | | |
456 | 469 | | |
457 | | - | |
| 470 | + | |
458 | 471 | | |
459 | 472 | | |
460 | 473 | | |
| |||
686 | 699 | | |
687 | 700 | | |
688 | 701 | | |
689 | | - | |
690 | | - | |
| 702 | + | |
| 703 | + | |
| 704 | + | |
| 705 | + | |
691 | 706 | | |
692 | | - | |
| 707 | + | |
693 | 708 | | |
694 | 709 | | |
695 | 710 | | |
| |||
739 | 754 | | |
740 | 755 | | |
741 | 756 | | |
742 | | - | |
743 | 757 | | |
744 | 758 | | |
745 | 759 | | |
746 | 760 | | |
747 | 761 | | |
| 762 | + | |
| 763 | + | |
| 764 | + | |
| 765 | + | |
| 766 | + | |
| 767 | + | |
| 768 | + | |
| 769 | + | |
| 770 | + | |
| 771 | + | |
| 772 | + | |
| 773 | + | |
| 774 | + | |
| 775 | + | |
748 | 776 | | |
749 | 777 | | |
750 | 778 | | |
| |||
909 | 937 | | |
910 | 938 | | |
911 | 939 | | |
912 | | - | |
| 940 | + | |
913 | 941 | | |
914 | 942 | | |
915 | 943 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
0 commit comments