Repository navigation
Commit 9ae7d77
fix(analyst): DuckDB read-only guard uses txid_current, dynamic query() is refused, estimate-lookup infrastructure errors propagate
- The DuckDB read-only guard probes the transaction id with `txid_current()`, which every supported DuckDB release exposes, instead of `current_transaction_id()`
- DuckDB `query()` executes the SQL in its string argument, so a masked literal could smuggle an already-denied call into the probe; it is now part of the denied function class. `pg_ls_*dir` is no longer allowlisted (server directory listings are file access); redundant allowlist/denylist entries removed
- The bare-table estimate lookup re-throws a lost helper session (`stateLost`) and any other infrastructure error instead of treating it as an unknown estimate; only recognised missing-statistics or catalog-access failures still mean unknown, so a probe never runs under silently reset session state
- tests: query() smuggling and pg_ls_dir/pg_ls_waldir rejected; lost-session estimate error propagates; missing-catalog error still yields an unknown estimate
Co-Authored-By: Claude Fable 5.1 <[email protected]>1 parent 5a69583 commit 9ae7d77
3 files changed
Lines changed: 39 additions & 7 deletions
File tree
- packages
- drivers/src
- opencode
- src/altimate/tools
- test/altimate
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
238 | 238 | | |
239 | 239 | | |
240 | 240 | | |
241 | | - | |
242 | | - | |
| 241 | + | |
| 242 | + | |
243 | 243 | | |
244 | 244 | | |
245 | 245 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
22 | | - | |
23 | | - | |
| 22 | + | |
| 23 | + | |
24 | 24 | | |
25 | | - | |
| 25 | + | |
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
| |||
311 | 311 | | |
312 | 312 | | |
313 | 313 | | |
314 | | - | |
315 | | - | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
316 | 323 | | |
317 | 324 | | |
318 | 325 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
152 | 152 | | |
153 | 153 | | |
154 | 154 | | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
155 | 158 | | |
156 | 159 | | |
157 | 160 | | |
| |||
402 | 405 | | |
403 | 406 | | |
404 | 407 | | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
405 | 430 | | |
406 | 431 | | |
407 | 432 | | |
| |||
0 commit comments