Commit 5ccf63f
test(run-ops): stop RunPresenter read-seam test freezing on the first testcontainer
The RunStore singleton is built once at import and its error-normalizing
wrapper memoizes each Prisma model delegate on first access. The test's
delegating proxy returned current.taskRun directly, so the store cached the
first test's container-bound delegate and later tests (fresh containers)
failed with "Database test_0 does not exist". Object-valued delegates now
return a stable per-key sub-proxy the store can safely cache, re-delegating
to the live current client on each access. Production code is unchanged.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>1 parent 82e91a4 commit 5ccf63f
1 file changed
Lines changed: 39 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
15 | | - | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
16 | 22 | | |
17 | 23 | | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
18 | 48 | | |
19 | 49 | | |
20 | 50 | | |
21 | 51 | | |
22 | 52 | | |
23 | 53 | | |
24 | 54 | | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
25 | 62 | | |
26 | 63 | | |
27 | 64 | | |
| |||
0 commit comments