Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
82 commits
Select commit Hold shift + click to select a range
9e72991
fix(cli): take the index lock before replacing the database
jonjomckay Nov 26, 2026
d1679fe
fix(index): say which source files were left out for their size (#3503)
colbymchenry Nov 27, 2026
03383f9
perf(index): a large file indexes in the time its size asks for; inde…
colbymchenry Nov 28, 2026
f84c70a
fix(objc): read a React Native extern shim as the implementation it e…
colbymchenry Nov 28, 2026
2ac6a59
fix(tanstack): read the root of a code-based route tree in each form …
colbymchenry Nov 28, 2026
688385a
release: 1.6.5 (#3508)
colbymchenry Nov 28, 2026
aedff9a
docs(changelog): promote [Unreleased] into [1.6.5]
github-actions[bot] Nov 28, 2026
05a8d23
fix(explore): size an answer to the code a query names, and let a hos…
colbymchenry Nov 29, 2026
a3d7c16
fix(explore): an answer sized to named symbols never drops one of the…
colbymchenry Nov 29, 2026
0dddc9a
perf(js): a minified script no longer stalls the pass that links even…
colbymchenry Nov 29, 2026
8493781
test: a regression gate for speed, graph and answers
colbymchenry Nov 29, 2026
3343abe
Merge pull request #3517 from colbymchenry/regression-gate
colbymchenry Nov 29, 2026
07cdb0a
fix(typescript): read variance annotations on a type parameter withou…
colbymchenry Nov 29, 2026
7aabfdf
docs(changelog): thirteen fixes reported by @inth3shadows
colbymchenry Nov 29, 2026
4b6a11a
fix(explore): the one-symbol answer shows the project's definition an…
colbymchenry Nov 29, 2026
d64820c
Merge pull request #3520 from colbymchenry/ts-variance-annotations
colbymchenry Nov 29, 2026
22865d0
fix(indexing): a FIFO under a name CodeGraph reads is skipped, not wa…
colbymchenry Nov 29, 2026
41cd775
fix(go): a local given what a local closure returns has the type the …
colbymchenry Nov 29, 2026
4bea547
fix(daemon): bind the socket where the prompt hook accepts it under a…
colbymchenry Nov 29, 2026
3959757
fix(resolution): a TS/JS value named like a class does not call that …
colbymchenry Nov 29, 2026
5c902e3
fix(resolution): a TS local a member call fills in takes the type the…
colbymchenry Nov 29, 2026
6fcc19b
fix(resolution): a TS/JS local holding a DOM value reached in more th…
colbymchenry Nov 29, 2026
9d798f0
fix(resolution): a TS parameter typed by its function's declared type…
colbymchenry Nov 29, 2026
89342bd
test(regression): keep the engine project's graph with typed member-c…
colbymchenry Nov 29, 2026
e645e42
fix(python): three receiver-typing fixes (#3525)
colbymchenry Nov 29, 2026
a60b412
Merge pull request #3518 from colbymchenry/changelog-thirteen-fixes
colbymchenry Nov 29, 2026
932ed66
fix(resolution): a member value through an untyped receiver is a func…
colbymchenry Nov 29, 2026
bf8c726
Merge pull request #3526 from colbymchenry/member-value-not-a-function
colbymchenry Nov 29, 2026
e694624
Merge pull request #3496 from jonjomckay/fix/index-lock-before-database
colbymchenry Nov 29, 2026
7762529
docs(changelog): list the index lock fix under Unreleased
colbymchenry Nov 29, 2026
04f25af
Merge pull request #3528 from colbymchenry/changelog-3494
colbymchenry Nov 29, 2026
b8383c0
fix(windows): keep a PowerShell 7 parent's modules out of Windows Pow…
colbymchenry Nov 29, 2026
ade435b
fix(rust): a chain from an outside type's value no longer links a pro…
maxmilian Nov 26, 2026
3e32649
fix(rust): leave a chain through a dependency name that leads into th…
maxmilian Nov 26, 2026
d6e5a19
fix(rust): leave a chain whose target is in any dependency source in …
maxmilian Nov 26, 2026
295060f
docs(changelog): leave the line for #3483 to the batch's changelog ch…
colbymchenry Nov 29, 2026
454f9ad
fix(extraction): skip linked git worktrees where git does not list th…
colbymchenry Nov 29, 2026
e4068cf
fix(kotlin): an alias through a property no longer overflows the stack
colbymchenry Nov 29, 2026
241ff6d
fix(svelte,astro): a <script> inside an expression, a string or a com…
colbymchenry Nov 29, 2026
4d19894
fix(python): honour the import roots pytest and Pyright configs declare
colbymchenry Nov 29, 2026
e7dd9d0
fix(express): read routes from a router or an app under any name
colbymchenry Nov 29, 2026
e0dc175
fix(rust): a function passed as a value inside a macro is referenced
colbymchenry Nov 29, 2026
09eaa78
fix(objc): the C++ in an Objective-C++ file is read with the C++ grammar
colbymchenry Nov 29, 2026
3974d58
fix(javascript): read a reserved word as a JSX name
colbymchenry Nov 29, 2026
b7c57f7
fix(resolution): match a request to a route by what the route spells
colbymchenry Nov 29, 2026
a550b86
docs(changelog): the fixes of this batch, and the one kept graph they…
colbymchenry Nov 29, 2026
b3b341d
Merge pull request #3530 from colbymchenry/kotlin-alias-cycle
colbymchenry Nov 29, 2026
f596a19
Merge pull request #3531 from colbymchenry/windows-upgrade-psmodulepath
colbymchenry Nov 29, 2026
9d2c099
Merge pull request #3539 from colbymchenry/rust-outside-receiver
colbymchenry Nov 29, 2026
1da50db
Merge pull request #3532 from colbymchenry/rust-macro-fn-value
colbymchenry Nov 29, 2026
2e204c7
Merge pull request #3533 from colbymchenry/express-router-names
colbymchenry Nov 29, 2026
3816463
Merge pull request #3534 from colbymchenry/objcpp-out-of-line-method
colbymchenry Nov 29, 2026
4e042e2
Merge pull request #3535 from colbymchenry/svelte-template-script
colbymchenry Nov 29, 2026
6de67e1
Merge pull request #3536 from colbymchenry/vue-jsx-reserved-attr
colbymchenry Nov 29, 2026
d50f358
Merge pull request #3537 from colbymchenry/python-import-roots
colbymchenry Nov 29, 2026
6c88aab
Merge pull request #3538 from colbymchenry/walk-skips-linked-worktrees
colbymchenry Nov 29, 2026
e2f24ec
Merge pull request #3529 from colbymchenry/batch-changelog-and-gate
colbymchenry Nov 29, 2026
95bae89
docs(changelog): highlights for the next release, and its fixes under…
colbymchenry Nov 29, 2026
78bfdad
fix(gate): a release that cannot finish a project is noted, not a crash
colbymchenry Nov 29, 2026
3dfa48e
Merge pull request #3541 from colbymchenry/release-notes-next
colbymchenry Nov 29, 2026
e7a44dd
Merge pull request #3540 from colbymchenry/gate-against-unfinished
colbymchenry Nov 29, 2026
e014516
fix(telemetry): count users, not machine ids, with a rollup that work…
colbymchenry Nov 30, 2026
4d93b3e
fix(telemetry): development builds send nothing, and the engine says …
colbymchenry Nov 30, 2026
809ce38
fix(telemetry): date each user from stored proof, and count new users…
colbymchenry Nov 30, 2026
702bc7b
release: 1.6.6
colbymchenry Nov 30, 2026
963c3ab
docs(changelog): promote [Unreleased] into [1.6.6]
github-actions[bot] Nov 30, 2026
5fd6089
feat(install): offer the prompt hook to Codex CLI (#3335)
colbymchenry Nov 30, 2026
81ecf57
fix(mcp): query workers read without repairing, and a "busy" answer s…
colbymchenry Nov 30, 2026
f43c97e
Merge pull request #3548 from colbymchenry/query-workers-read-only
colbymchenry Nov 30, 2026
3046861
fix(extraction): a documented member of an object literal is a node (…
colbymchenry Nov 30, 2026
35cf712
perf(graph): a breadth-first walk reads only what it can keep (#3408)
colbymchenry Nov 30, 2026
96ad32c
fix(extraction): a value cut for display keeps whole characters (#3408)
colbymchenry Nov 30, 2026
b3b52a8
fix(search): a field of an object literal is found by its name (#3408)
colbymchenry Nov 30, 2026
07136dd
fix(search): a field is found in a default export, an object handed t…
colbymchenry Nov 30, 2026
479c9fd
fix(graph): a walk reads the edges to what a bridge made (#3408)
colbymchenry Nov 30, 2026
f8d7043
chore(extraction): bump EXTRACTION_VERSION to 30 (#3408)
colbymchenry Nov 30, 2026
a9ca399
release: 1.6.7
colbymchenry Nov 30, 2026
1dd70eb
docs(changelog): promote [Unreleased] into [1.6.7]
github-actions[bot] Nov 30, 2026
6fc7f69
Sync CodeGraph v1.6.7 while retaining Desktop packaging
PinableAgents Dec 1, 2026
eea8915
Run CodeGraph six-platform acceptance on pull requests
PinableAgents Dec 1, 2026
c919039
Pin CodeGraph Desktop runtimes to Node 24.23.0
PinableAgents Dec 1, 2026
8d19823
Resume verified CodeGraph runtime releases from main
PinableAgents Dec 1, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions .github/workflows/pinable-desktop-runtime.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
name: Pinable desktop runtimes

on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_dispatch: {}

permissions:
Expand Down Expand Up @@ -32,7 +36,7 @@ jobs:
persist-credentials: false
- uses: actions/setup-node@v6
with:
node-version: '24.21.0'
node-version: '24.23.0'
cache: npm
- uses: actions/setup-python@v6
with:
Expand Down Expand Up @@ -195,8 +199,8 @@ jobs:

publish:
needs: collect
# Opt back in only after Desktop can migrate from the legacy 1.6.5 release.
if: ${{ false }}
# Publish only after the full release set is verified on the fork's main branch.
if: ${{ github.repository == 'PinableAgents/codegraph' && github.ref == 'refs/heads/main' && github.event_name == 'push' }}
runs-on: ubuntu-22.04
timeout-minutes: 15
permissions:
Expand Down
2 changes: 1 addition & 1 deletion .pinable/runtime.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"schemaVersion": 1,
"nodeVersion": "v24.21.0",
"nodeVersion": "v24.23.0",
"releasePrefix": "pinable-runtime-v",
"targets": ["darwin-arm64", "darwin-x64", "linux-x64", "linux-arm64", "win32-x64", "win32-arm64"]
}
17 changes: 16 additions & 1 deletion AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,9 @@ Two functions in `src/mcp/tools.ts` scale explore with indexed file count. This
- `getExploreBudget(fileCount)` → **call** budget: `<500→1, <5000→2, <15000→3, <25000→4, ≥25000→5` (max 5).
- `getExploreOutputBudget(fileCount)` → **per-call** output (chars / files / per-file). **Invariant: a larger tier must never get a smaller `maxCharsPerFile` than a smaller tier.** (Regression that motivated this doc: the `<5000` tier's 2500 was *below* the `<500` tier's 3800, so on a god-file repo — excalidraw's 415 KB `App.tsx` — one explore returned <1% of the file and forced a Read.)
- Explore output must **never tell the agent to "use Read"** — steer to another `codegraph_explore` and "treat returned source as already Read."
- **A query anchored on named symbols is sized to the code it names, not to the tier** (`sizedToNamedSymbols` in `tools.ts`, `namedSymbolAnchors` in `explore-one-symbol.ts`). Anchors are the query's tokens written like code (a capital, digit, underscore or qualifier) that the index defines once to three times; two to eight of them make the query anchored, whatever else it holds (words for what is wanted of them, a name the index lacks, an overloaded name). The budget is the answer's frame (2,500 characters once it is framed lean), the anchors' own source, and as much again for the code around them, never less than 4,000; the tier's budget is the ceiling, so it stays monotonic with repo size. The same queries have their words matched as exact names and no other way (`exactNamesOnly`): no stems, no text search, no camelCase parts, which is what brought a C++ `Call` into an answer about `goValueIsCall`. Measured on agents fixing issues here: four helpers of 58 lines came back as 483 lines, and of 57 questions those agents asked, 43 named two or more symbols and almost every answer was the tier's 25,000 characters; they asked explore two or three times a run and made the other lookups with grep. Everything else keeps the tier's budget and the word search: one name (its own answer, #3407), one name among other words, no name written like code, a pinned file or line. Two traps met while building it: sized without the frame, two ten-line functions were left 500 characters for their own file; and searching by the anchors alone, instead of matching every word as an exact name, dropped the overloaded names a flow runs through. A test of the allocator at the tier's ceiling that queries with names sets `CODEGRAPH_EXPLORE_NAMED_SIZING=0`, as `explore-allocation-e2e.test.ts` and `explore-displacement-guard.test.ts` do. **What the sizing must never cost is a definition the query named**, and before the first release it did: over a project for each language, framework, router and bridge in the README and three real codebases (484 sets of questions, 1,033 of them naming two to eight of a project's own symbols) the sized answer had lost a definition the unsized one showed in 173, and 92 came back as "No relevant code found". Five causes, each now closed and each a shape in `explore-named-sizing.test.ts`: (1) the patterns that read names out of a query (`extractSymbolsFromQuery`) do not read a capitalised name with a digit in it (`Thing0`, `MEMBER_191`, `sha256Hex`), and with the word search off nothing else looked one up, so every token written like code is handed to the search as an exact name (`exactNames`) and the anchors' definitions are put in the answer whether or not the search reached them; (2) a container that is more than half its file is dropped from the ranges like any envelope, so a named one keeps its opening three lines (`NAMED_ENVELOPE_OPENING_LINES`); (3) a Scala `object`, a Pascal unit and a COBOL program are `module` nodes, which a one-symbol answer leaves to the general path, so an anchored query takes `module` and `namespace` for names too (`ANCHOR_KINDS`); (4) a lowercase word the index defines is a name once the query is anchored by two written like code (`parseToken expire_token validate`), unless it is a question's own word (`QUESTION_WORDS`: a function named `use` is not asked for by "how does A use B"); (5) a file a named symbol is defined in is part of the answer whatever its rank (`anchorFiles`: kept past the score floor and the relevance gate, sorted ahead of all but a pinned file, never cliffed, and the default file count raised to hold them), because eight names in eight files had three left out by the tier's five-file default, in the general answer as well. **Never the file of a config key** (`isConfigLeafNode`, #383): a key in a properties or YAML file is a symbol a query can name, and its line is `key = <secret>`. The first version of (5) kept every anchor's file and printed a password for a query that named its key; the engine's own `config-secret-redaction.test.ts` caught it, on a full run of the suite and not on the tests of the files touched. The render loop now refuses any file that holds a config key, whatever brought it there. Run the whole suite on every round of a change to explore, not once at the end. Behind all five is one check made on the finished answer (`namedSymbolsShown`): if the first line of a named definition is neither in it nor already held by the session, the query is answered again with the sizing off, and that answer is returned when it shows a named definition the sized one does not. Where it shows no more of what was named, the smaller answer stands: a longer answer missing the same definitions is worse, and returning it whenever anything was missing sent a quarter of the questions about real code back to the tier's ceiling for nothing. So the sizing can make an answer smaller and cannot lose a named definition the general path shows. Measured after all five: of the 1,033 questions none lost a definition, none came back empty, 4,080 of 4,184 names were shown where the release showed 3,622, answers averaged 25% shorter than the release's (35% on the three real codebases), the second pass ran for 49 and its answer was returned for 7. When you change what an anchored query gathers or how its file budget is spent, run the sweep again rather than trusting the unit tests: every one of these losses was in a shape nobody had thought to write a test for, and two of the five were found only on real code.
- **A host can cap explore's answer: `CODEGRAPH_EXPLORE_MAX_CHARS`** (`cappedExploreBudget`). The tiers are sized for an agent that answers a question from one or two explore calls and reads nothing else. An agent that edits code asks about three times a run and pays for each answer again on every later turn: measured on such agents, their answers at the tier's ceiling brought in four times the text they saved in file reads, and of 57 questions they asked only the ones naming short symbols came back smaller under the rule above. Held to 8,000, the same 57 answers are 57% less text. The cap is the budget an answer is built to, not the longest its text can be: the hard ceiling is half again above any budget, and at a cap of 8,000 over three real projects 85% of 579 answers were past 8,000 characters and none past 12,000. Say so wherever the cap is described; a host that needs a hard limit sets two thirds of it. The default is unchanged, because the README benchmarks were measured with it; a host that pays by the token of context sets the cap. Never below 6,000, never above the tier.
- **An answer under 18,000 characters is framed as the small tiers frame theirs** (`LEAN_FRAME_BELOW_CHARS`): no relationships section, no list of further files, no advisory note on call counts, which together are a third of a 9,000-character answer. The completeness note stays at every size; `explore-completeness-note.test.ts` fails if it is dropped.

### Dynamic-dispatch coverage — the flow must EXIST in the graph end-to-end

Expand Down Expand Up @@ -190,6 +193,17 @@ Every engine test file runs in a throwaway home dir (`__tests__/setup-home-sandb

Behavior that differs by platform (path resolution, drive letters, `SENSITIVE_PATHS`, `%APPDATA%` config dirs, CRLF) must be gated, not assumed. Use `it.runIf(process.platform === 'win32')(...)` for Windows-only assertions and `it.runIf(process.platform !== 'win32')(...)` for POSIX-only ones — e.g. `/etc` is sensitive on POSIX but resolves to `C:\etc` (non-existent) on Windows, so an ungated `/etc` assertion fails on Windows. Validate the Windows side for real (see below); don't merge a Windows-gated test you haven't seen run.

## Indexing cost grows with the file's size (do not regress)

**Indexing a file costs in proportion to its size: about a second a megabyte.** Nothing done for one symbol, reference, route or match may read the whole file, all of the file's nodes, all of its imports, or everything before it. That one shape, in about forty places across the kernel, the wasm extractor, the resolver and the framework passes, made a megabyte take from half a minute to several minutes and left large files with no symbols. Each instance looks like ordinary code and is fine at 300 lines.

**Before changing or reviewing a loop in `src/extraction/`, `src/resolution/` or `codegraph-kernel/`, and before answering an issue about slow indexing, a hang, or a file with no symbols, read `docs/design/large-file-performance.md`.** It lists what to look for in a diff and what to write instead, how to measure, and how to prove a fix. In short:

- **Use the lookups, not a pass over the file:** `lineAt` / `linesOf` / `firstIndexOfEach` (`resolution/synth-utils.ts`), `nodesAroundLine` / `nodesNamed` (`resolution/nodes-around.ts`), `importsBoundTo` and its siblings (`resolution/import-lookup.ts`), `childrenOf` / `namedChildrenOf` or `node.namedChildren` in place of `node.child(i)` in a loop, `pushAll` / `maxOf` in place of spreading a file-sized list.
- **Measure** with `scripts/benchmarks/large-files/` at 0.3, 1.2 and 3.9 MB, with the kernel and with `CODEGRAPH_KERNEL=0`: four times the size must cost about four times the time. Start from the README's language, framework and bridge tables, not from the list of parsers; a new one gets a case.
- **A speed fix leaves the graph identical:** `scripts/benchmarks/large-files/compare-graphs.mjs <dist of main> <dist of the branch> <projects…>`, with both parsers. A change in what is read goes in its own pull request.
- **Tests:** `__tests__/large-file-{indexing,frameworks,lookups}.test.ts` and `kernel-large-file-parity.test.ts`. Each case bounds the time and asserts something the faster path could get wrong.

## Cross-platform validation

The dev machine — and the default `npm test` target — is **macOS**, so local runs cover the macOS path. The other two platforms aren't here; when a change is platform-sensitive (file watching, sockets / named pipes, path & symlink handling, process lifecycle, inotify budget) validate them for real rather than guessing.
Expand Down Expand Up @@ -290,5 +304,6 @@ publish actions on shared state. Write the files, hand the user the commands.
- The **last released version** — `grep -m1 '^## \[' CHANGELOG.md` shows the top-of-file version (older releases follow). A comment dated before the latest `## [X.Y.Z] - YYYY-MM-DD` is reacting to *released* state — work that's only on `main` or on an unmerged branch doesn't apply.
- The **last main commit** — `git log --first-parent main -1 --format='%ai %h %s'`. A comment after the last release but before a fix on main may already be addressed there but unreleased.
- The **current branch's tip** — your own unmerged work obviously can't be what the comment is reacting to.
Always disambiguate "released," "merged-but-unreleased," and "in-progress" before agreeing that a user-reported problem is unfixed (or that a fix is incomplete). A user saying "your fix only covers X" about a recent PR is usually pointing at the *released* shortcomings — your in-flight branch may already address them but they have no way to know that.
Always disambiguate "released," "merged-but-unreleased," and "in-progress" before agreeing that a user-reported problem is unfixed (or that a fix is incomplete). **And before saying a report is fixed, run what it reports.** A release that fixed the same kind of fault has not fixed this one until the reporter's own file, command or query says so: #3501 (a minified bundle that hung indexing) was answered "patched in 1.6.5" from that release's notes, and the bundle took 36 seconds on 1.6.5 where it had taken 39. A user saying "your fix only covers X" about a recent PR is usually pointing at the *released* shortcomings — your in-flight branch may already address them but they have no way to know that.
- **Run the regression gate (`npm run gate`, `scripts/regression/`) before you open a pull request, before you say someone else's is safe to merge, and before a release. Nothing runs it for you:** the maintainer chose not to have it run on every pull request (2026-11-29), so it is run by hand, by him or by the agent doing the work, and the pull request says that it was run and what it said. It exists because a suite someone runs by hand passed two regressions in a month: #3362 was a fix to which event reaches which listener, validated for accuracy on six real projects and for speed on two, all hand-written, and it made a minified bundle take 37 seconds (#3501, shipped in 1.6.4); #3514 sized an answer to the symbols a query names and lost them in 173 of 1,033 questions (caught before release, by hand). Neither was a careless change. Each was validated on the inputs its author thought of, and the fault was in an input nobody thought of. So: (1) a change is checked against a fixed set of projects it did not choose, every time, with one command; (2) every report that names a public file adds that file to the gate's `REAL_FILES`, because a reported file has the shape nobody generated; (3) `expected.json` is updated only when the new result is the one wanted and the pull request says why, never to make a failure go away; (4) a change described as a speed fix or a refactor that moves the GRAPH check is wrong until shown otherwise. The gate says a graph changed, not that it is right: `npm test` holds what is right, and the explore-answer sweep and the agent comparison are still run by hand before a release.
- **Version-tag every image referenced in `README.md`.** GitHub caches README images (`raw.githubusercontent.com` with a 5-minute TTL; third-party hosts sit behind the long-lived camo proxy), so updating an asset in place can keep showing the stale version. Give each README image URL a `?v=N` query tag and **bump `N` in the same commit whenever the asset bytes change** — e.g. `assets/waitlist.svg?v=2`. The changed URL sidesteps every cache so the new image shows immediately instead of waiting on a TTL to expire.
Loading
Loading