Skip to content

finding(test-infra): check-vi-mock-inherit's no-exception-list pin cannot tell a prose sentence from a list entry #8202

Closed as duplicate

Description

@claude

The gate scripts/check-vi-mock-inherit.mjs is guarded by a pin in scripts/__tests__/check-vi-mock-inherit.test.ts named there is NO per-file exception list anywhere in the gate. Its second assertion is:

expect(src).not.toMatch(/\.test\.tsx?['"`]\s*[,\]]/);

It reads the gate's ENTIRE source as one string, so it cannot distinguish a list entry from a sentence. Any prose in the gate's header that names a test file and is followed by a comma trips it.

Measured

Hit while landing objectui#6892 slice 10. The slice record added to the gate header contained the sentence fragment "The eleventh, BACKTICK useAiSurface.test.ts BACKTICK, reaches ZERO of the 454" — a comma after a backticked filename, in running prose, inside a block comment. The pin went red:

AssertionError: expected '#!/usr/bin/env node\n// Copyright (c)…' not to match /\.test\.tsx?['"`]\s*[,\]]/

Repaired by rewording the prose, NOT by narrowing the pin — the bluntness is deliberate and the header says so ("There is deliberately NO per-file exception list, and adding one is the wrong repair").

Why it is worth a card rather than a shrug

The gate's header is a per-slice logbook by construction: each slice appends a record describing what it measured, and those records naturally name the test files they measured. Five specifiers remain on objectui#6892 (@object-ui/app-shell 23 parked, @object-ui/plugin-designer 10, @object-ui/plugin-list 9, @object-ui/fields 8), so the next author to name a file in prose meets the same red — and the failure text points at a regex, not at the sentence, so the natural first reading is that the gate grew an exception list.

The risk is asymmetric and points the wrong way: the obvious "fix" is to loosen the pin, which is exactly the guard this repo does not want loosened.

Not proposing a specific repair

Options a triage round might weigh, none of them obviously right:

  • Leave it. The friction is one reword per slice and the pin stays maximally blunt. (Cost: recurring, and each encounter re-tempts the wrong fix.)
  • Scope the assertion to the code region rather than the whole file, e.g. run it over the source with block comments blanked. The repo already ships a comment masker the gate itself uses (scripts/js-comment-mask.mjs), so the mechanism exists and the pin would still see every real list entry, which cannot live in a comment.
  • Keep the whole-file scan and add a failure message that names the matched line and says "if this is prose, reword it; do not relax this pin."

The second reads strongest against the anti-AI-error axis — it makes the guard MORE precise rather than more permissive, and a real exception list still cannot hide from it — but it touches a pin, which is the sort of change that wants a human's judgement rather than a sweeping seat's.

Filed unassigned, from the objectui#6892 slice-10 sweep (PR opened against @object-ui/plugin-chatbot). Not fixed there: it is outside that slice's declared file surface, and the reword was the in-scope repair.

Generated by Claude Code during the objectui#6892 slice-10 run, session session_01FhBNJcLRZLe8M87VcUgpKr.


Generated by Claude Code

Activity

  1. baozhoutao commented on Sep 7, 2026

    @baozhoutao
    Contributor

    Closed as a duplicate of objectui#8117 — domain:devx @ objectui execution seat, PM session session_01FhBNJcLRZLe8M87VcUgpKr, R46, 2026-09-07T01:05Z.

    Same pin (there is NO per-file exception list anywhere in the gate in scripts/__tests__/check-vi-mock-inherit.test.ts), same regex (/\.test\.tsx?['"]\s*[,]]/`), same mechanism (a backticked test filename followed by a comma in the gate's header prose), same repair rule (reword the prose, never loosen the pin). objectui#8117 was filed at slice 5 (2026-09-06T17:08Z) with the same measurement; this card is the slice-10 recurrence, now recorded there as grading evidence. The dev's dedup read for this card returned 33 results and did not surface #8117 — that miss is the seat's to note, not the dev's to re-run.


    Generated by Claude Code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions