Found while diagnosing the contractEnvelope-6839 family for objectui#8665. ⛔ Not graded and not assigned. Out of scope for that card and for PR #8707, which deliberately changed no file but plugin-gantt's.
Different class from objectui#8665: that card is about waits that fail to gate a read. This one is about assertion strength — the wait here is fine.
The site
packages/plugin-charts/src/ObjectChart.contractEnvelope-6839.test.tsx, site 2, the group-by label domain:
async function labelThrough(envelope: Envelope): Promise<string> {
const ds: any = { find: vi.fn(async () => envelope(PROJECTS)) };
const out = await resolveGroupByLabels(
[{ stage: 'p1', amount: 10 }],
'stage',
{ name: 'crm_opportunity', fields: { stage: LOOKUP_FIELD } },
ds,
);
return String(out[0].stage);
}
and the refusal arm:
expect(
await labelThrough(asRecords),
'a `records` envelope must not resolve the referenced domain',
).not.toBe('Apollo');
Why it is weak
.not.toBe('Apollo') is satisfied by every value except that one literal. The arm's own comment says what it means to observe — that the axis carries the raw foreign key, i.e. 'P1', what humanizeLabel makes of an unresolved key. But the assertion accepts:
'P1' — the intended reading;
'undefined', because the helper coerces with String(out[0].stage) and a resolver that returned a row without a stage produces exactly that string;
'', 'null', or any other wrong label a future ladder invents.
⇒ ⭐ the arm passes for a resolver that stopped resolving anything at all, which is the implementation strictly worse than the bug the file's own docblock says every case must refuse. The two positive arms (asData, asBareArray) do refuse it, so the FILE is not blind — but this arm on its own asserts far less than it reads as asserting, and it is the arm the file calls "the sharp half."
⚠️ This is the objectui#8688 shape: an assertion that degrades to something both sides can satisfy, rather than throwing. On objectui#8688 the site CI observed threw a TypeError; the one nobody had observed degraded to a comparison that passed.
What the repair would be
Assert the concrete distinguishable value rather than the absence of one:
expect(await labelThrough(asRecords), '…').toBe('P1');
'P1' is what humanizeLabel produces from the unresolved key, so it names the observable state the comment already describes, and a resolver that returns nothing reddens instead of passing.
⚠️ Worth checking at the same time whether the other refusal arms in the family carry .not.toBe / .not.toEqual shapes — this sweep only looked at the seven files objectui#8665 lists, and only this one uses a negated matcher on a value.
Provenance
Read on da5e4f69e while probing the family for objectui#8665; the site-2 helper takes no DOM path at all (it awaits resolveGroupByLabels directly), so no race is involved and no probe was needed — this is a reading of the assertion, and the reading is the whole finding.
Filed by the developer seat working objectui#8665 under session session_01YBWFb5YgMU5dw8p2VKj16S, generated with Claude Code.
Found while diagnosing the
contractEnvelope-6839family for objectui#8665. ⛔ Not graded and not assigned. Out of scope for that card and for PR #8707, which deliberately changed no file butplugin-gantt's.Different class from objectui#8665: that card is about waits that fail to gate a read. This one is about assertion strength — the wait here is fine.
The site
packages/plugin-charts/src/ObjectChart.contractEnvelope-6839.test.tsx, site 2, the group-by label domain:and the refusal arm:
Why it is weak
.not.toBe('Apollo')is satisfied by every value except that one literal. The arm's own comment says what it means to observe — that the axis carries the raw foreign key, i.e.'P1', whathumanizeLabelmakes of an unresolved key. But the assertion accepts:'P1'— the intended reading;'undefined', because the helper coerces withString(out[0].stage)and a resolver that returned a row without astageproduces exactly that string;'','null', or any other wrong label a future ladder invents.⇒ ⭐ the arm passes for a resolver that stopped resolving anything at all, which is the implementation strictly worse than the bug the file's own docblock says every case must refuse. The two positive arms (
asData,asBareArray) do refuse it, so the FILE is not blind — but this arm on its own asserts far less than it reads as asserting, and it is the arm the file calls "the sharp half."TypeError; the one nobody had observed degraded to a comparison that passed.What the repair would be
Assert the concrete distinguishable value rather than the absence of one:
'P1'is whathumanizeLabelproduces from the unresolved key, so it names the observable state the comment already describes, and a resolver that returns nothing reddens instead of passing..not.toBe/.not.toEqualshapes — this sweep only looked at the seven files objectui#8665 lists, and only this one uses a negated matcher on a value.Provenance
Read on
da5e4f69ewhile probing the family for objectui#8665; the site-2 helper takes no DOM path at all (it awaitsresolveGroupByLabelsdirectly), so no race is involved and no probe was needed — this is a reading of the assertion, and the reading is the whole finding.Filed by the developer seat working objectui#8665 under session
session_01YBWFb5YgMU5dw8p2VKj16S, generated with Claude Code.