"""Wave 42, lane G — cross-fence wiring rows. ⛔ ONE LANE OWNS THIS FILE. A row lands in the SAME change as the wiring it asserts; the worker who REQUESTS a wiring may not be the one who verifies it. Shape is `verify_wiring.py`'s exactly: (feature, declaring_file, declaring_regex, mounting_file, mounting_regex) Paths are relative to `aios-web/web/src/`. """ from __future__ import annotations ROWS: list[tuple[str, str, str, str, str]] = [ # ⭐⭐ W42-T26 (owner instruction 8, R9, contract C7) — THE SHARE DIALOG'S FIELD DISCLOSURE. # C7's last line says these rows PIN THE COPY, and the reason is the ticket's own trap: T25 # makes the behaviour correct while nothing on screen changes, so the disclosure is the half # that gets quietly reworded away by a later tidy-up with every other gate still green. # # ⚠ BOTH HALVES NAME THE SAME FILE, WHICH IS LEGITIMATE HERE AND ONLY BECAUSE THE TWO REGEXES # ASSERT DIFFERENT FACTS: the declaring side proves the SENTENCE still exists verbatim, the # mounting side proves the branch that RENDERS it is still wired. A row whose two halves assert # one fact proves half of what it claims. # # ⛔ THE COPY LIVES IN `const` STRING LITERALS, NOT IN JSX TEXT, AND THAT IS WHAT MAKES THESE # ROWS POSSIBLE. `re.search` runs over the literal file text and prettier wraps JSX text across # lines, so a needle spanning a wrap never matches. A string literal is never re-wrapped. ("W42-T26/C7 the shared view names WHICH FIELDS TRAVEL with it", "shell/ShareDialog.tsx", r"Sharing a view also shares the fields it uses", "shell/ShareDialog.tsx", r"\{VIEW_FIELD_TRAVEL\}"), # ⚠ THE NON-OBVIOUS CLAUSE, PINNED ON ITS OWN. A sharer reasons about the columns they can SEE; # a filter can test a column that is not on screen and the grant hands that column over too. # The done-when names it separately, so it gets its own row rather than riding on the one above. ("W42-T26/C7 the FILTER's fields are named specifically", "shell/ShareDialog.tsx", r"A filter can test a column that is not on screen", "shell/ShareDialog.tsx", r"\{VIEW_FILTER_FIELDS\}"), ("W42-T26/C7 the grant is disclosed as TOPIC-WIDE, not view-only", "shell/ShareDialog.tsx", r"shows on every view of this database, not only on this one", "shell/ShareDialog.tsx", r"\{VIEW_FIELD_TOPIC_WIDE\}"), # ⛔ THE REFUSAL HALF IS THE ONE THAT DISAPPEARS QUIETLY: the declaring side proves the client # still READS the response key; the mounting side proves the list is still RENDERED with the # server's own human-readable message beside each key. Without this pair, the API may report a # refusal that the dialog never tells the sharer about # [[a-declared-gate-is-an-unchecked-claim]]. # # ⛔ THE NEEDLE IS THE CALL SITE, NOT THE BARE KEY NAME, AND THAT IS NOT A STYLE CHOICE. The # WIRINGS loop matches against `read(dfile)` RAW, never `code_only()`, so comments are in # scope: a bare `refusedFieldKeys` matched the JSDoc in `ShareDialog.tsx` that EXPLAINS the # key, and the row would have stayed green off its own explanation with the read deleted. Same # root cause as `code_only`'s docstring records, opposite sign. ("W42-T26/C7 a field that could NOT be included is listed with its reason", "shell/ShareDialog.tsx", r"fieldNotes\(answered\?\.refusedFieldKeys\)", "shell/ShareDialog.tsx", r"refusedFields\.map\("), ("W42-T26/C7 refusal rows prefer the server's human-readable message", "shell/ShareDialog.tsx", r"rec\.message \?\? rec\.reason \?\? rec\.why", "shell/ShareDialog.tsx", r"\{f\.reason\}"), ("W42-T26/C7 the fields that DID travel are named after a save", "shell/ShareDialog.tsx", r"fieldNotes\(answered\?\.sharedFieldKeys\)", "shell/ShareDialog.tsx", r"\{SHARED_FIELDS_LEAD\}"), ] #: (what was deleted, file, the pattern that must NOT match, why it matters) DELETIONS: list[tuple[str, str, str, str]] = []