Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
85 commits
Select commit Hold shift + click to select a range
a677457
test(eval): freeze ContextBench benchmark protocol
PatrickSys Apr 27, 2026
dd1433b
docs: preserve hidden local work before cleanup
PatrickSys May 1, 2026
51562f7
test(eval): add map-quality diagnostic harness
PatrickSys May 1, 2026
53c5fff
test(eval): freeze map-quality fixtures
PatrickSys May 1, 2026
ac0bc94
test(eval): split map-quality support fixtures
PatrickSys May 1, 2026
77b5586
test(eval): enforce map-quality gates
PatrickSys May 1, 2026
748712f
feat: make client setup local by default
PatrickSys Aug 13, 2026
8a167a3
docs: align public setup and benchmark evidence
PatrickSys Aug 13, 2026
f31ee83
docs: preserve benchmark evidence and correct comparison claims
PatrickSys Oct 6, 2026
c3a6792
docs: align client setup with published package behavior
PatrickSys Oct 6, 2026
c87353b
docs: align capability and CLI guides with published setup
PatrickSys Oct 6, 2026
9236a65
feat: add model-free indexing and current source relationships
PatrickSys Oct 11, 2026
129ad6b
Await filesystem casing probe before starting search assertion
PatrickSys Oct 11, 2026
49d9cea
fix: keep local agent context current and verifiable
PatrickSys Oct 15, 2026
a9eff27
test: freeze identifier nomination behavior
PatrickSys Oct 15, 2026
886aeb0
test: freeze grounded rescue nomination controls
PatrickSys Oct 15, 2026
ae3c3c8
test: freeze supplemental public retrieval queries
PatrickSys Oct 15, 2026
f01bb03
test: align supplemental query IDs with eval schema
PatrickSys Oct 15, 2026
5b1b629
test: freeze general rescue density controls
PatrickSys Oct 15, 2026
22f4468
test: freeze structural context regression cases
PatrickSys Oct 15, 2026
2210581
test: freeze analyzer routing source facts
PatrickSys Oct 15, 2026
6672b85
Preserve current source declarations in model-free search
PatrickSys Oct 15, 2026
37fdd12
Freeze Angular declaration source facts
PatrickSys Oct 15, 2026
bd756bc
Preserve Angular method ownership in indexed context
PatrickSys Oct 15, 2026
1726644
fix: route help to CLI usage
PatrickSys Oct 16, 2026
2c411c7
test: keep the original help response timeout
PatrickSys Oct 16, 2026
ae6b97c
fix: bound indexing memory and restore EOF exit
PatrickSys Oct 16, 2026
3eb86fd
docs: align release wording with the current setup
PatrickSys Oct 16, 2026
694bd72
fix: report omitted chunks at index limits
PatrickSys Oct 16, 2026
69b9ff2
fix: share bounded ONNX thread budget across local models
PatrickSys Oct 16, 2026
ad6fe5a
Merge remote-tracking branch 'origin/master' into j11/memory
PatrickSys Oct 16, 2026
a602c1f
fix: explain when indexing leaves code out of search
PatrickSys Oct 16, 2026
e148606
Set up detected coding tools together
PatrickSys Oct 16, 2026
9885166
Allow time for a cold package install
PatrickSys Oct 16, 2026
fd82b9f
fix: report index caps and drop false backend conventions
cursoragent Oct 30, 2026
ebc1324
fix: narrow edit preflight outside the shared search module
cursoragent Oct 30, 2026
ae18046
fix(mcp): lead tool descriptions with their purpose
PatrickSys Oct 31, 2026
df82422
fix(mcp): validate memory inputs before writing
PatrickSys Oct 31, 2026
b95155e
fix(mcp): bound pattern memories and reject invalid categories
PatrickSys Oct 31, 2026
22c09ba
fix: preserve keyword candidates across matching files
PatrickSys Oct 31, 2026
71c16da
docs: bound retrieval repair claims to reproducible evidence
PatrickSys Oct 31, 2026
69f85a0
docs: distinguish published beta from stable and local npx resolution
PatrickSys Nov 4, 2026
206a60e
docs: clarify published beta status in changelog
PatrickSys Nov 4, 2026
2cf45c9
fix(cli): disclose incomplete search coverage
PatrickSys Nov 6, 2026
7a3f4c6
fix(cli): pin Codex setup help to the published beta
PatrickSys Nov 6, 2026
6ba70b2
fix(cli): expose verified relationship traversal
PatrickSys Nov 7, 2026
b9c8117
fix(search): retain bounded source context with exact preview ranges
PatrickSys Nov 7, 2026
9fd547b
fix(search): direct source reads for bounded evidence
PatrickSys Nov 7, 2026
3c4e6cb
fix(search): ground continuation hints in indexed edges
PatrickSys Nov 7, 2026
0c4d17f
fix(search): keep lexical rescue evidence with its chunk
PatrickSys Nov 7, 2026
6b53073
WIP 157 convention exemplars: uncommitted edits rescued before disk c…
PatrickSys Dec 6, 2026
9faec02
WIP rescued by L27 from C:\Users\bitaz\runs\cbc-dogfood-20261020\mast…
PatrickSys Dec 6, 2026
9a0a289
WIP rescued by L27 from E:\assist-runs\day-20261204\L9\jobs\t3-157\co…
PatrickSys Dec 6, 2026
62748bf
WIP rescued by L27 from E:\assist-runs\night-20261106\cb1-cbc\repo (1…
PatrickSys Dec 6, 2026
cfcbe33
WIP rescued by L27 from E:\assist-runs\night-20261106\n04-cbc-adapter…
PatrickSys Dec 6, 2026
b5f7daa
WIP rescued by L27 from E:\runs\day-20261103\cbc-pro-v2-160\ci-probe …
PatrickSys Dec 6, 2026
da50cf8
WIP rescued by L27 from E:\runs\day-20261103\cbc-pro-v2-160\source (9…
PatrickSys Dec 6, 2026
dfd3680
WIP rescued by L27 from C:\wt\cbc-front-door (1 uncommitted files)
PatrickSys Dec 6, 2026
5baacd1
WIP rescued by L27 from C:\wt\cbc-help (1 uncommitted files)
PatrickSys Dec 6, 2026
5b549f5
WIP rescued by L27 from C:\wt\cbc-night-init (1 uncommitted files)
PatrickSys Dec 6, 2026
21da481
WIP rescued by L27 from E:\assist-runs\night-20261106\or-cbc\repo (1 …
PatrickSys Dec 6, 2026
4530854
WIP rescued by L27 from C:\Users\bitaz\runs\cbc-dogfood-20261020\mast…
PatrickSys Dec 6, 2026
af4d56f
Merge rescue/l27-runs-day-20261103-cbc-pro-v2-160-ci-probe-origin-rec…
PatrickSys Dec 6, 2026
b092381
Merge rescue/l27-wt-cbc-final-smoke-j11-memory
PatrickSys Dec 6, 2026
05c6a87
Merge rescue/l27-assist-runs-night-20261106-n04-cbc-adapter-candidate…
PatrickSys Dec 6, 2026
dd05932
Merge rescue/l27-runs-cc-mcp-ux-20261030-repo-fix-mcp-ux-20261030
PatrickSys Dec 6, 2026
a85b34f
Merge rescue/l27-runs-cc-retrieval-20261030-repo-feat-retrieval-file-…
PatrickSys Dec 6, 2026
094638b
Merge rescue/l27-runs-day-20261103-cbc-pro-v2-160-ci-probe-origin-can…
PatrickSys Dec 6, 2026
9b1c896
Merge rescue/l27-assist-runs-night-20261106-cb1-cbc-repo-wip
PatrickSys Dec 6, 2026
3edd1a8
Merge rescue/l27-runs-day-20261103-cbc-pro-v2-160-ci-probe-wip
PatrickSys Dec 6, 2026
75be42a
Merge rescue/l27-assist-runs-night-20261106-or-cbc-repo-wip
PatrickSys Dec 6, 2026
6e4d1de
Merge rescue/l27-wt-cbc-night-init-wip
PatrickSys Dec 6, 2026
1555515
Merge rescue/l27-runs-day-20261103-cbc-pro-v2-160-ci-probe-origin-cod…
PatrickSys Dec 6, 2026
b0149f4
Merge rescue/l27-assist-runs-night-20261106-cb1-cbc-repo-cb5-rejected…
PatrickSys Dec 6, 2026
dfba570
Merge rescue/l27-runs-day-20261103-cbc-pro-v2-160-ci-probe-origin-can…
PatrickSys Dec 6, 2026
0c33189
Merge rescue/l27-runs-day-20261103-cbc-pro-v2-160-source-wip
PatrickSys Dec 6, 2026
f1d74bc
Merge rescue/l27-runs-ideaspine-cbc-consumer-20261104-cbc-source-fix-…
PatrickSys Dec 6, 2026
c76f817
Merge rescue/l27-wt-cbc-front-door-wip
PatrickSys Dec 6, 2026
540ebc5
Merge rescue/l27-wt-cbc-help-wip
PatrickSys Dec 6, 2026
8b43f6d
Merge rescue/l27-users-bitaz-runs-cbc-dogfood-20261020-master-wip
PatrickSys Dec 6, 2026
3bdd996
Merge rescue/l27-users-bitaz-runs-cbc-dogfood-20261020-master-wip-453…
PatrickSys Dec 6, 2026
03e66e1
Merge rescue/l27-runs-day-20261103-cbc-pro-v2-160-ci-probe-origin-cod…
PatrickSys Dec 6, 2026
96b1962
Merge rescue/l27-assist-runs-day-20261204-l9-jobs-t3-157-codebase-con…
PatrickSys Dec 6, 2026
f40f271
fix(consolidation): replay vetted changes from clean history
PatrickSys Dec 6, 2026
97443da
fix(indexer): handle Windows writer tickets deleted during resolution
PatrickSys Dec 6, 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
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@
],
"overrides": {
"@modelcontextprotocol/sdk>ajv": "8.18.0",
"@modelcontextprotocol/sdk>@hono/node-server": "1.19.13",
"@modelcontextprotocol/sdk>@hono/node-server": "2.1.3",
"@modelcontextprotocol/sdk>express-rate-limit": "8.5.1",
"express-rate-limit>ip-address": "10.7.4",
"@huggingface/transformers>onnxruntime-node": "1.24.3",
Expand Down
12 changes: 6 additions & 6 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

120 changes: 95 additions & 25 deletions scripts/run-eval.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import { parseArgs } from 'util';
import { readFileSync, writeFileSync, mkdirSync } from 'fs';
import { existsSync } from 'fs';
import { CodebaseIndexer } from '../dist/core/indexer.js';
import { inspectIndexDiskState } from '../dist/core/index-generation.js';
import { CodebaseSearcher } from '../dist/core/search.js';
import { analyzerRegistry } from '../dist/core/analyzer-registry.js';
import { AngularAnalyzer } from '../dist/analyzers/angular/index.js';
Expand All @@ -22,6 +23,11 @@ import {
evaluateDiscoveryFixture,
formatDiscoveryReport
} from '../dist/eval/discovery-harness.js';
import {
combineMapQualitySummaries,
evaluateMapQualityFixture,
formatMapQualityReport
} from '../dist/eval/map-quality-harness.js';
import { getDefaultFixturePaths, resolveEvalMode } from '../dist/eval/run-config.js';

const __dirname = path.dirname(fileURLToPath(import.meta.url));
Expand All @@ -30,21 +36,14 @@ const packageJsonPath = path.join(projectRoot, 'package.json');

const packageJson = JSON.parse(readFileSync(packageJsonPath, 'utf-8'));

const defaultDiscoveryProtocol = path.join(
projectRoot,
'tests',
'fixtures',
'discovery-benchmark-protocol.json'
);

const usage = [
`Usage: node scripts/run-eval.mjs <codebaseA> [codebaseB] [options]`,
``,
`Options:`,
` --mode=<retrieval|discovery|edit-preflight> Select benchmark mode (default: retrieval)`,
` --mode=<retrieval|discovery|edit-preflight|map-quality> Select benchmark mode (default: retrieval)`,
` --fixture-a=<path> Override fixture for codebaseA`,
` --fixture-b=<path> Override fixture for codebaseB`,
` --protocol=<path> Override discovery benchmark protocol`,
` --protocol=<path> Override discovery or map-quality benchmark protocol`,
` --competitor-results=<path> JSON file with comparator metrics for discovery gate evaluation`,
` --output=<path> Write final summary JSON to this file`,
` --skip-reindex Skip re-index phase`,
Expand All @@ -66,15 +65,17 @@ function printHeader(version) {
console.log(`Model: ${process.env.EMBEDDING_MODEL || 'Xenova/bge-small-en-v1.5 (default)'}`);
}

function hasIndexArtifacts(rootPath) {
async function hasIndexArtifacts(rootPath) {
const index = await inspectIndexDiskState(rootPath);
if (index.kind === 'committed') return true;
const contextDir = path.join(rootPath, '.codebase-context');
const keywordIndexPath = path.join(contextDir, 'index.json');
const vectorDirPath = path.join(contextDir, 'index');
return existsSync(keywordIndexPath) && existsSync(vectorDirPath);
}

async function maybeReindex(rootPath, skipReindex) {
if (skipReindex && hasIndexArtifacts(rootPath)) {
if (skipReindex && (await hasIndexArtifacts(rootPath))) {
console.log(`\n--- Phase 1: Skipping re-index (--skip-reindex) ---`);
return;
}
Expand Down Expand Up @@ -107,6 +108,7 @@ async function runSingleEvaluation({
label,
codebasePath,
fixturePath,
protocol,
mode,
skipReindex,
noRerank,
Expand All @@ -127,6 +129,10 @@ async function runSingleEvaluation({
}
console.log(`Path output: ${redactPaths ? 'REDACTED' : 'FULL'}`);

if (mode === 'map-quality' && fixture.slice === 'claim' && skipReindex) {
throw new Error('Claim-bearing map-quality slices require a fresh run. Remove --skip-reindex.');
}

await maybeReindex(resolvedCodebase, skipReindex);

let summary;
Expand All @@ -143,6 +149,22 @@ async function runSingleEvaluation({
fixturePath: resolvedFixture,
summary
});
} else if (mode === 'map-quality') {
if (!protocol) {
throw new Error('map-quality mode requires a protocol fixture');
}
console.log(`\n--- Phase 2: Running ${fixture.tasks.length}-task map-quality harness ---`);
summary = await evaluateMapQualityFixture({
fixture,
fixtureName: path.basename(resolvedFixture),
protocol,
rootPath: resolvedCodebase
});
report = formatMapQualityReport({
codebaseLabel: label,
fixturePath: resolvedFixture,
summary
});
} else if (mode === 'edit-preflight') {
console.log(`\n--- Phase 2: Running ${fixture.tasks.length}-task edit-preflight harness ---`);
summary = await evaluateEditPreflightFixture({
Expand Down Expand Up @@ -183,18 +205,24 @@ function printCombinedSummary(summaries, mode) {
const totalTasks = summaries.reduce((sum, summary) => sum + summary.totalTasks, 0);
const avgUsefulness =
totalTasks > 0
? summaries.reduce((sum, summary) => sum + summary.averageUsefulness * summary.totalTasks, 0) /
totalTasks
? summaries.reduce(
(sum, summary) => sum + summary.averageUsefulness * summary.totalTasks,
0
) / totalTasks
: 0;
const avgPayload =
totalTasks > 0
? summaries.reduce((sum, summary) => sum + summary.averagePayloadBytes * summary.totalTasks, 0) /
totalTasks
? summaries.reduce(
(sum, summary) => sum + summary.averagePayloadBytes * summary.totalTasks,
0
) / totalTasks
: 0;
const avgTokens =
totalTasks > 0
? summaries.reduce((sum, summary) => sum + summary.averageEstimatedTokens * summary.totalTasks, 0) /
totalTasks
? summaries.reduce(
(sum, summary) => sum + summary.averageEstimatedTokens * summary.totalTasks,
0
) / totalTasks
: 0;

console.log(`\n=== Combined Discovery Summary ===`);
Expand All @@ -205,6 +233,21 @@ function printCombinedSummary(summaries, mode) {
return;
}

if (mode === 'map-quality') {
const combined = combineMapQualitySummaries(summaries);
console.log(`\n=== Combined Map Quality Summary ===`);
console.log(`Average task score: ${(combined.averageTaskScore * 100).toFixed(0)}%`);
console.log(`Gate: ${combined.gate.status}`);
console.log(
`Rendered budget: ${combined.budget.renderedBytes} bytes / ${combined.budget.estimatedTokens} tok`
);
console.log(
`Rendered ceiling: ${combined.budget.renderedWithinBudget ? 'pass' : 'fail'} | Structural caps: ${combined.budget.structuralWithinBudget ? 'pass' : 'fail'}`
);
console.log(`====================================\n`);
return;
}

if (mode === 'edit-preflight') {
const combined = combineEditPreflightSummaries(summaries);
console.log(`\n=== Combined Edit Preflight Summary ===`);
Expand Down Expand Up @@ -263,7 +306,7 @@ async function main() {
'fixture-b': { type: 'string' },
protocol: { type: 'string' },
'competitor-results': { type: 'string' },
'output': { type: 'string' }
output: { type: 'string' }
},
allowPositionals: true
});
Expand Down Expand Up @@ -292,11 +335,12 @@ async function main() {
: defaultFixtures.fixtureB;
const protocolPath = values.protocol
? path.resolve(values.protocol)
: defaultDiscoveryProtocol;
: (defaultFixtures.protocol ?? null);
const comparatorResultsPath = values['competitor-results']
? path.resolve(values['competitor-results'])
: null;
const outputPath = values['output'] ? path.resolve(values['output']) : null;
const mapProtocol = mode === 'map-quality' && protocolPath ? loadFixture(protocolPath) : null;

const sharedOptions = {
mode,
Expand All @@ -309,6 +353,7 @@ async function main() {
label: 'A',
codebasePath: codebaseA,
fixturePath: fixtureA,
protocol: mapProtocol,
...sharedOptions
});

Expand All @@ -319,6 +364,7 @@ async function main() {
label: 'B',
codebasePath: codebaseB,
fixturePath: fixtureB,
protocol: mapProtocol,
...sharedOptions
});

Expand All @@ -328,7 +374,9 @@ async function main() {
if (mode === 'discovery') {
const combinedSummary = combineDiscoverySummaries(summaries);
const protocol = loadFixture(protocolPath);
const comparatorEvidence = comparatorResultsPath ? loadFixture(comparatorResultsPath) : undefined;
const comparatorEvidence = comparatorResultsPath
? loadFixture(comparatorResultsPath)
: undefined;
const gate = evaluateDiscoveryGate({
summary: combinedSummary,
protocol,
Expand All @@ -337,11 +385,13 @@ async function main() {
});
combinedSummary.gate = gate;
printCombinedSummary([combinedSummary], mode);
console.log(formatDiscoveryReport({
codebaseLabel: 'combined-suite',
fixturePath: protocolPath,
summary: combinedSummary
}));
console.log(
formatDiscoveryReport({
codebaseLabel: 'combined-suite',
fixturePath: protocolPath,
summary: combinedSummary
})
);
if (outputPath) {
const outputDir = path.dirname(outputPath);
if (!existsSync(outputDir)) mkdirSync(outputDir, { recursive: true });
Expand All @@ -351,6 +401,26 @@ async function main() {
process.exit(gate.status === 'failed' ? 1 : 0);
}

if (mode === 'map-quality') {
const combinedSummary = combineMapQualitySummaries(summaries);
printCombinedSummary(summaries, mode);
console.log(
formatMapQualityReport({
codebaseLabel: 'combined-suite',
fixturePath: protocolPath ?? fixtureA,
summary: combinedSummary
})
);
if (outputPath) {
const outputDir = path.dirname(outputPath);
if (!existsSync(outputDir)) mkdirSync(outputDir, { recursive: true });
writeFileSync(outputPath, JSON.stringify(combinedSummary, null, 2));
console.log(`\nResults written to: ${outputPath}`);
}
process.exitCode = combinedSummary.gate.status === 'passed' ? 0 : 1;
return;
}

if (mode === 'edit-preflight') {
const combinedSummary = combineEditPreflightSummaries(summaries);
printCombinedSummary(summaries, mode);
Expand Down
Loading
Loading