@miller-tech/uap 2.44.2 → 2.48.0
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/config/model-registry.json +66 -0
- package/dist/.tsbuildinfo +1 -1
- package/dist/delivery/agentic-executor.d.ts +21 -1
- package/dist/delivery/agentic-executor.d.ts.map +1 -1
- package/dist/delivery/agentic-executor.js +55 -10
- package/dist/delivery/agentic-executor.js.map +1 -1
- package/dist/delivery/edit-match.d.ts +7 -1
- package/dist/delivery/edit-match.d.ts.map +1 -1
- package/dist/delivery/edit-match.js +176 -2
- package/dist/delivery/edit-match.js.map +1 -1
- package/dist/delivery/path-hints.d.ts +10 -0
- package/dist/delivery/path-hints.d.ts.map +1 -0
- package/dist/delivery/path-hints.js +181 -0
- package/dist/delivery/path-hints.js.map +1 -0
- package/docs/performance/deliver-gate-corpus.md +84 -0
- package/docs/plans/droid-client-performance-options.md +252 -0
- package/package.json +1 -1
- package/src/policies/enforcers/__pycache__/_common.cpython-311.pyc +0 -0
- package/src/policies/enforcers/__pycache__/expert_review_required.cpython-311.pyc +0 -0
- package/src/policies/enforcers/__pycache__/quality_metrics_gate.cpython-311.pyc +0 -0
- package/templates/hooks/__pycache__/deliver_autoroute.cpython-311.pyc +0 -0
- package/tools/agents/scripts/__pycache__/anthropic_proxy.cpython-311.pyc +0 -0
- package/tools/agents/scripts/__pycache__/tool_risk.cpython-311.pyc +0 -0
- package/tools/agents/scripts/__pycache__/toolcall_path_normalizer.cpython-311.pyc +0 -0
- package/tools/agents/scripts/anthropic_proxy.py +56 -9
|
@@ -14,12 +14,17 @@
|
|
|
14
14
|
*
|
|
15
15
|
* 1. EXACT — byte-identical substring. Unchanged, always tried first, so
|
|
16
16
|
* a model that gets it right sees identical behaviour.
|
|
17
|
+
* 1.5 LISTING — the needle is a copy of a numbered listing (`12| code`);
|
|
18
|
+
* strip the prefixes and match the code text. Uniqueness
|
|
19
|
+
* required. (Idea from Turnpack, github.com/OnlyTerp/turnpack,
|
|
20
|
+
* Apache-2.0 — see `stripListingPrefixes`.)
|
|
17
21
|
* 2. TOLERANT — line-aligned match after per-line whitespace normalisation
|
|
18
22
|
* (leading/trailing trimmed, internal runs collapsed). Catches
|
|
19
23
|
* the dominant real miss: right code, wrong indentation.
|
|
20
24
|
* 3. NEAREST — no match at all, so instead of "not found" we return the
|
|
21
25
|
* closest region of the file with line numbers, turning a dead
|
|
22
|
-
* turn into a corrective one
|
|
26
|
+
* turn into a corrective one — plus the first differing line
|
|
27
|
+
* pair, when the region is close (Turnpack's miss-reply shape).
|
|
23
28
|
*
|
|
24
29
|
* Everything here is PURE (string in, decision out) so the ladder is unit
|
|
25
30
|
* testable without a model, a file system, or a delivery run.
|
|
@@ -83,6 +88,7 @@ export interface EditMatchOptions {
|
|
|
83
88
|
indentSensitive?: boolean;
|
|
84
89
|
}
|
|
85
90
|
export declare function isIndentSensitive(path: string): boolean;
|
|
91
|
+
export declare function stripListingPrefixes(needle: string): string | null;
|
|
86
92
|
/**
|
|
87
93
|
* Build the nearest-match report shown when nothing matched.
|
|
88
94
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"edit-match.d.ts","sourceRoot":"","sources":["../../src/delivery/edit-match.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"edit-match.d.ts","sourceRoot":"","sources":["../../src/delivery/edit-match.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AAEH,gDAAgD;AAChD,MAAM,MAAM,aAAa;AACvB,uEAAuE;AACrE,OAAO;AACT,0DAA0D;GACxD,UAAU;AACZ,iEAAiE;GAC/D,WAAW;AACb,iCAAiC;GAC/B,MAAM,CAAC;AAEX,MAAM,WAAW,SAAS;IACxB,IAAI,EAAE,aAAa,CAAC;IACpB,kFAAkF;IAClF,KAAK,EAAE,MAAM,CAAC;IACd,yEAAyE;IACzE,MAAM,EAAE,MAAM,CAAC;IACf,6DAA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xB;AAED;;;;;;;GAOG;AACH,wBAAgB,cAAc,CAC5B,OAAO,EAAE,MAAM,EACf,SAAS,EAAE,MAAM,EACjB,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,MAAM,GACd,eAAe,CA0CjB"}
|
|
@@ -14,12 +14,17 @@
|
|
|
14
14
|
*
|
|
15
15
|
* 1. EXACT — byte-identical substring. Unchanged, always tried first, so
|
|
16
16
|
* a model that gets it right sees identical behaviour.
|
|
17
|
+
* 1.5 LISTING — the needle is a copy of a numbered listing (`12| code`);
|
|
18
|
+
* strip the prefixes and match the code text. Uniqueness
|
|
19
|
+
* required. (Idea from Turnpack, github.com/OnlyTerp/turnpack,
|
|
20
|
+
* Apache-2.0 — see `stripListingPrefixes`.)
|
|
17
21
|
* 2. TOLERANT — line-aligned match after per-line whitespace normalisation
|
|
18
22
|
* (leading/trailing trimmed, internal runs collapsed). Catches
|
|
19
23
|
* the dominant real miss: right code, wrong indentation.
|
|
20
24
|
* 3. NEAREST — no match at all, so instead of "not found" we return the
|
|
21
25
|
* closest region of the file with line numbers, turning a dead
|
|
22
|
-
* turn into a corrective one
|
|
26
|
+
* turn into a corrective one — plus the first differing line
|
|
27
|
+
* pair, when the region is close (Turnpack's miss-reply shape).
|
|
23
28
|
*
|
|
24
29
|
* Everything here is PURE (string in, decision out) so the ladder is unit
|
|
25
30
|
* testable without a model, a file system, or a delivery run.
|
|
@@ -136,6 +141,61 @@ function tolerantSpans(haystack, needle, preserveIndent) {
|
|
|
136
141
|
}
|
|
137
142
|
return spans;
|
|
138
143
|
}
|
|
144
|
+
/**
|
|
145
|
+
* Strip a uniform line-number listing prefix from an edit anchor.
|
|
146
|
+
*
|
|
147
|
+
* WHY: `read_file` hands the model numbered listings (` 12| code`, and other
|
|
148
|
+
* harnesses use `12:code` or `12→code`), and the measured failure anatomy
|
|
149
|
+
* (docs/plans/droid-client-performance-options.md, class edit-miss, 642 calls)
|
|
150
|
+
* shows models copying the anchor straight out of that listing — prefix and
|
|
151
|
+
* all — which then misses on every rung of this ladder because the file itself
|
|
152
|
+
* carries no line numbers. The idea of tolerating copied line numbers in an
|
|
153
|
+
* edit search is taken from Turnpack (github.com/OnlyTerp/turnpack, Apache-2.0,
|
|
154
|
+
* `ship`'s "line numbers copied from a listing" rung); this is an independent
|
|
155
|
+
* implementation with UAP's stricter guards.
|
|
156
|
+
*
|
|
157
|
+
* Accepted ONLY when the needle is unmistakably a listing copy:
|
|
158
|
+
* - EVERY non-empty line carries the same `\d+<sep>` shape (separator one of
|
|
159
|
+
* `|`, `:`, `→`, `=>` followed by optional space), and
|
|
160
|
+
* - when there is more than one numbered line, the numbers are consecutive
|
|
161
|
+
* (a contiguous copy of a listing is what a real model paste looks like;
|
|
162
|
+
* scattered numbers are far more likely to be the code itself, e.g. a
|
|
163
|
+
* table or a switch cascade — refuse rather than edit the wrong block).
|
|
164
|
+
*
|
|
165
|
+
* Returns the anchor with prefixes removed (original indentation after the
|
|
166
|
+
* separator is kept), or null when the needle is not a listing copy. Blank
|
|
167
|
+
* lines within the needle are allowed and pass through untouched.
|
|
168
|
+
*/
|
|
169
|
+
const LISTING_PREFIX = /^[ \t]*(\d{1,6})[ \t]*(?:=>|\||→|:)[ \t]?/;
|
|
170
|
+
export function stripListingPrefixes(needle) {
|
|
171
|
+
const lines = needle.split('\n');
|
|
172
|
+
const numbered = [];
|
|
173
|
+
for (let i = 0; i < lines.length; i++) {
|
|
174
|
+
if (lines[i].trim() === '')
|
|
175
|
+
continue;
|
|
176
|
+
const m = LISTING_PREFIX.exec(lines[i]);
|
|
177
|
+
if (!m)
|
|
178
|
+
return null;
|
|
179
|
+
numbered.push(i);
|
|
180
|
+
}
|
|
181
|
+
if (numbered.length === 0)
|
|
182
|
+
return null;
|
|
183
|
+
// Consecutive numbers across the non-blank lines: step of 1 between each
|
|
184
|
+
// numbered line that follows another (blank lines in the needle are rare in
|
|
185
|
+
// a copy but tolerated; the FILE may hold blank lines between them, which
|
|
186
|
+
// the line-window search below does not see — that is fine, this only needs
|
|
187
|
+
// to prove the needle is a listing, not to match it).
|
|
188
|
+
for (let k = 1; k < numbered.length; k++) {
|
|
189
|
+
const prev = Number(LISTING_PREFIX.exec(lines[numbered[k - 1]])?.[1] ?? NaN);
|
|
190
|
+
const cur = Number(LISTING_PREFIX.exec(lines[numbered[k]])?.[1] ?? NaN);
|
|
191
|
+
if (!Number.isFinite(prev) || !Number.isFinite(cur) || cur !== prev + 1)
|
|
192
|
+
return null;
|
|
193
|
+
}
|
|
194
|
+
// A single numbered line is accepted: it cannot be a coincidence of code
|
|
195
|
+
// that ALSO needs the prefix gone, and the uniqueness requirement downstream
|
|
196
|
+
// keeps it safe.
|
|
197
|
+
return lines.map((l) => l.replace(LISTING_PREFIX, '')).join('\n');
|
|
198
|
+
}
|
|
139
199
|
/**
|
|
140
200
|
* Build the nearest-match report shown when nothing matched.
|
|
141
201
|
*
|
|
@@ -172,10 +232,84 @@ export function nearestMatchReport(haystack, needle, maxLines = 8) {
|
|
|
172
232
|
.slice(from, to + 1)
|
|
173
233
|
.map((l, i) => `${String(from + i + 1).padStart(5)}| ${l}`)
|
|
174
234
|
.join('\n');
|
|
235
|
+
// FIRST DIFFERING LINE (idea from Turnpack's `ship` miss reply, Apache-2.0):
|
|
236
|
+
// when the needle aligns at the anchor but a line differs, name the pair so
|
|
237
|
+
// the fix needs no extra round to spot it. Compared on the SAME normalised
|
|
238
|
+
// form the tolerant rung uses; the excerpt above carries the raw text the
|
|
239
|
+
// model should copy next.
|
|
240
|
+
let diffNote = '';
|
|
241
|
+
const wanted = needle
|
|
242
|
+
.split('\n')
|
|
243
|
+
.map((l) => normalizeLine(l))
|
|
244
|
+
.filter((l) => l !== '');
|
|
245
|
+
for (let k = 0; k < wanted.length && bestLine + k < hayLines.length; k++) {
|
|
246
|
+
const fileLine = normalizeLine(hayLines[bestLine + k]);
|
|
247
|
+
if (fileLine !== wanted[k]) {
|
|
248
|
+
diffNote =
|
|
249
|
+
`\nFirst difference, at line ${bestLine + k + 1}:\n` +
|
|
250
|
+
` search has: ${truncateForReport(wanted[k])}\n` +
|
|
251
|
+
` file has: ${truncateForReport(fileLine)}`;
|
|
252
|
+
break;
|
|
253
|
+
}
|
|
254
|
+
}
|
|
175
255
|
return (`Nearest region in the CURRENT file (lines ${from + 1}-${to + 1}, ` +
|
|
176
|
-
`best anchor line ${bestLine + 1}):\n${excerpt}\n` +
|
|
256
|
+
`best anchor line ${bestLine + 1}):\n${excerpt}${diffNote}\n` +
|
|
177
257
|
`Copy the exact text above, or use edit_range with start_line/end_line.`);
|
|
178
258
|
}
|
|
259
|
+
/** Cap one reported line so a pathological long line cannot flood context. */
|
|
260
|
+
function truncateForReport(line, max = 200) {
|
|
261
|
+
return line.length > max ? line.slice(0, max) + '…' : line;
|
|
262
|
+
}
|
|
263
|
+
/**
|
|
264
|
+
* Continuation of rung 1.5 for a listing-stripped needle with no exact hit:
|
|
265
|
+
* the whitespace-tolerant search runs against the STRIPPED code text (the
|
|
266
|
+
* prefixes themselves can never match a file), then the miss rung reports
|
|
267
|
+
* against it too. Shares the tolerant rung's uniqueness requirement and the
|
|
268
|
+
* miss rung's nearest-region diagnostics; only the `note` differs, so the
|
|
269
|
+
* model learns its anchor came from a listing.
|
|
270
|
+
*/
|
|
271
|
+
function resolveListingStrippedMiss(current, strippedNeedle, tolerant, diagnostics, indentSensitive) {
|
|
272
|
+
const LISTING_NOTE = 'old_string carried line-number listing prefixes (e.g. "12| ") — they were stripped; ';
|
|
273
|
+
if (tolerant) {
|
|
274
|
+
const spans = tolerantSpans(current, strippedNeedle, indentSensitive);
|
|
275
|
+
if (spans.length === 1) {
|
|
276
|
+
const span = spans[0];
|
|
277
|
+
return {
|
|
278
|
+
kind: 'tolerant',
|
|
279
|
+
index: span.index,
|
|
280
|
+
length: span.length,
|
|
281
|
+
count: 1,
|
|
282
|
+
targetIndent: span.indent,
|
|
283
|
+
needleIndent: indentOf(strippedNeedle.split('\n')[0] ?? ''),
|
|
284
|
+
lineAligned: true,
|
|
285
|
+
note: LISTING_NOTE +
|
|
286
|
+
'the edit was applied after also normalising whitespace. ' +
|
|
287
|
+
'Re-read the file before the next edit; anchors must be the file content, not the listing.',
|
|
288
|
+
};
|
|
289
|
+
}
|
|
290
|
+
if (spans.length > 1) {
|
|
291
|
+
return {
|
|
292
|
+
kind: 'ambiguous',
|
|
293
|
+
index: -1,
|
|
294
|
+
length: 0,
|
|
295
|
+
count: spans.length,
|
|
296
|
+
note: LISTING_NOTE +
|
|
297
|
+
`it matches ${spans.length} places once whitespace is normalised — too ambiguous to ` +
|
|
298
|
+
`guess at. Re-read the file and copy the exact text, or use edit_range.`,
|
|
299
|
+
};
|
|
300
|
+
}
|
|
301
|
+
}
|
|
302
|
+
const report = diagnostics ? nearestMatchReport(current, strippedNeedle) : '';
|
|
303
|
+
return {
|
|
304
|
+
kind: 'miss',
|
|
305
|
+
index: -1,
|
|
306
|
+
length: 0,
|
|
307
|
+
count: 0,
|
|
308
|
+
note: report
|
|
309
|
+
? `old_string not found (line-number listing prefixes were stripped).\n${report}`
|
|
310
|
+
: 'old_string not found — re-read the file and match the CURRENT content (not the numbered listing).',
|
|
311
|
+
};
|
|
312
|
+
}
|
|
179
313
|
/**
|
|
180
314
|
* Locate `oldStr` in `current` using the exact -> tolerant -> miss ladder.
|
|
181
315
|
*
|
|
@@ -212,6 +346,46 @@ export function resolveEditMatch(current, oldStr, options = {}) {
|
|
|
212
346
|
idx = current.indexOf(oldStr, idx + 1);
|
|
213
347
|
return { kind: 'exact', index: idx, length: oldStr.length, count: exactCount };
|
|
214
348
|
}
|
|
349
|
+
// --- Rung 1.5: listing-prefixed needle (Turnpack idea, see stripListingPrefixes) --
|
|
350
|
+
// Tried BEFORE the whitespace-tolerant rung: a listing copy usually holds the
|
|
351
|
+
// file's exact bytes after the prefix, so this can match byte-exactly and the
|
|
352
|
+
// whitespace rung stays reserved for genuine indentation drift. Uniqueness is
|
|
353
|
+
// required like the tolerant rung; `occurrence` is ignored for the same
|
|
354
|
+
// reason (it counts a different candidate list).
|
|
355
|
+
const strippedNeedle = stripListingPrefixes(oldStr);
|
|
356
|
+
if (strippedNeedle !== null && strippedNeedle.trim() !== '') {
|
|
357
|
+
const strippedCount = current.split(strippedNeedle).length - 1;
|
|
358
|
+
if (strippedCount === 1) {
|
|
359
|
+
const idx = current.indexOf(strippedNeedle);
|
|
360
|
+
return {
|
|
361
|
+
kind: 'tolerant',
|
|
362
|
+
index: idx,
|
|
363
|
+
length: strippedNeedle.length,
|
|
364
|
+
count: 1,
|
|
365
|
+
targetIndent: indentOf(current.slice(idx).split('\n')[0] ?? ''),
|
|
366
|
+
needleIndent: indentOf(strippedNeedle.split('\n')[0] ?? ''),
|
|
367
|
+
lineAligned: true,
|
|
368
|
+
note: 'old_string carried line-number listing prefixes (e.g. "12| ") — they were stripped and ' +
|
|
369
|
+
'the edit was applied to the code text. Re-read the file before the next edit; anchors ' +
|
|
370
|
+
'must be the file content, not the listing.',
|
|
371
|
+
};
|
|
372
|
+
}
|
|
373
|
+
if (strippedCount > 1) {
|
|
374
|
+
return {
|
|
375
|
+
kind: 'ambiguous',
|
|
376
|
+
index: -1,
|
|
377
|
+
length: 0,
|
|
378
|
+
count: strippedCount,
|
|
379
|
+
note: `old_string carried line-number listing prefixes, and the code beneath them matches ` +
|
|
380
|
+
`${strippedCount} places — too ambiguous to guess at. Re-read the file and copy the exact ` +
|
|
381
|
+
`text without the line numbers, or use edit_range with explicit line numbers.`,
|
|
382
|
+
};
|
|
383
|
+
}
|
|
384
|
+
// 0 stripped-exact hits: fall through with the stripped needle, so the
|
|
385
|
+
// whitespace-tolerant rung also works on the code text rather than the
|
|
386
|
+
// listing prefixes (which can never match).
|
|
387
|
+
return resolveListingStrippedMiss(current, strippedNeedle, tolerant, diagnostics, indentSensitive);
|
|
388
|
+
}
|
|
215
389
|
// --- Rung 2: whitespace-tolerant ----------------------------------------
|
|
216
390
|
if (tolerant) {
|
|
217
391
|
const spans = tolerantSpans(current, oldStr, indentSensitive);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
4
|
+
/**
|
|
5
|
+
* A did-you-mean suffix for a path-not-found error, or null when nothing
|
|
6
|
+
* useful can be said cheaply. NEVER throws — a hint failure must not turn a
|
|
7
|
+
* clean `path-not-found` into an `other-error`.
|
|
8
|
+
*/
|
|
9
|
+
export declare function nearestPathHint(projectRoot: string, rel: string, options?: PathHintOptions): string | null;
|
|
10
|
+
//# sourceMappingURL=path-hints.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"path-hints.d.ts","sourceRoot":"","sources":["../../src/delivery/path-hints.ts"],"names":[],"mappings":"AA2BA,MAAM,WAAW,eAAe;IAC9B,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AA0GD;;;;GAIG;AACH,wBAAgB,eAAe,CAC7B,WAAW,EAAE,MAAM,EACnB,GAAG,EAAE,MAAM,EACX,OAAO,GAAE,eAAoB,GAC5B,MAAM,GAAG,IAAI,CA0Cf"}
|
|
@@ -0,0 +1,181 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Did-you-mean hints for missing paths (harness plan O-C.2).
|
|
3
|
+
*
|
|
4
|
+
* Measured motivation (tool-calls corpus, 2026-10-11 → 2026-11-14): 502
|
|
5
|
+
* `path-not-found` failures, and the guessed paths are near-misses of real
|
|
6
|
+
* files (`apps/api/src/repositories/installments_repository.ts`-shaped).
|
|
7
|
+
* A bare "does not exist" answers the question the model did not ask — it
|
|
8
|
+
* already knows the file is missing, that is why it is trying to create or
|
|
9
|
+
* read it — and the retry is another guess. Telling it what IS there converts
|
|
10
|
+
* the next round from a guess into a lookup.
|
|
11
|
+
*
|
|
12
|
+
* The hint is deliberately an ERROR APPENDAGE, never a standalone result, so
|
|
13
|
+
* the telemetry classifier still files the call under `path-not-found` (the
|
|
14
|
+
* leading text carries the trigger phrase; nothing in the hint text does).
|
|
15
|
+
*/
|
|
16
|
+
import { readdirSync, statSync } from 'node:fs';
|
|
17
|
+
import { join } from 'node:path';
|
|
18
|
+
/** Bounds: a hint must stay cheap even on hostile inputs (gigantic dirs). */
|
|
19
|
+
const MAX_UP_LEVELS = 4;
|
|
20
|
+
const MAX_ENTRIES_PER_DIR = 60;
|
|
21
|
+
const MAX_SUGGESTIONS = 3;
|
|
22
|
+
const MAX_LISTED_ENTRIES = 12;
|
|
23
|
+
/** Candidate depth below the anchor dir. 2 catches `src/types/audit.ts`
|
|
24
|
+
* when the anchor is `src/` and the guess named `src/types/audits.ts`. */
|
|
25
|
+
const MAX_CANDIDATE_DEPTH = 2;
|
|
26
|
+
/** Cheap case-insensitive similarity in [0, 1]; 1 = identical. */
|
|
27
|
+
function similarity(a, b) {
|
|
28
|
+
const x = a.toLowerCase().replace(/[^a-z0-9]/g, '');
|
|
29
|
+
const y = b.toLowerCase().replace(/[^a-z0-9]/g, '');
|
|
30
|
+
if (x === y)
|
|
31
|
+
return 1;
|
|
32
|
+
if (x.length === 0 || y.length === 0)
|
|
33
|
+
return 0;
|
|
34
|
+
// Bounded Levenshtein: these strings are path fragments, not genomes.
|
|
35
|
+
const prev = new Array(y.length + 1);
|
|
36
|
+
const cur = new Array(y.length + 1);
|
|
37
|
+
for (let j = 0; j <= y.length; j++)
|
|
38
|
+
prev[j] = j;
|
|
39
|
+
for (let i = 1; i <= x.length; i++) {
|
|
40
|
+
cur[0] = i;
|
|
41
|
+
for (let j = 1; j <= y.length; j++) {
|
|
42
|
+
const cost = x[i - 1] === y[j - 1] ? 0 : 1;
|
|
43
|
+
cur[j] = Math.min(prev[j] + 1, cur[j - 1] + 1, prev[j - 1] + cost);
|
|
44
|
+
}
|
|
45
|
+
for (let j = 0; j <= y.length; j++)
|
|
46
|
+
prev[j] = cur[j];
|
|
47
|
+
}
|
|
48
|
+
return 1 - prev[y.length] / Math.max(x.length, y.length);
|
|
49
|
+
}
|
|
50
|
+
function isDirectory(p) {
|
|
51
|
+
try {
|
|
52
|
+
return statSync(p).isDirectory();
|
|
53
|
+
}
|
|
54
|
+
catch {
|
|
55
|
+
return false;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* The deepest existing ancestor directory of `rel` (POSIX-project-relative),
|
|
60
|
+
* plus how many segments of `rel` live below it. `[null, 0]` when none of the
|
|
61
|
+
* ancestors exist within the walk-up bound (a fully bogus root).
|
|
62
|
+
*/
|
|
63
|
+
function nearestExistingAncestor(projectRoot, rel) {
|
|
64
|
+
const parts = rel.split('/').filter((p) => p.length > 0 && p !== '.');
|
|
65
|
+
if (parts.length === 0)
|
|
66
|
+
return null;
|
|
67
|
+
// Peel TRAILING components until a directory exists — including peeling
|
|
68
|
+
// ALL of them, in which case the project root itself is the anchor. The
|
|
69
|
+
// case-insensitive miss ('BIG.js' vs 'big.js') has no existing prefix at
|
|
70
|
+
// all, and its did-you-mean lives in the root listing.
|
|
71
|
+
const maxPeel = Math.min(MAX_UP_LEVELS, parts.length);
|
|
72
|
+
for (let peel = 0; peel <= maxPeel; peel++) {
|
|
73
|
+
const keep = parts.length - peel;
|
|
74
|
+
const dir = join(projectRoot, ...parts.slice(0, keep));
|
|
75
|
+
if (isDirectory(dir)) {
|
|
76
|
+
return {
|
|
77
|
+
dir,
|
|
78
|
+
dirRel: parts.slice(0, keep).join('/') || '.',
|
|
79
|
+
missing: parts.slice(keep),
|
|
80
|
+
};
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
return null;
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* Collect paths under `dir` (bounded breadth/depth) whose names resemble the
|
|
87
|
+
* missing tail of the request. Resemblance is scored against the FULL
|
|
88
|
+
* requested path so a same-named file in a different directory ranks below a
|
|
89
|
+
* same-named file in the right one.
|
|
90
|
+
*/
|
|
91
|
+
function collectCandidates(dir, dirRel, wanted) {
|
|
92
|
+
const out = [];
|
|
93
|
+
const walk = (abs, rel, depth) => {
|
|
94
|
+
let names;
|
|
95
|
+
try {
|
|
96
|
+
names = readdirSync(abs).slice(0, MAX_ENTRIES_PER_DIR);
|
|
97
|
+
}
|
|
98
|
+
catch {
|
|
99
|
+
return;
|
|
100
|
+
}
|
|
101
|
+
for (const name of names) {
|
|
102
|
+
if (name.startsWith('.') && !wanted.startsWith('.'))
|
|
103
|
+
continue;
|
|
104
|
+
const relHere = rel === '' ? name : `${rel}/${name}`;
|
|
105
|
+
let isDir;
|
|
106
|
+
try {
|
|
107
|
+
isDir = statSync(join(abs, name)).isDirectory();
|
|
108
|
+
}
|
|
109
|
+
catch {
|
|
110
|
+
continue;
|
|
111
|
+
}
|
|
112
|
+
if (isDir) {
|
|
113
|
+
if (depth < MAX_CANDIDATE_DEPTH)
|
|
114
|
+
walk(join(abs, name), relHere, depth + 1);
|
|
115
|
+
continue;
|
|
116
|
+
}
|
|
117
|
+
const score = similarity(relHere, wanted);
|
|
118
|
+
if (score >= 0.55)
|
|
119
|
+
out.push({ rel: relHere, score });
|
|
120
|
+
}
|
|
121
|
+
};
|
|
122
|
+
walk(dir, dirRel, 0);
|
|
123
|
+
return out.sort((a, b) => b.score - a.score);
|
|
124
|
+
}
|
|
125
|
+
/**
|
|
126
|
+
* A did-you-mean suffix for a path-not-found error, or null when nothing
|
|
127
|
+
* useful can be said cheaply. NEVER throws — a hint failure must not turn a
|
|
128
|
+
* clean `path-not-found` into an `other-error`.
|
|
129
|
+
*/
|
|
130
|
+
export function nearestPathHint(projectRoot, rel, options = {}) {
|
|
131
|
+
try {
|
|
132
|
+
const wanted = String(rel ?? '').replace(/\\/g, '/').replace(/^\/+/, '');
|
|
133
|
+
if (wanted === '' || wanted === '.')
|
|
134
|
+
return null;
|
|
135
|
+
// The request may itself be a directory the caller mis-filed; the caller's
|
|
136
|
+
// error text distinguishes that, the hint just needs to not lie.
|
|
137
|
+
const ancestor = nearestExistingAncestor(projectRoot, wanted);
|
|
138
|
+
if (!ancestor)
|
|
139
|
+
return null;
|
|
140
|
+
const dirRel = ancestor.dirRel;
|
|
141
|
+
const candidates = collectCandidates(ancestor.dir, dirRel, wanted);
|
|
142
|
+
const seen = new Set();
|
|
143
|
+
const suggestions = [];
|
|
144
|
+
for (const c of candidates) {
|
|
145
|
+
if (seen.has(c.rel))
|
|
146
|
+
continue;
|
|
147
|
+
seen.add(c.rel);
|
|
148
|
+
suggestions.push(c.rel);
|
|
149
|
+
if (suggestions.length >= (options.maxSuggestions ?? MAX_SUGGESTIONS))
|
|
150
|
+
break;
|
|
151
|
+
}
|
|
152
|
+
if (suggestions.length > 0) {
|
|
153
|
+
return ` — did you mean: ${suggestions.join(', ')}?`;
|
|
154
|
+
}
|
|
155
|
+
// Nothing close: the second-best hint is what the nearest existing
|
|
156
|
+
// directory actually holds, so the model's next path is a fact not a guess.
|
|
157
|
+
let names = [];
|
|
158
|
+
try {
|
|
159
|
+
names = readdirSync(ancestor.dir).slice(0, MAX_LISTED_ENTRIES);
|
|
160
|
+
}
|
|
161
|
+
catch {
|
|
162
|
+
return null;
|
|
163
|
+
}
|
|
164
|
+
const entries = names.map((name) => {
|
|
165
|
+
try {
|
|
166
|
+
return statSync(join(ancestor.dir, name)).isDirectory() ? `${name}/` : name;
|
|
167
|
+
}
|
|
168
|
+
catch {
|
|
169
|
+
return name;
|
|
170
|
+
}
|
|
171
|
+
});
|
|
172
|
+
if (entries.length === 0)
|
|
173
|
+
return null;
|
|
174
|
+
const suffix = ancestor.missing.length > 0 ? ` (nothing under ${ancestor.missing.join('/')})` : '';
|
|
175
|
+
return ` — nearest existing directory ${dirRel}/ contains: ${entries.join(', ')}${suffix}`;
|
|
176
|
+
}
|
|
177
|
+
catch {
|
|
178
|
+
return null;
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
//# sourceMappingURL=path-hints.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"path-hints.js","sourceRoot":"","sources":["../../src/delivery/path-hints.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAChD,OAAO,EAAE,IAAI,EAAE,MAAM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C,GAAa,EAAE,IAAI,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC,GAAG,IAAI,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC;YACxF,CAAC;YAAC,MAAM,CAAC;gBACP,OAAO,IAAI,CAAC;YACd,CAAC;QACH,CAAC,CAAC,CAAC;QACH,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC;YAAE,OAAO,IAAI,CAAC;QACtC,MAAM,MAAM,GAAG,QAAQ,CAAC,OAAO,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,mBAAmB,QAAQ,CAAC,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC;QACnG,OAAO,iCAAiC,MAAM,eAAe,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,MAAM,EAAE,CAAC;IAC7F,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,IAAI,CAAC;IACd,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
# Delivery-gate corpus — the descriptive model × technique × tier table
|
|
2
|
+
|
|
3
|
+
Generated 2026-11-14 by `python3 scripts/aggregate_gate_corpus.py`
|
|
4
|
+
([proof-plan option O1](../plans/model-performance-proof-options.md),
|
|
5
|
+
directed by [client-performance option
|
|
6
|
+
O-E](../plans/droid-client-performance-options.md)).
|
|
7
|
+
|
|
8
|
+
**Discrimination status: descriptive by construction.** This is a population
|
|
9
|
+
record, not a controlled experiment — no paired arm exists *inside* this
|
|
10
|
+
aggregation. Per the house rule it is never quoted as a finding; it directs
|
|
11
|
+
where to spend the controlled paired runs (O2). The paired-benchmark rows
|
|
12
|
+
carry their own per-run discrimination verdicts verbatim (floor / ceiling /
|
|
13
|
+
underpowered / discordant-pair analysis from the harness itself); the
|
|
14
|
+
`full-uap-stack` rows are live single-attempt delivery observations.
|
|
15
|
+
|
|
16
|
+
## The table
|
|
17
|
+
|
|
18
|
+
<!-- BEGIN GENERATED: scripts/aggregate_gate_corpus.py (regenerate) -->
|
|
19
|
+
| Model | Technique | Tier | n attempts | Gate pass | Mean tokens | Mean turns | Discrimination |
|
|
20
|
+
| --- | --- | --- | ---: | ---: | ---: | ---: | --- |
|
|
21
|
+
| `opus-4.8` | full-uap-stack | frontier | 2 | 0.0% | n/r | 5.0 | descriptive (n=1) |
|
|
22
|
+
| `Qwen3.8-27B` | baseline | local | 176 | 71.0% | 3067 | 1.0 | floor; no-discordant-pairs; underpowered |
|
|
23
|
+
| `Qwen3.8-27B` | uap-full | local | 176 | 71.0% | 3514 | 1.0 | floor; no-discordant-pairs; underpowered |
|
|
24
|
+
| `bench-proxy/qwen35-a3b-iq4xs` | baseline | local | 123 | 94.3% | 3270 | 13.7 | unlabeled |
|
|
25
|
+
| `bench-proxy/qwen35-a3b-iq4xs` | uap-full | local | 123 | 96.7% | 3311 | 13.9 | unlabeled |
|
|
26
|
+
| `qwen-proxy/Qwen3.8-27B` | baseline | local | 36 | 94.4% | 253828 | 7.0 | underpowered |
|
|
27
|
+
| `qwen-proxy/Qwen3.8-27B` | uap-full | local | 36 | 97.2% | 309971 | 8.3 | underpowered |
|
|
28
|
+
| `qwen35-a3b` | baseline | local | 295 | 38.6% | 6901 | 1.0 | floor; ok; unlabeled |
|
|
29
|
+
| `qwen35-a3b` | full-uap-stack | local | 5 | 73.2% | n/r | 7.4 | descriptive (n=1) |
|
|
30
|
+
| `qwen35-a3b` | uap-full | local | 295 | 54.2% | 21973 | 2.1 | floor; ok; unlabeled |
|
|
31
|
+
| `qwen35-a3b` | uap-lazy | local | 40 | 67.5% | 21070 | 2.7 | unlabeled |
|
|
32
|
+
| `qwen36-35b-a3b-iq4xs` | baseline | local | 79 | 7.6% | n/r | n/r | unlabeled |
|
|
33
|
+
| `qwen36-35b-a3b-iq4xs` | uap-full | local | 79 | 3.8% | n/r | n/r | unlabeled |
|
|
34
|
+
| `qwen38-27b` | baseline | local | 62 | 62.9% | n/r | 1.0 | ceiling; underpowered |
|
|
35
|
+
| `qwen38-27b` | uap-full | local | 62 | 62.9% | n/r | 1.0 | ceiling; underpowered |
|
|
36
|
+
<!-- END GENERATED -->
|
|
37
|
+
|
|
38
|
+
## Sources
|
|
39
|
+
|
|
40
|
+
Two corpora, pooled by (model, technique, tier):
|
|
41
|
+
|
|
42
|
+
1. **Paired benchmark reports** (`benchmark-results/<run>/report.json`, 34
|
|
43
|
+
runs) — the A/B harness output. `baseline` vs `uap-full` vs `uap-lazy` are
|
|
44
|
+
the technique arms; the gate pass is the run's own success rate pooled
|
|
45
|
+
over its `n` attempts, and token/turn costs are the arm means weighted by
|
|
46
|
+
n. Model ids carry the harness adapter prefix where the run used one
|
|
47
|
+
(`bench-proxy/…`, `qwen-proxy/…`).
|
|
48
|
+
2. **Live `[deliver]` lessons** (`full-uap-stack` rows, from the memory-DB
|
|
49
|
+
backups and the committed memory bridge mirror) — every recorded delivery
|
|
50
|
+
outcome, best-%-of-gates per attempt, n=1 each. Token cost is not recorded
|
|
51
|
+
per lesson (n/r).
|
|
52
|
+
|
|
53
|
+
## What the table already says (directions, not findings)
|
|
54
|
+
|
|
55
|
+
- The **floor/ceiling discrimination verdicts matter more than the rates**:
|
|
56
|
+
`qwen38-27b` at 62.9% in BOTH arms is a ceiling row (the task set caps the
|
|
57
|
+
measurable difference), and `Qwen3.8-27B` at 71.0% in both arms is a
|
|
58
|
+
no-discordant-pairs floor. Rows like those cannot rank techniques no
|
|
59
|
+
matter how large the n — the discriminating runs are the ones the harness
|
|
60
|
+
itself labeled `ok` or `underpowered`.
|
|
61
|
+
- `qwen35-a3b` is the only model with a large non-floor gap in both
|
|
62
|
+
directions: baseline 38.6% → uap-full 54.2% (+15.6 points, n=295, harness
|
|
63
|
+
verdict `ok`), at ~3.2x the token cost and ~2x the turns — the UAP layer
|
|
64
|
+
buys gates on weak models by spending tokens, which is the exact trade the
|
|
65
|
+
reliability ladder prices.
|
|
66
|
+
- The frontier row is **route-death, not model quality**: both `opus-4.8`
|
|
67
|
+
attempts died at 0% of gates within 5 turns on the dead `:8317` passthrough
|
|
68
|
+
(see the client-performance plan) — no frontier baseline exists yet.
|
|
69
|
+
- Live lessons (`full-uap-stack`) sit ABOVE the same model's benchmark
|
|
70
|
+
baseline (qwen35-a3b: 73.2% best-gate average over 5 real deliveries vs
|
|
71
|
+
38.6% bench baseline) — real tasks are more tractable than the paired task
|
|
72
|
+
set, so bench rows are a pessimistic floor for live outcomes, not a
|
|
73
|
+
prediction of them.
|
|
74
|
+
|
|
75
|
+
## Regenerating
|
|
76
|
+
|
|
77
|
+
```
|
|
78
|
+
python3 scripts/aggregate_gate_corpus.py # markdown (this table)
|
|
79
|
+
python3 scripts/aggregate_gate_corpus.py --json # the raw row records
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
The script reads the MAIN checkout only (benchmark-results/ is untracked run
|
|
83
|
+
output; worktrees do not carry it) and is fail-soft: unreadable run dirs and
|
|
84
|
+
non-matching rows are skipped, never fatal.
|