diff --git a/__tests__/kernel-retry-materialize.test.ts b/__tests__/kernel-retry-materialize.test.ts index 79f9b040fa..2494ea3303 100644 --- a/__tests__/kernel-retry-materialize.test.ts +++ b/__tests__/kernel-retry-materialize.test.ts @@ -68,7 +68,7 @@ describe.skipIf(!kernelBuilt)("kernel buffer-transport storage (#1541)", () => { async (store) => { const source = "def target_fn(root, mission_path):\n" + - " return (root, mission_path, 'bompus_custom_ds_players')\n" + + " return (root, mission_path, 'demo_custom_players')\n" + "\n" + "class Adapter:\n" + " def adapt(self):\n" + @@ -147,7 +147,7 @@ describe.skipIf(!kernelBuilt)("kernel buffer-transport storage (#1541)", () => { expect(nodes.map((n) => n.name)).toContain("target_fn"); expect(nodes.map((n) => n.name)).toContain("Adapter"); const queries = (cg as unknown as { queries: QueryBuilder }).queries; - const holders = queries.findNodeIdsByLiteral(["bompus_custom_ds_players"]); + const holders = queries.findNodeIdsByLiteral(["demo_custom_players"]); expect(holders.map((id) => cg.getNode(id)?.name)).toEqual(["target_fn"]); }, ); diff --git a/__tests__/literal-capture.test.ts b/__tests__/literal-capture.test.ts index b78ee01b3a..94f1f77b89 100644 --- a/__tests__/literal-capture.test.ts +++ b/__tests__/literal-capture.test.ts @@ -11,7 +11,7 @@ function node(id: string, kind: Node['kind'], startLine: number, endLine: number describe('seedLiteralsInQuery', () => { it('keeps storage keys, flags, dotted names and paths', () => { - for (const v of ['bompus_custom_ds_players', '--start', 'draft.pick', 'api/v1/users', 'ns:event']) + for (const v of ['demo_custom_players', '--start', 'draft.pick', 'api/v1/users', 'ns:event']) expect(seedLiteralsInQuery(`who uses "${v}"`), v).toEqual([v]); }); it('drops plain words, prose, short flags and values that start with a separator', () => { @@ -19,8 +19,8 @@ describe('seedLiteralsInQuery', () => { expect(seedLiteralsInQuery(`who uses "${v}"`), v).toEqual([]); }); it('finds quoted spans and bare runs, stripping surrounding punctuation', () => { - expect(seedLiteralsInQuery('who writes "bompus_custom_ds_players" (via --start)?')) - .toEqual(['bompus_custom_ds_players', '--start']); + expect(seedLiteralsInQuery('who writes "demo_custom_players" (via --start)?')) + .toEqual(['demo_custom_players', '--start']); }); it('returns nothing for a symbol-anchored question', () => { expect(seedLiteralsInQuery('callers of resolvePlayerKey in shared')).toEqual([]); @@ -51,9 +51,9 @@ describe('seedRouteNamesInQuery', () => { describe('captureLiterals', () => { const source = [ `import { x } from './utils/helpers';`, // 1: path starts with '.', never qualifies - `const KEY = 'bompus_custom_ds_players';`, // 2: top level → file node + `const KEY = 'demo_custom_players';`, // 2: top level → file node `export function save() {`, // 3 - ` storage.set('bompus_custom_ds_players', 1);`, // 4 + ` storage.set('demo_custom_players', 1);`, // 4 ` log('ready');`, // 5: plain word ` emit(\`draft.pick\`); emit(\`draft.\${n}\`);`, // 6: second one interpolates `}`, // 7 @@ -68,8 +68,8 @@ describe('captureLiterals', () => { const imp = node('./utils/helpers', 'import', 1, 1); const nodes = [file, imp, save, boot, start]; captureLiterals(source, nodes); - expect(file.literals).toEqual(['bompus_custom_ds_players']); - expect(save.literals).toEqual(['bompus_custom_ds_players', 'draft.pick']); + expect(file.literals).toEqual(['demo_custom_players']); + expect(save.literals).toEqual(['demo_custom_players', 'draft.pick']); expect(start.literals).toEqual(['--start']); expect(boot.literals).toBeUndefined(); expect(imp.literals).toBeUndefined(); diff --git a/__tests__/literal-seeds.test.ts b/__tests__/literal-seeds.test.ts index 077d3aff4d..98cac178a2 100644 --- a/__tests__/literal-seeds.test.ts +++ b/__tests__/literal-seeds.test.ts @@ -25,7 +25,7 @@ describe('literal seeds — index, query, and lifecycle', () => { fs.writeFileSync( path.join(dir, 'src', 'writer.ts'), `export function persistRows(rows: unknown[]) { - chrome.storage.local.set({ 'bompus_custom_ds_players': rows }); + chrome.storage.local.set({ 'demo_custom_players': rows }); } export function unrelatedHelper() { return 'ready'; } `, @@ -33,7 +33,7 @@ export function unrelatedHelper() { return 'ready'; } fs.writeFileSync( path.join(dir, 'src', 'reader.ts'), `export async function readRows() { - const got = await chrome.storage.local.get('bompus_custom_ds_players'); + const got = await chrome.storage.local.get('demo_custom_players'); return got; } `, @@ -57,13 +57,13 @@ function start() { return 1; } }); it('resolves a storage key to every symbol whose body holds it', () => { - const ids = queries().findNodeIdsByLiteral(['bompus_custom_ds_players']); + const ids = queries().findNodeIdsByLiteral(['demo_custom_players']); const names = ids.map((id) => cg.getNode(id)?.name).sort(); expect(names).toEqual(['persistRows', 'readRows']); }); it('a quoted key in a prose query puts the writers at the top of the subgraph', async () => { - const sub = await cg.findRelevantContext('which modules write "bompus_custom_ds_players" to storage'); + const sub = await cg.findRelevantContext('which modules write "demo_custom_players" to storage'); const rootNames = sub.roots.map((id) => sub.nodes.get(id)?.name); expect(rootNames.slice(0, 2).sort()).toEqual(['persistRows', 'readRows']); expect(rootNames).not.toContain('unrelatedHelper'); @@ -77,7 +77,7 @@ function start() { return 1; } it('CODEGRAPH_LITERAL_SEEDS=0 turns the seed off (the ablation switch)', async () => { process.env.CODEGRAPH_LITERAL_SEEDS = '0'; try { - const sub = await cg.findRelevantContext('bompus_custom_ds_players'); + const sub = await cg.findRelevantContext('demo_custom_players'); const names = [...sub.nodes.values()].map((n) => n.name); expect(names).not.toContain('persistRows'); } finally { @@ -88,12 +88,12 @@ function start() { return 1; } it("a file's rows leave with its nodes on re-index, and a full index clears the table", async () => { fs.writeFileSync(path.join(dir, 'src', 'reader.ts'), `export function readRows() { return null; }\n`); await cg.indexFiles(['src/reader.ts']); - let names = queries().findNodeIdsByLiteral(['bompus_custom_ds_players']).map((id) => cg.getNode(id)?.name); + let names = queries().findNodeIdsByLiteral(['demo_custom_players']).map((id) => cg.getNode(id)?.name); expect(names).toEqual(['persistRows']); fs.rmSync(path.join(dir, 'src', 'writer.ts')); await cg.indexAll(); - expect(queries().findNodeIdsByLiteral(['bompus_custom_ds_players'])).toEqual([]); + expect(queries().findNodeIdsByLiteral(['demo_custom_players'])).toEqual([]); }); }); @@ -113,7 +113,7 @@ describe('literal seeds — explore renders the holder file', () => { fs.mkdirSync(path.join(dir, 'callers'), { recursive: true }); fs.writeFileSync( path.join(dir, 'shared', 'bag.ts'), - `const BAG_KEY = 'bompus_custom_ds_players'; + `const BAG_KEY = 'demo_custom_players'; export function persistBag(rows: unknown[]) { chrome.storage.local.set({ [BAG_KEY]: rows }); } @@ -153,7 +153,7 @@ export function storageWriter${i}() { it('the file holding the quoted key takes the first source slot', async () => { const res = await handler.execute('codegraph_explore', { - query: 'which modules write "bompus_custom_ds_players" to storage', + query: 'which modules write "demo_custom_players" to storage', maxFiles: 1, }); const text = res.content[0].text as string; @@ -180,7 +180,7 @@ describe('literal seeds — every holder reaches the subgraph past the entry cap fs.writeFileSync( path.join(dir, 'src', `holder${i}.ts`), `export function write${i}(rows: unknown[]) { - chrome.storage.local.set({ 'bompus_custom_ds_players': rows }); + chrome.storage.local.set({ 'demo_custom_players': rows }); } `, ); @@ -195,14 +195,14 @@ describe('literal seeds — every holder reaches the subgraph past the entry cap }); it('all holders are roots with the default searchLimit of 3', async () => { - const sub = await cg.findRelevantContext('which modules write "bompus_custom_ds_players" to storage'); + const sub = await cg.findRelevantContext('which modules write "demo_custom_players" to storage'); const rootFiles = new Set(sub.roots.map((id) => sub.nodes.get(id)?.filePath)); expect(rootFiles.size).toBe(N); }); it('explore renders every holder with the default file cap', async () => { const res = await new ToolHandler(cg).execute('codegraph_explore', { - query: 'which modules write "bompus_custom_ds_players" to storage', + query: 'which modules write "demo_custom_players" to storage', }); const text = res.content[0].text as string; const sourced = [...text.matchAll(/^\*\*`(.+?)`\*\* —/gm)].map((m) => m[1]); diff --git a/__tests__/ts-chained-receiver.test.ts b/__tests__/ts-chained-receiver.test.ts index af703f0975..c7ec4fe385 100644 --- a/__tests__/ts-chained-receiver.test.ts +++ b/__tests__/ts-chained-receiver.test.ts @@ -25,7 +25,7 @@ beforeAll(async () => { w( 'storage.ts', 'declare const chrome: any;\n' + - 'export const DraftHubStorage = {\n' + + 'export const AppStorage = {\n' + ' async get(key: string): Promise {\n' + ' const result = await chrome.storage.local.get([key]);\n' + ' return result[key];\n' + diff --git a/__tests__/ts-this-field-call.test.ts b/__tests__/ts-this-field-call.test.ts index 4760bce493..9a9a277c8c 100644 --- a/__tests__/ts-this-field-call.test.ts +++ b/__tests__/ts-this-field-call.test.ts @@ -51,16 +51,16 @@ beforeAll(async () => { // A field typed as the type OF a value: an object literal used as a namespace. w( 'storage.ts', - 'export const DraftHubStorage = {\n' + + 'export const AppStorage = {\n' + ' async get(key: string): Promise { return key; },\n' + ' async getSettings(): Promise { return {}; },\n' + '};\n' ); w( 'keeper.ts', - "import { DraftHubStorage } from './storage';\n" + + "import { AppStorage } from './storage';\n" + 'export class Keeper {\n' + - ' constructor(private readonly storage: typeof DraftHubStorage) {}\n' + + ' constructor(private readonly storage: typeof AppStorage) {}\n' + ' async get(key: string): Promise { return this.storage.get(key); }\n' + ' async settings(): Promise { return this.storage.getSettings(); }\n' + '}\n' @@ -116,8 +116,8 @@ describe('this..() (#1496)', () => { it('resolves a field typed `typeof ` onto the literal\'s member', () => { // The members are functions inside the constant's extent (#1573), qualified // under it (#2300). - expect(calleesOf('Keeper::settings')).toEqual(['DraftHubStorage::getSettings']); - expect(calleesOf('Keeper::get')).toEqual(['DraftHubStorage::get']); + expect(calleesOf('Keeper::settings')).toEqual(['AppStorage::getSettings']); + expect(calleesOf('Keeper::get')).toEqual(['AppStorage::get']); const self = cg.getCallers(method('Keeper::get').id).some(({ node }) => node.id === method('Keeper::get').id); expect(self).toBe(false); }); diff --git a/__tests__/window-message-synthesizer.test.ts b/__tests__/window-message-synthesizer.test.ts index b11ab7303e..8c9bb565ab 100644 --- a/__tests__/window-message-synthesizer.test.ts +++ b/__tests__/window-message-synthesizer.test.ts @@ -20,7 +20,7 @@ describe('window-message synthesizer', () => { it('links a publisher to the listener that checks the same source discriminator', async () => { fs.writeFileSync(path.join(dir, 'constants.ts'), - 'export const MESSAGES = { TTD_AJAX_EVENT: "BOMPUS_TTD_AJAX", OTHER_EVENT: "BOMPUS_OTHER" };\n'); + 'export const MESSAGES = { TTD_AJAX_EVENT: "DEMO_AJAX", OTHER_EVENT: "DEMO_OTHER" };\n'); fs.writeFileSync(path.join(dir, 'publish.ts'), `import { MESSAGES } from "./constants"; export function publishTtdLivewire() { window.postMessage({ source: MESSAGES.TTD_AJAX_EVENT, payload: {} }, "*"); @@ -56,7 +56,7 @@ export function listenWithoutCheck() { it('does not pair a string discriminator with a different member name', async () => { fs.writeFileSync(path.join(dir, 'a.ts'), `export function send() { - window.postMessage({ source: "BOMPUS_TTD_AJAX" }, "*"); + window.postMessage({ source: "DEMO_AJAX" }, "*"); } `); fs.writeFileSync(path.join(dir, 'b.ts'), `export function listen() { diff --git a/docs/benchmarks/fork-vs-upstream-2026-09-26.md b/docs/benchmarks/fork-vs-upstream-2026-09-26.md index 068a84aea4..637b407528 100644 --- a/docs/benchmarks/fork-vs-upstream-2026-09-26.md +++ b/docs/benchmarks/fork-vs-upstream-2026-09-26.md @@ -33,11 +33,11 @@ n8n (Vue and TypeScript) and re-measures every corpus on one newer fork build. - n8n (Vue and TypeScript) `7cc0450a` Shallow clones, no dependencies installed. -- **Discarded runs.** Runs that a live draft room on the host refused or - contended were thrown away and re-run. The first n8n runs came from an +- **Discarded runs.** Runs disrupted by another job on the host were + thrown away and re-run. The first n8n runs came from an incomplete clone (about 7.5% of files missing) and were discarded; every n8n - number below comes from a verified complete checkout. n8n was measured while a - draft room was active, and its pairs vary by about 10% (upstream 99.8 and + number below comes from a verified complete checkout. n8n was measured while another + job was active, and its pairs vary by about 10% (upstream 99.8 and 111.7 s, fork 103.8 and 92.8 s). ## Full index: fork vs upstream (Node 24) @@ -151,7 +151,7 @@ in the README. | supabase | 3.88 s, 973 MiB | 3.48 s, 977 MiB | | n8n | 6.66 s, 1,230 MiB | 6.24 s, 1,236 MiB | -A live draft room paused the run after CPython; the last three corpora ran +Another job on the host paused the run after CPython; the last three corpora ran once it ended, at a 1-minute load of 2–4 from other sessions. Supabase's base syncs spread from 3.55 s to 4.37 s, so its difference is mostly noise. The base column also sits below the second round's right-hand figures (pretix 1.85 diff --git a/docs/design/kernel-only-extraction-plan.md b/docs/design/kernel-only-extraction-plan.md index 47cd1c2fbc..f3563fa6e3 100644 --- a/docs/design/kernel-only-extraction-plan.md +++ b/docs/design/kernel-only-extraction-plan.md @@ -204,7 +204,7 @@ On Node the per-worker WASM grammar heap is about 5 MB per worker, not the 60 MB ### Windows validation (2026-09-12) -Run on the Windows host itself (Windows-local checkout under `C:\Users\bompus\src\codegraph-win`, Node 26.8.1, MSVC Build Tools 18 / 14.51, cargo 1.98.1, Git Bash for the build script), against `fork/consolidated` at `de37daee` plus the fix below: +Run on the Windows host itself (Windows-local checkout under `\codegraph-win`, Node 26.8.1, MSVC Build Tools 18 / 14.51, cargo 1.98.1, Git Bash for the build script), against `fork/consolidated` at `de37daee` plus the fix below: | Step | Result | |---|---| diff --git a/docs/design/resolution-binding-model-plan.md b/docs/design/resolution-binding-model-plan.md index 73aa6cda89..a58793b51b 100644 --- a/docs/design/resolution-binding-model-plan.md +++ b/docs/design/resolution-binding-model-plan.md @@ -173,7 +173,7 @@ Tests: `__tests__/bindings-tsjs.test.ts` (every new row form) and `__tests__/bin **Follow-up, kind eligibility for bare calls (same day).** A receiver-less JS/TS call may only resolve to a function, class, component, constant or variable (`BARE_CALL_TARGET_KINDS`, `name-matcher.ts`). The rule rejects the candidate exact-match would commit to; it does not filter the candidate set. The filtering form was tried first and manufactured 192 edges on vitest (dropping the property candidates from a crowd left a lone wrong survivor: every dynamic `import(...)` landed on a function named `import`, `trace()` on a Vue constant); the rejection form lost 102 property-target edges and gained 2 fuzzy ones. Corpus totals after: vite 28,826 → 28,688, vitest 74,987 → 74,887, svelte 70,603 → 70,589, all cases held. Goldens: the `a()` → Dart `enum_member` edge and an `expensive()` → Swift `field` edge are gone. -**Windows validation (2026-09-12).** `fork/consolidated` at `91902770` (PRs #29, #30, #31) on the Windows-local checkout (`C:\Users\bompus\src\codegraph-win`, Node 26.8.1, cargo 1.98.1, MSVC): `npm ci`, `bash scripts/build-kernel.sh` (53 s, 76 MB `win32-x64` prebuild, no source change needed), `npm run build`; the 14 binding-model and kernel suites pass (426 tests, golden dumps byte-identical), and the full suite passes: 268 files, 4,736 tests, 7 files skipped by the POSIX-only gates. +**Windows validation (2026-09-12).** `fork/consolidated` at `91902770` (PRs #29, #30, #31) on the Windows-local checkout (`\codegraph-win`, Node 26.8.1, cargo 1.98.1, MSVC): `npm ci`, `bash scripts/build-kernel.sh` (53 s, 76 MB `win32-x64` prebuild, no source change needed), `npm run build`; the 14 binding-model and kernel suites pass (426 tests, golden dumps byte-identical), and the full suite passes: 268 files, 4,736 tests, 7 files skipped by the POSIX-only gates. **Windows validation of Phase 3 (2026-09-12).** `fork/consolidated` at `105210e3` (PRs #33 to #37: Python, Go, Java/Kotlin, PHP, C/C++) on the same Windows checkout: `npm ci`, `bash scripts/build-kernel.sh` (31 s, 76 MB `win32-x64` prebuild, no source change needed), `npm run build`; the 11 binding-model and kernel suites pass (995 tests, golden dumps byte-identical), and the full suite passes: 273 files, 4,766 tests, 7 files skipped by the POSIX-only gates. diff --git a/scripts/precision/bisect-case.sh b/scripts/precision/bisect-case.sh index 32d81135e2..f4bc5e89a4 100644 --- a/scripts/precision/bisect-case.sh +++ b/scripts/precision/bisect-case.sh @@ -10,8 +10,10 @@ # A step that cannot score the case (kernel build fails, runner errors, the # case is absent from the report) ABORTS the bisect with 255 rather than # skipping with 125: a systematic failure otherwise skips every commit and the -# bisect ends with nothing learned. Step logs go to $BISECT_LOGS. Run the -# precision runner once first so the corpus is already checked out. +# bisect ends with nothing learned. Step logs go to $BISECT_LOGS (default: +# bisect- under ${XDG_STATE_HOME:-$HOME/.local/state}/codegraph, a +# per-user folder that stays the same from step to step). Run the precision +# runner once first so the corpus is already checked out. # # `git bisect run` exports GIT_DIR naming this repository; the runner (and the # indexer under it) would then run every corpus git command against the engine. @@ -23,7 +25,7 @@ case_id="${2:?usage: bisect-case.sh }" : "${EVAL_REPOS:?set EVAL_REPOS to the directory holding the corpus checkout}" engine="$(git rev-parse --show-toplevel)" sha="$(git rev-parse --short HEAD)" -logs="${BISECT_LOGS:-${XDG_DATA_HOME:-$HOME/.local/share}/agent-documents/tmp/bisect-$corpus}" +logs="${BISECT_LOGS:-${XDG_STATE_HOME:-$HOME/.local/state}/codegraph/bisect-$corpus}" mkdir -p "$logs" log="$logs/$sha.log" for v in $(git rev-parse --local-env-vars); do unset "$v"; done diff --git a/src/extraction/literal-capture.ts b/src/extraction/literal-capture.ts index bbb322d957..36ac65f70a 100644 --- a/src/extraction/literal-capture.ts +++ b/src/extraction/literal-capture.ts @@ -18,7 +18,7 @@ const MAX_LITERALS_PER_NODE = 32; * A value qualifies when it looks like an identifier an agent would quote * back verbatim: leading letter or underscore (or a `-`/`--` flag prefix), * only identifier, path, and namespace characters, and at least one - * separator — `bompus_draft_state`, `--start`, `draft.pick`, `api/v1/users`. + * separator — `demo_draft_state`, `--start`, `draft.pick`, `api/v1/users`. * A plain word (`ready`, `Error`) has no separator and stays out: it would * seed on every function that logs it. */ diff --git a/src/mcp/tools.ts b/src/mcp/tools.ts index 853af84960..1eb8afdccc 100644 --- a/src/mcp/tools.ts +++ b/src/mcp/tools.ts @@ -1034,12 +1034,12 @@ const SUMMARY_SENTINEL = '[[codegraph-explore-summary]]'; * tracker, backlog, runbook, readme…) AND matches ≥2 distinct query terms in a * markdown file's path or headings — seeds that file's best-matching SECTIONS. * Why a separate pass: the general FTS gather spends each term's small result - * budget on code symbols (`warRoom*` for "War Room"), so the doc never enters + * budget on code symbols (`statusBoard*` for "Status Board"), so the doc never enters * the candidate pool; and when it does, the ranker's first real key is random- * walk mass over call edges, which markdown never has, so a code file sharing * one word outranks the named doc. A markdown-scoped search per term keeps code * names from crowding the doc out; the doc-word + ≥2-term guard keeps a code - * question that merely shares a word ("War Room popout") from pulling a plan + * question that merely shares a word ("Status Board popout") from pulling a plan * file above the code. Sections, not files, are the seeds so the render shows * the answer section first instead of a whole 25k-char file. */ @@ -1104,8 +1104,8 @@ function collectDocSeeds(cg: CodeGraph, query: string, maxFiles = 2): DocSeed[] .filter((n) => n.kind === 'module' && n.language === 'markdown') .sort((a, b) => a.startLine - b.startLine); const hits = termScore(lp + ' ' + headings.map((h) => h.name).join(' ')); - // The two-hit rule keeps a code question that merely shares a word ("War - // Room popout") from pulling a plan file above the code. A query with one + // The two-hit rule keeps a code question that merely shares a word ("Status + // Board popout") from pulling a plan file above the code. A query with one // significant term cannot reach 2, and having passed DOC_WORD that term IS // the doc word, so there is no code question left to protect against. if (!named && !namedStem && hits < Math.min(2, terms.length)) continue; @@ -1120,10 +1120,10 @@ function collectDocSeeds(cg: CodeGraph, query: string, maxFiles = 2): DocSeed[] try { fileLines = readFileSync(abs, 'utf-8').split('\n'); } catch { continue; } const fileSpan = Math.max(1, ...headings.map((h) => h.endLine)); const isWrapper = (h: Node) => headings.length >= 4 && (h.endLine - h.startLine) > fileSpan * 0.6; - // A term is worth its rarity in this file ("room" on every line of a War - // Room tracker says nothing; "blocker" on three lines points at the answer), + // A term is worth its rarity in this file ("board" on every line of a Status + // Board tracker says nothing; "blocker" on three lines points at the answer), // and a line counts only when two distinct terms meet on it. A term that - // names the file ("war", "sync" against PLAN-war-room-sync-validation.md) + // names the file ("status", "sync" against PLAN-status-board-sync-validation.md) // located the file and says nothing about which line: agents echo the file // name into the query, and those tokens would outvote the one that matters. const lower = fileLines.map((l) => l.toLowerCase());