Commit db315dd
committed
fix(workspace): narrow the id-lookup error suppression, stop the test flag leaking
Bot review on the current head.
**An unreadable store reported "not found".** The id path swallowed every read
error so that project scope, which throws outside an instance context, could not
hide a global or workspace match. But probing both scopes is our choice only
when the caller passes `scope: "all"` — when they name a scope, a failure there
is a real error they need to see, not missing memory. Suppression is now limited
to exactly the project-scope-under-`all` case.
**The test flag leaked into the process.** `store-directory.test.ts` set
`ALTIMATE_WORKSPACE=1` at module load and never restored it, so unrelated suites
sharing the process inherited the pilot flag. Saved and restored in teardown,
deleting it when it was previously unset.
Both mutation-checked. The reviewer's other two findings were raised against
`de4201f7b` and are already fixed in `568b7cfae9`: the id path merges the
overlay (it no longer returns before the merge), and hydration commits into the
state that launched it, so a stale in-flight fetch cannot clobber a refreshed
overlay.
Tests: 4481 pass across memory + altimate.1 parent 568b7cf commit db315dd
3 files changed
Lines changed: 38 additions & 8 deletions
File tree
- packages/opencode
- src/memory/tools
- test/memory
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | | - | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
52 | 53 | | |
53 | 54 | | |
54 | 55 | | |
55 | | - | |
56 | | - | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
57 | 59 | | |
58 | 60 | | |
59 | 61 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
212 | 212 | | |
213 | 213 | | |
214 | 214 | | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
215 | 236 | | |
216 | 237 | | |
217 | 238 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
3 | 5 | | |
4 | 6 | | |
5 | | - | |
| 7 | + | |
6 | 8 | | |
7 | 9 | | |
8 | 10 | | |
| |||
12 | 14 | | |
13 | 15 | | |
14 | 16 | | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
15 | 22 | | |
16 | 23 | | |
17 | 24 | | |
| |||
0 commit comments