Skip to content

merge: reconcile upstream through d0bb9be5 - #501

Merged
bompus merged 5 commits into
fork/consolidatedfrom
reconcile/upstream-d0bb9be5
Oct 14, 2026
Merged

bompus merged 5 commits into
fork/consolidatedfrom
reconcile/upstream-d0bb9be5

Conversation

@bompus

@bompus bompus commented Oct 14, 2026 •

Copy link
Copy Markdown
Owner

fork/consolidated now contains upstream main through d0bb9be5 (three commits), so a React Router lazy route follows a barrel that re-exports an import (colbymchenry#2558), relinks a page that appears below its barrel on sync (colbymchenry#2560), and a component a file declares as a value is what its JSX renders (colbymchenry#2420).

Conflicts. Seven files conflicted, because upstream's fixes were written against the regex-based JavaScript resolver and the fork reads the kernel's binding rows instead (91902770). Nothing brings the regexes back.

File Resolution
src/index.ts Fork's version kept. Upstream's sync change (re-open failed references that wait for a module through a barrel) went into src/codegraph.ts, where the class now lives; createImportReader takes (root, queries) on the fork and changedFilePaths may be absent, so both are handled.
src/resolution/alias-binding.ts Fork's version kept; extractLocalExportAliases and defaultExportBinding stay deleted.
src/resolution/module-importers.ts Fork's reader kept. Upstream's EXPORTS_A_BINDING regex is replaced by exportedBindings, built from the file's top-level binding rows that carry exportedAs (the nodeless default row of export default withAuth(Page) is skipped). Upstream's reopenReferencesThroughBarrels and passesOn came in as written.
src/resolution/frameworks/react.ts Upstream's new code (declaredComponent, valueLoader, loaderOf, wrappedComponent), with exportedComponent and exportsBinding reading binding rows and declaredValue using getNodesByName (the fork has no getNodesInFileNamed).
src/resolution/callback-synthesizer.ts Fork's imports kept plus declaredComponent. Upstream's input-file list (collectInputs, lazyValueModules) is not taken: the fork re-runs synthesis in full on a sync that changes a file.
__tests__/react-router.test.ts, docs/design/framework-coverage.md Both sides kept; the doc row labels upstream's evidence "upstream:".

Checks, on this head. Upstream's five new or changed test files: 123 of 123 pass. Full suite 723 files / 9,087 tests pass (39 skipped); tsc --noEmit and check:agent-docs clean; golden dumps unchanged. Precision gate (eval:precision): vite absent 6/6 and present 2/2 held, vitest absent 1/1 held.

README. The "About this fork" merge point now names d0bb9be5. Rows checked and left as they were: fork-vs-upstream benchmark, React Router, getHref, framework mode, Solid, inferred links kept current on sync.

One fixture edited. In __tests__/jsx-child-disambiguation.test.ts the text Sign in <LoginPage /> became Sign in: <LoginPage />; the assertion is unchanged. The fork's tag detector (opensTag) reads a word before < as a type or comparison, so it draws no render edge there where upstream does. That is older than this merge and is not changed here.

Not covered. Indexing time with the new declaredComponent lookup (one cached getNodesByName per PascalCase reference in .tsx/.jsx) was not measured. The merge commit keeps upstream's d0bb9be5 as a parent, so land it as a merge commit. Promoting the deployed build is a separate step.


Summary by cubic

Reconciles fork/consolidated with upstream main through d0bb9be5, adopting three fixes: lazy React Router routes follow a barrel that re-exports an import, sync relinks a route when its page appears below its barrel, and a component a file declares as a value is what its JSX renders. Upstream's five test files pass 123/123, the full suite is clean (723 files, 9,087 tests, 39 skipped), and golden dumps are unchanged.

Conflict resolutions. The seven conflicted files share one choice: upstream's regex-based JavaScript resolver is not brought back; its fixes were ported to read the kernel's binding rows instead.

  • src/codegraph.ts keeps the fork's version; the sync-path reopenReferencesThroughBarrels call moved here, handling the fork's createImportReader(root, queries) signature and a possibly absent changedFilePaths.
  • module-importers.ts replaces EXPORTS_A_BINDING with exportedBindings, built from top-level binding rows carrying exportedAs; extractLocalExportAliases and defaultExportBinding stay deleted.
  • react.ts reads exports from binding rows and looks up declared values through getNodesByName (the fork has no getNodesInFileNamed).
  • callback-synthesizer.ts drops upstream's collectInputs/lazyValueModules input list: the fork re-runs synthesis in full on any sync that changes a file.
  • __tests__/react-router.test.ts and docs/design/framework-coverage.md keep both sides.

One fixture in jsx-child-disambiguation.test.ts was edited, Sign in: <LoginPage /> for Sign in <LoginPage />, because the fork's tag detector reads a word before < as a type or comparison and draws no render edge there; upstream's original text is kept as an it.fails case so the limit stays visible, and the assertion is unchanged. Trap 19 in framework-coverage.md scopes Pattern 1 to PascalCase references in .tsx/.jsx files and notes the type/value namespace limit. The README's merge point now names d0bb9be5. Indexing cost of the new declaredComponent lookup was not measured, and promoting the deployed build is a separate step.

Written for commit 5b73098. Summary will update on new commits.

View guided diff Turn on auto-fix

Summary by CodeRabbit

  • Bug Fixes
    • React Router routes and layouts now resolve components correctly when re-exported through nested folders or loaded lazily.
    • Route references update when a page is added or gains an export, including pages reached through re-exports.
    • JSX links now prefer values declared in the same file—including wrapped, aliased, and lazy-loaded components—over unrelated components with the same name elsewhere.
  • Documentation
    • Updated the recorded upstream commit and expanded framework coverage notes.

colbymchenry and others added 4 commits October 14, 2026 17:55
…mport (colbymchenry#2558)

A lazily loaded folder whose index passes on a page it imports linked
nothing: DigiShop.Frontend's `src/layout/index.ts` does `import { UserLayout }
from './UserLayout'; export { UserLayout }`, and its routes load
`await import('@/layout')`. exportedComponent, the barrel walk behind lazy
routes, React.lazy values and lazy layouts (colbymchenry#2436, colbymchenry#2452, colbymchenry#2480), read the
export clause as naming a declaration in the barrel, which has none: the
name is an import binding. `import Login from './Login'; export default
Login` and `export { Page as Component }` of an imported Page failed the
same way, so all 27 lazy route refs in DigiShop's App.tsx stayed failed.

A binding the module exports but does not declare is now followed through
the module's import of it, a default import as `default` and a named one by
the name it imports, with each file read added to `reads` so lazyModules
still redraws the route. A namespace import or a package's binding links
nothing. `export default withAuth(Page)` hands over a call, whose first
identifier ownExport reads; that was harmless while only same-file
declarations counted, so a default is followed only when the statement is
the binding itself (exportsBinding), or the route would link the HOC.

colbymchenry#2451 (open) adds the same step to the general import walk; colbymchenry#2420 (open)
carried it in a lazyRouteComponent rewrite that exportedComponent superseded.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…olbymchenry#2560)

A lazy React Router route whose module is a barrel, and whose page sits in a
folder below the barrel's, stayed unlinked after `codegraph sync` added the
page or gave it its export, though a fresh index linked it. In
DigiShop.Frontend, `@/pages` is `src/pages/index.ts`, which imports `./Home`,
`src/pages/Home/index.tsx`, and exports it again. While the page is missing,
the route's reference fails and waits under the key of the module it names,
`module:pages` (colbymchenry#2422). The retry looks failed references up by the keys of
the changed files, and a file in `pages/Home/` gives only `module:Home` and
its own stem. The limit, which the `export *` barrels of colbymchenry#2436 share, was
recorded with colbymchenry#2558.

After the failed-ref retry, which makes the barrel's import edge into an
added file, sync now walks up the import edges from each file it added, or
gave a definition, to the barrels that pass it on: `export … from`, or an
import exported again (`import { X } from './x'; export { X }`, `export
default X`), as deep as the resolver chases a name. It re-opens, for the
sweep, the failed references waiting under those barrels' keys.

Only keys a failed reference waits under are looked up, in one DISTINCT
over the failed rows parked under module keys, so a sync with none reads
nothing, and a body-only edit seeds nothing. The ImportReader that the
added-files reopen (colbymchenry#2512) uses is shared, and gains exportedBindings,
behind a regex pre-check, since most importers export nothing.
defaultExportBinding moves to alias-binding.ts for this walk and for
react.ts's exportsBinding.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… JSX renders (colbymchenry#2420)

A PascalCase name that a .tsx/.jsx file declares as a module-level value is
that declaration wherever the file uses it: a JSX tag, a route's element, a
layout or a TSX type. Its initializer decides what it renders, in order:
- the component of the module its lazy loader loads, or the export the
  loader picks, in either branch of a conditional;
- the function it wraps (`observer(function X() {…})`,
  `forwardRef(Inner) as {…}`);
- else the declaration itself.

Before, the lookup by kind skipped the value and took a lone same-named
component anywhere, often in another app of the repository.

- Pattern 1 asks declaredComponent about every PascalCase reference, not
  only route references. layoutComponent and the jsx-render synthesizer's
  jsxChild ask it too.
- valueLoader reads a value's loader with loaderValue (colbymchenry#2480).
- defaultExportedName reads `export default observer(Login)`.
- lazyValueModules records the modules a file's lazy values load as
  synthesis inputs, so a sync that changes one of them redraws the tag.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Brings in upstream colbymchenry#2558 (a lazy route follows a barrel that re-exports
an import), colbymchenry#2560 (sync re-opens a lazy route when a page appears below
its barrel) and colbymchenry#2420 (a component a file declares as a value is what its
JSX renders).

Fork-side choices:
- The CodeGraph class lives in src/codegraph.ts, so upstream's sync-path
  call to reopenReferencesThroughBarrels goes there; src/index.ts stays
  the fork's.
- extractLocalExportAliases and defaultExportBinding are not brought
  back. The import reader's exportedBindings, exportedComponent's local
  export and its "default export is this binding" check read the
  kernel's binding rows (exportedAs on import and declaration rows). A
  nodeless `default` row, which `export default observer(Page)` leaves,
  falls through to the default-export reader, as upstream does.
- declaredValue looks the name up through getNodesByName, because the
  fork's context has no getNodesInFileNamed.
- collectInputs and lazyValueModules are dropped: the fork re-runs
  synthesis in full on any sync that changes a file and keeps no
  synthesis-input list.
- jsx-child-disambiguation.test.ts: one fixture writes `Sign in: <LoginPage />`
  in place of `Sign in <LoginPage />`, because the fork's opensTag reads a
  word before `<` as a type or a comparison. The assertion is unchanged.
- framework-coverage.md: the React Router row keeps the fork's text and
  adds upstream's evidence, marked upstream. Trap 19 describes the fork's
  full resynthesis in place of lazyValueModules. The row's verified date
  stays at 2026-10-07 because the fork has not re-verified it.
- README names upstream main through d0bb9be.
@coderabbitai

coderabbitai Bot commented Oct 14, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Repository YAML (base), Organization UI (inherited)
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 5a7ad0c2-89b3-4efd-980d-17950a9d76ca
📥 Commits

Reviewing files that changed from the base of the PR and between 8814098 and 5b73098.

📒 Files selected for processing: 2
  • __tests__/jsx-child-disambiguation.test.ts
  • docs/design/framework-coverage.md
🚧 Files skipped from review as they are similar to previous changes: 1
  • docs/design/framework-coverage.md

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 8 remain after this review.

📝 Walkthrough

React resolution now checks local declarations and follows lazy values and re-exported route components. Sync reopens failed references when relevant files or definitions change. The README updates the upstream commit included in the fork’s default branch.

Changes: React Component and Route Resolution

Layer / File(s) Summary
File-local and lazy component values
src/resolution/frameworks/react.ts, src/resolution/callback-synthesizer.ts, __tests__/jsx-child-disambiguation.test.ts, __tests__/react-router.test.ts, __tests__/sync-lazy-route-value.test.ts, docs/design/framework-coverage.md, CHANGELOG.md
JSX, route, and layout resolution checks declarations in the consuming file. The resolver handles wrapped and lazy-loaded values, and tests cover local values, export selection, and same-named components in other files.
Route components through re-exports
src/resolution/frameworks/react.ts, src/resolution/module-importers.ts, __tests__/react-router-barrel-imports.test.ts, docs/design/framework-coverage.md, CHANGELOG.md
Route resolution follows imported bindings and re-exported values, including wrapped default exports. Tests cover direct and chained barrels, renamed exports, and excluded export forms.
Reopen route references after sync
src/codegraph.ts, src/db/queries.ts, src/resolution/module-importers.ts, __tests__/react-router-barrel-imports.test.ts, __tests__/sync-nested-barrel-route.test.ts, docs/design/framework-coverage.md, CHANGELOG.md
Sync follows barrel import chains to reopen retryable failed references when files are added or definitions change. Tests cover added, edited, deleted, and restored pages.

Fork Revision Metadata

Layer / File(s) Summary
Update upstream commit reference
README.md
The README changes the upstream commit identified as included in the fork’s default branch.

Priority: ➖ Normal

Merge Risk: ⚪ Minimal · up to 5b730

Sync retries failed route references after barrel export changes, avoiding stale route links in this case. No actionable merge-blocking risk remains.

Security architecture risk: 🔵 Low · up to 5b730

The inspected changes preserve existing write serialization and recoverable retry behavior while improving component resolution. No introduced security concern was established in those paths, but incomplete coverage prevents a minimal-risk assessment.

Retained concerns
No architecture-level concerns identified.

Security review details

Security Blast Radius

  • inferred — Control over indexed source can influence component targets and module-key retries across files in the project index. The inspected outcomes are graph relationships and unresolved-reference state; these references do not establish a new runtime authorization grant or cross-tenant exposure.

Trust Boundaries and Controls

  • observed — Barrel recovery requires an indexed import relationship and supported pass-through export, limits traversal depth, and deduplicates visited paths. Retry selection retains per-key population ceilings, and reopening targets exact row IDs only while their status remains failed.

Resilience and Maintainability Implications

  • observed — Sync retains mutex and file-lock serialization. Edge persistence precedes resolved-row cleanup and occurs in chunks, so intermediate state is possible rather than whole-sync atomicity. Existing pending-row recovery and finally-block resource cleanup remain the containment mechanisms for interrupted work.
Pre-merge checks: Passed 6
Passed Passed checks: 6 passed
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly identifies the primary change: reconciling the fork with upstream through commit d0bb9be.
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Suppressions Explained Passed PASS. The pull-request diff adds no lint, type-check, or compiler suppression directive, and it adds no lint or TypeScript configuration ignore entry. The only failure-related test marker is `it.fails…
User-Visible Changes Documented Passed The diff does not add, remove, or rename a CLI command or flag, MCP tool argument, supported language or framework, agent target, or config key. The React and TypeScript/JavaScript changes extend exis…
✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Comment @coderabbitai help to get the list of available commands.

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 13 files

Reply with feedback, questions, or to request a fix.

View guided diff | Turn on auto-fix | Re-trigger cubic

Comment thread __tests__/jsx-child-disambiguation.test.ts Outdated
Comment thread docs/design/framework-coverage.md
Comment thread src/resolution/frameworks/react.ts
Comment thread src/resolution/frameworks/react.ts
Comment thread src/resolution/frameworks/react.ts
Comment thread src/codegraph.ts
Comment thread src/codegraph.ts
Comment thread docs/design/framework-coverage.md Outdated
…scope Trap 19 and note the type/value namespace limit

The reworded fixture hid a fork limit (opensTag reads a word before '<' as a type or comparison). The reworded case stays, and upstream's own text is added as an it.fails case so the limit stays visible. Trap 19 now says Pattern 1 covers PascalCase references in .tsx/.jsx files and names the type/value namespace limit.
@bompus
bompus merged commit 540eb66 into fork/consolidated Oct 14, 2026
5 checks passed
@bompus
bompus deleted the reconcile/upstream-d0bb9be5 branch October 14, 2026 22:33
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