Repository navigation
fix(test-infra): judge a subpath of a swept package in check-vi-mock-inherit - #8391
Conversation
…inherit The gate resolved scope by exact string equality against COVERED_SPECIFIERS, so a subpath of an already-swept package fell into the "other workspace" bucket -- counted, never judged -- while the verdict line above it named the package as covered. A gate that reports a verdict broader than what it checked hides the absence behind a green. A member now covers `member` and `member/...`. The separator is part of the prefix, so a sibling package whose name merely starts with a member's is not swallowed. The constant still names package roots only: what widened is the reach of one membership, not the test for membership. Re-measured on b38014e with the gate's own scan() against today's eighteen members: 2 subpath sites, both `@object-ui/components/ui/sonner` in packages/plugin-form, both already inheriting. Census 623 -> 625 judged and 37 -> 35 other workspace, zero frozen before and after, no site moving the other way -- so this lands as a ratchet and no sweep was owed. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FhBNJcLRZLe8M87VcUgpKr
|
ACCEPT — What was verified independentlyThe diff is what the report says it is. const coveredPrefixes = [...coveredSet].map((member) => `${member}/`);
const isCovered = (spec) => coveredSet.has(spec) || coveredPrefixes.some((prefix) => spec.startsWith(prefix));
The load-bearing number was re-derived here, not taken from the report. A ⭐ The separator fence is not hypothetical — it has a live occupant, and this is the finding of the reviewThe PR and its pin justify including the So a naive No stale consumer of the verdict string is left behindThe line changed from The pins earn the claimThe regression pin builds a fixture with a frozen subpath factory and asserts ⭐ The ablation the dev ran is the report's strongest line and it reproduces the card's thesis exactly: with the resolver reverted, the pins go red while the gate itself still exits 0 printing Answering the dev's open question, because it has a measured answerThe dispatch's "⛔ no model identifiers in any pushed artifact" and this session's mandated Out-of-scope finding#8392 (the No changeset owed ( Next: CI convergence → flip ready → post-flip guard → auto-merge SQUASH → queue confirmation → landing probe ( Generated by Claude Code |
|
Armed: PR #8391 flipped ready at 2026-09-07T16:23:32Z on head Landing probe on merge, on re-fetched ⇒ #8183 becomes dispatchable the moment this lands and rebases onto this resolver change rather than racing it. — Generated by Claude Code |
|
LANDED — merged into Content probe on re-fetched
⭐ Restating why that control is the right one: this PR's own hazard was introducing the defect it removes, one level up — a naive ⇒ #8183 is unblocked — the chain head has landed, so it may be dispatched and will rebase onto this resolver rather than race it. #6892's Generated by Claude Code |
…omment The step comment above `node scripts/check-vi-mock-inherit.mjs` claimed that "only the covered workspace specifiers in `COVERED_SPECIFIERS` are judged". That has been false since objectui#8141 (PR #8391) widened the resolver to judge a member AND any subpath of one, so `@object-ui/components/ui/sonner` is judged today although it is not a `COVERED_SPECIFIERS` member. The gate's own header and its verdict line were updated by that PR; this second prose site was not. Removed rather than reworded. The gate header is where the last three boundary changes were recorded, and the workflow copy was left behind all three times: this is a duplicate statement that goes stale periodically, not a one-off miss, so rewording it would fix this instance and not the next. The step's `run:` already names the script, and its header carries the boundary in full -- including the whole-module-replacement carve-out this paragraph restated (scripts/check-vi-mock-inherit.mjs, "Three things are therefore out of scope by construction, not by exemption"). Comment-only: the four deleted lines are whole-line YAML comments, and both wiring suites that pin this workflow read it through a `yamlOf()` that strips whole-line comments before asserting. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FhBNJcLRZLe8M87VcUgpKr
…omment (objectstack-ai#8843) The step comment above `node scripts/check-vi-mock-inherit.mjs` claimed that "only the covered workspace specifiers in `COVERED_SPECIFIERS` are judged". That has been false since objectui#8141 (PR objectstack-ai#8391) widened the resolver to judge a member AND any subpath of one, so `@object-ui/components/ui/sonner` is judged today although it is not a `COVERED_SPECIFIERS` member. The gate's own header and its verdict line were updated by that PR; this second prose site was not. Removed rather than reworded. The gate header is where the last three boundary changes were recorded, and the workflow copy was left behind all three times: this is a duplicate statement that goes stale periodically, not a one-off miss, so rewording it would fix this instance and not the next. The step's `run:` already names the script, and its header carries the boundary in full -- including the whole-module-replacement carve-out this paragraph restated (scripts/check-vi-mock-inherit.mjs, "Three things are therefore out of scope by construction, not by exemption"). Comment-only: the four deleted lines are whole-line YAML comments, and both wiring suites that pin this workflow read it through a `yamlOf()` that strips whole-line comments before asserting. Claude-Session: https://claude.ai/code/session_01FhBNJcLRZLe8M87VcUgpKr Co-authored-by: Claude <noreply@anthropic.com>
Fixes #8141
The defect
scripts/check-vi-mock-inherit.mjsresolved scope by exact string equality againstCOVERED_SPECIFIERS. A subpath of an already-swept package therefore fell through to the@object-ui/branch and landed in the "other workspace" bucket: counted, never judged — while the verdict line printed above it named the package as covered.That is the class this card is admitted under: a gate that runs and reports a verdict broader than what it checked hides the absence behind a green. The neighbouring card #8286 was closed as out-of-class precisely because no gate ran there at all — nothing was claimed, so nothing was over-claimed. #8286 is not addressed here.
⭐ This was not an exemption and not a recogniser bug — the resolver did exactly what it said. It was a scope boundary drawn when the covered set had ONE member and no call site named a subpath. The failure mechanism the gate exists to catch (a module-scope read of an export the frozen stand-in never listed, killing the file during COLLECTION with zero failed assertions) does not care whether the frozen stand-in stood in for a package root or for one of its subpaths: a subpath's export surface grows exactly the way the root's does.
The route: option 1 (prefix match), and its precondition, taken first
A member now covers
memberandmember/.... The separator is part of the prefix, so a sibling package whose NAME merely starts with a member's (@object-ui/react-native) is a different package and stays out. The constant still names package ROOTS only — what widened is the reach of one membership, not the test for membership, so "a member joins only by sweep" is unchanged.Widening the resolver newly JUDGES sites nobody swept, so the population was re-measured first, on today's tree, with the gate's own exported
scan()— never from the card's table, which was taken on214d5d5a6when the constant held eleven members:Measured on
b38014e82against today's eighteen members:The two newly-judged sites are both
@object-ui/components/ui/sonner, both inpackages/plugin-form:Both were already inheriting (
async (importOriginal) => ({ ...actual, toast: fakeToast })), so no sweep was owed and this lands as a RATCHET — the same "the tree is at zero, so the gate starts as a ratchet" argument that scoped #6849. Every other row is byte-identical between the two runs and no site moved the other way. Had the re-measure turned up a frozen subpath factory it would have been SWEPT in this PR — never floored, never given a per-site allowance.What changed
coveredSet.has(spec)becomesspec === member || spec.startsWith(member + '/').... call site(s) on A, B, ... and their subpaths judged, so the line is true of what the run checked. The over-claim is the defect; a verdict that named only the members would be the same over-claim in the other direction.scripts/__tests__/check-vi-mock-inherit.test.ts) — six cases: a subpath is judged (frozen and inheriting shapes),vi.importActualof the subpath inherits it, the regression pin (a frozen subpath factory makes the gate RED rather than silently green), a sibling package sharing a name prefix is NOT swallowed, andCOVERED_SPECIFIERSstill holds package roots only.Verification
Ablation — the resolver reverted to exact equality on a committed tree, the mutation proved on disk (marker counts 1 to 0, blob
7d02f51cto478fadc7), then restored withgit checkout HEAD -- pathand proved byte-identical (blob back to7d02f51c,git diff HEADempty):Tests 5 failed | 69 passed (74)— the subpath isworkspace/unjudgedagain, the regression pin'sfrozenlist empties, and the on-disk pin finds no judged subpath site;37 other workspace. That is the card in one line: nothing is red, the verdict just quietly stops being true of the package it names.Scope
Deliberately untouched:
holdsObtainedModule()(#8183, serialized behind this card on the same file and rebasing onto this resolver change), #8117's pin-versus-prose issue in the same file, and@object-ui/app-shell(being measured under #8173) — it is not added toCOVERED_SPECIFIERShere. No changeset is owed:node scripts/check-changeset-presence.mjsreports 0 published source files and 0 published contracts in this range.Generated by Claude Code