Repository navigation
Commit c21f09e
committed
CI red on PR #7857: `packages/objectql/src/protocol-commit-history.test.ts` had
two org-scoped revert cases fail with COMMIT_NOT_FOUND. Measured rather than
assumed: its `matchesWhere` was pure flat equality, so the widened lookup
`{ id, $or: [{organization_id: <org>}, {organization_id: null}] }` compared
`row['$or']` against the array and matched nothing.
The double is the blind party, not the fix. Both failing rows carry the
CALLER'S OWN org (`organization_id: 'org_a'`, request org `'org_a'`), so they
match the FIRST `$or` branch outright — the same row the strict equality already
accepted. No real behaviour changed, and neither case's subject (#6602's
registry org-asymmetry) involves the commit lookup at all; it is merely the door
they enter through.
Conjoined with the sibling keys in the entries loop, matching the corrected form
#7846 landed across six doubles in this package an hour earlier. Not the
early-returning `if ($or) return …some(…)` shape those six carried before it:
that discards sibling keys, so `{ id, $or: [...] }` would stop constraining `id`
and could return some other commit whose org matched. This file was not among
#7846's six because it had no operator handling to correct, so it is a new
member of the #7620 lane rather than a regression of it.
`undefined` normalises to `null` on comparison, same as the six, because a
column a row never set reads as NULL out of a real driver.
@objectstack/objectql: 185 files / 3274 tests passing (was 184/3272 with the two
failures) — exactly the two cases restored, nothing else moved.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019hxiiv8qFCUmDThHU1k7HV
1 parent b4ea578 commit c21f09e
2 files changed
Lines changed: 79 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
90 | 90 | | |
91 | 91 | | |
92 | 92 | | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
93 | 121 | | |
94 | 122 | | |
95 | 123 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
247 | 247 | | |
248 | 248 | | |
249 | 249 | | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
250 | 285 | | |
| 286 | + | |
251 | 287 | | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
252 | 297 | | |
253 | | - | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
254 | 304 | | |
255 | 305 | | |
256 | 306 | | |
| |||
0 commit comments