Commit 0780e88
* fix(objectql): report a refused write at `warn`, not `error` (#17052)
`insert`, `update` and `delete` each end their catch with `throw e` and logged
the failure at ERROR one statement earlier. AGENTS.md → Degradation log levels
names that shape: "a failure handed to the CALLER is not a degradation at all
… Do not bolt a `logger.error` onto such a site."
The diagnosis two earlier rulings shaped survives the move. `warn(message,
meta?)` has no `Error` slot, and `Error.message`/`stack` are non-enumerable, so
handing the error over as meta would have serialised `{}`. The doors instead
build the `{ error: { message, stack } }` bag `ObjectLogger.write()` builds from
the slot, keeping #8682's redaction and #14095's choice of the driver error over
the envelope. The rendered line is byte-identical apart from the level word.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019wtfW1ZxGnP1XKGc9uZVms
* test(objectql): move the three level readers the full suite found (#17052)
Running the whole package rather than the message-matched files found one
consumer a message grep could not see, plus two rig defects of my own:
- `engine-delete-restricted-locale.test.ts` — #7307's pin that the delete
door's `developerMessage` reaches the SERVER LOG. It monkey-patches the
logger method and reads the meta by ARGUMENT POSITION, so it never mentions
`Delete operation failed` and no grep for that message could find it. Now
captures both `warn` and `error`, taking meta from the right position for
each, so it stays a statement about the log rather than about one method.
- `engine-strict-readonly-warning-truthful.test.ts` — `warns` collected every
warn-level message, so the door's entry made each strip assertion count 2.
The message isolation this suite already performed in `stripLineLevels()`
now backs `warns` too, which is where the strip assertions actually read.
- `engine-write-failure-log-level.test.ts` — the delete door was driven with
an unrecognised `id` option, so the engine refused the call before reaching
the driver and the door logged nothing. Addressed through `where`, which is
what #4371's refusal message names.
Full suite: 289/289 files, 4865/4865 tests. typecheck: OK.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019wtfW1ZxGnP1XKGc9uZVms
---------
Co-authored-by: Claude <noreply@anthropic.com>
1 parent d03c3c9 commit 0780e88
9 files changed
Lines changed: 475 additions & 59 deletions
File tree
- .changeset
- packages/objectql/src
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
751 | 751 | | |
752 | 752 | | |
753 | 753 | | |
754 | | - | |
| 754 | + | |
| 755 | + | |
| 756 | + | |
755 | 757 | | |
756 | 758 | | |
757 | 759 | | |
| |||
814 | 816 | | |
815 | 817 | | |
816 | 818 | | |
817 | | - | |
| 819 | + | |
818 | 820 | | |
819 | 821 | | |
820 | | - | |
821 | | - | |
| 822 | + | |
| 823 | + | |
822 | 824 | | |
823 | 825 | | |
824 | | - | |
825 | | - | |
| 826 | + | |
| 827 | + | |
| 828 | + | |
| 829 | + | |
| 830 | + | |
| 831 | + | |
| 832 | + | |
| 833 | + | |
| 834 | + | |
| 835 | + | |
| 836 | + | |
826 | 837 | | |
827 | 838 | | |
828 | 839 | | |
829 | 840 | | |
830 | 841 | | |
831 | | - | |
832 | | - | |
| 842 | + | |
| 843 | + | |
833 | 844 | | |
834 | 845 | | |
835 | 846 | | |
836 | 847 | | |
837 | 848 | | |
838 | | - | |
| 849 | + | |
839 | 850 | | |
840 | 851 | | |
841 | 852 | | |
| |||
872 | 883 | | |
873 | 884 | | |
874 | 885 | | |
875 | | - | |
876 | | - | |
| 886 | + | |
| 887 | + | |
| 888 | + | |
| 889 | + | |
| 890 | + | |
| 891 | + | |
| 892 | + | |
877 | 893 | | |
878 | | - | |
879 | | - | |
| 894 | + | |
| 895 | + | |
880 | 896 | | |
881 | 897 | | |
882 | 898 | | |
883 | 899 | | |
884 | 900 | | |
885 | | - | |
| 901 | + | |
886 | 902 | | |
887 | 903 | | |
888 | 904 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | | - | |
| 17 | + | |
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
39 | 46 | | |
40 | 47 | | |
41 | 48 | | |
| |||
Lines changed: 19 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
220 | 220 | | |
221 | 221 | | |
222 | 222 | | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
223 | 233 | | |
224 | | - | |
225 | | - | |
226 | | - | |
227 | | - | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
228 | 240 | | |
| 241 | + | |
| 242 | + | |
229 | 243 | | |
230 | | - | |
| 244 | + | |
231 | 245 | | |
232 | 246 | | |
233 | 247 | | |
| |||
Lines changed: 12 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
323 | 323 | | |
324 | 324 | | |
325 | 325 | | |
326 | | - | |
327 | | - | |
328 | | - | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
329 | 334 | | |
330 | 335 | | |
331 | 336 | | |
332 | 337 | | |
333 | | - | |
| 338 | + | |
334 | 339 | | |
335 | 340 | | |
336 | 341 | | |
337 | 342 | | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
338 | 346 | | |
339 | 347 | | |
340 | 348 | | |
Lines changed: 29 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
125 | 125 | | |
126 | 126 | | |
127 | 127 | | |
128 | | - | |
| 128 | + | |
129 | 129 | | |
130 | 130 | | |
131 | 131 | | |
132 | | - | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
133 | 140 | | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
134 | 144 | | |
135 | | - | |
136 | | - | |
137 | | - | |
| 145 | + | |
138 | 146 | | |
139 | 147 | | |
140 | 148 | | |
| |||
148 | 156 | | |
149 | 157 | | |
150 | 158 | | |
151 | | - | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
152 | 167 | | |
153 | 168 | | |
154 | 169 | | |
| |||
164 | 179 | | |
165 | 180 | | |
166 | 181 | | |
167 | | - | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
168 | 185 | | |
169 | 186 | | |
170 | 187 | | |
| |||
201 | 218 | | |
202 | 219 | | |
203 | 220 | | |
204 | | - | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
205 | 224 | | |
206 | 225 | | |
207 | 226 | | |
| |||
248 | 267 | | |
249 | 268 | | |
250 | 269 | | |
251 | | - | |
| 270 | + | |
| 271 | + | |
252 | 272 | | |
253 | 273 | | |
254 | 274 | | |
| |||
0 commit comments