Path: none | 违反 #8640 裁决(useMemo 身份依赖)第 9 例
Filed by the domain:ui#2 execution seat (PM session session_018HrVaotisyhgmot9o2MLRq) out of the objectui#7237 measurement dispatch. ⛔ Not graded here.
The declared contract, quoted from AGENTS.md §5 commandment #10
Never depend on the IDENTITY of a useMemo / useCallback result (objectui#8640, ruled over eight instances …) … never let correctness rest on the object or function that comes back — ⛔ not as a useEffect / useMemo dependency, ⛔ not as a Map / WeakMap key, ⛔ not in a reference comparison.
The site
packages/plugin-gantt/src/ObjectGantt.tsx, read on objectui origin/main 030a675b0 at 2026-09-19T19:00Z:
reload's own dependency array still lists effectiveDataSource, which is a useMemo result.
- The mount effect keys on
reload, which is a useCallback result.
⭐ The file already records the consequence in the first person. dataItems was removed from that same array precisely because a React cache discard «was enough to give reload a fresh identity and re-fire the mount effect below (objectui#6592)». ⇒ One banned identity was removed from that line and another was left on it.
⚠️ Why nothing is red today, stated rather than left to be assumed
Commandment #10 says it itself: React does not discard on its own in this tree, so a pin that does not force a discard passes identically on defect and fix. ⇒ The absence of a failing test here is ⛔ not evidence the dependency is safe; it is the rule's own documented blind spot. The enforcing pattern the rule points at is packages/permissions's providerCtxIdentity.discarded.test.tsx, which forces a discard.
⛔ This card does not propose the re-key. Commandment #10 names the direction (re-key on the primitives or payload objects actually read), but which primitives reload genuinely reads out of effectiveDataSource is a reading of that closure, not a guess.
查重词
useMemo identity dependency · effectiveDataSource reload deps · discard-proof cache · objectui#8640 · objectui#6592
Generated by Claude Code
Path: none | 违反 #8640 裁决(useMemo 身份依赖)第 9 例
Filed by the
domain:ui#2execution seat (PM sessionsession_018HrVaotisyhgmot9o2MLRq) out of the objectui#7237 measurement dispatch. ⛔ Not graded here.The declared contract, quoted from
AGENTS.md§5 commandment #10The site
packages/plugin-gantt/src/ObjectGantt.tsx, read on objectuiorigin/main030a675b0at 2026-09-19T19:00Z:reload's own dependency array still listseffectiveDataSource, which is auseMemoresult.reload, which is auseCallbackresult.⭐ The file already records the consequence in the first person.
dataItemswas removed from that same array precisely because a React cache discard «was enough to givereloada fresh identity and re-fire the mount effect below (objectui#6592)». ⇒ One banned identity was removed from that line and another was left on it.Commandment #10 says it itself: React does not discard on its own in this tree, so a pin that does not force a discard passes identically on defect and fix. ⇒ The absence of a failing test here is ⛔ not evidence the dependency is safe; it is the rule's own documented blind spot. The enforcing pattern the rule points at is
packages/permissions'sproviderCtxIdentity.discarded.test.tsx, which forces a discard.⛔ This card does not propose the re-key. Commandment #10 names the direction (re-key on the primitives or payload objects actually read), but which primitives
reloadgenuinely reads out ofeffectiveDataSourceis a reading of that closure, not a guess.查重词
useMemo identity dependency·effectiveDataSource reload deps·discard-proof cache·objectui#8640·objectui#6592Generated by Claude Code