Skip to content

merge: reconcile upstream through baf19067 - #520

Merged
bompus merged 4 commits into
fork/consolidatedfrom
reconcile/upstream-baf19067
Oct 18, 2026
Merged

bompus merged 4 commits into
fork/consolidatedfrom
reconcile/upstream-baf19067

Conversation

@bompus

@bompus bompus commented Oct 18, 2026 •

Copy link
Copy Markdown
Owner

fork/consolidated now contains upstream main through baf19067 (three commits): a C++ data member written through a chain is found in a base class (colbymchenry#2628), the Windows daemon test cleans up its detached process (colbymchenry#2629), and a member reference through an import binding (LIST.includes(x) after import { LIST } from './constants') is parked under its module and relinked on sync (colbymchenry#2630).

Conflicts. Four files conflicted, because upstream wrote its fixes against the regex-based JavaScript resolver and the fork reads the kernel's binding rows. No regex came back.

File Resolution
src/db/migrations.ts Upstream's version-16 member-tail index is the fork's version 22 (the fork already uses 16 to 21 for its own migrations). CURRENT_SCHEMA_VERSION is 22, with the same missing-column guard as the fork's version 21.
src/index.ts Fork's re-export file kept. Upstream's comment on the sync retry went to the same place in src/codegraph.ts.
src/resolution/import-resolver.ts Upstream's importBindingTail (member receiver parking) on top of getImportMappings; the fork's isExternalImport(…, ref.filePath) already covers the nearest-alias case upstream added inline.
src/resolution/name-matcher.ts Stays deleted. colbymchenry#2628 needed no kernel change: cpp_member_written_in already searches supertypes, and cpp-member-chain-base-members.test.ts passes unchanged.

One behavior difference from upstream. A call on an imported constant (LIST.includes(x), store.get(k)) is parked and retried the same way, but the fork's native resolver links a call through an import only to a function, method, class or component (or a store through getState), so it stays unlinked after a sync and after a full index. Upstream links it to the constant. Seven link expectations in sync-import-member-retry.test.ts are changed to say so (the parking and sync-equals-full-index assertions are upstream's as written). The CHANGELOG has a fork note and the README one sentence. Whether to adopt upstream's constant links is a resolution-policy decision that needs eval:precision on JS/TS corpora, and is not made here.

Checks, on this head. build:kernel with clippy -D warnings, golden dumps (no .dump diff), tsc --noEmit, check:agent-docs, readme-sync all exit 0; full suite 749 files, 9,286 passed, 40 skipped. eval:precision was not run: no Rust file changed, and the only resolution change is which tail a failed reference is parked under, which changes no edges.

README rows checked. Merge point (now baf19067); the JavaScript/TypeScript member-call paragraph (one sentence added); "About this fork" feature table, name-resolution row, sync-retry sentence, 2026-10-15 benchmark paragraph (historical, no number moves). No docs-site page names the merge point.

The merge commit keeps upstream's baf19067 as a parent, so land it as a merge commit. Promoting the deployed build is a separate step.


Summary by cubic

Merges upstream main through baf19067 into fork/consolidated, bringing in three fixes: C++ calls on data members inherited through a chain now link to the member's class, the Windows daemon rebuild test no longer leaves a suspended detached process behind, and a member reference through an import binding (LIST.includes(x) after import { LIST } from './constants') is parked under its module and relinked when that module changes.

Conflict resolutions

  • Upstream's member-tail index becomes schema version 22; the fork's own migrations already use 16–21.
  • Upstream's name-matcher.ts stays deleted; the kernel's existing C++ member lookup already searches base classes.

Behavior difference

  • A call on an imported constant stays unlinked in the fork after a sync and after a full index, because the native resolver links calls through imports only to functions, methods, classes, components, or a store's getState.
  • Seven link expectations in sync-import-member-retry.test.ts change to reflect that; parking and sync-equals-full-index assertions match upstream.

Written for commit 963b635. Summary will update on new commits.

View guided diff Turn on auto-fix

colbymchenry and others added 4 commits October 17, 2026 02:05
… `options.statistics->getTickerCount(…)` on a RocksDB `Options`, links to the member's class (colbymchenry#2628)

