iterate-kernel 0.1.6 → 0.1.8
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/dist/convergence.d.ts +13 -4
- package/dist/convergence.d.ts.map +1 -1
- package/dist/convergence.js +13 -3
- package/dist/convergence.js.map +1 -1
- package/dist/evidence-pack.d.ts +15 -0
- package/dist/evidence-pack.d.ts.map +1 -1
- package/dist/evidence-pack.js +17 -2
- package/dist/evidence-pack.js.map +1 -1
- package/fixtures/convergence.ok-01.json +33 -1
- package/package.json +1 -1
- package/schemas/convergence-round-state.schema.json +15 -3
- package/schemas/evidence-pack.schema.json +8 -3
package/dist/convergence.d.ts
CHANGED
|
@@ -21,24 +21,33 @@ export declare const RoundStateSchema: z.ZodObject<{
|
|
|
21
21
|
openFindings: z.ZodNumber;
|
|
22
22
|
/** False when the engine never got to evidence something (refused, crashed, unattached). */
|
|
23
23
|
evidenceComplete: z.ZodBoolean;
|
|
24
|
-
/**
|
|
25
|
-
|
|
24
|
+
/**
|
|
25
|
+
* The engine's own circuit-breaker level for this run; 3 is tripped.
|
|
26
|
+
*
|
|
27
|
+
* OPTIONAL, and absence is not the same claim as 0. `0` says "a breaker exists and it has
|
|
28
|
+
* not tripped"; absence says "this run has no breaker channel at all" — which is the normal
|
|
29
|
+
* shape of an iterate loop that never touched the GUI engine. The distinction changes no
|
|
30
|
+
* verdict today (only `>= 3` halts), but collapsing it would force a producer that never
|
|
31
|
+
* looked to assert a measurement it did not take, and that is the exact failure this
|
|
32
|
+
* contract's `unmeasured` state exists to prevent.
|
|
33
|
+
*/
|
|
34
|
+
breakerLevel: z.ZodOptional<z.ZodNumber>;
|
|
26
35
|
}, "strict", z.ZodTypeAny, {
|
|
27
36
|
round: number;
|
|
28
37
|
maxRounds: number;
|
|
29
38
|
invariantState: "pass" | "fail" | "error" | "unmeasured";
|
|
30
39
|
openFindings: number;
|
|
31
40
|
evidenceComplete: boolean;
|
|
32
|
-
breakerLevel: number;
|
|
33
41
|
schemaVersion?: "iterate.convergence/0.1" | undefined;
|
|
42
|
+
breakerLevel?: number | undefined;
|
|
34
43
|
}, {
|
|
35
44
|
round: number;
|
|
36
45
|
maxRounds: number;
|
|
37
46
|
invariantState: "pass" | "fail" | "error" | "unmeasured";
|
|
38
47
|
openFindings: number;
|
|
39
48
|
evidenceComplete: boolean;
|
|
40
|
-
breakerLevel: number;
|
|
41
49
|
schemaVersion?: "iterate.convergence/0.1" | undefined;
|
|
50
|
+
breakerLevel?: number | undefined;
|
|
42
51
|
}>;
|
|
43
52
|
export type RoundState = z.infer<typeof RoundStateSchema>;
|
|
44
53
|
export declare const ConvergenceActionSchema: z.ZodEnum<["fix", "verify", "converged", "halt"]>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"convergence.d.ts","sourceRoot":"","sources":["../src/convergence.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB;;;;;;;;;GASG;AACH,eAAO,MAAM,0BAA0B,EAAG,yBAAkC,CAAC;AAE7E,eAAO,MAAM,oBAAoB,oDAAkD,CAAC;AACpF,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAElE,+DAA+D;AAC/D,eAAO,MAAM,gBAAgB;;;;;;IAM3B,4FAA4F;;IAE5F
|
|
1
|
+
{"version":3,"file":"convergence.d.ts","sourceRoot":"","sources":["../src/convergence.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB;;;;;;;;;GASG;AACH,eAAO,MAAM,0BAA0B,EAAG,yBAAkC,CAAC;AAE7E,eAAO,MAAM,oBAAoB,oDAAkD,CAAC;AACpF,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAElE,+DAA+D;AAC/D,eAAO,MAAM,gBAAgB;;;;;;IAM3B,4FAA4F;;IAE5F;;;;;;;;;OASG;;;;;;;;;;;;;;;;;;EAEH,CAAC;AACH,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAE1D,eAAO,MAAM,uBAAuB,mDAAiD,CAAC;AACtF,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAExE,eAAO,MAAM,mBAAmB;;;;;;;;;CAStB,CAAC;AACX,MAAM,MAAM,iBAAiB,GAAG,CAAC,OAAO,mBAAmB,CAAC,CAAC,MAAM,OAAO,mBAAmB,CAAC,CAAC;AAE/F,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;EAcpC,CAAC;AACH,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAC;AAE5E;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,UAAU,GAAG,mBAAmB,CAyB1E"}
|
package/dist/convergence.js
CHANGED
|
@@ -21,8 +21,17 @@ export const RoundStateSchema = z.strictObject({
|
|
|
21
21
|
openFindings: z.number().int().min(0),
|
|
22
22
|
/** False when the engine never got to evidence something (refused, crashed, unattached). */
|
|
23
23
|
evidenceComplete: z.boolean(),
|
|
24
|
-
/**
|
|
25
|
-
|
|
24
|
+
/**
|
|
25
|
+
* The engine's own circuit-breaker level for this run; 3 is tripped.
|
|
26
|
+
*
|
|
27
|
+
* OPTIONAL, and absence is not the same claim as 0. `0` says "a breaker exists and it has
|
|
28
|
+
* not tripped"; absence says "this run has no breaker channel at all" — which is the normal
|
|
29
|
+
* shape of an iterate loop that never touched the GUI engine. The distinction changes no
|
|
30
|
+
* verdict today (only `>= 3` halts), but collapsing it would force a producer that never
|
|
31
|
+
* looked to assert a measurement it did not take, and that is the exact failure this
|
|
32
|
+
* contract's `unmeasured` state exists to prevent.
|
|
33
|
+
*/
|
|
34
|
+
breakerLevel: z.number().int().min(0).max(3).optional()
|
|
26
35
|
});
|
|
27
36
|
export const ConvergenceActionSchema = z.enum(["fix", "verify", "converged", "halt"]);
|
|
28
37
|
export const CONVERGENCE_REASONS = {
|
|
@@ -77,8 +86,9 @@ export function convergenceDecision(state) {
|
|
|
77
86
|
round: input.round,
|
|
78
87
|
maxRounds: input.maxRounds
|
|
79
88
|
});
|
|
80
|
-
if (input.breakerLevel >= 3)
|
|
89
|
+
if (input.breakerLevel !== undefined && input.breakerLevel >= 3) {
|
|
81
90
|
return decided("halt", CONVERGENCE_REASONS.breakerTripped);
|
|
91
|
+
}
|
|
82
92
|
if (input.round >= input.maxRounds)
|
|
83
93
|
return decided("halt", CONVERGENCE_REASONS.budgetExhausted);
|
|
84
94
|
if (input.invariantState === "error")
|
package/dist/convergence.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"convergence.js","sourceRoot":"","sources":["../src/convergence.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAE9C;;;;;;;;;GASG;AACH,MAAM,CAAC,MAAM,0BAA0B,GAAG,yBAAkC,CAAC;AAE7E,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,YAAY,CAAC,CAAC,CAAC;AAGpF,+DAA+D;AAC/D,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,CAAC,YAAY,CAAC;IAC7C,aAAa,EAAE,CAAC,CAAC,OAAO,CAAC,0BAA0B,CAAC,CAAC,QAAQ,EAAE;IAC/D,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IAC9B,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,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,CAAC"}
|
package/dist/evidence-pack.d.ts
CHANGED
|
@@ -20,6 +20,21 @@ export declare const AttributionLevelSchema: z.ZodEnum<["soft", "strong", "weak"
|
|
|
20
20
|
export type AttributionLevel = z.infer<typeof AttributionLevelSchema>;
|
|
21
21
|
export declare const CircuitBreakerLevelSchema: z.ZodNumber;
|
|
22
22
|
export type CircuitBreakerLevel = z.infer<typeof CircuitBreakerLevelSchema>;
|
|
23
|
+
/**
|
|
24
|
+
* The selector, and why `role`/`title` carry a `.min(1)`.
|
|
25
|
+
*
|
|
26
|
+
* The engine's AX matcher treats an empty string as "no constraint stated", so an empty `role`
|
|
27
|
+
* is not a narrower selector — it is a selector that silently stops naming what it targets, and
|
|
28
|
+
* a `last_evidence` report rendered from it prints a missing label. The daemon refuses it. A
|
|
29
|
+
* published contract that accepted `""` would promise the agent one rule while the side that
|
|
30
|
+
* actually acts on the selector enforced another; the GlassPane shell caught exactly this drift,
|
|
31
|
+
* which is why the bound is stated in both bindings (here and `schemas/evidence-pack.schema.json`)
|
|
32
|
+
* rather than left to a consumer's stricter local copy.
|
|
33
|
+
*
|
|
34
|
+
* `identifier` deliberately has no minimum: no side rules on an empty one (the daemon has no
|
|
35
|
+
* guard for it, and "nothing in the tree carries an empty AXIdentifier" is not readable from the
|
|
36
|
+
* engine), so the kernel does not invent a verdict for it either.
|
|
37
|
+
*/
|
|
23
38
|
export declare const SelectorSchema: z.ZodObject<{
|
|
24
39
|
role: z.ZodString;
|
|
25
40
|
title: z.ZodOptional<z.ZodString>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"evidence-pack.d.ts","sourceRoot":"","sources":["../src/evidence-pack.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,mFAAmF;AACnF,eAAO,MAAM,oBAAoB,QAAgC,CAAC;AAElE,gFAAgF;AAChF,eAAO,MAAM,kBAAkB,QAAkD,CAAC;AAElF,mFAAmF;AACnF,eAAO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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAS7B,CAAC;AACH,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAkF9D;;;;;;;;GAQG;AACH,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;WAGlC,CAAC"}
|
package/dist/evidence-pack.js
CHANGED
|
@@ -18,9 +18,24 @@ export const EVIDENCE_SCHEMA_VERSION = "glasspane.evidence/0.1";
|
|
|
18
18
|
export const LEGACY_EVIDENCE_SCHEMA_VERSION = "glasspane.evidence/0.1-draft";
|
|
19
19
|
export const AttributionLevelSchema = z.enum(["soft", "strong", "weak"]);
|
|
20
20
|
export const CircuitBreakerLevelSchema = z.number().int().min(0).max(3);
|
|
21
|
+
/**
|
|
22
|
+
* The selector, and why `role`/`title` carry a `.min(1)`.
|
|
23
|
+
*
|
|
24
|
+
* The engine's AX matcher treats an empty string as "no constraint stated", so an empty `role`
|
|
25
|
+
* is not a narrower selector — it is a selector that silently stops naming what it targets, and
|
|
26
|
+
* a `last_evidence` report rendered from it prints a missing label. The daemon refuses it. A
|
|
27
|
+
* published contract that accepted `""` would promise the agent one rule while the side that
|
|
28
|
+
* actually acts on the selector enforced another; the GlassPane shell caught exactly this drift,
|
|
29
|
+
* which is why the bound is stated in both bindings (here and `schemas/evidence-pack.schema.json`)
|
|
30
|
+
* rather than left to a consumer's stricter local copy.
|
|
31
|
+
*
|
|
32
|
+
* `identifier` deliberately has no minimum: no side rules on an empty one (the daemon has no
|
|
33
|
+
* guard for it, and "nothing in the tree carries an empty AXIdentifier" is not readable from the
|
|
34
|
+
* engine), so the kernel does not invent a verdict for it either.
|
|
35
|
+
*/
|
|
21
36
|
export const SelectorSchema = z.strictObject({
|
|
22
|
-
role: z.string().max(SELECTOR_MAX_LENGTH),
|
|
23
|
-
title: z.string().max(SELECTOR_MAX_LENGTH).optional(),
|
|
37
|
+
role: z.string().min(1).max(SELECTOR_MAX_LENGTH),
|
|
38
|
+
title: z.string().min(1).max(SELECTOR_MAX_LENGTH).optional(),
|
|
24
39
|
identifier: z.string().max(SELECTOR_MAX_LENGTH).optional(),
|
|
25
40
|
});
|
|
26
41
|
export const ActionSchema = z.enum([
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"evidence-pack.js","sourceRoot":"","sources":["../src/evidence-pack.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,mFAAmF;AACnF,MAAM,CAAC,MAAM,oBAAoB,GAAG,6BAA6B,CAAC;AAElE,gFAAgF;AAChF,MAAM,CAAC,MAAM,kBAAkB,GAAG,+CAA+C,CAAC;AAElF,mFAAmF;AACn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IAAI,OAAO,KAAK,SAAS,IAAI,cAAc,CAAC,SAAS,CAAC,EAAE,CAAC;QACtE,IAAI,CAAC,OAAO,GAAG,EAAE,GAAG,OAAO,EAAE,SAAS,EAAE,EAAE,GAAG,SAAS,EAAE,MAAM,EAAE,IAAI,EAAE,EAAE,CAAC;IAC3E,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC;AAED;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,CAAC,UAAU,CAChD,4BAA4B,EAC5B,kBAAkB,CACnB,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"comment": "Cross-implementation anchor for the convergence rules (kernel/src/convergence.ts): given what a round states about itself, what the loop does next (5.7 R40 scenario 4). This is policy arithmetic over verdicts somebody else produced — nothing here verifies anything. Rules a second implementation must reproduce, stated here so it need not read the TypeScript: (1) the input object is `iterate.convergence/0.1` (the version key is optional) with required `round` (integer >=1), `maxRounds` (integer >=1), `invariantState` in `pass|fail|error|unmeasured`, `openFindings` (integer >=0), `evidenceComplete` (boolean), `breakerLevel` (integer 0..3, where 3 is tripped); no other keys. (2) PRECEDENCE, first match wins: breakerLevel >= 3 -> halt, reason `circuit-breaker-tripped`; round >= maxRounds -> halt, reason `round-budget-exhausted`; invariantState `error` -> halt, reason `invariant-check-errored`; openFindings > 0 -> fix, reason `open-findings`; invariantState `fail` -> fix, reason `invariants-failed`; evidenceComplete false -> verify, reason `evidence-incomplete`; invariantState `unmeasured` -> verify, reason `invariants-unmeasured`; otherwise -> converged, reason `all-gates-green`. (3) WHY that order: a limit the harness set on itself is not the app's failure, so the breaker halts before anything is counted; the budget is checked before the work so a run cannot buy another round by re-reporting findings it already had; a check that errored yields no verdict, and retrying it is the runner's job, not the loop's; `verify` rather than `converged` for unlooked-or-unmeasured states is the whole point — 'we could not look' and 'we looked and it holds' must not collapse into the same line. (4) The decision echoes `round` and `maxRounds` unchanged, so a ledger line says which round was judged. (5) `breakerLevel` is the engine's own circuit-breaker level for the run; 3 is the policy limit, which is why the range stops there. PROVENANCE: max_rounds 7 is the repo's own `config/iterate.config.yaml`; the breaker ceiling of 3 is `CircuitBreakerLevelSchema` in the evidence-pack contract; each case below states its inputs and the reason the precedence gives, and the expected values were derived from the rule text in this file — not by running the TypeScript.",
|
|
2
|
+
"comment": "Cross-implementation anchor for the convergence rules (kernel/src/convergence.ts): given what a round states about itself, what the loop does next (5.7 R40 scenario 4). This is policy arithmetic over verdicts somebody else produced — nothing here verifies anything. Rules a second implementation must reproduce, stated here so it need not read the TypeScript: (1) the input object is `iterate.convergence/0.1` (the version key is optional) with required `round` (integer >=1), `maxRounds` (integer >=1), `invariantState` in `pass|fail|error|unmeasured`, `openFindings` (integer >=0), `evidenceComplete` (boolean), `breakerLevel` (integer 0..3, where 3 is tripped); no other keys. (2) PRECEDENCE, first match wins: breakerLevel >= 3 -> halt, reason `circuit-breaker-tripped`; round >= maxRounds -> halt, reason `round-budget-exhausted`; invariantState `error` -> halt, reason `invariant-check-errored`; openFindings > 0 -> fix, reason `open-findings`; invariantState `fail` -> fix, reason `invariants-failed`; evidenceComplete false -> verify, reason `evidence-incomplete`; invariantState `unmeasured` -> verify, reason `invariants-unmeasured`; otherwise -> converged, reason `all-gates-green`. (3) WHY that order: a limit the harness set on itself is not the app's failure, so the breaker halts before anything is counted; the budget is checked before the work so a run cannot buy another round by re-reporting findings it already had; a check that errored yields no verdict, and retrying it is the runner's job, not the loop's; `verify` rather than `converged` for unlooked-or-unmeasured states is the whole point — 'we could not look' and 'we looked and it holds' must not collapse into the same line. (4) The decision echoes `round` and `maxRounds` unchanged, so a ledger line says which round was judged. (5) `breakerLevel` is the engine's own circuit-breaker level for the run; 3 is the policy limit, which is why the range stops there. PROVENANCE: max_rounds 7 is the repo's own `config/iterate.config.yaml`; the breaker ceiling of 3 is `CircuitBreakerLevelSchema` in the evidence-pack contract; each case below states its inputs and the reason the precedence gives, and the expected values were derived from the rule text in this file — not by running the TypeScript. AMENDMENT (0.1.8): `breakerLevel` is OPTIONAL. Absent means this run has no circuit-breaker channel at all and the first precedence rule is skipped; it is NOT the same claim as 0, which asserts a breaker exists and reports it untripped. A producer that never looked must omit the key rather than write 0.",
|
|
3
3
|
"input": {
|
|
4
4
|
"schemaVersion": "iterate.convergence/0.1",
|
|
5
5
|
"round": 3,
|
|
@@ -247,6 +247,38 @@
|
|
|
247
247
|
"expect": "refused",
|
|
248
248
|
"path": "",
|
|
249
249
|
"messageIncludes": "confidence"
|
|
250
|
+
},
|
|
251
|
+
{
|
|
252
|
+
"name": "no-breaker-channel-absent-not-zero",
|
|
253
|
+
"state": {
|
|
254
|
+
"round": 2,
|
|
255
|
+
"maxRounds": 7,
|
|
256
|
+
"invariantState": "pass",
|
|
257
|
+
"openFindings": 0,
|
|
258
|
+
"evidenceComplete": true
|
|
259
|
+
},
|
|
260
|
+
"expect": {
|
|
261
|
+
"action": "converged",
|
|
262
|
+
"reason": "all-gates-green",
|
|
263
|
+
"round": 2,
|
|
264
|
+
"maxRounds": 7
|
|
265
|
+
}
|
|
266
|
+
},
|
|
267
|
+
{
|
|
268
|
+
"name": "absent-breaker-still-halts-on-budget",
|
|
269
|
+
"state": {
|
|
270
|
+
"round": 7,
|
|
271
|
+
"maxRounds": 7,
|
|
272
|
+
"invariantState": "pass",
|
|
273
|
+
"openFindings": 4,
|
|
274
|
+
"evidenceComplete": true
|
|
275
|
+
},
|
|
276
|
+
"expect": {
|
|
277
|
+
"action": "halt",
|
|
278
|
+
"reason": "round-budget-exhausted",
|
|
279
|
+
"round": 7,
|
|
280
|
+
"maxRounds": 7
|
|
281
|
+
}
|
|
250
282
|
}
|
|
251
283
|
]
|
|
252
284
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "iterate-kernel",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.8",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "iterate ecosystem shared kernel: schemas, the evidence->decision transcription, the decision-log audit chain and public validators. Verification reasoning stays in the engine; this layer transcribes.",
|
|
6
6
|
"type": "module",
|
|
@@ -5,7 +5,13 @@
|
|
|
5
5
|
"description": "What a caller states about the round that just finished, which the convergence rules turn into an action (5.7 R40 scenario 4). Every field is a verdict somebody else produced; this contract moves none of them. NOTE ON SOURCE OF TRUTH: the field constraints are duplicated from `src/convergence.ts`, which is the definition; this file mirrors it. The ordering that decides which verdict wins (breaker, then budget, then errored check, then findings, then evidence, then invariants, then converged) is arithmetic in the validator and cannot be expressed in JSON Schema — a schema-only implementation must re-implement `convergenceDecision` and be tested against the cases in `fixtures/convergence.ok-01.json`.",
|
|
6
6
|
"type": "object",
|
|
7
7
|
"additionalProperties": false,
|
|
8
|
-
"required": [
|
|
8
|
+
"required": [
|
|
9
|
+
"round",
|
|
10
|
+
"maxRounds",
|
|
11
|
+
"invariantState",
|
|
12
|
+
"openFindings",
|
|
13
|
+
"evidenceComplete"
|
|
14
|
+
],
|
|
9
15
|
"properties": {
|
|
10
16
|
"schemaVersion": {
|
|
11
17
|
"const": "iterate.convergence/0.1"
|
|
@@ -19,7 +25,12 @@
|
|
|
19
25
|
"minimum": 1
|
|
20
26
|
},
|
|
21
27
|
"invariantState": {
|
|
22
|
-
"enum": [
|
|
28
|
+
"enum": [
|
|
29
|
+
"pass",
|
|
30
|
+
"fail",
|
|
31
|
+
"error",
|
|
32
|
+
"unmeasured"
|
|
33
|
+
]
|
|
23
34
|
},
|
|
24
35
|
"openFindings": {
|
|
25
36
|
"type": "integer",
|
|
@@ -31,7 +42,8 @@
|
|
|
31
42
|
"breakerLevel": {
|
|
32
43
|
"type": "integer",
|
|
33
44
|
"minimum": 0,
|
|
34
|
-
"maximum": 3
|
|
45
|
+
"maximum": 3,
|
|
46
|
+
"description": "Optional. 0..3 is a measured level; absence means this run has no circuit-breaker channel at all. Absence is not 0: 0 asserts an untripped breaker. The first precedence rule only fires on a measured level, so skipping an absent breaker and halting on 0 are different outcomes by construction, and no producer has to invent a number."
|
|
35
47
|
}
|
|
36
48
|
}
|
|
37
49
|
}
|
|
@@ -196,15 +196,20 @@
|
|
|
196
196
|
"properties": {
|
|
197
197
|
"role": {
|
|
198
198
|
"type": "string",
|
|
199
|
-
"
|
|
199
|
+
"minLength": 1,
|
|
200
|
+
"maxLength": 512,
|
|
201
|
+
"description": "What the target is, in the accessibility tree's own vocabulary. Never empty: the engine's matcher reads an empty role as 'no constraint stated', so an empty role stops naming what the assertion targets instead of narrowing it — and the daemon refuses it."
|
|
200
202
|
},
|
|
201
203
|
"title": {
|
|
202
204
|
"type": "string",
|
|
203
|
-
"
|
|
205
|
+
"minLength": 1,
|
|
206
|
+
"maxLength": 512,
|
|
207
|
+
"description": "Optional display label. When present it is never empty, for the same reason as role: a report rendered from `title: \"\"` prints a missing label and reads as 'the tree had no title there'."
|
|
204
208
|
},
|
|
205
209
|
"identifier": {
|
|
206
210
|
"type": "string",
|
|
207
|
-
"maxLength": 512
|
|
211
|
+
"maxLength": 512,
|
|
212
|
+
"description": "Optional AXIdentifier. Deliberately has no minLength: no side rules on an empty identifier (the daemon has no guard for it), so the kernel does not invent one."
|
|
208
213
|
}
|
|
209
214
|
}
|
|
210
215
|
},
|