Skip to content

fix(deps): pin react and react-dom to one version - #184

Merged
github-actions[bot] merged 1 commit into
mainfrom
claude/daily-repo-scan-v8fvqs
Aug 11, 2026
Merged

fix(deps): pin react and react-dom to one version#184
github-actions[bot] merged 1 commit into
mainfrom
claude/daily-repo-scan-v8fvqs

Conversation

@dizhaky

@dizhaky dizhaky commented Aug 11, 2026

Copy link
Copy Markdown
Owner

What does this PR do?

Every workspace declares react and react-dom at exactly 19.2.7, but the root node_modules held react 19.2.8 against react-dom 19.2.7. Dozens of packages ask for react as a peer at ^19, npm hoisted that to the root, and the four workspaces kept nested 19.2.7 copies. react-dom then resolved from the root and found the root react, so every renderer test died at collection:

Incompatible React versions: The "react" and "react-dom" packages must have the
exact same version. Instead got:
  - react:      19.2.8
  - react-dom:  19.2.7

This is not theoretical — it is failing CI right now. On #183's run:

job result
JS & TS checks / web / check failure — log names this error, 4 suites dead at collection
JS & TS checks / apps/desktop / check:test:ui failure — same error, reproduced here on a pristine main checkout
All required checks pass failure (and #183 merged anyway, so that aggregator is not gating merges today)

Fixed with a root override, which is the instrument this repo already uses for exactly this class of problem (lodash, undici, brace-expansion). The lockfile result is one react in the tree instead of five: the four nested 19.2.7 copies collapse and the root drops to 19.2.7.

Related Issue

No issue. Found while running the desktop gate for #183 and recorded there as a follow-up.

Type of Change

  • 🐛 Bug fix (non-breaking change that fixes an issue)

Changes Made

  • package.jsonreact and react-dom added to the root overrides, both 19.2.7, matching every workspace's own declaration.
  • package-lock.json — regenerated. The whole delta is the collapse described above; no package gains a version it did not already have somewhere in the tree.
  • docs/system-log/2026-08-11.md — entry appended, including a correction to the previous entry (see below).

How to Test

  1. npm ci
  2. npm run --prefix apps/desktop test:ui396 files / 3489 tests pass. On main, every one of those files fails at collection.
  3. npm run --prefix web check and npm run --prefix ui-tui check.

Checklist

Code

  • My commit messages follow Conventional Commits
  • My PR contains only changes related to this fix
  • I've added tests for my changes — N/A; the fix is what lets 3,489 existing tests run at all
  • I've tested on my platform: Linux
  • pytest tests/ -q — N/A, no Python touched

Documentation & Housekeeping

  • I've updated relevant documentation (docs/system-log/2026-08-11.md)
  • N/A — cli-config.yaml.example, CONTRIBUTING.md / AGENTS.md, tool schemas
  • I've considered cross-platform impact — dependency resolution is platform-independent; the desktop electron suite is unchanged at 976 passing

Screenshots / Logs

Before (main, clean npm ci, --project ui): every file fails at collection.
After:

 Test Files  396 passed (396)
      Tests  3489 passed (3489)

Unchanged elsewhere, so the override doesn't disturb anything: web 26 files / 165 tests, ui-tui 138 files / 1530 tests, apps/desktop check:lint 0 errors and test:desktop:platforms 976 passed.


Correction I owe on #183

#183's description said the React mismatch was local-only and left open "whether CI's js lanes are green only because they resolve the tree differently." They weren't green — CI was failing on this. I had called get_job_logs with failed_only while that run was still in flight; it returned the five Python slices that had failed so far and read like a complete answer, while the JS jobs were still running. They failed a minute later. The finding was real and understated, not overstated.

Not fixed here — ui-tui / check fails for a different reason

packages/hermes-ink/src/ink/ink-resize.test.ts:111 and :147 fail on CI with AssertionError: expected 128 to be less than -1. That is not the React mismatch, and the file passes locally — it reads terminal geometry, so it looks environment-dependent (no TTY on the runner) rather than broken. It needs its own diagnosis rather than a drive-by fix here.


Generated by Claude Code

Every workspace declares react and react-dom at exactly 19.2.7, but the root
node_modules held react 19.2.8 against react-dom 19.2.7. Dozens of packages ask
for react as a peer at ^19, npm hoisted that to the root, and the four
workspaces kept nested 19.2.7 copies. react-dom then resolved from the root and
found the root react, so every renderer test died at collection with:

    Incompatible React versions: The "react" and "react-dom" packages must have
    the exact same version. Instead got:
      - react:      19.2.8
      - react-dom:  19.2.7

This is not theoretical. On #183's run, JS & TS checks / web / check failed with
exactly that error (4 suites at collection), and apps/desktop / check:test:ui
failed the same way — the desktop case reproduced here on a pristine main
checkout with a clean npm ci, changes stashed.

Fixed with a root override, the instrument this repo already uses for exactly
this class of problem (lodash, undici, brace-expansion). The lockfile result is
one react in the tree instead of five: the four nested 19.2.7 copies collapse
and the root drops to 19.2.7.

Verified: apps/desktop --project ui now runs 396 files / 3489 tests, where
before every file failed at collection. web check 26 files / 165 tests, ui-tui
check 138 files / 1530 tests, both 0 lint errors. apps/desktop check:lint 0
errors and test:desktop:platforms 976 passed, unchanged — the override does not
disturb the electron side.

Not fixed here: ui-tui / check also fails on CI, but for an unrelated reason —
packages/hermes-ink/src/ink/ink-resize.test.ts asserts on terminal geometry and
reports "expected 128 to be less than -1" on the runner while passing locally.
That looks environment-dependent and needs its own diagnosis.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012689txgT12g2hjRczcUZi8
@dizhaky
dizhaky marked this pull request as ready for review August 11, 2026 22:36
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@github-actions
github-actions Bot merged commit 5e7d256 into main Aug 11, 2026
31 checks passed
@github-actions
github-actions Bot deleted the claude/daily-repo-scan-v8fvqs branch August 11, 2026 22:36
github-actions Bot pushed a commit that referenced this pull request Aug 12, 2026
ink-resize.test.ts failed once on CI (on #183's run, in two of its three
tests) with:

    AssertionError: expected 128 to be less than -1

meaning the erase landed at byte 128 and "hello" was never repainted. It is
intermittent, not a standing red — it passed on #184's run along with every
other JS lane.

I could not reproduce it: 12 isolated runs, 8 under saturating CPU contention,
3 runs of the whole hermes-ink package, and the full ui-tui suite are all
green. Two mechanisms were probed and ruled out locally. The repaint is not
racing a flush — measured after onRender(), after one microtask, and after a
50ms macrotask, "hello" sits at index 39 in all three, so the `await tick()` is
not load-bearing. And no deferred write from the initial render lands after the
test clears its buffer, which would have explained the erase moving from byte
32 locally to 128 on CI: across five runs, zero bytes arrive after the clear.

So the mechanism is unknown, and the remaining hypothesis — the erase landing
in a frame whose repaint went down a diff path with nothing to write — is
exactly the drift bug these tests exist to catch. That makes it possibly a real
intermittent renderer race rather than a bad test.

The assertion is therefore NOT loosened. Loosening it is the obvious way to
stop a flake and the wrong move here: "erase written, content never repainted"
is the precise condition being guarded, so a weaker check could hide a live
bug.

What changes is the diagnostics. The three duplicated assertions now go through
expectErasedThenRepainted(), which asserts the same invariant in two steps —
the text was repainted at all, then that it came after the erase — and carries
the frame bytes into the failure message. Verified by negative control: fed the
helper the exact CI failure shape and read the message it produces rather than
assuming it renders.

ui-tui check: 138 files / 1530 tests, 0 lint errors.


Claude-Session: https://claude.ai/code/session_012689txgT12g2hjRczcUZi8

Co-authored-by: Claude <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants