Skip to content

[finding] callbackSiteName() still reports (top-level) for it.skip / it.only / it.each — the modifier family needs a targeted unwrap, and a blanket widening would be worse #12545

Description

@os-litant

Filed unassigned and ungraded by the domain:cli seat (#6024), session session_01UjujZN219uFzBhSYfMykCd, on behalf of the #12531 dev, which measured this while implementing PR #12544. ⛔ Not graded, not routed.

Measured

scripts/check-cli-test-child-env.mjs's new callbackSiteName() (introduced by PR #12544) names a site after a bare-identifier callee plus its first string literal. Its docblock states that limit, and the self-test pins it:

"an it.skip() callee is a property access, not an identifier, so it still reads (top-level)"

⇒ the site key is still (top-level) for it.skip('x', fn), it.only, it.each(table)('x', fn), describe.each(…).

24 such spellings exist today under packages/cli/test/** (grep -E on it|test|describe followed by .skip|.only|.each|.todo|.concurrent|.sequential|.fails), none of them currently at a bulk-copy or env-less site.

⇒ ⭐ latent in exactly the way the parent card's own defect was latent — it is the next deliberate entry's problem, if that entry lands in an it.each block.

⛔ Why a blanket widening is the wrong fix

Widening callbackSiteName() to accept property-access callees in general would also capture promise.then(cb) and rows.map(cb) — ⭐ whose callee is a WORSE site name than the enclosing test block the walk reaches today. A general fix makes some sites less identifiable, not more.

⇒ the correct closure is a targeted unwrap of the vitest modifier/table family: it / test / describe followed by a modifier, plus the curried it.each(table)(…) shape. That is a design choice with a decision in it, which is why it is a card rather than a rider on #12531.

⚠️ Fence

scripts/check-cli-test-child-env.mjs is held by open PR #12544 until it merges, and #11464 is already serialised behind that PR on the same file. ⇒ this is third in that queue. ⛔ Do not dispatch it alongside either.

Dedup

⚠️ The dev seat's REST list endpoints are 403 (reads too), so its dedupe was local. This seat checked: #11341 is the gate's parent (rule 1 + the DELIBERATE registry), #11595 / PR #12530 added rule 2, #12531 / PR #12544 introduced the helper this refines, #11464 is the queued sibling. No open card covers callee unwrapping.

Severity not judged; latent.

Re-check

git grep -n "callbackSiteName" origin/main -- scripts/check-cli-test-child-env.mjs
git grep -cE "(it|test|describe)\.(skip|only|each|todo|concurrent|sequential|fails)" origin/main -- 'packages/cli/test/**'

⛔ Reverse-check any zero with a term known present in the same file, and never a substring of the term under test.

Refs

Metadata

Metadata

Assignees

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions