Skip to content

Commit fcddb13

Browse files
committed
docs(service-analytics): retract the "more tightly than the proxy" clause from the case-exactness suite header
The round-1 contract review measured that clause false: FOLD_PER_DIALECT inspects the COLUMN side only, so a one-sided column fold on the postgres / unknown arm leaves this file green (exit 0, 14 passed) where the pre-fix `LIKE translate($1,` pin caught it. The PR body and the changeset were corrected in round 2; this source header was not, and a PR body cannot reach someone who opens this suite six months from now. The header now carries the two halves the PR body already states: tighter on family separation (the four collapse mutations the review drove all went red here), looser on both-sides folding, plus the cross-reference that icontains-dialect-sql.test.ts holds the verbatim postgres / unknown byte pin for that second case. Concluded as not net-weakened across the two files, never as a strict tightening. Comment-only, proven two ways with firing controls: every added and removed diff line is a comment line (28 added, 8 removed, 0 non-comment; four real code lines fed to the same filter classify as CODE), and the file transpiled with removeComments is byte-identical to its 711db06 blob (sha256/16 941867ad0f3e45a7, 14888 bytes on both sides, while injecting one code line in memory moves that hash). The other seven files this PR touches are untouched: git hash-object equals the 711db06 blob for each. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XpTx2tbq3pZRYAdoGt6E6Y
1 parent 711db06 commit fcddb13

1 file changed

Lines changed: 28 additions & 8 deletions

File tree

packages/services/service-analytics/src/__tests__/text-operator-case-exactness.test.ts

Lines changed: 28 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -72,14 +72,34 @@
7272
* which it no longer is.
7373
*
7474
* ⛔ It was therefore neither deleted nor loosened — it was re-aimed at the
75-
* property itself, which is now pinned DIRECTLY and more tightly than the proxy
76-
* ever did (`$icontains and the case-EXACT family stay two constructs…`
77-
* below): on each dialect, `$icontains` and `$contains` must compile to
78-
* DIFFERENT text, and `$contains` must carry no fold. That discriminates
79-
* against the collapse in both directions, where dialect-invariance only
80-
* discriminated against one. The row sets that make it more than a text
81-
* comparison are executed in `icontains-dialect-sql.test.ts`, which owns the
82-
* `$icontains` half of the family from here on.
75+
* property itself, pinned DIRECTLY (`$icontains and the case-EXACT family stay
76+
* two constructs…` below): on each dialect, `$icontains` and `$contains` must
77+
* compile to DIFFERENT text, and `$contains` must carry no fold.
78+
*
79+
* ⛔ That re-aiming is NOT a strict tightening. An earlier revision of this
80+
* header claimed it was ("more tightly than the proxy ever did"); #15780's
81+
* contract review measured that claim false, so it is retracted here. What is
82+
* true has two halves:
83+
*
84+
* - **TIGHTER on family separation.** The re-aimed pin discriminates against
85+
* the collapse in BOTH directions, where dialect-invariance only caught
86+
* one. Named measured set: the four collapse mutations that review drove —
87+
* the fold leaking onto `$contains`, `$contains`' bare construct handed to
88+
* `$icontains`, and the two read-scope directions (drop the fold there /
89+
* hand it to `$contains` there). This file went red on all four.
90+
* - **LOOSER on both-sides folding.** `FOLD_PER_DIALECT` below inspects the
91+
* COLUMN side only. So the mutation that folds the column but leaves the
92+
* comparand UNFOLDED on the `postgres` / `unknown` arm slips PAST this file
93+
* — measured green there, exit 0 and 14 passed — where the pre-#15780
94+
* `LIKE translate($1,` pin would have caught it.
95+
*
96+
* That second case is held instead by `icontains-dialect-sql.test.ts`, which
97+
* pins the `postgres` / `unknown` arm's emitted SQL and bound params VERBATIM,
98+
* and which does go red on that same mutation. ⇒ Across the two files the
99+
* ratchet is NOT net-weakened; within THIS file alone it is not a strict
100+
* tightening. ⛔ Neither claim may be restated as "strictly tighter". The row
101+
* sets that make any of this more than a text comparison are executed in that
102+
* same suite, which owns the `$icontains` half of the family from here on.
83103
*
84104
* Escaping (#5567) is unchanged for every `LIKE` arm; the GLOB arm brings its
85105
* OWN escaped character class (`*`, `?`, `[`), which is why the second fixture

0 commit comments

Comments
 (0)