@holmes-lab/holmes-kit 0.35.11 → 0.35.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +20 -0
- package/README.md +1 -0
- package/dist/.build-id +1 -1
- package/dist/holmes/mcp/handlers/maintenance-analysis.js +16 -1
- package/dist/holmes/mcp/maintenance-analyze.d.ts +9 -0
- package/dist/holmes/mcp/maintenance-analyze.js +27 -2
- package/dist/holmes/review/co-change.d.ts +30 -0
- package/dist/holmes/review/co-change.js +69 -0
- package/dist/holmes/review/run-replay.js +8 -3
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,26 @@ All notable changes to this project will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
<!-- @implements A-SPEC-209 -->
|
|
8
|
+
## [0.35.12] - 2026-10-07
|
|
9
|
+
|
|
10
|
+
### Changed
|
|
11
|
+
|
|
12
|
+
- **For a named change, `maintenance_analyze` ranks what else moves by history as well as by the graph**
|
|
13
|
+
(A-SPEC-469.1). When a call passes `changedFiles`, `impacts.rankedImpact` now fuses the graph ranking with
|
|
14
|
+
recency-weighted co-change: which files were committed together with the changed ones in the last 400 commits,
|
|
15
|
+
each shared commit counting `0.5^(age / 50)`, commits touching more than 30 files ignored, the two lists merged
|
|
16
|
+
by reciprocal-rank fusion and the first ten kept. A row keeps its graph `score` (0 for a file the graph did not
|
|
17
|
+
rank) and carries `coChange` when history holds one. Measured through the product path on replayed changes, the
|
|
18
|
+
previous build against this one, history read strictly before each change: a file that really changed with the
|
|
19
|
+
named one is among the ten with recall 0.442 instead of 0.337 on a second, Python repository (79 changes, paired
|
|
20
|
+
+0.105, minimum detectable 0.091; precision +0.019), replicated on 93 further changes (+0.080, minimum
|
|
21
|
+
detectable 0.064); on this repository 0.502 instead of 0.465 (70 changes, +0.037, below the minimum detectable
|
|
22
|
+
0.081 — no detectable change). One read-only `git log` per such call; without git history the list is the graph
|
|
23
|
+
ranking, as before. The list for a request alone (no `changedFiles`) and the ungraded closure the gates read are
|
|
24
|
+
unchanged. **Measured and not adopted:** walking the call graph one or two hops deeper reaches 5 to 14 points
|
|
25
|
+
more of the files that change together per hop, and still loses to the current list at ten on three of four
|
|
26
|
+
windows, because nothing ranks the larger set — depth is unchanged.
|
|
27
|
+
|
|
8
28
|
## [0.35.11] - 2026-10-07
|
|
9
29
|
|
|
10
30
|
### Fixed
|
package/README.md
CHANGED
|
@@ -23,6 +23,7 @@ Measured at `173b99650442` (specs `sha256:215f84d4e9f4`) — reproduce with `hol
|
|
|
23
23
|
|
|
24
24
|
### 🛡️ Currently Supported Features (Production Features)
|
|
25
25
|
|
|
26
|
+
- **What else moves when you change this file — ranked by history too** *(new in 0.35.12)*: when `maintenance_analyze` is given `changedFiles`, its graded impact list (`impacts.rankedImpact`) fuses the call-graph ranking with recency-weighted co-change from git history (files committed together with the changed ones, recent commits counting more). On replayed changes of a second, Python repository a file that really changed with the named one is among the ten shown with recall 0.44 instead of 0.34 (beyond the minimum detectable difference, and replicated on further changes); on this repository the difference is positive and not detectable. Walking the call graph deeper was measured at the same time and not adopted: it reaches more and ranks worse.
|
|
26
27
|
- **The graph states what the code does, and intake answers in one call** *(new in 0.35.11)*: three corrections to what the traceability graph and `requirement_triage` say, each measured before it was built. `requirement_triage` ranked every requirement lineage on the first 64 distinct words of its text; it now reads the whole text (right lineage in the top five: 0.28 → 0.66 on this repository, 0.76 → 0.85 on a second one, both beyond the minimum detectable difference). A call with `persist: true` waits up to 20 seconds for the refresh it requested instead of returning `ambiguous` and asking to be repeated (`HOLMES_TRIAGE_WAIT_MS` sets the bound, 0 turns it off). `maintenance_analyze` lists `relevantTests` in relevance order — tests named after the changed file first — so the ten a bounded response shows are no longer the alphabetically first ten (a test the change also touched is among them with recall 0.48 instead of 0.21 here). TypeScript `calls` edges are bound by the compiler's symbol resolution — 21% of the name-bound edges linked a standard-library call such as `xs.map()` to an unrelated symbol — using only the files the scan already read plus TypeScript's bundled library; and an `@implements` anchor written in or directly above a function links the spec to that function instead of to every function of the file. **What is not claimed:** on replayed changes neither graph correction moved what `maintenance_analyze` returns beyond the minimum detectable difference; they change what the graph states, and the CHANGELOG records one measured cost.
|
|
27
28
|
- **The protected store is recognised however a shell command spells it** *(new in 0.35.2 — security fix, upgrade recommended)*: through 0.35.1 a path into `.ax/specs`, `.ax/ledger`, `.ax/approvals` or `.ax/state` written directly after a shell expansion, a variable, or a character the shell removes at run time was not seen as protected, so a removal, move or overwrite of governance state could pass the gate. The store spelling now counts wherever it appears in a command, and an output redirect to a computed target is not a read. Reads still pass. A directory that merely ends in `.ax` and has a child named like the store's is judged as the store. Limit: a path assembled so the spelling never appears in the command text is outside this rule.
|
|
28
29
|
- **The session-start banner in Codex** *(new in 0.35.8)*: with a runtime registry, `runtime-binding setup --activate-hooks codex` (or the `runtime_binding` tool) adds a SessionStart entry to the workspace's `.codex/hooks.json`, so a Codex session starts by being told which Holmes build governs it and whether autonomous approval is on — as Claude Code sessions are. It runs after you trust it in Codex's `/hooks`. Antigravity passes no hook output to the model, so nothing is wired there.
|
package/dist/.build-id
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
cead5754-muxg0vti
|
|
@@ -34,7 +34,7 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
34
34
|
})();
|
|
35
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
36
|
exports.createMaintenanceAnalysisHandlers = createMaintenanceAnalysisHandlers;
|
|
37
|
-
// @implements A-SPEC-745, A-SPEC-
|
|
37
|
+
// @implements A-SPEC-745, A-SPEC-469.1, A-SPEC-741,A-SPEC-741.1, A-SPEC-612, A-SPEC-100.2, A-SPEC-128, A-SPEC-189, A-SPEC-267, A-SPEC-268, A-SPEC-269, A-SPEC-277, A-SPEC-283, A-SPEC-290, A-SPEC-292, A-SPEC-293, A-SPEC-378, A-SPEC-388, A-SPEC-418, A-SPEC-478, A-SPEC-571.2, A-SPEC-573.4, A-SPEC-578.5, A-SPEC-734, A-SPEC-278.3
|
|
38
38
|
const fs = __importStar(require("node:fs"));
|
|
39
39
|
const path = __importStar(require("node:path"));
|
|
40
40
|
const node_child_process_1 = require("node:child_process");
|
|
@@ -47,6 +47,8 @@ const test_scope_1 = require("../../rtm/test-scope");
|
|
|
47
47
|
const root_1 = require("../../project/root");
|
|
48
48
|
const test_evidence_1 = require("../../review/test-evidence");
|
|
49
49
|
const temporal_prior_1 = require("../../review/temporal-prior");
|
|
50
|
+
const co_change_1 = require("../../review/co-change");
|
|
51
|
+
const test_files_1 = require("../../cpg/test-files");
|
|
50
52
|
const commit_text_1 = require("../../review/commit-text");
|
|
51
53
|
const bundler_1 = require("../../context/bundler");
|
|
52
54
|
const tier_1 = require("../../semantic/tier");
|
|
@@ -213,9 +215,22 @@ function createMaintenanceAnalysisHandlers(context) {
|
|
|
213
215
|
commitTextBoost[hit.file] = hit.score / top;
|
|
214
216
|
}
|
|
215
217
|
catch { /* no history, no boost — the ranking falls back to lexical evidence alone */ }
|
|
218
|
+
// @implements A-SPEC-469.1 — for a NAMED change: what history says changed together with those
|
|
219
|
+
// files, recency-weighted. One bounded read-only `git log`; no history, no signal.
|
|
220
|
+
let coChange;
|
|
221
|
+
const changedSources = (a.changedFiles ?? []).filter((file) => typeof file === 'string' && !(0, test_files_1.isTestFile)(file));
|
|
222
|
+
if (changedSources.length > 0) {
|
|
223
|
+
try {
|
|
224
|
+
const weights = (0, co_change_1.coChangeFromGit)(root, 'HEAD', changedSources);
|
|
225
|
+
if (weights.size > 0)
|
|
226
|
+
coChange = Object.fromEntries(weights);
|
|
227
|
+
}
|
|
228
|
+
catch { /* the graph ranking alone */ }
|
|
229
|
+
}
|
|
216
230
|
const analyzeWith = (defUse) => (0, maintenance_analyze_1.analyzeMaintenance)({
|
|
217
231
|
semantic,
|
|
218
232
|
...common,
|
|
233
|
+
...(coChange !== undefined ? { coChange } : {}),
|
|
219
234
|
coverage: { ...common.coverage, historyStatus },
|
|
220
235
|
history,
|
|
221
236
|
changePrior,
|
|
@@ -102,6 +102,13 @@ export interface MaintenanceAnalysisInput {
|
|
|
102
102
|
* property that lets the replay benchmark run it against a materialised tree.
|
|
103
103
|
*/
|
|
104
104
|
changePrior?: Record<string, number>;
|
|
105
|
+
/**
|
|
106
|
+
* @implements A-SPEC-469.1
|
|
107
|
+
* Recency-weighted co-change of each path with the CHANGED files (`review/co-change.ts`), read by
|
|
108
|
+
* the caller from history up to the analysed state. Used only when `changedFiles` names a file, and
|
|
109
|
+
* only to rank `impacts.rankedImpact`. Absent: that list is the graph ranking alone.
|
|
110
|
+
*/
|
|
111
|
+
coChange?: Record<string, number>;
|
|
105
112
|
/**
|
|
106
113
|
* @implements A-SPEC-388
|
|
107
114
|
* Per-file multipliers from how much each file's COMMIT PROSE talks like the request, normalised
|
|
@@ -311,10 +318,12 @@ export interface MaintenanceAnalysis {
|
|
|
311
318
|
* (HOLMES), the graded top-10's 0.5713 / 0.1611, and both metrics won on all three corpora,
|
|
312
319
|
* which is the bar that A-SPEC-309/313 set and their expansions failed.
|
|
313
320
|
*/
|
|
321
|
+
/** @implements A-SPEC-469.1 — `coChange`: the row's recency-weighted co-change with the changed files, when it has one. */
|
|
314
322
|
rankedImpact: Array<{
|
|
315
323
|
file: string;
|
|
316
324
|
score: number;
|
|
317
325
|
semCos?: number;
|
|
326
|
+
coChange?: number;
|
|
318
327
|
}>;
|
|
319
328
|
/**
|
|
320
329
|
* @implements A-SPEC-289
|
|
@@ -5,7 +5,7 @@ exports.testNameMatches = testNameMatches;
|
|
|
5
5
|
exports.unquoteGitPath = unquoteGitPath;
|
|
6
6
|
exports.analyzeMaintenance = analyzeMaintenance;
|
|
7
7
|
exports.boundAnalysis = boundAnalysis;
|
|
8
|
-
// @implements A-SPEC-745, A-SPEC-745.1, A-SPEC-741, A-SPEC-741.1, A-SPEC-740, A-SPEC-725, A-SPEC-310
|
|
8
|
+
// @implements A-SPEC-745, A-SPEC-745.1, A-SPEC-469.1,A-SPEC-741, A-SPEC-741.1, A-SPEC-740, A-SPEC-725, A-SPEC-310
|
|
9
9
|
// @implements A-SPEC-295
|
|
10
10
|
// @implements A-SPEC-294
|
|
11
11
|
// @implements A-SPEC-293
|
|
@@ -30,6 +30,7 @@ const unreadable_paths_1 = require("../semantic/unreadable-paths");
|
|
|
30
30
|
const dense_retrieval_1 = require("../review/dense-retrieval");
|
|
31
31
|
const test_scope_1 = require("../rtm/test-scope");
|
|
32
32
|
const test_files_1 = require("../cpg/test-files");
|
|
33
|
+
const co_change_1 = require("../review/co-change");
|
|
33
34
|
const scope_1 = require("../review/scope");
|
|
34
35
|
// @implements A-SPEC-469 — the SAME code path the S-484 measurement ran; identity is the reason
|
|
35
36
|
// the measured numbers transfer to the shipped surface.
|
|
@@ -693,7 +694,31 @@ function analyzeMaintenance(input) {
|
|
|
693
694
|
const rankedImpactSeeds = new Map(rankedImpactSeedSymbols
|
|
694
695
|
.flatMap((qualifiedName) => input.graph.codeNodeIds(qualifiedName))
|
|
695
696
|
.map((id) => [id, 1]));
|
|
696
|
-
const
|
|
697
|
+
const graphRankedImpact = (0, assoc_arm_1.pprImpactRanked)((0, assoc_arm_1.graphViewOf)(input.graph.dumpCanonical()), rankedImpactSeeds, new Set(input.changedFiles ?? []), assoc_arm_1.RANKED_IMPACT_K, assoc_arm_1.RANKED_IMPACT_CONFIG);
|
|
698
|
+
// @implements A-SPEC-469.1 — for a NAMED change, fuse the graph ranking with what history says
|
|
699
|
+
// changed together with those files (recency-weighted, supplied by the caller: no I/O here).
|
|
700
|
+
// Reciprocal-rank fusion, the first ten kept. A row keeps its graph score (0 when the graph did not
|
|
701
|
+
// rank the file) and carries its co-change weight. Only scanned, unchanged files can enter — the
|
|
702
|
+
// scan holds no test files. Measured: recall@10 0.337 -> 0.442 on the second corpus, replicated;
|
|
703
|
+
// the request-only list was not measured and is left as it was.
|
|
704
|
+
const rankedImpact = (() => {
|
|
705
|
+
const weights = input.coChange;
|
|
706
|
+
const changed = new Set(input.changedFiles ?? []);
|
|
707
|
+
if (weights === undefined || changed.size === 0)
|
|
708
|
+
return graphRankedImpact;
|
|
709
|
+
const scannedPaths = new Set(scanned.map((file) => file.sourcePath));
|
|
710
|
+
const coList = Object.entries(weights)
|
|
711
|
+
.filter(([file, weight]) => weight > 0 && scannedPaths.has(file) && !changed.has(file))
|
|
712
|
+
.sort((a, b) => b[1] - a[1] || a[0].localeCompare(b[0]))
|
|
713
|
+
.map(([file]) => file);
|
|
714
|
+
if (coList.length === 0)
|
|
715
|
+
return graphRankedImpact;
|
|
716
|
+
const graphRow = new Map(graphRankedImpact.map((row) => [row.file, row]));
|
|
717
|
+
return (0, co_change_1.fuseRanked)(graphRankedImpact.map((row) => row.file), coList).slice(0, assoc_arm_1.RANKED_IMPACT_K).map(({ file }) => ({
|
|
718
|
+
...(graphRow.get(file) ?? { file, score: 0 }),
|
|
719
|
+
...(weights[file] !== undefined && weights[file] > 0 ? { coChange: weights[file] } : {}),
|
|
720
|
+
}));
|
|
721
|
+
})();
|
|
697
722
|
// @implements A-SPEC-486 — the same additive verdict on the graded impact surface: a cached
|
|
698
723
|
// cosine per row, no row added or removed, score untouched.
|
|
699
724
|
{
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
export interface CoChangeOptions {
|
|
2
|
+
/** Commits read, newest first. */
|
|
3
|
+
limit: number;
|
|
4
|
+
/** A commit touching more files than this says nothing about any pair (a mass rename, a release). */
|
|
5
|
+
maxCommitFiles: number;
|
|
6
|
+
/** Age, in commits, at which a shared commit counts half. */
|
|
7
|
+
halfLife: number;
|
|
8
|
+
}
|
|
9
|
+
/** The values measured. Not tuned afterwards: a change here is a new measurement. */
|
|
10
|
+
export declare const CO_CHANGE_DEFAULTS: CoChangeOptions;
|
|
11
|
+
/**
|
|
12
|
+
* Recency-weighted co-change of every path with the seeds, from commits listed newest first.
|
|
13
|
+
* A commit that touches a seed adds `0.5^(age / halfLife)` to every other path it touches; `age` is
|
|
14
|
+
* the commit's position in the list. Seeds themselves are never returned.
|
|
15
|
+
*/
|
|
16
|
+
export declare function coChangeWeights(commits: ReadonlyArray<readonly string[]>, seeds: readonly string[], opts?: CoChangeOptions): Map<string, number>;
|
|
17
|
+
/**
|
|
18
|
+
* The same, read from git: the `limit` non-merge commits reachable from `before`, itself included and
|
|
19
|
+
* nothing after it. Unreadable history is an empty answer, never an error — the caller ranks without
|
|
20
|
+
* the signal.
|
|
21
|
+
*/
|
|
22
|
+
export declare function coChangeFromGit(root: string, before: string, seeds: readonly string[], opts?: CoChangeOptions): Map<string, number>;
|
|
23
|
+
/**
|
|
24
|
+
* Reciprocal-rank fusion of two ranked lists (k = 60, the constant of the original paper, untuned):
|
|
25
|
+
* a file's score is the sum of 1 / (k + rank) over the lists that hold it. Ties keep path order.
|
|
26
|
+
*/
|
|
27
|
+
export declare function fuseRanked(a: readonly string[], b: readonly string[], k?: number): Array<{
|
|
28
|
+
file: string;
|
|
29
|
+
score: number;
|
|
30
|
+
}>;
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CO_CHANGE_DEFAULTS = void 0;
|
|
4
|
+
exports.coChangeWeights = coChangeWeights;
|
|
5
|
+
exports.coChangeFromGit = coChangeFromGit;
|
|
6
|
+
exports.fuseRanked = fuseRanked;
|
|
7
|
+
// @implements A-SPEC-469.1
|
|
8
|
+
// Which files have changed together with these, how often, and how recently? Evolutionary coupling is
|
|
9
|
+
// the oldest evidence there is for "what else moves when I change this" (ROSE, 2004; combined with
|
|
10
|
+
// retrieval in Kagdi et al., 2010), and this repository had tried it once: twelve cases, as a
|
|
11
|
+
// threshold admitting candidates for a request. Measured 2026-10-07 as a RANKING for a named change,
|
|
12
|
+
// fused with the graph ranking: recall@10 0.337 -> 0.442 on the second corpus (n=79, MDE80 0.091),
|
|
13
|
+
// replicated on 93 further cases (+0.080, MDE80 0.064); no detectable loss on this repository.
|
|
14
|
+
const node_child_process_1 = require("node:child_process");
|
|
15
|
+
const bounded_io_1 = require("../project/bounded-io");
|
|
16
|
+
/** The values measured. Not tuned afterwards: a change here is a new measurement. */
|
|
17
|
+
exports.CO_CHANGE_DEFAULTS = { limit: 400, maxCommitFiles: 30, halfLife: 50 };
|
|
18
|
+
/**
|
|
19
|
+
* Recency-weighted co-change of every path with the seeds, from commits listed newest first.
|
|
20
|
+
* A commit that touches a seed adds `0.5^(age / halfLife)` to every other path it touches; `age` is
|
|
21
|
+
* the commit's position in the list. Seeds themselves are never returned.
|
|
22
|
+
*/
|
|
23
|
+
function coChangeWeights(commits, seeds, opts = exports.CO_CHANGE_DEFAULTS) {
|
|
24
|
+
const seedSet = new Set(seeds);
|
|
25
|
+
const weights = new Map();
|
|
26
|
+
if (seedSet.size === 0)
|
|
27
|
+
return weights;
|
|
28
|
+
commits.slice(0, opts.limit).forEach((files, age) => {
|
|
29
|
+
if (files.length > opts.maxCommitFiles || !files.some((file) => seedSet.has(file)))
|
|
30
|
+
return;
|
|
31
|
+
const weight = Math.pow(0.5, age / opts.halfLife);
|
|
32
|
+
for (const file of new Set(files))
|
|
33
|
+
if (!seedSet.has(file))
|
|
34
|
+
weights.set(file, (weights.get(file) ?? 0) + weight);
|
|
35
|
+
});
|
|
36
|
+
return weights;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* The same, read from git: the `limit` non-merge commits reachable from `before`, itself included and
|
|
40
|
+
* nothing after it. Unreadable history is an empty answer, never an error — the caller ranks without
|
|
41
|
+
* the signal.
|
|
42
|
+
*/
|
|
43
|
+
function coChangeFromGit(root, before, seeds, opts = exports.CO_CHANGE_DEFAULTS) {
|
|
44
|
+
if (seeds.length === 0)
|
|
45
|
+
return new Map();
|
|
46
|
+
let raw;
|
|
47
|
+
try {
|
|
48
|
+
// `core.quotePath=false`: non-ASCII paths come out as themselves. A path holding a quote, a tab or
|
|
49
|
+
// a newline is still quoted by git; it then matches no scanned path and simply carries no weight.
|
|
50
|
+
raw = (0, node_child_process_1.execFileSync)('git', ['-C', root, '-c', 'core.quotePath=false', 'log', '--no-merges', `-${opts.limit}`, '--format=%x1e', '--name-only', before], { timeout: bounded_io_1.GIT_TIMEOUT_MS, encoding: 'utf8', maxBuffer: bounded_io_1.GIT_MAX_BUFFER, stdio: ['ignore', 'pipe', 'ignore'] });
|
|
51
|
+
}
|
|
52
|
+
catch {
|
|
53
|
+
return new Map();
|
|
54
|
+
}
|
|
55
|
+
const commits = raw.split('\x1e').slice(1)
|
|
56
|
+
.map((block) => block.split('\n').map((line) => line.trim()).filter((line) => line !== ''));
|
|
57
|
+
return coChangeWeights(commits, seeds, opts);
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Reciprocal-rank fusion of two ranked lists (k = 60, the constant of the original paper, untuned):
|
|
61
|
+
* a file's score is the sum of 1 / (k + rank) over the lists that hold it. Ties keep path order.
|
|
62
|
+
*/
|
|
63
|
+
function fuseRanked(a, b, k = 60) {
|
|
64
|
+
const score = new Map();
|
|
65
|
+
for (const list of [a, b])
|
|
66
|
+
list.forEach((file, i) => score.set(file, (score.get(file) ?? 0) + 1 / (k + i + 1)));
|
|
67
|
+
return [...score.entries()].map(([file, s]) => ({ file, score: s }))
|
|
68
|
+
.sort((x, y) => y.score - x.score || x.file.localeCompare(y.file));
|
|
69
|
+
}
|
|
@@ -36,7 +36,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
36
36
|
exports.uncitedDiffs = uncitedDiffs;
|
|
37
37
|
exports.runReplay = runReplay;
|
|
38
38
|
exports.semanticCaseRanking = semanticCaseRanking;
|
|
39
|
-
// @implements A-SPEC-346, A-SPEC-734, A-SPEC-758
|
|
39
|
+
// @implements A-SPEC-346, A-SPEC-734, A-SPEC-758, A-SPEC-469.1
|
|
40
40
|
// @implements A-SPEC-347
|
|
41
41
|
// @implements A-SPEC-348
|
|
42
42
|
// @implements A-SPEC-349
|
|
@@ -81,6 +81,7 @@ const dense_retrieval_1 = require("./dense-retrieval");
|
|
|
81
81
|
// @implements A-SPEC-472 — the three-arm iteration experiment (static / re-seed / judged).
|
|
82
82
|
const explore_1 = require("../assoc/explore");
|
|
83
83
|
const temporal_prior_1 = require("./temporal-prior");
|
|
84
|
+
const co_change_1 = require("./co-change");
|
|
84
85
|
const commit_text_1 = require("./commit-text");
|
|
85
86
|
const bounded_io_1 = require("../project/bounded-io");
|
|
86
87
|
// @implements A-SPEC-756.1 — the anchor-binding arms: file-level, place, place plus history.
|
|
@@ -716,9 +717,13 @@ async function runReplay(corpus, limit, opts = {}) {
|
|
|
716
717
|
const seed = [...c.files].sort()[0];
|
|
717
718
|
const expected = c.files.filter((f) => f !== seed);
|
|
718
719
|
if (expected.length > 0) {
|
|
720
|
+
// @implements A-SPEC-469.1 — what the product's handler passes for a named change: co-change
|
|
721
|
+
// with the seed, read up to the PARENT and never the answer commit.
|
|
722
|
+
const coChangeWeights = (0, co_change_1.coChangeFromGit)(corpus.root, parent, [seed]);
|
|
723
|
+
const coChange = coChangeWeights.size > 0 ? Object.fromEntries(coChangeWeights) : undefined;
|
|
719
724
|
const run = (0, maintenance_analyze_1.analyzeMaintenance)({
|
|
720
725
|
request: c.subject, scanned, specs, graph, testAnchors: anchors, history: [],
|
|
721
|
-
changedFiles: [seed], changePrior, commitTextBoost,
|
|
726
|
+
changedFiles: [seed], changePrior, commitTextBoost, ...(coChange !== undefined ? { coChange } : {}),
|
|
722
727
|
basis: { head: parent, loadedBuild: 'b', diskBuild: 'b', specFingerprint: 'fp' },
|
|
723
728
|
coverage: { scannedFiles: scanned.length, skippedFiles: [], unsupportedLanguages: [] },
|
|
724
729
|
});
|
|
@@ -736,7 +741,7 @@ async function runReplay(corpus, limit, opts = {}) {
|
|
|
736
741
|
emitCall('compiler', run);
|
|
737
742
|
onNameGraph((byName, g) => emitCall('name', (0, maintenance_analyze_1.analyzeMaintenance)({
|
|
738
743
|
request: c.subject, scanned: byName, specs, graph: g, testAnchors: anchors, history: [],
|
|
739
|
-
changedFiles: [seed], changePrior, commitTextBoost,
|
|
744
|
+
changedFiles: [seed], changePrior, commitTextBoost, ...(coChange !== undefined ? { coChange } : {}),
|
|
740
745
|
basis: { head: parent, loadedBuild: 'b', diskBuild: 'b', specFingerprint: 'fp' },
|
|
741
746
|
coverage: { scannedFiles: byName.length, skippedFiles: [], unsupportedLanguages: [] },
|
|
742
747
|
})));
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"//": "@implements A-SPEC-209",
|
|
3
3
|
"name": "@holmes-lab/holmes-kit",
|
|
4
|
-
"version": "0.35.
|
|
4
|
+
"version": "0.35.12",
|
|
5
5
|
"description": "Holmes-Kit — deterministic Agentic Software Engineering (ASE) harness with causal traceability (spec chain + D-CPG + RTM + phase guardrail)",
|
|
6
6
|
"main": "dist/holmes/mcp/server.js",
|
|
7
7
|
"types": "dist/holmes/mcp/server.d.ts",
|