Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
3892e7d
chore: gitignore napi-generated artifacts in crates/codegraph-core
carlos-alm Jun 13, 2026
ef8ea4f
chore(tests): remove unused biome suppression in visitor.test.ts
carlos-alm Jun 13, 2026
a372b82
fix(titan-run): sync --start-from enum and phase-timestamp list with …
carlos-alm Jun 13, 2026
9a52c7c
fix(hooks): track Bash file modifications via before/after git status…
carlos-alm Jun 13, 2026
85a26df
chore(native): remove dead code (unused var, method, variant, fields)
carlos-alm Jun 13, 2026
184d221
refactor(native): extract emit_pts_alias_edges params into PtsAliasCt…
carlos-alm Jun 13, 2026
909e1df
fix(wasm): sort call targets by confidence before emit to match nativ…
carlos-alm Jun 13, 2026
66fc899
fix(bench): add 2 warmup runs and raise INCREMENTAL_RUNS to 5 for inc…
carlos-alm Jun 13, 2026
84e1a5f
ci(bench): add per-PR perf canary for extractor/graph/native changes
carlos-alm Jun 13, 2026
d07b358
fix(perf): plumb symbolsOnly through parseFilesWasmInline to skip ana…
carlos-alm Jun 13, 2026
3db5d8c
fix(perf): scope runPostNativeCha to changed files on incremental builds
carlos-alm Jun 13, 2026
8b3aa3d
fix(native): add post-pass phase timings to result.phases
carlos-alm Jun 13, 2026
fd4ffd1
fix(perf): correct INLINE_BACKFILL_THRESHOLD docstring; raise thresho…
carlos-alm Jun 13, 2026
498ee21
fix(perf): guard post-native passes against unnecessary work on 1-fil…
carlos-alm Jun 13, 2026
61a9839
chore(types): remove dead protoMethodsMs field and stale comment
carlos-alm Jun 13, 2026
5f5d4d2
fix: class-scope field annotation typeMap keys to prevent cross-class…
carlos-alm Jun 13, 2026
29dd101
fix(bench): update elixir/julia/objc expected-edges to module-qualifi…
carlos-alm Jun 13, 2026
9320ed2
fix(wasm): emit receiver edges for declaration-typed locals in C++/CUDA
carlos-alm Jun 13, 2026
7313330
fix(native): resolve Go factory and Python constructor receiver types…
carlos-alm Jun 13, 2026
f93d0cb
fix: align enclosing-caller attribution for variable bindings (haskel…
carlos-alm Jun 13, 2026
1915e5e
chore(lint): fix unused import and formatting in cpp/cuda extractors …
carlos-alm Jun 13, 2026
7095ffe
fix: align Java interface dispatch across wasm/native/hybrid
carlos-alm Jun 13, 2026
4aced08
fix: use setTypeMapEntry in cpp/cuda extractors and extract CHA_DISPA…
carlos-alm Jun 13, 2026
7eda366
fix(native): extend Gate B RTA check to cover constructor/function ki…
carlos-alm Jun 13, 2026
7a65225
fix: resolve merge conflicts with main
carlos-alm Jun 13, 2026
5fba9d0
fix: resolve merge conflicts with main
carlos-alm Jun 13, 2026
733b0d5
fix: resolve merge conflicts with main
carlos-alm Jun 14, 2026
78b41e0
fix: resolve merge conflicts with main
carlos-alm Jun 14, 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
5 changes: 4 additions & 1 deletion src/domain/graph/builder/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -361,6 +361,9 @@ export function batchInsertEdges(db: BetterSqlite3Database, rows: unknown[][]):
}
}

/** Confidence assigned to CHA-expanded interface/abstract dispatch edges. */
export const CHA_DISPATCH_CONFIDENCE = 0.8;

