agentfootprint 9.76.1 → 9.77.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/CHANGELOG.md +78 -0
- package/CLAUDE.md +1 -0
- package/dist/core/Agent.js +36 -0
- package/dist/core/Agent.js.map +1 -1
- package/dist/core/agent/integrityFindings.js +47 -0
- package/dist/core/agent/integrityFindings.js.map +1 -0
- package/dist/core/agent/stages/callLLM.js +14 -29
- package/dist/core/agent/stages/callLLM.js.map +1 -1
- package/dist/core/agent/stages/toolCalls.js +77 -0
- package/dist/core/agent/stages/toolCalls.js.map +1 -1
- package/dist/esm/core/Agent.d.ts +3 -0
- package/dist/esm/core/Agent.js +36 -0
- package/dist/esm/core/Agent.js.map +1 -1
- package/dist/esm/core/agent/integrityFindings.d.ts +27 -0
- package/dist/esm/core/agent/integrityFindings.js +43 -0
- package/dist/esm/core/agent/integrityFindings.js.map +1 -0
- package/dist/esm/core/agent/stages/callLLM.d.ts +14 -0
- package/dist/esm/core/agent/stages/callLLM.js +11 -26
- package/dist/esm/core/agent/stages/callLLM.js.map +1 -1
- package/dist/esm/core/agent/stages/toolCalls.d.ts +23 -0
- package/dist/esm/core/agent/stages/toolCalls.js +78 -1
- package/dist/esm/core/agent/stages/toolCalls.js.map +1 -1
- package/dist/esm/core/agent/types.d.ts +49 -0
- package/dist/esm/index.d.ts +1 -0
- package/dist/esm/index.js +7 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/integrity/argumentLeaves.d.ts +33 -0
- package/dist/esm/integrity/argumentLeaves.js +49 -0
- package/dist/esm/integrity/argumentLeaves.js.map +1 -0
- package/dist/esm/integrity/disposition/lifecycle.d.ts +16 -1
- package/dist/esm/integrity/disposition/lifecycle.js +25 -1
- package/dist/esm/integrity/disposition/lifecycle.js.map +1 -1
- package/dist/esm/integrity/empty-lookup/check.d.ts +140 -0
- package/dist/esm/integrity/empty-lookup/check.js +212 -0
- package/dist/esm/integrity/empty-lookup/check.js.map +1 -0
- package/dist/esm/integrity/finding/types.d.ts +11 -2
- package/dist/esm/integrity/finding/types.js.map +1 -1
- package/dist/esm/integrity/unsupported-argument/check.js +11 -27
- package/dist/esm/integrity/unsupported-argument/check.js.map +1 -1
- package/dist/esm/lib/trace-toolpack/traceToolpack.js +6 -4
- package/dist/esm/lib/trace-toolpack/traceToolpack.js.map +1 -1
- package/dist/index.js +11 -3
- package/dist/index.js.map +1 -1
- package/dist/integrity/argumentLeaves.js +54 -0
- package/dist/integrity/argumentLeaves.js.map +1 -0
- package/dist/integrity/disposition/lifecycle.js +25 -1
- package/dist/integrity/disposition/lifecycle.js.map +1 -1
- package/dist/integrity/empty-lookup/check.js +217 -0
- package/dist/integrity/empty-lookup/check.js.map +1 -0
- package/dist/integrity/finding/types.js.map +1 -1
- package/dist/integrity/unsupported-argument/check.js +13 -29
- package/dist/integrity/unsupported-argument/check.js.map +1 -1
- package/dist/lib/trace-toolpack/traceToolpack.js +6 -4
- package/dist/lib/trace-toolpack/traceToolpack.js.map +1 -1
- package/dist/types/core/Agent.d.ts +3 -0
- package/dist/types/core/Agent.d.ts.map +1 -1
- package/dist/types/core/agent/integrityFindings.d.ts +28 -0
- package/dist/types/core/agent/integrityFindings.d.ts.map +1 -0
- package/dist/types/core/agent/stages/callLLM.d.ts +14 -0
- package/dist/types/core/agent/stages/callLLM.d.ts.map +1 -1
- package/dist/types/core/agent/stages/toolCalls.d.ts +23 -0
- package/dist/types/core/agent/stages/toolCalls.d.ts.map +1 -1
- package/dist/types/core/agent/types.d.ts +49 -0
- package/dist/types/core/agent/types.d.ts.map +1 -1
- package/dist/types/index.d.ts +1 -0
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/integrity/argumentLeaves.d.ts +34 -0
- package/dist/types/integrity/argumentLeaves.d.ts.map +1 -0
- package/dist/types/integrity/disposition/lifecycle.d.ts +16 -1
- package/dist/types/integrity/disposition/lifecycle.d.ts.map +1 -1
- package/dist/types/integrity/empty-lookup/check.d.ts +141 -0
- package/dist/types/integrity/empty-lookup/check.d.ts.map +1 -0
- package/dist/types/integrity/finding/types.d.ts +11 -2
- package/dist/types/integrity/finding/types.d.ts.map +1 -1
- package/dist/types/integrity/unsupported-argument/check.d.ts.map +1 -1
- package/dist/types/lib/trace-toolpack/traceToolpack.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/esm/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,oEAAoE;AACpE,8DAA8D;AAC9D,uEAAuE;AACvE,kEAAkE;AAClE,sEAAsE;AACtE,sDAAsD;AACtD,OAAO,8CAA8C,CAAC;AACtD,OAAO,2CAA2C,CAAC;AACnD,OAAO,4CAA4C,CAAC;AAsCpD,6BAA6B;AAC7B,cAAc,qBAAqB,CAAC;AAEpC,yEAAyE;AACzE,uDAAuD;AACvD,OAAO,EACL,cAAc,EACd,mBAAmB,EACnB,cAAc;AAEd,yEAAyE;AACzE,wEAAwE;AACxE,yEAAyE;AACzE,gBAAgB;AAChB,SAAS;AAET,2EAA2E;AAC3E,6EAA6E;AAC7E,6EAA6E;AAC7E,6DAA6D;AAC7D,YAAY;AAGZ,8EAA8E;AAC9E,6EAA6E;AAC7E,4EAA4E;AAC5E,yEAAyE;AACzE,4EAA4E;AAC5E,uCAAuC;AACvC,uBAAuB,EACvB,wBAAwB,GACzB,MAAM,kBAAkB,CAAC;AAC1B,oEAAoE;AACpE,yEAAyE;AACzE,wEAAwE;AACxE,qEAAqE;AACrE,kDAAkD;AAClD,OAAO,EACL,gBAAgB,GAMjB,MAAM,2BAA2B,CAAC;AAKnC,yCAAyC;AACzC,EAAE;AACF,yEAAyE;AACzE,kEAAkE;AAClE,oEAAoE;AACpE,qEAAqE;AACrE,2EAA2E;AAC3E,8EAA8E;AAC9E,0DAA0D;AAC1D,OAAO,EACL,kBAAkB,EAClB,kBAAkB,EAClB,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E;AACxE,sEAAsE;AACtE,sEAAsE;AACtE,OAAO,EACL,SAAS,EACT,uBAAuB,EAEvB,cAAc,GAGf,MAAM,oBAAoB,CAAC;AAE5B,yEAAyE;AACzE,0EAA0E;AAC1E,qEAAqE;AACrE,iEAAiE;AACjE,OAAO,EACL,IAAI,GAML,MAAM,6BAA6B,CAAC;AAErC,qEAAqE;AACrE,wEAAwE;AACxE,uEAAuE;AACvE,oEAAoE;AACpE,yDAAyD;AACzD,wEAAwE;AACxE,gDAAgD;AAChD,wEAAwE;AACxE,gEAAgE;AAEhE,wEAAwE;AACxE,wEAAwE;AACxE,uDAAuD;AAEvD,mEAAmE;AACnE,oEAAoE;AACpE,sDAAsD"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,oEAAoE;AACpE,8DAA8D;AAC9D,uEAAuE;AACvE,kEAAkE;AAClE,sEAAsE;AACtE,sDAAsD;AACtD,OAAO,8CAA8C,CAAC;AACtD,OAAO,2CAA2C,CAAC;AACnD,OAAO,4CAA4C,CAAC;AAsCpD,6BAA6B;AAC7B,cAAc,qBAAqB,CAAC;AAEpC,yEAAyE;AACzE,uDAAuD;AACvD,OAAO,EACL,cAAc,EACd,mBAAmB,EACnB,cAAc;AAEd,yEAAyE;AACzE,wEAAwE;AACxE,yEAAyE;AACzE,gBAAgB;AAChB,SAAS;AAET,2EAA2E;AAC3E,6EAA6E;AAC7E,6EAA6E;AAC7E,6DAA6D;AAC7D,YAAY;AAGZ,8EAA8E;AAC9E,6EAA6E;AAC7E,4EAA4E;AAC5E,yEAAyE;AACzE,4EAA4E;AAC5E,uCAAuC;AACvC,uBAAuB,EACvB,wBAAwB,GACzB,MAAM,kBAAkB,CAAC;AAC1B,oEAAoE;AACpE,yEAAyE;AACzE,wEAAwE;AACxE,qEAAqE;AACrE,kDAAkD;AAClD,OAAO,EACL,gBAAgB,GAMjB,MAAM,2BAA2B,CAAC;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xE,gEAAgE;AAChE,gEAAgE;AAChE,6CAA6C;AAC7C,EAAE;AACF,2FAA2F;AAC3F,wFAAwF;AAExF,OAAO,EACL,eAAe,GAIhB,MAAM,kCAAkC,CAAC;AAE1C,+DAA+D;AAE/D,oEAAoE;AACpE,gEAAgE;AAEhE,qEAAqE;AACrE,0DAA0D;AAC1D,cAAc,qBAAqB,CAAC;AAEpC,uEAAuE;AACvE,uEAAuE;AACvE,oEAAoE;AACpE,sEAAsE;AACtE,8CAA8C;AAE9C,wEAAwE;AACxE,sEAAsE;AACtE,sEAAsE;AACtE,OAAO,EACL,SAAS,EACT,uBAAuB,EAEvB,cAAc,GAGf,MAAM,oBAAoB,CAAC;AAE5B,yEAAyE;AACzE,0EAA0E;AAC1E,qEAAqE;AACrE,iEAAiE;AACjE,OAAO,EACL,IAAI,GAML,MAAM,6BAA6B,CAAC;AAErC,qEAAqE;AACrE,wEAAwE;AACxE,uEAAuE;AACvE,oEAAoE;AACpE,yDAAyD;AACzD,wEAAwE;AACxE,gDAAgD;AAChD,wEAAwE;AACxE,gEAAgE;AAEhE,wEAAwE;AACxE,wEAAwE;AACxE,uDAAuD;AAEvD,mEAAmE;AACnE,oEAAoE;AACpE,sDAAsD"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* argumentLeaves — what "a string argument" MEANS, in one place.
|
|
3
|
+
*
|
|
4
|
+
* Pattern: a pure generator leaf, zero imports.
|
|
5
|
+
* Role: two checks now read the arguments of a tool call — the choice
|
|
6
|
+
* seam's `unsupported-argument` (did the value come from what the run
|
|
7
|
+
* served?) and the write seam's `empty-lookup` (the run produced this
|
|
8
|
+
* value, and the lookup for it came back empty). They must agree,
|
|
9
|
+
* exactly, about which leaves of an arguments object are candidates
|
|
10
|
+
* and what their dot-paths are: the second check's whole job is to
|
|
11
|
+
* notice something about a value the first one already excused, and
|
|
12
|
+
* two spellings of "every string leaf" would eventually disagree
|
|
13
|
+
* about which value that was.
|
|
14
|
+
*
|
|
15
|
+
* The dot-path is the finding's `predicate` on both sides (`machine`,
|
|
16
|
+
* `filter.hosts.0`), so it is identity-bearing and not a convenience.
|
|
17
|
+
*/
|
|
18
|
+
/** Every string leaf of an arguments object, with its dot-path. */
|
|
19
|
+
export declare function stringLeaves(node: unknown, path: string): Generator<{
|
|
20
|
+
path: string;
|
|
21
|
+
value: string;
|
|
22
|
+
}>;
|
|
23
|
+
/**
|
|
24
|
+
* Below this, substring matching says nothing. Shared for the same reason the
|
|
25
|
+
* walk is: 'up' and 'a1' land inside unrelated words in any corpus, and a
|
|
26
|
+
* fence that moved on one check and not the other would leave a value one
|
|
27
|
+
* check judges and the other silently skips.
|
|
28
|
+
*/
|
|
29
|
+
export declare const MIN_CHECKED_LENGTH = 4;
|
|
30
|
+
/** Longest a single value is quoted at inside a finding's message. */
|
|
31
|
+
export declare const MAX_QUOTED_CHARS = 80;
|
|
32
|
+
/** One value, clipped to quoting length. */
|
|
33
|
+
export declare function clipValue(value: string): string;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* argumentLeaves — what "a string argument" MEANS, in one place.
|
|
3
|
+
*
|
|
4
|
+
* Pattern: a pure generator leaf, zero imports.
|
|
5
|
+
* Role: two checks now read the arguments of a tool call — the choice
|
|
6
|
+
* seam's `unsupported-argument` (did the value come from what the run
|
|
7
|
+
* served?) and the write seam's `empty-lookup` (the run produced this
|
|
8
|
+
* value, and the lookup for it came back empty). They must agree,
|
|
9
|
+
* exactly, about which leaves of an arguments object are candidates
|
|
10
|
+
* and what their dot-paths are: the second check's whole job is to
|
|
11
|
+
* notice something about a value the first one already excused, and
|
|
12
|
+
* two spellings of "every string leaf" would eventually disagree
|
|
13
|
+
* about which value that was.
|
|
14
|
+
*
|
|
15
|
+
* The dot-path is the finding's `predicate` on both sides (`machine`,
|
|
16
|
+
* `filter.hosts.0`), so it is identity-bearing and not a convenience.
|
|
17
|
+
*/
|
|
18
|
+
/** Every string leaf of an arguments object, with its dot-path. */
|
|
19
|
+
export function* stringLeaves(node, path) {
|
|
20
|
+
if (typeof node === 'string') {
|
|
21
|
+
yield { path, value: node };
|
|
22
|
+
return;
|
|
23
|
+
}
|
|
24
|
+
if (Array.isArray(node)) {
|
|
25
|
+
for (let i = 0; i < node.length; i++) {
|
|
26
|
+
yield* stringLeaves(node[i], path === '' ? String(i) : `${path}.${String(i)}`);
|
|
27
|
+
}
|
|
28
|
+
return;
|
|
29
|
+
}
|
|
30
|
+
if (node !== null && typeof node === 'object') {
|
|
31
|
+
for (const [key, value] of Object.entries(node)) {
|
|
32
|
+
yield* stringLeaves(value, path === '' ? key : `${path}.${key}`);
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Below this, substring matching says nothing. Shared for the same reason the
|
|
38
|
+
* walk is: 'up' and 'a1' land inside unrelated words in any corpus, and a
|
|
39
|
+
* fence that moved on one check and not the other would leave a value one
|
|
40
|
+
* check judges and the other silently skips.
|
|
41
|
+
*/
|
|
42
|
+
export const MIN_CHECKED_LENGTH = 4;
|
|
43
|
+
/** Longest a single value is quoted at inside a finding's message. */
|
|
44
|
+
export const MAX_QUOTED_CHARS = 80;
|
|
45
|
+
/** One value, clipped to quoting length. */
|
|
46
|
+
export function clipValue(value) {
|
|
47
|
+
return value.length <= MAX_QUOTED_CHARS ? value : `${value.slice(0, MAX_QUOTED_CHARS - 1)}…`;
|
|
48
|
+
}
|
|
49
|
+
//# sourceMappingURL=argumentLeaves.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"argumentLeaves.js","sourceRoot":"","sources":["../../../src/integrity/argumentLeaves.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,mEAAmE;AACnE,MAAM,SAAS,CAAC,CAAC,YAAY,CAC3B,IAAa,EACb,IAAY;IAEZ,IAAI,OAAO,IAAI,KAAK,QAAQ,EAAE,CAAC;QAC7B,MAAM,EAA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
|
* compose-invariant: a mount kernel is configured; dangling: at
|
|
11
11
|
* least one tool declared `argumentsFrom`, which arms BOTH the
|
|
12
12
|
* compose-seam dangling-reference check and the choice-seam
|
|
13
|
-
* unsupported-argument check off the same declaration
|
|
13
|
+
* unsupported-argument check off the same declaration;
|
|
14
|
+
* empty-lookup: that same declaration AND the operator's
|
|
15
|
+
* `noticeEmptyLookups` dial — two halves, because an advisory that
|
|
16
|
+
* armed itself off a declaration made for something else would not
|
|
17
|
+
* be opt-in at all).
|
|
14
18
|
* Registration is what makes silence auditable — an unregistered
|
|
15
19
|
* check is honest
|
|
16
20
|
* absence, a registered one that never notes is the wiring rot
|
|
@@ -45,6 +49,17 @@ export interface IntegrityChecksPresent {
|
|
|
45
49
|
readonly dangling: boolean;
|
|
46
50
|
/** A `.claims()` contract is declared (9.61.0). */
|
|
47
51
|
readonly claim?: boolean;
|
|
52
|
+
/**
|
|
53
|
+
* The write seam's `empty-lookup` notice (9.77.0) — armed only when BOTH
|
|
54
|
+
* halves are true: the operator turned `noticeEmptyLookups` on AND at least
|
|
55
|
+
* one tool declared `argumentsFrom`. Deliberately NOT armed by the
|
|
56
|
+
* declaration alone, unlike its two siblings: this check would otherwise
|
|
57
|
+
* start filing advisories in every app that already declares
|
|
58
|
+
* `argumentsFrom` for the other two, and an absent dial must leave a run
|
|
59
|
+
* byte-identical. Absent → a registered `not-applicable` ROW, never
|
|
60
|
+
* silence.
|
|
61
|
+
*/
|
|
62
|
+
readonly emptyLookup?: boolean;
|
|
48
63
|
}
|
|
49
64
|
/**
|
|
50
65
|
* Start one run's ledger: register the present checks and, in dev posture,
|
|
@@ -10,7 +10,11 @@
|
|
|
10
10
|
* compose-invariant: a mount kernel is configured; dangling: at
|
|
11
11
|
* least one tool declared `argumentsFrom`, which arms BOTH the
|
|
12
12
|
* compose-seam dangling-reference check and the choice-seam
|
|
13
|
-
* unsupported-argument check off the same declaration
|
|
13
|
+
* unsupported-argument check off the same declaration;
|
|
14
|
+
* empty-lookup: that same declaration AND the operator's
|
|
15
|
+
* `noticeEmptyLookups` dial — two halves, because an advisory that
|
|
16
|
+
* armed itself off a declaration made for something else would not
|
|
17
|
+
* be opt-in at all).
|
|
14
18
|
* Registration is what makes silence auditable — an unregistered
|
|
15
19
|
* check is honest
|
|
16
20
|
* absence, a registered one that never notes is the wiring rot
|
|
@@ -29,6 +33,7 @@ import { wireViolationsOf } from '../invariant-violation/wire.js';
|
|
|
29
33
|
import { danglingReferencesOf } from '../dangling-reference/check.js';
|
|
30
34
|
import { unsupportedArgumentsOf } from '../unsupported-argument/check.js';
|
|
31
35
|
import { unsupportedClaimsOf } from '../unsupported-claim/check.js';
|
|
36
|
+
import { emptyLookupOf, readLookupResult } from '../empty-lookup/check.js';
|
|
32
37
|
/**
|
|
33
38
|
* Start one run's ledger: register the present checks and, in dev posture,
|
|
34
39
|
* prove each can still catch its own synthetic defect.
|
|
@@ -73,6 +78,7 @@ export function beginIntegrityRun(present, posture) {
|
|
|
73
78
|
armed('dangling-reference', 'compose', present.dangling === true);
|
|
74
79
|
armed('unsupported-argument', 'choice', present.dangling === true);
|
|
75
80
|
armed('unsupported-claim', 'claim', present.claim === true);
|
|
81
|
+
armed('empty-lookup', 'write', present.emptyLookup === true);
|
|
76
82
|
if (posture !== 'dev')
|
|
77
83
|
return ledger;
|
|
78
84
|
// The canaries — one known-bad fixture per REGISTERED check, through the
|
|
@@ -142,6 +148,24 @@ export function beginIntegrityRun(present, posture) {
|
|
|
142
148
|
if (caught.findings.length > 0)
|
|
143
149
|
ledger.noteSynthetic('unsupported-claim', 'claim', 'caught');
|
|
144
150
|
}
|
|
151
|
+
{
|
|
152
|
+
// The write-seam canary (9.77.0): a lookup whose argument the fixture's
|
|
153
|
+
// PRODUCER really did serve, answering with a zero-row rowset. Both
|
|
154
|
+
// halves of the join are deliberately load-bearing — remove the ground
|
|
155
|
+
// and the value is not the run's own; make the rowset non-empty and
|
|
156
|
+
// there is nothing to notice — so a check that finds nothing here has
|
|
157
|
+
// lost one of the two facts it exists to pair.
|
|
158
|
+
ledger.noteSynthetic('empty-lookup', 'write', 'minted');
|
|
159
|
+
const caught = emptyLookupOf({
|
|
160
|
+
toolName: 'canary_tool',
|
|
161
|
+
toolCallId: 'canary',
|
|
162
|
+
args: { id: 'canary-grounded-id' },
|
|
163
|
+
argumentsFrom: ['canary_ground'],
|
|
164
|
+
reading: readLookupResult([], false),
|
|
165
|
+
}, [{ toolName: 'canary_ground', text: 'canary: served canary-grounded-id' }], -1);
|
|
166
|
+
if (caught.findings.length > 0)
|
|
167
|
+
ledger.noteSynthetic('empty-lookup', 'write', 'caught');
|
|
168
|
+
}
|
|
145
169
|
return ledger;
|
|
146
170
|
}
|
|
147
171
|
//# sourceMappingURL=lifecycle.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lifecycle.js","sourceRoot":"","sources":["../../../../src/integrity/disposition/lifecycle.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"lifecycle.js","sourceRoot":"","sources":["../../../../src/integrity/disposition/lifecycle.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAEH,OAAO,EAAE,iBAAiB,EAA0B,MAAM,aAAa,CAAC;AAGxE,OAAO,EAAE,qBAAqB,EAAE,MAAM,iCAAiC,CAAC;AACxE,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAClE,OAAO,EAAE,oBAAoB,EAAE,MAAM,gCAAgC,CAAC;AACtE,OAAO,EAAE,sBAAsB,EAAE,MAAM,kCAAkC,CAAC;AAC1E,OAAO,EAAE,mBAAmB,EAAE,MAAM,+BAA+B,CAAC;AACpE,OAAO,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAqC3E;;;GAGG;AACH,MAAM,UAAU,iBAAiB,CAC/B,OAA+B,EAC/B,OAAyB;IAEzB,MAAM,MAAM,GAAG,iBAAiB,EAAE,CAAC;IACnC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BACvB,KAAK,EAAE,cAAc;gBACrB,KAAK,EAAE,SAAS;gBAChB,QAAQ,EAAE,QAAQ;gBAClB,UAAU,EAAE,QAAQ;gBACpB,SAAS,EAAE,CAAC,CAAC;aACd;SACF,EACD,EAAE,MAAM,EAAE,mBAAmB,EAAE,EAC/B,CAAC,CAAC,CACH,CAAC;QACF,IAAI,MAAM,CAAC,QAAQ,CAAC,MAAM,GAAG,CAAC;YAAE,MAAM,CAAC,aAAa,CAAC,mBAAmB,EAAE,OAAO,EAAE,QAAQ,CAAC,CAAC;IAC/F,CAAC;IACD,CAAC;QACC,wEAAwE;QACxE,oEAAoE;QACpE,uEAAuE;QACvE,oEAAoE;QACpE,sEAAsE;QACtE,+CAA+C;QAC/C,MAAM,CAAC,aAAa,CAAC,cAAc,EAAE,OAAO,EAAE,QAAQ,CAAC,CAAC;QACxD,MAAM,MAAM,GAAG,aAAa,CAC1B;YACE,QAAQ,EAAE,aAAa;YACvB,UAAU,EAAE,QAAQ;YACpB,IAAI,EAAE,EAAE,EAAE,EAAE,oBAAoB,EAAE;YAClC,aAAa,EAAE,CAAC,eAAe,CAAC;YAChC,OAAO,EAAE,gBAAgB,CAAC,EAAE,EAAE,KAAK,CAAC;SACrC,EACD,CAAC,EAAE,QAAQ,EAAE,eAAe,EAAE,IAAI,EAAE,mCAAmC,EAAE,CAAC,EAC1E,CAAC,CAAC,CACH,CAAC;QACF,IAAI,MAAM,CAAC,QAAQ,CAAC,MAAM,GAAG,CAAC;YAAE,MAAM,CAAC,aAAa,CAAC,cAAc,EAAE,OAAO,EAAE,QAAQ,CAAC,CAAC;IAC1F,CAAC;IACD,OAAO,MAAM,CAAC;AAChB,CAAC"}
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* empty-lookup — the run itself produced this identifier, and the lookup for
|
|
3
|
+
* it found nothing. Filed at the WRITE seam, as an advisory, never an
|
|
4
|
+
* accusation.
|
|
5
|
+
*
|
|
6
|
+
* Pattern: pure function over (one finished call, the results its declared
|
|
7
|
+
* producers served); the domain check, one seam later than
|
|
8
|
+
* `unsupported-argument`.
|
|
9
|
+
* Role: the decidable fragment of "did this tool answer, or did it only
|
|
10
|
+
* appear to answer?".
|
|
11
|
+
*
|
|
12
|
+
* THE MEASURED FAILURE. A triage agent's reverse-lookup tool filtered a
|
|
13
|
+
* column before a pivot, so the column did not exist yet and EVERY reverse
|
|
14
|
+
* lookup returned an empty result — for every identifier, always. The tool
|
|
15
|
+
* then answered SUCCESSFULLY with an empty list, and the agent reported in a
|
|
16
|
+
* table, with confidence, that the device was "not currently logged in to any
|
|
17
|
+
* port on the collected switches" and advised checking physical cabling. It
|
|
18
|
+
* was logged in the whole time. Nothing in the framework noticed, because an
|
|
19
|
+
* empty result from a broken filter is byte-identical to an empty result from
|
|
20
|
+
* a genuine absence.
|
|
21
|
+
*
|
|
22
|
+
* WHAT THE LIBRARY ALREADY KNOWS, and this check is nothing more than the
|
|
23
|
+
* join of the two:
|
|
24
|
+
* (a) the identifier was GROUNDED — it came out of an earlier tool result
|
|
25
|
+
* in THIS run, from a tool the consumer's author named in
|
|
26
|
+
* `Tool.argumentsFrom`;
|
|
27
|
+
* (b) the lookup keyed on it came back EMPTY.
|
|
28
|
+
* When the run produced the identifier and the lookup for it finds nothing,
|
|
29
|
+
* that is worth filing. It is not worth accusing anyone of.
|
|
30
|
+
*
|
|
31
|
+
* THE CEILING, and it is the whole reason this is an advisory: an empty
|
|
32
|
+
* answer can be perfectly true. The device may exist and simply have no
|
|
33
|
+
* logins right now. NOTHING IN THIS FILE CAN TELL THOSE APART, and nothing in
|
|
34
|
+
* this file pretends to — the finding says "here is a pair worth a look", the
|
|
35
|
+
* record carries the ceiling sentence verbatim, and the same finding is filed
|
|
36
|
+
* for the true absence and the broken filter alike. A check that guessed
|
|
37
|
+
* which one it was looking at would be inventing the certainty the field
|
|
38
|
+
* failure was made of.
|
|
39
|
+
*
|
|
40
|
+
* DECLARED, NEVER INFERRED — the `argumentsFrom` precedent, THIRD use. A tool
|
|
41
|
+
* is this check's subject only because its author said its arguments come
|
|
42
|
+
* from another tool's results. One declaration now arms three seams:
|
|
43
|
+
* `dangling-reference` asks whether the ground is still in reach when the
|
|
44
|
+
* tool is OFFERED, `unsupported-argument` whether the value the model chose
|
|
45
|
+
* came from that ground when the tool was CALLED, and this whether the ground
|
|
46
|
+
* the run really did serve then found anything when the tool ANSWERED.
|
|
47
|
+
*
|
|
48
|
+
* WHAT COUNTS AS EMPTY — and what this refuses to judge. See
|
|
49
|
+
* {@link readLookupResult}. A rowset is counted, never interpreted; an
|
|
50
|
+
* absence is read from the marker its own helper mints. Every other shape a
|
|
51
|
+
* tool has ever returned — a sentence, an object, a `null`, a claim ticket —
|
|
52
|
+
* is BESPOKE: the library cannot see whether it holds rows, so the encounter
|
|
53
|
+
* is `not-applicable` and says so in the ledger. That row is the point. A
|
|
54
|
+
* check that silently skipped what it could not read would be the decoration
|
|
55
|
+
* the disposition family exists to make impossible.
|
|
56
|
+
*
|
|
57
|
+
* Detection only. Nothing here blocks, retries, rewrites or delays anything;
|
|
58
|
+
* the result the model reads is the result the tool returned.
|
|
59
|
+
*/
|
|
60
|
+
import type { Disposition } from '../disposition/types.js';
|
|
61
|
+
import type { ContextError } from '../finding/types.js';
|
|
62
|
+
/**
|
|
63
|
+
* THE CEILING, as one string with one owner.
|
|
64
|
+
*
|
|
65
|
+
* Quoted verbatim into every finding's message, into the check's README and
|
|
66
|
+
* into its docs page, so the bound cannot drift out of one of them and leave
|
|
67
|
+
* a reader thinking the library knows more than it does.
|
|
68
|
+
*/
|
|
69
|
+
export declare const EMPTY_LOOKUP_CEILING: string;
|
|
70
|
+
/** What the library could read about a finished lookup's result. */
|
|
71
|
+
export interface LookupResultReading {
|
|
72
|
+
/** `'rowset'` — an array, counted. `'absence'` — the `absent()` envelope. */
|
|
73
|
+
readonly shape: 'rowset' | 'absence';
|
|
74
|
+
readonly empty: boolean;
|
|
75
|
+
/** Rows counted, for a rowset. Absent for an absence, which declares itself. */
|
|
76
|
+
readonly rows?: number;
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* READ a finished result's shape, or decline to.
|
|
80
|
+
*
|
|
81
|
+
* The two readable shapes, and why only these two:
|
|
82
|
+
*
|
|
83
|
+
* • a **rowset** — an array. Its length is COUNTED, not interpreted: zero
|
|
84
|
+
* rows is zero rows, and no judgement about what the tool meant is
|
|
85
|
+
* involved. This is the shape the recorded failure actually returned.
|
|
86
|
+
* • an **absence** — the `absent()` envelope, whose author said in so many
|
|
87
|
+
* words "the search ran and matched nothing".
|
|
88
|
+
*
|
|
89
|
+
* Everything else returns `undefined`, which the caller files as
|
|
90
|
+
* `not-applicable`. A prose sentence, a bespoke `{ rows: [...] }` wrapper, a
|
|
91
|
+
* `null`, a placement claim ticket — the library cannot see rows in any of
|
|
92
|
+
* them, and guessing is how a checker starts lying.
|
|
93
|
+
*
|
|
94
|
+
* @param value the tool's own answer, as it returned it.
|
|
95
|
+
* @param declaredAbsence whether `readAbsence` recognized the value. PASSED
|
|
96
|
+
* IN rather than re-derived here on purpose: the `af_absent` marker has
|
|
97
|
+
* exactly one owner (`core/agent/coverage/absent.ts`), a second spelling of
|
|
98
|
+
* a reserved word would eventually disagree with the first, and
|
|
99
|
+
* `src/integrity/` stays a leaf that imports no agent code.
|
|
100
|
+
*/
|
|
101
|
+
export declare function readLookupResult(value: unknown, declaredAbsence: boolean): LookupResultReading | undefined;
|
|
102
|
+
/** One finished call to a tool whose author declared where its arguments come from. */
|
|
103
|
+
export interface EmptyLookupCall {
|
|
104
|
+
/** The CONSUMER — the tool that was called and answered. */
|
|
105
|
+
readonly toolName: string;
|
|
106
|
+
/** The provider's id for this call — what the witness points a reader at. */
|
|
107
|
+
readonly toolCallId: string;
|
|
108
|
+
readonly args: Readonly<Record<string, unknown>>;
|
|
109
|
+
/** `Tool.argumentsFrom` — the tools whose results were meant to ground these arguments. */
|
|
110
|
+
readonly argumentsFrom: readonly string[];
|
|
111
|
+
/** What the library could read about the result — `undefined` = bespoke shape. */
|
|
112
|
+
readonly reading: LookupResultReading | undefined;
|
|
113
|
+
}
|
|
114
|
+
/** One earlier tool result this run served, with the tool that produced it. */
|
|
115
|
+
export interface ProducedResult {
|
|
116
|
+
readonly toolName: string;
|
|
117
|
+
/** The result exactly as the run served it into the conversation. */
|
|
118
|
+
readonly text: string;
|
|
119
|
+
}
|
|
120
|
+
/** One encounter's outcome: the findings, and the disposition it earns. */
|
|
121
|
+
export interface EmptyLookupEncounter {
|
|
122
|
+
readonly findings: readonly ContextError[];
|
|
123
|
+
/**
|
|
124
|
+
* The ledger row this encounter files — computed HERE, beside the rules
|
|
125
|
+
* that decide it, so "the library refused to judge this shape" is provable
|
|
126
|
+
* without a live agent.
|
|
127
|
+
*/
|
|
128
|
+
readonly disposition: Disposition;
|
|
129
|
+
}
|
|
130
|
+
/**
|
|
131
|
+
* Judge one finished call to an armed tool.
|
|
132
|
+
*
|
|
133
|
+
* @param call the call and what the library could read of its result. The
|
|
134
|
+
* caller has already established the tool declared `argumentsFrom`;
|
|
135
|
+
* nothing here re-decides who is a subject.
|
|
136
|
+
* @param produced every tool result this run served BEFORE this call, with
|
|
137
|
+
* the tool that produced each. Filtered to the declared producers here.
|
|
138
|
+
* @param epoch the run iteration, stamped on every witness.
|
|
139
|
+
*/
|
|
140
|
+
export declare function emptyLookupOf(call: EmptyLookupCall, produced: readonly ProducedResult[], epoch: number): EmptyLookupEncounter;
|
|
@@ -0,0 +1,212 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* empty-lookup — the run itself produced this identifier, and the lookup for
|
|
3
|
+
* it found nothing. Filed at the WRITE seam, as an advisory, never an
|
|
4
|
+
* accusation.
|
|
5
|
+
*
|
|
6
|
+
* Pattern: pure function over (one finished call, the results its declared
|
|
7
|
+
* producers served); the domain check, one seam later than
|
|
8
|
+
* `unsupported-argument`.
|
|
9
|
+
* Role: the decidable fragment of "did this tool answer, or did it only
|
|
10
|
+
* appear to answer?".
|
|
11
|
+
*
|
|
12
|
+
* THE MEASURED FAILURE. A triage agent's reverse-lookup tool filtered a
|
|
13
|
+
* column before a pivot, so the column did not exist yet and EVERY reverse
|
|
14
|
+
* lookup returned an empty result — for every identifier, always. The tool
|
|
15
|
+
* then answered SUCCESSFULLY with an empty list, and the agent reported in a
|
|
16
|
+
* table, with confidence, that the device was "not currently logged in to any
|
|
17
|
+
* port on the collected switches" and advised checking physical cabling. It
|
|
18
|
+
* was logged in the whole time. Nothing in the framework noticed, because an
|
|
19
|
+
* empty result from a broken filter is byte-identical to an empty result from
|
|
20
|
+
* a genuine absence.
|
|
21
|
+
*
|
|
22
|
+
* WHAT THE LIBRARY ALREADY KNOWS, and this check is nothing more than the
|
|
23
|
+
* join of the two:
|
|
24
|
+
* (a) the identifier was GROUNDED — it came out of an earlier tool result
|
|
25
|
+
* in THIS run, from a tool the consumer's author named in
|
|
26
|
+
* `Tool.argumentsFrom`;
|
|
27
|
+
* (b) the lookup keyed on it came back EMPTY.
|
|
28
|
+
* When the run produced the identifier and the lookup for it finds nothing,
|
|
29
|
+
* that is worth filing. It is not worth accusing anyone of.
|
|
30
|
+
*
|
|
31
|
+
* THE CEILING, and it is the whole reason this is an advisory: an empty
|
|
32
|
+
* answer can be perfectly true. The device may exist and simply have no
|
|
33
|
+
* logins right now. NOTHING IN THIS FILE CAN TELL THOSE APART, and nothing in
|
|
34
|
+
* this file pretends to — the finding says "here is a pair worth a look", the
|
|
35
|
+
* record carries the ceiling sentence verbatim, and the same finding is filed
|
|
36
|
+
* for the true absence and the broken filter alike. A check that guessed
|
|
37
|
+
* which one it was looking at would be inventing the certainty the field
|
|
38
|
+
* failure was made of.
|
|
39
|
+
*
|
|
40
|
+
* DECLARED, NEVER INFERRED — the `argumentsFrom` precedent, THIRD use. A tool
|
|
41
|
+
* is this check's subject only because its author said its arguments come
|
|
42
|
+
* from another tool's results. One declaration now arms three seams:
|
|
43
|
+
* `dangling-reference` asks whether the ground is still in reach when the
|
|
44
|
+
* tool is OFFERED, `unsupported-argument` whether the value the model chose
|
|
45
|
+
* came from that ground when the tool was CALLED, and this whether the ground
|
|
46
|
+
* the run really did serve then found anything when the tool ANSWERED.
|
|
47
|
+
*
|
|
48
|
+
* WHAT COUNTS AS EMPTY — and what this refuses to judge. See
|
|
49
|
+
* {@link readLookupResult}. A rowset is counted, never interpreted; an
|
|
50
|
+
* absence is read from the marker its own helper mints. Every other shape a
|
|
51
|
+
* tool has ever returned — a sentence, an object, a `null`, a claim ticket —
|
|
52
|
+
* is BESPOKE: the library cannot see whether it holds rows, so the encounter
|
|
53
|
+
* is `not-applicable` and says so in the ledger. That row is the point. A
|
|
54
|
+
* check that silently skipped what it could not read would be the decoration
|
|
55
|
+
* the disposition family exists to make impossible.
|
|
56
|
+
*
|
|
57
|
+
* Detection only. Nothing here blocks, retries, rewrites or delays anything;
|
|
58
|
+
* the result the model reads is the result the tool returned.
|
|
59
|
+
*/
|
|
60
|
+
import { MIN_CHECKED_LENGTH, clipValue, stringLeaves } from '../argumentLeaves.js';
|
|
61
|
+
/**
|
|
62
|
+
* THE CEILING, as one string with one owner.
|
|
63
|
+
*
|
|
64
|
+
* Quoted verbatim into every finding's message, into the check's README and
|
|
65
|
+
* into its docs page, so the bound cannot drift out of one of them and leave
|
|
66
|
+
* a reader thinking the library knows more than it does.
|
|
67
|
+
*/
|
|
68
|
+
export const EMPTY_LOOKUP_CEILING = 'An empty result can be perfectly true — the thing may exist and simply have nothing to show ' +
|
|
69
|
+
'right now — so this is a place to look, never a verdict that anything is wrong.';
|
|
70
|
+
/**
|
|
71
|
+
* READ a finished result's shape, or decline to.
|
|
72
|
+
*
|
|
73
|
+
* The two readable shapes, and why only these two:
|
|
74
|
+
*
|
|
75
|
+
* • a **rowset** — an array. Its length is COUNTED, not interpreted: zero
|
|
76
|
+
* rows is zero rows, and no judgement about what the tool meant is
|
|
77
|
+
* involved. This is the shape the recorded failure actually returned.
|
|
78
|
+
* • an **absence** — the `absent()` envelope, whose author said in so many
|
|
79
|
+
* words "the search ran and matched nothing".
|
|
80
|
+
*
|
|
81
|
+
* Everything else returns `undefined`, which the caller files as
|
|
82
|
+
* `not-applicable`. A prose sentence, a bespoke `{ rows: [...] }` wrapper, a
|
|
83
|
+
* `null`, a placement claim ticket — the library cannot see rows in any of
|
|
84
|
+
* them, and guessing is how a checker starts lying.
|
|
85
|
+
*
|
|
86
|
+
* @param value the tool's own answer, as it returned it.
|
|
87
|
+
* @param declaredAbsence whether `readAbsence` recognized the value. PASSED
|
|
88
|
+
* IN rather than re-derived here on purpose: the `af_absent` marker has
|
|
89
|
+
* exactly one owner (`core/agent/coverage/absent.ts`), a second spelling of
|
|
90
|
+
* a reserved word would eventually disagree with the first, and
|
|
91
|
+
* `src/integrity/` stays a leaf that imports no agent code.
|
|
92
|
+
*/
|
|
93
|
+
export function readLookupResult(value, declaredAbsence) {
|
|
94
|
+
if (declaredAbsence)
|
|
95
|
+
return { shape: 'absence', empty: true };
|
|
96
|
+
if (Array.isArray(value))
|
|
97
|
+
return { shape: 'rowset', empty: value.length === 0, rows: value.length };
|
|
98
|
+
return undefined;
|
|
99
|
+
}
|
|
100
|
+
/**
|
|
101
|
+
* Judge one finished call to an armed tool.
|
|
102
|
+
*
|
|
103
|
+
* @param call the call and what the library could read of its result. The
|
|
104
|
+
* caller has already established the tool declared `argumentsFrom`;
|
|
105
|
+
* nothing here re-decides who is a subject.
|
|
106
|
+
* @param produced every tool result this run served BEFORE this call, with
|
|
107
|
+
* the tool that produced each. Filtered to the declared producers here.
|
|
108
|
+
* @param epoch the run iteration, stamped on every witness.
|
|
109
|
+
*/
|
|
110
|
+
export function emptyLookupOf(call, produced, epoch) {
|
|
111
|
+
// A shape the library cannot read is not a pass and not a fail. It is the
|
|
112
|
+
// check looking at a subject that is out of its scope BY RULE, which is
|
|
113
|
+
// exactly what `not-applicable` was minted for.
|
|
114
|
+
if (call.reading === undefined)
|
|
115
|
+
return { findings: [], disposition: 'not-applicable' };
|
|
116
|
+
// The lookup found something. Nothing to say — and a `checked-pass` rather
|
|
117
|
+
// than silence, because a check that only speaks when it fires cannot be
|
|
118
|
+
// told apart from one that was never wired.
|
|
119
|
+
if (!call.reading.empty)
|
|
120
|
+
return { findings: [], disposition: 'checked-pass' };
|
|
121
|
+
// Only the DECLARED producers ground anything here. The choice seam asks
|
|
122
|
+
// the broader question (did ANYTHING the run served carry this value); this
|
|
123
|
+
// one is narrower on purpose — `argumentsFrom` says where the value was
|
|
124
|
+
// supposed to come from, and "it came from exactly there, and the lookup
|
|
125
|
+
// still found nothing" is the pair worth a person's attention.
|
|
126
|
+
const grounds = produced
|
|
127
|
+
.filter((p) => call.argumentsFrom.includes(p.toolName) && p.text.length > 0)
|
|
128
|
+
.map((p) => ({ toolName: p.toolName, lowered: p.text.toLowerCase() }));
|
|
129
|
+
// The declared ground served nothing at all in this run, so there is no
|
|
130
|
+
// corpus to join against and no identity edge between the two tools. Not a
|
|
131
|
+
// pass — the check could not run. `unreachable` is the family's word for
|
|
132
|
+
// exactly that, and it is the falsification instrument: an `empty-lookup`
|
|
133
|
+
// row dominated by `unreachable` means apps are calling consumers before
|
|
134
|
+
// their declared producers, and this check is watching a seam that is not
|
|
135
|
+
// where their identifiers come from.
|
|
136
|
+
if (grounds.length === 0)
|
|
137
|
+
return { findings: [], disposition: 'unreachable' };
|
|
138
|
+
const consumer = { kind: 'tool', id: call.toolName };
|
|
139
|
+
const emptyPhrase = call.reading.shape === 'absence'
|
|
140
|
+
? 'a declared absence — the tool said the search ran and matched nothing'
|
|
141
|
+
: 'a rowset with zero rows';
|
|
142
|
+
const findings = [];
|
|
143
|
+
for (const leaf of stringLeaves(call.args, '')) {
|
|
144
|
+
const value = leaf.value.trim();
|
|
145
|
+
// The same fences as the choice seam, for the same reasons and from the
|
|
146
|
+
// same file: non-strings are never identifier-shaped, and below four
|
|
147
|
+
// characters substring matching is noise in both directions.
|
|
148
|
+
if (value.length < MIN_CHECKED_LENGTH)
|
|
149
|
+
continue;
|
|
150
|
+
const needle = value.toLowerCase();
|
|
151
|
+
// Substring, case-insensitive — deliberately THE SAME rule the choice
|
|
152
|
+
// seam grounds by. The two checks must agree about what "this value came
|
|
153
|
+
// from that tool" means, or a value could fall between them and be seen
|
|
154
|
+
// by neither.
|
|
155
|
+
const ground = grounds.find((g) => g.lowered.includes(needle));
|
|
156
|
+
if (ground === undefined)
|
|
157
|
+
continue;
|
|
158
|
+
const producer = { kind: 'tool', id: ground.toolName };
|
|
159
|
+
const witnesses = [
|
|
160
|
+
{
|
|
161
|
+
subject: consumer,
|
|
162
|
+
predicate: leaf.path,
|
|
163
|
+
value: leaf.value,
|
|
164
|
+
epoch,
|
|
165
|
+
stratum: 'asserted',
|
|
166
|
+
provenance: `tool call ${call.toolCallId}: argument '${leaf.path}' as the model chose it`,
|
|
167
|
+
},
|
|
168
|
+
{
|
|
169
|
+
subject: producer,
|
|
170
|
+
predicate: leaf.path,
|
|
171
|
+
value: 'served this value earlier in this run',
|
|
172
|
+
epoch,
|
|
173
|
+
stratum: 'asserted',
|
|
174
|
+
provenance: `'${ground.toolName}' is a declared ground of '${call.toolName}' ` +
|
|
175
|
+
`(Tool.argumentsFrom) and one of its results in this run carries the value`,
|
|
176
|
+
},
|
|
177
|
+
{
|
|
178
|
+
subject: consumer,
|
|
179
|
+
predicate: leaf.path,
|
|
180
|
+
value: `found nothing — ${emptyPhrase}`,
|
|
181
|
+
epoch,
|
|
182
|
+
stratum: 'asserted',
|
|
183
|
+
provenance: `tool call ${call.toolCallId}: the result, as the tool returned it`,
|
|
184
|
+
},
|
|
185
|
+
];
|
|
186
|
+
findings.push({
|
|
187
|
+
kind: 'empty-lookup',
|
|
188
|
+
seam: 'write',
|
|
189
|
+
subjects: [consumer, producer],
|
|
190
|
+
// The dot-path IS the discriminator, exactly as at the choice seam: two
|
|
191
|
+
// arguments of one call are two notices. The stated limit is the same
|
|
192
|
+
// one — the SAME argument re-chosen with a different value stays one
|
|
193
|
+
// finding, and the ledger's `findings` count is what says how often.
|
|
194
|
+
predicate: leaf.path,
|
|
195
|
+
witnesses,
|
|
196
|
+
epoch,
|
|
197
|
+
// Doubt, not contradiction. Counted apart from real defects everywhere
|
|
198
|
+
// the family reports, because this check can never know it found one.
|
|
199
|
+
advisory: true,
|
|
200
|
+
message: `'${call.toolName}' was called with ${leaf.path} = "${clipValue(value)}" — a value ` +
|
|
201
|
+
`this run itself produced, in a result from '${ground.toolName}', which ` +
|
|
202
|
+
`'${call.toolName}' declares as where its arguments come from — and the lookup came ` +
|
|
203
|
+
`back with ${emptyPhrase}. That pairing is what makes it worth a look: the run had ` +
|
|
204
|
+
`the identifier, so an empty answer is either a true absence or a lookup that could ` +
|
|
205
|
+
`never have matched, and those two are byte-identical from here. ` +
|
|
206
|
+
`${EMPTY_LOOKUP_CEILING} Call id ${call.toolCallId}. Nothing here blocked the call, ` +
|
|
207
|
+
`changed the result, or retried anything.`,
|
|
208
|
+
});
|
|
209
|
+
}
|
|
210
|
+
return { findings, disposition: findings.length > 0 ? 'checked-fail' : 'checked-pass' };
|
|
211
|
+
}
|
|
212
|
+
//# sourceMappingURL=check.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"check.js","sourceRoot":"","sources":["../../../../src/integrity/empty-lookup/check.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0DG;AAEH,OAAO,EAAE,kBAAkB,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAKnF;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAC/B,8FAA8F;IAC9F,iFAAiF,CAAC;AAWpF;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,MAAM,UAAU,gBAAgB,CAC9B,KAAc,EACd,eAAwB;IAExB,IAAI,eAAe;QAAE,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;IAC9D,IA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|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
import type { Assertion, SubjectRef } from '../assertion/types.js';
|
|
21
21
|
import type { IntegritySeam } from '../disposition/types.js';
|
|
22
22
|
/**
|
|
23
|
-
* The
|
|
23
|
+
* The six defect classes, by their plain names:
|
|
24
24
|
*
|
|
25
25
|
* | kind | means | mechanism |
|
|
26
26
|
* |---|---|---|
|
|
@@ -29,8 +29,17 @@ import type { IntegritySeam } from '../disposition/types.js';
|
|
|
29
29
|
* | `dangling-reference` | offered an action whose inputs are no longer available | closure |
|
|
30
30
|
* | `duplicate-execution` | did settled work again | once |
|
|
31
31
|
* | `unsupported-claim` | stated something the record does not support | grounding |
|
|
32
|
+
* | `empty-lookup` | the run produced this value, and the lookup for it found nothing | join |
|
|
33
|
+
*
|
|
34
|
+
* `empty-lookup` is the one class that is ADVISORY BY CONSTRUCTION (9.77.0) —
|
|
35
|
+
* every finding it files carries `advisory: true`, because an empty result
|
|
36
|
+
* can be perfectly true and nothing in the library can tell a true absence
|
|
37
|
+
* from a lookup that could never have matched. It is a place to look, not a
|
|
38
|
+
* defect that was proven. It is deliberately NOT `dangling-reference`, whose
|
|
39
|
+
* meaning is the opposite: there the ground has left reach, here the ground
|
|
40
|
+
* is in reach and the lookup came back with nothing.
|
|
32
41
|
*/
|
|
33
|
-
export type ContextErrorKind = 'invariant-violation' | 'unsupported-argument' | 'dangling-reference' | 'duplicate-execution' | 'unsupported-claim';
|
|
42
|
+
export type ContextErrorKind = 'invariant-violation' | 'unsupported-argument' | 'dangling-reference' | 'duplicate-execution' | 'unsupported-claim' | 'empty-lookup';
|
|
34
43
|
/** One detected context error — a labelled instance, automatically. */
|
|
35
44
|
export interface ContextError {
|
|
36
45
|
readonly kind: ContextErrorKind;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/integrity/finding/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;
|
|
1
|
+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