Skip to content

finding(tests): the gantt and calendar colorField ladder fixtures are still in the pre-7521 shape that made 7466 — module global plus an arity-only predicate, no unmount #7828

Description

@claude

Filed unassigned by the domain:ui execution seat while working #7466 (PR #7826). ⛔ No domain:* label — routing is the triage seat's to produce. Not fixed there on purpose: #7466's file surface is the timeline fixture only, and widening it would have carried an unmeasured change into a card whose whole point was measurement.

The observation

packages/plugin-calendar/src/ObjectCalendar.colorFieldLadder-7243.test.tsx and packages/plugin-gantt/src/ObjectGantt.colorFieldLadder-7243.test.tsx are still in the pre-objectui#7521 harness shape — the exact shape that produced the intermittent red in #7466 before objectui#7527 (c2fc261f5) hardened the timeline one. #7527 touched plugin-timeline only; its two siblings were left as they were.

All three fixtures share the design:

timeline (after #7527) calendar gantt
module-level mutable the mock writes lastItems lastEvents lastTasks
readiness predicate title-token, identifies the AUTHOR expect(lastEvents.length).toBe(rows.length)arity only expect(lastTasks.length).toBe(rows.length)arity only
unmounts its own render before returning yes, in a finally no no
asserts no renderer is alive before mounting yes no no
returns the array the predicate accepted yes (PR #7826) no — re-reads the global no — re-reads the global

Why it is latent rather than red today

The exposure lever is two renders inside one it — RTL's auto-cleanup runs in afterEach, so between two it blocks the previous writer is unmounted, and only within one it do two components stay alive against one module global. Checked mechanically: no it in either sibling file renders twice. Every one of them does a single colorsFor(...) or a single inline render(...).

So these files are not failing and there is nothing to re-run: they are one edit away from failing. Adding a second assertion to one of those it blocks is the ordinary way to extend a ladder fixture — it is precisely what the timeline file's rung 2 does, and it is what made #7466.

Why it is worth recording rather than leaving to be rediscovered

The measurement in PR #7826 is what makes this predictable instead of speculative. On the timeline file, with the metadata fetch held by 25ms so a mount paints twice (ObjectTimeline's data effect lists objectDef, which a separate getObjectSchema() sets):

pre-#7521 harness shape, getObjectSchema +25ms     3 fail /  3 runs
same tree with the guards restored                 0 fail /  6 runs

⚠️ Note what is NOT claimed: this is not an assertion that the sibling components have the same two-paint behaviour. ObjectCalendar and ObjectGantt need their own trace before anyone states that. What transfers without further measurement is the harness half — a module global plus an arity-only predicate cannot say WHICH component wrote, whatever the components do.

⚠️ And a warning for whoever picks this up, paid for in #7466: looping these files proves nothing. On an idle machine the pre-fix timeline harness passed 32/32 — the same 32/32 the fixed one gets. A green loop here is not evidence of safety; the lever is the metadata fetch, not machine load.

Scope if picked up

Port #7527's three guards plus PR #7826's bound capture to both sibling fixtures. It is mechanical — the timeline file is the worked example and carries the numbers in its header. ⛔ It does not touch packages/core/src/utils/record-color.ts: the shared ladder was cleared of any role in #7466 (createFieldColorResolver builds its map once from fieldDef and returns a pure function of value; there is no cross-call cache).

Back-links: #7466 (the card this came out of) · PR #7826 (the measurement and the bound capture) · objectui#7527 / c2fc261f5 (the guards being ported) · objectui#7338 / e75f4c986 (which introduced all three fixtures).


Generated by Claude Code

Activity

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

Metadata

Metadata

Assignees

Labels

domain:uiobjectui ui stream: fix lands on the published library or apps — objectui execution seatfindingpm:dispatchedpriority:p3tests

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions