Commit 9f5b711
committed
fix(files): report a reference dependency from the isolated-VM compile path
The isolated-VM fallback returns before the static reference scan, so a document
it compiled never reported one — yet that path reads workspace files live through
its broker, which is what `onWorkspaceFileAccess` records. A versioned request for
such a document therefore still took a one-year immutable lifetime, and changing a
referenced file left the browser serving a stale render.
Fixed at the root rather than in that one branch: the flag is now required on
CompiledDocResult, so every compile path must declare it and a new one cannot
inherit a cacheable-forever answer by staying silent. Each site reports the union
of what the source references statically and what the compile actually touched —
neither alone is sufficient, since a failed read records no access and the broker
reaches files the static scan cannot see.
Making it required immediately surfaced a second case: the process-local compile
cache is shared with compiles that carried a workspace, so a cached entry can hold
contributor identities even when the reading call passes none. That branch now
reads the cached identities instead of assuming independence.1 parent 6ff2969 commit 9f5b711
3 files changed
Lines changed: 102 additions & 17 deletions
File tree
- apps/sim/lib/copilot/tools/server/files
Lines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
169 | 169 | | |
170 | 170 | | |
171 | 171 | | |
| 172 | + | |
172 | 173 | | |
173 | 174 | | |
174 | 175 | | |
| |||
219 | 220 | | |
220 | 221 | | |
221 | 222 | | |
| 223 | + | |
222 | 224 | | |
223 | 225 | | |
224 | 226 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
152 | 152 | | |
153 | 153 | | |
154 | 154 | | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
155 | 159 | | |
156 | | - | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
157 | 173 | | |
158 | 174 | | |
159 | 175 | | |
| |||
574 | 590 | | |
575 | 591 | | |
576 | 592 | | |
| 593 | + | |
577 | 594 | | |
578 | 595 | | |
579 | 596 | | |
| |||
664 | 681 | | |
665 | 682 | | |
666 | 683 | | |
| 684 | + | |
| 685 | + | |
| 686 | + | |
| 687 | + | |
667 | 688 | | |
668 | 689 | | |
669 | 690 | | |
| |||
686 | 707 | | |
687 | 708 | | |
688 | 709 | | |
| 710 | + | |
689 | 711 | | |
690 | 712 | | |
691 | 713 | | |
| |||
729 | 751 | | |
730 | 752 | | |
731 | 753 | | |
| 754 | + | |
732 | 755 | | |
733 | 756 | | |
734 | 757 | | |
| |||
898 | 921 | | |
899 | 922 | | |
900 | 923 | | |
901 | | - | |
| 924 | + | |
| 925 | + | |
| 926 | + | |
| 927 | + | |
| 928 | + | |
902 | 929 | | |
903 | 930 | | |
904 | 931 | | |
905 | | - | |
| 932 | + | |
| 933 | + | |
| 934 | + | |
| 935 | + | |
| 936 | + | |
906 | 937 | | |
907 | 938 | | |
908 | 939 | | |
| |||
924 | 955 | | |
925 | 956 | | |
926 | 957 | | |
927 | | - | |
928 | | - | |
929 | | - | |
930 | | - | |
931 | | - | |
932 | | - | |
933 | | - | |
934 | | - | |
935 | | - | |
| 958 | + | |
936 | 959 | | |
937 | 960 | | |
938 | 961 | | |
939 | 962 | | |
940 | 963 | | |
941 | | - | |
| 964 | + | |
| 965 | + | |
| 966 | + | |
942 | 967 | | |
943 | 968 | | |
944 | 969 | | |
| |||
952 | 977 | | |
953 | 978 | | |
954 | 979 | | |
| 980 | + | |
| 981 | + | |
| 982 | + | |
| 983 | + | |
| 984 | + | |
| 985 | + | |
955 | 986 | | |
956 | 987 | | |
957 | 988 | | |
| |||
964 | 995 | | |
965 | 996 | | |
966 | 997 | | |
967 | | - | |
| 998 | + | |
| 999 | + | |
| 1000 | + | |
| 1001 | + | |
| 1002 | + | |
968 | 1003 | | |
Lines changed: 51 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
379 | 379 | | |
380 | 380 | | |
381 | 381 | | |
382 | | - | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
383 | 389 | | |
384 | 390 | | |
385 | 391 | | |
386 | 392 | | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
387 | 425 | | |
388 | 426 | | |
389 | 427 | | |
| |||
413 | 451 | | |
414 | 452 | | |
415 | 453 | | |
| 454 | + | |
416 | 455 | | |
417 | 456 | | |
418 | 457 | | |
| |||
425 | 464 | | |
426 | 465 | | |
427 | 466 | | |
| 467 | + | |
428 | 468 | | |
429 | 469 | | |
430 | 470 | | |
| |||
443 | 483 | | |
444 | 484 | | |
445 | 485 | | |
446 | | - | |
| 486 | + | |
| 487 | + | |
| 488 | + | |
| 489 | + | |
| 490 | + | |
447 | 491 | | |
448 | 492 | | |
449 | 493 | | |
| |||
467 | 511 | | |
468 | 512 | | |
469 | 513 | | |
470 | | - | |
| 514 | + | |
| 515 | + | |
| 516 | + | |
| 517 | + | |
| 518 | + | |
471 | 519 | | |
472 | 520 | | |
473 | 521 | | |
| |||
0 commit comments