Repository navigation
Commit b1fa3f1
fix(drivers): stop the driver fabricating a lock wrapper the registry then trusts
Two defects my previous commit introduced, caught in review.
**The driver's lock matcher was looser than the registry's.** I tightened
`categorizeConnectionError` to require both `could not set lock` and
`conflicting lock`, precisely so a lock-shaped error from elsewhere could not be
claimed as contention — but left `isLockError` in the driver matching
`could not set lock` alone. A non-contention failure (an unsupported filesystem
lock, a permissions problem) therefore entered the lock branch, spent a
read-only retry, and was wrapped as "locked by another process". The registry
then trusted that fabricated wrapper as a recoverable `store_locked` and told
the reader to close a process that does not exist, hiding the real filesystem
fault. The two matchers now agree, with a comment on each saying so.
**The liveness test leaked its handle on failure.** `close()` ran after both
assertions, so a failing one skipped it. Since that test opens the store
read-write and DuckDB's lock is per-process, the leak would make every later
test in the file fail with a lock conflict rather than the real cause — the
exact confusion this suite exists to prevent. Now closed in a `finally`, with
the assertions moved after it.
Test: a non-contention `Could not set lock … Operation not supported` must keep
its own message, must not be relabelled "locked by another process", and must
not spend a retry. It fails against the previous commit's matcher.
Gates: typecheck 13/13; markers ok against `origin/main`; drivers 143 pass 0
fail; `test/altimate` 4224 pass 0 fail; gated E2E 22 pass 0 fail on six
consecutive runs. Lint 5865 warnings / 1 error — the error remains the
pre-existing `consistent-return` in
`packages/http-recorder/test/record-replay.test.ts`; +1 warning, an un-awaited
`mock.module` in the new test, matching every other `mock.module` in that file.
Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01VqnuBDGkh1ZT65Ti7e6DHZ1 parent c06a851 commit b1fa3f1
3 files changed
Lines changed: 65 additions & 7 deletions
File tree
- packages
- drivers
- src
- test
- opencode/test/altimate
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
74 | 74 | | |
75 | 75 | | |
76 | 76 | | |
77 | | - | |
78 | | - | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
79 | 85 | | |
80 | 86 | | |
81 | 87 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
189 | 189 | | |
190 | 190 | | |
191 | 191 | | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
192 | 236 | | |
193 | 237 | | |
194 | 238 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
113 | 113 | | |
114 | 114 | | |
115 | 115 | | |
116 | | - | |
117 | | - | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
118 | 127 | | |
119 | 128 | | |
120 | | - | |
| 129 | + | |
121 | 130 | | |
122 | | - | |
123 | | - | |
| 131 | + | |
124 | 132 | | |
125 | 133 | | |
126 | 134 | | |
| |||
0 commit comments