/**
* CHA (Class Hierarchy Analysis) post-pass.
*
Expand Down Expand Up @@ -514,7 +517,7 @@ export function runChaPostPass(db: BetterSqlite3Database): number {
const key = `${source_id}|${methodNode.id}`;
if (seen.has(key)) continue;
seen.add(key);
newEdges.push([source_id, methodNode.id, 'calls', 0.8, 0, 'cha']);
newEdges.push([source_id, methodNode.id, 'calls', CHA_DISPATCH_CONFIDENCE, 0, 'cha']);
}
}

Expand Down
10 changes: 4 additions & 6 deletions src/domain/graph/builder/stages/native-orchestrator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ import type { PipelineContext } from '../context.js';
import {
batchInsertEdges,
batchInsertNodes,
CHA_DISPATCH_CONFIDENCE,
collectFiles as collectFilesUtil,
fileHash,
fileStat,
Expand Down Expand Up @@ -570,8 +571,8 @@ function runPostNativeCha(
}

// Find existing call edges targeting qualified methods (e.g., 'IWorker.doWork').
// Include the caller node's file so confidence can be computed file-pair-aware,
// matching the WASM path's computeConfidence(callerFile, targetFile, null) - CHA_DISPATCH_PENALTY formula.
// Include caller_file and method_file so affectedFiles can be populated for
// incremental role reclassification; confidence is CHA_DISPATCH_CONFIDENCE matching runChaPostPass.
// When scopeToChangedFiles is true, restrict to call sites in the changed files
// (safe because no hierarchy or RTA evidence changed outside those files).
let callToMethods: Array<{ source_id: number; method_name: string; caller_file: string | null }>;
Expand Down Expand Up @@ -667,10 +668,7 @@ function runPostNativeCha(
const key = `${source_id}|${methodNode.id}`;
if (seen.has(key)) continue;
seen.add(key);
// Use the same hardcoded 0.8 that runChaPostPass (helpers.ts) uses for
// DB-level CHA dispatch edges. This aligns the native orchestrator path
// with the WASM and hybrid paths, which both go through runChaPostPass.
const conf = 0.8;
const conf = CHA_DISPATCH_CONFIDENCE;
newEdges.push([source_id, methodNode.id, 'calls', conf, 0, 'cha']);
newEdgeCount++;
if (caller_file) affectedFiles.add(caller_file);
Expand Down
4 changes: 2 additions & 2 deletions src/extractors/cpp.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import type {
TreeSitterNode,
TreeSitterTree,
} from '../types.js';
import { extractModifierVisibility, findChild, nodeEndLine } from './helpers.js';
import { extractModifierVisibility, findChild, nodeEndLine, setTypeMapEntry } from './helpers.js';

/**
* Extract symbols from C++ files.
Expand Down Expand Up @@ -236,7 +236,7 @@ function handleCppDeclaration(node: TreeSitterNode, ctx: ExtractorOutput): void
if (!nameNode) continue;
const varName = unwrapCppDeclaratorName(nameNode);
if (varName) {
ctx.typeMap.set(varName, { type: typeName, confidence: 0.9 });
setTypeMapEntry(ctx.typeMap, varName, typeName, 0.9);
}
Comment thread
carlos-alm marked this conversation as resolved.
}
}
Expand Down
4 changes: 2 additions & 2 deletions src/extractors/cuda.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import type {
TreeSitterNode,
TreeSitterTree,
} from '../types.js';
import { extractModifierVisibility, findChild, nodeEndLine } from './helpers.js';
import { extractModifierVisibility, findChild, nodeEndLine, setTypeMapEntry } from './helpers.js';

/**
* Extract symbols from CUDA files.
Expand Down Expand Up @@ -236,7 +236,7 @@ function handleCudaDeclaration(node: TreeSitterNode, ctx: ExtractorOutput): void
if (!nameNode) continue;
const varName = extractCudaFieldName(nameNode);
if (varName) {
ctx.typeMap.set(varName, { type: typeName, confidence: 0.9 });
setTypeMapEntry(ctx.typeMap, varName, typeName, 0.9);
}
Comment thread
carlos-alm marked this conversation as resolved.
}
}
Expand Down
Loading