Repository navigation
Commit d9985f1
committed
🧵 Give each execution its own packaged-asset reader (#758)
The seam I added for SYN46 was a module-scoped mutable variable with an exported
setter. One variable shared by every execution in the process: two runs would
read through each other's reader, and substituting one changed what an unrelated
execution was told the product says. A test-only intent does not make shared
mutable state execution-local.
The reader is now a value. It travels from where the execution is built —
`runInvocation` → `invoke` → `executeDocument` → the observation — and the
observation holds its own, so narrowing carries it and two executions in one
process cannot reach each other's. There is no setter, no Context, no provider,
no installation field and no hook: nothing a document, a component or an
installed package can name reaches it at all. Production still uses the direct
Effection filesystem.
`executeReadingAssetsWith()` replaces `withAssetReader()`: it *builds a new
execution* around a reader rather than changing anything an existing one holds,
and is exported from `src/execute.ts` alone — not from `mod.ts`, not from
`host.ts`. Importing it from a repository component gives you the ability to
start your own execution, which you already had; it gives you no way to touch
the current one's reader.
SYN48 is the control that makes this a fact rather than a claim: one execution
suspended inside documentation-index construction, a second ordinary execution
overlapping it in the same process. The ordinary one reads canonical
documentation and completes independently. Restoring the module-global
implementation makes SYN48 fail, which is the check I should have written the
first time — SYN46 alone passes under both designs.1 parent 9d92bcb commit d9985f1
4 files changed
Lines changed: 172 additions & 65 deletions
File tree
- packages/core
- src
- tests
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
50 | | - | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
51 | 53 | | |
52 | | - | |
53 | | - | |
54 | | - | |
55 | | - | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
56 | 59 | | |
57 | 60 | | |
58 | 61 | | |
| |||
64 | 67 | | |
65 | 68 | | |
66 | 69 | | |
67 | | - | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
68 | 73 | | |
69 | 74 | | |
70 | 75 | | |
| |||
78 | 83 | | |
79 | 84 | | |
80 | 85 | | |
81 | | - | |
| 86 | + | |
82 | 87 | | |
83 | 88 | | |
84 | 89 | | |
| |||
100 | 105 | | |
101 | 106 | | |
102 | 107 | | |
| 108 | + | |
103 | 109 | | |
104 | 110 | | |
105 | | - | |
| 111 | + | |
106 | 112 | | |
107 | 113 | | |
108 | 114 | | |
109 | 115 | | |
110 | 116 | | |
111 | | - | |
| 117 | + | |
112 | 118 | | |
113 | | - | |
114 | | - | |
115 | | - | |
116 | | - | |
117 | | - | |
118 | | - | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
119 | 126 | | |
120 | | - | |
| 127 | + | |
121 | 128 | | |
122 | | - | |
123 | | - | |
124 | | - | |
125 | | - | |
126 | | - | |
127 | | - | |
128 | | - | |
129 | | - | |
130 | | - | |
131 | | - | |
132 | | - | |
133 | | - | |
134 | | - | |
135 | | - | |
136 | | - | |
137 | | - | |
138 | | - | |
139 | | - | |
| 129 | + | |
| 130 | + | |
140 | 131 | | |
141 | 132 | | |
142 | 133 | | |
143 | 134 | | |
144 | 135 | | |
| 136 | + | |
145 | 137 | | |
146 | 138 | | |
147 | | - | |
| 139 | + | |
148 | 140 | | |
149 | 141 | | |
150 | 142 | | |
| |||
177 | 169 | | |
178 | 170 | | |
179 | 171 | | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
180 | 180 | | |
181 | 181 | | |
182 | | - | |
| 182 | + | |
183 | 183 | | |
184 | 184 | | |
185 | 185 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
141 | 141 | | |
142 | 142 | | |
143 | 143 | | |
144 | | - | |
| 144 | + | |
| 145 | + | |
145 | 146 | | |
146 | 147 | | |
147 | 148 | | |
| |||
2161 | 2162 | | |
2162 | 2163 | | |
2163 | 2164 | | |
| 2165 | + | |
| 2166 | + | |
2164 | 2167 | | |
2165 | 2168 | | |
2166 | 2169 | | |
| |||
2348 | 2351 | | |
2349 | 2352 | | |
2350 | 2353 | | |
| 2354 | + | |
2351 | 2355 | | |
2352 | 2356 | | |
2353 | 2357 | | |
| |||
2735 | 2739 | | |
2736 | 2740 | | |
2737 | 2741 | | |
| 2742 | + | |
| 2743 | + | |
| 2744 | + | |
| 2745 | + | |
| 2746 | + | |
| 2747 | + | |
| 2748 | + | |
2738 | 2749 | | |
2739 | 2750 | | |
2740 | 2751 | | |
| |||
2767 | 2778 | | |
2768 | 2779 | | |
2769 | 2780 | | |
2770 | | - | |
| 2781 | + | |
2771 | 2782 | | |
2772 | 2783 | | |
2773 | 2784 | | |
| |||
2953 | 2964 | | |
2954 | 2965 | | |
2955 | 2966 | | |
| 2967 | + | |
| 2968 | + | |
2956 | 2969 | | |
2957 | 2970 | | |
2958 | 2971 | | |
| |||
3115 | 3128 | | |
3116 | 3129 | | |
3117 | 3130 | | |
| 3131 | + | |
3118 | 3132 | | |
3119 | 3133 | | |
3120 | 3134 | | |
| |||
3152 | 3166 | | |
3153 | 3167 | | |
3154 | 3168 | | |
3155 | | - | |
| 3169 | + | |
3156 | 3170 | | |
3157 | 3171 | | |
3158 | 3172 | | |
| |||
3170 | 3184 | | |
3171 | 3185 | | |
3172 | 3186 | | |
| 3187 | + | |
| 3188 | + | |
| 3189 | + | |
| 3190 | + | |
| 3191 | + | |
| 3192 | + | |
| 3193 | + | |
| 3194 | + | |
| 3195 | + | |
| 3196 | + | |
| 3197 | + | |
| 3198 | + | |
| 3199 | + | |
| 3200 | + | |
| 3201 | + | |
| 3202 | + | |
| 3203 | + | |
| 3204 | + | |
| 3205 | + | |
| 3206 | + | |
| 3207 | + | |
| 3208 | + | |
3173 | 3209 | | |
3174 | 3210 | | |
3175 | 3211 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
37 | | - | |
38 | | - | |
| 37 | + | |
| 38 | + | |
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
| |||
133 | 133 | | |
134 | 134 | | |
135 | 135 | | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
136 | 146 | | |
137 | 147 | | |
138 | 148 | | |
| |||
141 | 151 | | |
142 | 152 | | |
143 | 153 | | |
144 | | - | |
| 154 | + | |
145 | 155 | | |
146 | 156 | | |
147 | 157 | | |
| |||
155 | 165 | | |
156 | 166 | | |
157 | 167 | | |
| 168 | + | |
158 | 169 | | |
159 | 170 | | |
160 | 171 | | |
| |||
163 | 174 | | |
164 | 175 | | |
165 | 176 | | |
166 | | - | |
| 177 | + | |
167 | 178 | | |
168 | 179 | | |
169 | 180 | | |
| |||
178 | 189 | | |
179 | 190 | | |
180 | 191 | | |
| 192 | + | |
181 | 193 | | |
182 | 194 | | |
183 | 195 | | |
| |||
341 | 353 | | |
342 | 354 | | |
343 | 355 | | |
| 356 | + | |
| 357 | + | |
344 | 358 | | |
345 | 359 | | |
346 | 360 | | |
| |||
353 | 367 | | |
354 | 368 | | |
355 | 369 | | |
| 370 | + | |
356 | 371 | | |
357 | 372 | | |
0 commit comments