Step 3 of member chains, after colbymchenry#2626 and colbymchenry#2627. The type of `x.member` was
read from x's class alone, so a member that class inherits was never found
and the call fell back to its bare name.

A temporary diagnostic on main measured why chain calls still fell through:
2,801 of 4,884 were a member declared in a base class. Nearly all were
rocksdb's `Options`, which declares no members of its own and inherits
`statistics`, `table_factory`, `listeners`, `prefix_extractor` and the rest
from `DBOptions` and `ColumnFamilyOptions`. The other causes are left for
later:
- a chain whose base can't be typed: 875;
- a class the index lacks, e.g. protobuf's generated `_impl_`: 626;
- a member found nowhere: 337.

cppExpressionType's member branch now uses cppInheritedDataMember, the
lookup the calling class's own members already use (colbymchenry#2533):
- the class's own declaration first;
- then the classes it derives from, through their base edges, to depth 4;
- a base that depends on the class's template parameters is skipped
  unless a using-declaration brings the name in.

Kit A/B against main e8ec7fd:

| repo | removed | added | retargeted | same target, now typed |
|---|---|---|---|---|
| rocksdb | 1,410 | 634 | 392 | 184 |
| protobuf | 0 | 2 | 149 | 55 |
| leveldb, fmt, redis | identical | | | |

- Removed: the bare-name guesses on inherited std::shared_ptr and
  std::vector members, such as `options.table_factory.reset(…)` →
  FSWritableFilePtr::reset (654) and `options_.db_paths.emplace_back(…)` →
  autovector::emplace_back (256).
- Added: `options.statistics->getTickerCount(…)` → Statistics (432),
  `rate_limiter` → RateLimiter (51), `comparator` → Comparator (26).
- Retargeted: DummyOldStats -> Statistics, DB -> Env, ClockCacheShard -> Cache.
- protobuf's generated `this_._internal_metadata_.Clear<…>()`,
  `MergeFrom<…>` and `unknown_fields<…>` now reach InternalMetadata, a
  member every message inherits from MessageLite. Before, they reached the
  message's own `Clear` or `Any::MergeFrom`.

All 50 random sites read by hand (36 rocksdb, 14 protobuf) were correct.

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

A full suite run on Windows left a `serve --mcp --path %TEMP%\cg-rebuild-…`
process behind. Its parent was gone, and its one thread was suspended with
0 CPU used. It would never exit, and it held the checkout's dist.

libuv creates every detached child suspended on Windows and resumes it only
at the end of `uv_spawn`. A launcher killed inside that call never resumes
its daemon. The daemon never runs, so it writes no daemon.pid, and nothing
can find or stop it.

The rebuild test's teardown killed its launcher at once. The test stops the
daemon on purpose, so by then the launcher is serving calls in-process with
a retry timer running. When the retry comes due during the last call, the
launcher spawns its daemon as soon as that call answers, just as the
teardown begins. Under load the two coincide.

The teardown now:
- closes each launcher's stdin and waits for it to exit. A graceful exit
  can't land inside the synchronous spawn.
