chore(memory): V1-2.2 checkpoint, evidence, BDR-086, LRN-097/098, TODO
This commit is contained in:
1 parent
ca31b787b6
commit
17d919971e
8 files changed
+213
-4
No files matched your search
@@ -663,3 +663,13 @@ Adapting pgTAP across PGlite and the real Supabase image: the fixtures must resp
|
||||
|
||||
## LRN-096 — jsonb_path_query row iteration is quadratic; numeric text has no exponent (2026-10-28)
|
||||
PostgreSQL 17 `jsonb_path_query` (SRF) builds its whole match list on the first call and pops rows with `list_delete_first` -> O(n^2) when iterated row by row (FOR loop, count(*)): 200k matches 2.2 s, 400k ~27 s. Early `exit` saves nothing. Use one `jsonb_path_query_array(...)` then `jsonb_array_elements` (linear: 600k 0.4 s). Also: `numeric` prints no exponent, so `octet_length(jsonb::text)` of `1e131071` x 9000 (90 kB payload) = 1.2 GB -> raw OOM; sum printed numbers first. Apply to any SQL walk over user jsonb (status walks `sheet_all_reviewed`, `sheet_has_to_confirm` use the same SRF pattern, bounded today by core caps).
|
||||
|
||||
## LRN-097 — serde tagged enums and owned-Value reads double the wasm size (2026-10-29)
|
||||
serde derive cost in wasm: internally/adjacently tagged enums buffer through serde's private Content, so every type reachable through them gets a second Deserialize monomorphization (ContentDeserializer); `serde_json::from_value` (owned Value) is a third, distinct from `T::deserialize(&value)`. V1-2.2 measured: edit commands with tagged derive + owned from_value of the document = 635.7 KB gzip (budget 600); commands read via `Value` then `T::deserialize(&inner)`, document via `&Value` = 582.7 KB.
|
||||
Apply: in crates reaching wasm, read tagged wire forms through `serde_json::Value` with hand dispatch on the tag (keep ts-rs shape with `ts(tag, content, rename_all)`), always deserialize documents from `&Value`, measure `pnpm wasm:build` gzip after any new op; probe by removing one export at a time (cargo release wasm + gzip -9) before guessing.
|
||||
|
||||
## LRN-098 — Real SVG exports vs the allowlist; what the tree never reads (2026-10-29)
|
||||
Real vector exports vs R3 allowlist: cairo 1.18 writes colours as `rgb(20%, 40%, 70%)`; allowlist drops any function call in presentation attributes → cleaned drawing keeps shapes, loses colours. ImageMagick 7 MVG export writes style settings as bare text between elements (dropped silently, not a "removal"). Property test generators for SVG must avoid repeated attribute names (XML malformed) or most cases test nothing.
|
||||
Apply: classify fixtures by actual outcome before writing expectations; report colour loss on cleaning as an owner decision (allow numeric rgb()/rgba() = reader change); dedupe attribute names in generators.
|
||||
|
||||
Also: the tree drops processing instructions and comments, so "read with no removal" is not "bytes safe": `<?xml-stylesheet href=…?>` survives in stored bytes; scan PIs separately (fail-closed) wherever original bytes are kept.
|
||||
Reference in new issue
Block a user