From 2511aab3d67e4a56f269c8a36cd193c8dcd558da Mon Sep 17 00:00:00 2001 From: Vuong Hoang Date: Wed, 23 Sep 2026 09:14:32 -0700 Subject: [PATCH] =?UTF-8?q?memory:=20a=20third=20way=20an=20instrument=20g?= =?UTF-8?q?oes=20blind=20=E2=80=94=20nth-child=20vs=20nth-of-type?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Credited to design-dev. His R2 order check has a positive control — one tile given order:-1 that the check must catch — and the control went blind when group headers became grid children: nth-child(5) started landing on a header rather than the fifth tile. Same class as the two defects already in this file. A control that no longer controls reads exactly like a passing test; nothing in the output distinguishes 'detected nothing because there was nothing' from 'detected nothing because I am aimed at the wrong element'. The rule: nth-of-type over nth-child wherever the assertion means the Nth TILE rather than the Nth child element. They agree until somebody adds a sibling of a different kind, and adding siblings is what a redesign is. --- ...on-harness-that-certified-a-broken-test.md | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/persistent-memory.d/2026-09-22-a-mutation-harness-that-certified-a-broken-test.md b/persistent-memory.d/2026-09-22-a-mutation-harness-that-certified-a-broken-test.md index eece24e..f58d61a 100644 --- a/persistent-memory.d/2026-09-22-a-mutation-harness-that-certified-a-broken-test.md +++ b/persistent-memory.d/2026-09-22-a-mutation-harness-that-certified-a-broken-test.md @@ -48,3 +48,22 @@ rules (position, alphabetical, count) disagree. Whether it becomes `scripts/` is an open question for the operator — this repo has now been bitten by vacuous falsifiers three times, and prose in a memory file is not an instrument. + +## A third way an instrument goes blind: `nth-child` vs `nth-of-type` + +_Added 2026-09-23, credited to design-dev, who hit it in his R2 order check._ + +His layout check has a positive control — one tile given `order:-1` that the +check must catch. **The control went blind when group headers became grid +children**: `nth-child(5)` started landing on a header instead of the fifth +tile, so the control stopped controlling and the check kept reporting clean. + +Same class as this file's other two, and the reason it belongs here: **a control +that no longer controls reads exactly like a passing test.** Nothing in the +output distinguishes "detected nothing because there was nothing" from +"detected nothing because I am aimed at the wrong element". + +**The rule worth having written down:** use `nth-of-type` over `nth-child` for +any assertion that means *the Nth TILE* rather than *the Nth child element*. +The two agree right up until somebody adds a sibling of a different kind — and +adding a sibling is what a redesign is.