- records the daemons each launcher spawns (colbymchenry#1773's recorder) and stops them
  until all have exited. One spawned as its launcher exited may still be
  starting, and stopDaemonAt leaves a daemon running until it answers.

The recorder's comment now says that a launcher killed mid-spawn records
nothing.

CODEGRAPH_DAEMON_RETRY_MS=2500 puts the retry inside the last call on a
quiet box. Under it, main's test left a daemon in 6 of 12 runs: 2 suspended
ones, plus 4 live ones whose fixture then failed to delete. This test left
nothing in 12 runs. Of the mutants, killing launchers again, a single
stopDaemonAt and no spawn recorder each leaked. The other daemon test files
left nothing in 2 runs each.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ule when the module changes (colbymchenry#2630)

`NODE_PATH_EXCLUDELIST.includes(p)` after `import { NODE_PATH_EXCLUDELIST }
from './constants'`, `store.get(k)` through a default import or
`api.get()` through a namespace import is linked by a fresh index through
the import. When the module was missing or lacked the export, the failed
reference was parked under its member's name (`includes`, `get`), which the
module seldom declares and which the retry skips past its 500 ceiling. A
sync that gave the module the export never relinked it, nor one that added
the module where no import edge reached its file.

A direct member reference through an import binding of a project module is
now parked under the module's key, as whole names through a binding are
since colbymchenry#2450, and keeps two more triggers. Its member's name, through a new
expression index on the tail its name gives (schema v16), under the same
ceiling as the references still parked under that name: a namespace
import's barrel forwards the member from another file, and a guess by name
links a receiver whose module never resolves. Its receiver's name, through
a prefix range on the module-name index of colbymchenry#2450: a barrel's import of the
declaring file that no walk finds. The router navigation retry and the
dead-code check read module-parked calls by their member through the new
index. A chain or a longer path keeps its member's tail: on vscode,
parking them too tripled the refs an edit of a hot module retries, and
none of them resolved.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Brings in colbymchenry#2628 (C++ data member found in base classes), colbymchenry#2629 (daemon
test cleanup on Windows) and colbymchenry#2630 (a member reference through an import
binding is parked under its module and relinked on sync).

Fork-side choices:
- Schema: upstream's v16 member-tail index is the fork's v22. The fork
  already uses 16 to 21 for its own migrations (upstream's v15 is the
  fork's v21), so CURRENT_SCHEMA_VERSION is 22. The new test's legacy
  replay counts from 21.
- src/index.ts keeps the fork's re-export file. Upstream's comment on the
  sync retry goes to the same place in src/codegraph.ts.
- importBindingTail takes upstream's member-receiver parking. It reads
  binding rows through getImportMappings, and the fork's
  isExternalImport(..., ref.filePath) already covers the nearest-alias
  exception that upstream added inline.
- name-matcher.ts stays deleted. The native resolver already searches
  base classes for a data member (cpp_member_written_in), and
  cpp-member-chain-base-members.test.ts passes without a kernel change.
- sync-import-member-retry.test.ts: the fork links a member call through
  an import only to a function, method, class or component (or a store's
  getState). It also never guesses an import-bound receiver's method by
  name. So the calls on imported constants and the guessed
  store.fetchUserProfile stay unresolved in a full index as well as after
  a sync. Only those link expectations changed. The parking tails and
  every sync-equals-full-index check stay as upstream wrote them.
- CHANGELOG.md takes upstream's two entries plus a fork note on the
  imported-constant difference. The rebuild script would have re-added
  entries the fork removed in earlier reconciles. README records the
  merge point and the same difference.
@coderabbitai

coderabbitai Bot commented Oct 18, 2026

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration
  • Configuration used: Repository YAML (base), Organization UI (inherited)
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 36f46798-a8d4-49b9-8c04-54b312464bf3
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@greptile-apps

greptile-apps Bot commented Oct 18, 2026 •

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 5/5

[Critical impact] The PR appears safe to merge; no actionable defects were found.

Summary

Reconciles upstream through baf19067 while keeping the fork’s native resolver.

  • Sync retries direct member references through imported names.
  • Daemon rebuild tests stop every process their launchers start.
  • C++ tests cover calls through inherited members in member chains.
  • The README points to the merged upstream revision.

bompus explicitly deferred linking calls on imported constants. The PR keeps those calls unresolved after both sync and a full index; that stated policy difference is not reported as a defect.

This review used source inspection. No tests were run.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart TD
  A["Direct member reference fails to resolve"] --> B["Store under imported module key"]
  B --> C["A file is added or changed"]
  C --> D["Find waiting references by module, member, or receiver"]
  D --> E["Run the native resolver again"]
  E --> F{"Target found?"}
  F -->|Yes| G["Save the link"]
  F -->|No| B
Loading

Reviews (1) · Last reviewed commit: "Merge upstream/main (baf19067) into fork..." · Reviewed by Greptile

@bompus
bompus merged commit de5b179 into fork/consolidated Oct 18, 2026
6 checks passed
@bompus
bompus deleted the reconcile/upstream-baf19067 branch October 18, 2026 01:04
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