iterate-kernel 0.1.2 → 0.1.4

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/README.md CHANGED
@@ -36,6 +36,7 @@ APIs it actually uses.
36
36
  | `evidence-decision` | the **transcription**: evidence (attribution level, circuit-breaker level, pass/fail/inconclusive) → a decision outcome and a human summary. It reads fields the engine already decided; it never infers. |
37
37
  | `decision-log-entry` / `decision-log` | the append-only decision-log entry and the `opID ↔ entry` hash chain that makes it auditable |
38
38
  | `dimension-context` / `parse` | the dimension-coverage transcription: a plan plus what the engine actually recorded → verified / unverified / unplanned, and one line to put in a summary. It validates id *shape*, never which ids exist — that list belongs to whoever configured the run. |
39
+ | `run-plan` / `parse` | the plan that `dimension-context` needs and refuses to invent: which dimensions a run intends to cover, in the caller's order, with the declared source. It carries a **digest** (`rp_` + sha256 of the canonical form) so a ledger line can state which plan a run was held to, and a reader can notice the plan changed mid-run. Nothing here reads a config file — producing a plan is whoever configures the run's job, and that keeps the kernel from learning a consumer's file format. |
39
40
  | `errors` / `schemas` / `canonical-json` / `recipe-config` | `KernelSchemaError`, the JSON Schemas, canonical serialisation, recipe validation |
40
41
 
41
42
  ## A runnable example
package/dist/index.d.ts CHANGED
@@ -6,13 +6,14 @@
6
6
  * the single source of truth; the zod mirrors in src/ must stay in sync
7
7
  * with them via the shared truth fixtures (assertion C35).
8
8
  */
9
- export { EVIDENCE_PACK_SCHEMA_ID, DECISION_LOG_ENTRY_SCHEMA_ID, RECIPE_CONFIG_SCHEMA_ID, EVIDENCE_PACK_JSON_SCHEMA, DECISION_LOG_ENTRY_JSON_SCHEMA, RECIPE_CONFIG_JSON_SCHEMA, type JsonSchemaObject } from "./schemas.js";
9
+ export { EVIDENCE_PACK_SCHEMA_ID, DECISION_LOG_ENTRY_SCHEMA_ID, RECIPE_CONFIG_SCHEMA_ID, RUN_PLAN_SCHEMA_ID, EVIDENCE_PACK_JSON_SCHEMA, DECISION_LOG_ENTRY_JSON_SCHEMA, RECIPE_CONFIG_JSON_SCHEMA, RUN_PLAN_JSON_SCHEMA, type JsonSchemaObject } from "./schemas.js";
10
10
  export { EVIDENCE_SCHEMA_VERSION, OPERATION_ID_PATTERN, ISO_MILLIS_PATTERN, TREE_DIGEST_PATTERN, SELECTOR_MAX_LENGTH, AttributionLevelSchema, CircuitBreakerLevelSchema, SelectorSchema, ActionSchema, AssertionPropertySchema, StringOrBoolSchema, BoundsSchema, AxEventSignalSchema, PixelDiffSignalSchema, ResponsivenessSignalSchema, CrashSignalSchema, ActSignalSchema, HandlerRefSchema, HandlerProbeSignalSchema, StateEntrySchema, StateDiffSignalSchema, SignalsSchema, AttributionSchema, CircuitBreakerSchema, AssertionSchema, DiagnosisClassSchema, DiagnosisReportSchema, DiagnosisSchema, EvidencePackSchema, EvidencePackReadSchema, type AttributionLevel, type CircuitBreakerLevel, type Selector, type Action, type AssertionProperty, type StringOrBool, type Bounds, type AxEventSignal, type PixelDiffSignal, type ResponsivenessSignal, type CrashSignal, type ActSignal, type HandlerRef, type HandlerProbeSignal, type StateEntry, type StateDiffSignal, type Signals, type Attribution, type CircuitBreaker, type Assertion, type DiagnosisClass, type DiagnosisReport, type Diagnosis, type EvidencePack } from "./evidence-pack.js";
11
11
  export { DECISION_ENTRY_ID_PATTERN, PREV_ENTRY_HASH_PATTERN, SUMMARY_MAX_LENGTH, DecisionOutcomeSchema, DecisionLogEntrySchema, type DecisionOutcome, type DecisionLogEntry } from "./decision-log-entry.js";
12
12
  export { RECIPE_SCHEMA_VERSION, RECIPE_NAME_MAX_LENGTH, RECIPE_MIN_STEPS, RECIPE_MAX_STEPS, RecipeStepKindSchema, RecipeStepSchema, RecipeConfigSchema, type RecipeStepKind, type RecipeStep, type RecipeConfig } from "./recipe-config.js";
13
13
  export { DIMENSION_ID_PATTERN, DIMENSION_ID_MAX_LENGTH, DIMENSION_LABEL_MAX_LENGTH, DIMENSION_FOCUS_MAX_LENGTH, DIMENSION_MIN_PLANNED, DIMENSION_MAX_PLANNED, DIMENSION_MAX_OPERATION_IDS, DIMENSION_CONTEXT_CODES, PlannedDimensionSchema, DimensionEvidenceSchema, DimensionStatusSchema, DimensionContextEntrySchema, DimensionContextTotalsSchema, DimensionContextSchema, DimensionContextInputSchema, KernelDimensionError, dimensionContext, formatDimensionContext, type DimensionEvidence, type DimensionStatus, type DimensionContextEntry, type DimensionContextTotals, type DimensionContext, type DimensionContextInput, type KernelDimensionCode } from "./dimension-context.js";
14
- export { parseEvidencePack, parseEvidencePackRead, parseDecisionLogEntry, parseRecipeConfig, parseDimensionContext, parseDimensionContextInput } from "./parse.js";
14
+ export { parseEvidencePack, parseEvidencePackRead, parseDecisionLogEntry, parseRecipeConfig, parseRunPlan, parseDimensionContext, parseDimensionContextInput } from "./parse.js";
15
15
  export { canonicalJson } from "./canonical-json.js";
16
+ export { RUN_PLAN_SCHEMA_VERSION, RUN_PLAN_SOURCES, RunPlanSchema, RunPlanSourceSchema, RunPlanSourceKindSchema, plannedIds, plannedDimensionsOf, runPlanDigest, type RunPlan, type RunPlanSource, type RunPlanSourceKind } from "./run-plan.js";
16
17
  export { decisionOutcomeFromEvidence, decisionSummaryFromEvidence } from "./evidence-decision.js";
17
18
  export { DECISION_LOG_CODES, DecisionLogDraftSchema, KernelDecisionLogError, appendDecisionLogEntry, buildDecisionLogEntry, decisionLogEntryHash, decisionLogHead, newDecisionEntryId, readDecisionLog, serializeDecisionLogEntry, verifyDecisionLogText, type AppendedDecisionLogEntry, type DecisionLogDraft, type DecisionLogVerification, type KernelDecisionLogCode } from "./decision-log.js";
18
19
  export { KernelSchemaError, type KernelSchemaIssue } from "./errors.js";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,EACL,uBAAuB,EACvB,4BAA4B,EAC5B,uBAAuB,EACvB,yBAAyB,EACzB,8BAA8B,EAC9B,yBAAyB,EACzB,KAAK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AK,qBAAqB,EAC3B,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EAAE,iBAAiB,EAAE,KAAK,iBAAiB,EAAE,MAAM,aAAa,CAAC"}
package/dist/index.js CHANGED
@@ -6,13 +6,14 @@
6
6
  * the single source of truth; the zod mirrors in src/ must stay in sync
7
7
  * with them via the shared truth fixtures (assertion C35).
8
8
  */
9
- export { EVIDENCE_PACK_SCHEMA_ID, DECISION_LOG_ENTRY_SCHEMA_ID, RECIPE_CONFIG_SCHEMA_ID, EVIDENCE_PACK_JSON_SCHEMA, DECISION_LOG_ENTRY_JSON_SCHEMA, RECIPE_CONFIG_JSON_SCHEMA } from "./schemas.js";
9
+ export { EVIDENCE_PACK_SCHEMA_ID, DECISION_LOG_ENTRY_SCHEMA_ID, RECIPE_CONFIG_SCHEMA_ID, RUN_PLAN_SCHEMA_ID, EVIDENCE_PACK_JSON_SCHEMA, DECISION_LOG_ENTRY_JSON_SCHEMA, RECIPE_CONFIG_JSON_SCHEMA, RUN_PLAN_JSON_SCHEMA } from "./schemas.js";
10
10
  export { EVIDENCE_SCHEMA_VERSION, OPERATION_ID_PATTERN, ISO_MILLIS_PATTERN, TREE_DIGEST_PATTERN, SELECTOR_MAX_LENGTH, AttributionLevelSchema, CircuitBreakerLevelSchema, SelectorSchema, ActionSchema, AssertionPropertySchema, StringOrBoolSchema, BoundsSchema, AxEventSignalSchema, PixelDiffSignalSchema, ResponsivenessSignalSchema, CrashSignalSchema, ActSignalSchema, HandlerRefSchema, HandlerProbeSignalSchema, StateEntrySchema, StateDiffSignalSchema, SignalsSchema, AttributionSchema, CircuitBreakerSchema, AssertionSchema, DiagnosisClassSchema, DiagnosisReportSchema, DiagnosisSchema, EvidencePackSchema, EvidencePackReadSchema } from "./evidence-pack.js";
11
11
  export { DECISION_ENTRY_ID_PATTERN, PREV_ENTRY_HASH_PATTERN, SUMMARY_MAX_LENGTH, DecisionOutcomeSchema, DecisionLogEntrySchema } from "./decision-log-entry.js";
12
12
  export { RECIPE_SCHEMA_VERSION, RECIPE_NAME_MAX_LENGTH, RECIPE_MIN_STEPS, RECIPE_MAX_STEPS, RecipeStepKindSchema, RecipeStepSchema, RecipeConfigSchema } from "./recipe-config.js";
13
13
  export { DIMENSION_ID_PATTERN, DIMENSION_ID_MAX_LENGTH, DIMENSION_LABEL_MAX_LENGTH, DIMENSION_FOCUS_MAX_LENGTH, DIMENSION_MIN_PLANNED, DIMENSION_MAX_PLANNED, DIMENSION_MAX_OPERATION_IDS, DIMENSION_CONTEXT_CODES, PlannedDimensionSchema, DimensionEvidenceSchema, DimensionStatusSchema, DimensionContextEntrySchema, DimensionContextTotalsSchema, DimensionContextSchema, DimensionContextInputSchema, KernelDimensionError, dimensionContext, formatDimensionContext } from "./dimension-context.js";
14
- export { parseEvidencePack, parseEvidencePackRead, parseDecisionLogEntry, parseRecipeConfig, parseDimensionContext, parseDimensionContextInput } from "./parse.js";
14
+ export { parseEvidencePack, parseEvidencePackRead, parseDecisionLogEntry, parseRecipeConfig, parseRunPlan, parseDimensionContext, parseDimensionContextInput } from "./parse.js";
15
15
  export { canonicalJson } from "./canonical-json.js";
16
+ export { RUN_PLAN_SCHEMA_VERSION, RUN_PLAN_SOURCES, RunPlanSchema, RunPlanSourceSchema, RunPlanSourceKindSchema, plannedIds, plannedDimensionsOf, runPlanDigest } from "./run-plan.js";
16
17
  export { decisionOutcomeFromEvidence, decisionSummaryFromEvidence } from "./evidence-decision.js";
17
18
  export { DECISION_LOG_CODES, DecisionLogDraftSchema, KernelDecisionLogError, appendDecisionLogEntry, buildDecisionLogEntry, decisionLogEntryHash, decisionLogHead, newDecisionEntryId, readDecisionLog, serializeDecisionLogEntry, verifyDecisionLogText } from "./decision-log.js";
18
19
  export { KernelSchemaError } from "./errors.js";
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,EACL,uBAAuB,EACv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AEpB,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEpD,OAAO,EAAE,2BAA2B,EAAE,2BAA2B,EAAE,MAAM,wBAAwB,CAAC;AAElG,OAAO,EACL,kBAAkB,EAClB,sBAAsB,EACtB,sBAAsB,EACtB,sBAAsB,EACtB,qBAAqB,EACrB,oBAAoB,EACpB,eAAe,EACf,kBAAkB,EAClB,eAAe,EACf,yBAAyB,EACzB,qBAAqB,EAKtB,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EAAE,iBAAiB,EAA0B,MAAM,aAAa,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,EACL,uBAAuB,EACvB,4BAA4B,EAC5B,uBAAuB,EACvB,kBAAkB,EAClB,yBAAyB,EACzB,8BAA8B,EAC9B,yBAAyB,EACzB,oBAAoB,EAErB,MAAM,cAAc,CAAC;AAEtB,OAAO,EACL,uBAAuB,EACvB,oBAAoB,EACpB,kBAAkB,EAClB,mBAAmB,EACnB,mBAAmB,EACnB,sBAAsB,EACtB,yBAAyB,EACzB,cAAc,EACd,YAAY,EACZ,uBAAuB,EACvB,kBAAkB,EAClB,YAAY,EACZ,mBAAmB,EACnB,qBAAqB,EACrB,0BAA0B,EAC1B,iBAAiB,EACjB,eAAe,EACf,gBAAgB,EAChB,wBAAwB,EACxB,gBAAgB,EAChB,qBAAqB,EACrB,aAAa,EACb,iBAAiB,EACjB,oBAAoB,EACpB,eAAe,EACf,oBAAoB,EACpB,qBAAqB,EACrB,eAAe,EACf,kBAAkB,EAClB,sBAAsB,EAyBvB,MAAM,oBAAoB,CAAC;AAE5B,OAAO,EACL,yBAAyB,EACzB,uBAAuB,EACvB,kBAAkB,EAClB,qBAAqB,EACrB,sBAAsB,EAGvB,MAAM,yBAAyB,CAAC;AAEjC,OAAO,EACL,qBAAqB,EACrB,sBAAsB,EACtB,gBAAgB,EAChB,gBAAgB,EAChB,oBAAoB,EACpB,gBAAgB,EAChB,kBAAkB,EAInB,MAAM,oBAAoB,CAAC;AAE5B,OAAO,EACL,oBAAoB,EACpB,uBAAuB,EACvB,0BAA0B,EAC1B,0BAA0B,EAC1B,qBAAqB,EACrB,qBAAqB,EACrB,2BAA2B,EAC3B,uBAAuB,EACvB,sBAAsB,EACtB,uBAAuB,EACvB,qBAAqB,EACrB,2BAA2B,EAC3B,4BAA4B,EAC5B,sBAAsB,EACtB,2BAA2B,EAC3B,oBAAoB,EACpB,gBAAgB,EAChB,sBAAsB,EAQvB,MAAM,wBAAwB,CAAC;AAEhC,OAAO,EACL,iBAAiB,EACjB,qBAAqB,EACrB,qBAAqB,EACrB,iBAAiB,EACjB,YAAY,EACZ,qBAAqB,EACrB,0BAA0B,EAC3B,MAAM,YAAY,CAAC;AAEpB,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEpD,OAAO,EACL,uBAAuB,EACvB,gBAAgB,EAChB,aAAa,EACb,mBAAmB,EACnB,uBAAuB,EACvB,UAAU,EACV,mBAAmB,EACnB,aAAa,EAId,MAAM,eAAe,CAAC;AAEvB,OAAO,EAAE,2BAA2B,EAAE,2BAA2B,EAAE,MAAM,wBAAwB,CAAC;AAElG,OAAO,EACL,kBAAkB,EAClB,sBAAsB,EACtB,sBAAsB,EACtB,sBAAsB,EACtB,qBAAqB,EACrB,oBAAoB,EACpB,eAAe,EACf,kBAAkB,EAClB,eAAe,EACf,yBAAyB,EACzB,qBAAqB,EAKtB,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EAAE,iBAAiB,EAA0B,MAAM,aAAa,CAAC"}
package/dist/parse.d.ts CHANGED
@@ -2,6 +2,7 @@ import { type EvidencePack } from "./evidence-pack.js";
2
2
  import { type DecisionLogEntry } from "./decision-log-entry.js";
3
3
  import { type DimensionContext, type DimensionContextInput } from "./dimension-context.js";
4
4
  import { type RecipeConfig } from "./recipe-config.js";
5
+ import { type RunPlan } from "./run-plan.js";
5
6
  export declare function parseEvidencePack(input: unknown): EvidencePack;
6
7
  /**
7
8
  * Reads an evidence pack produced by the engine, tolerating only the two
@@ -17,6 +18,7 @@ export declare function parseEvidencePack(input: unknown): EvidencePack;
17
18
  export declare function parseEvidencePackRead(input: unknown): EvidencePack;
18
19
  export declare function parseDecisionLogEntry(input: unknown): DecisionLogEntry;
19
20
  export declare function parseRecipeConfig(input: unknown): RecipeConfig;
21
+ export declare function parseRunPlan(input: unknown): RunPlan;
20
22
  export declare function parseDimensionContext(input: unknown): DimensionContext;
21
23
  export declare function parseDimensionContextInput(input: unknown): DimensionContextInput;
22
24
  //# sourceMappingURL=parse.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"parse.d.ts","sourceRoot":"","sources":["../src/parse.ts"],"names":[],"mappings":"AAEA,OAAO,EAGL,KAAK,YAAY,EAClB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAA0B,KAAK,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AACxF,OAAO,EAGL,KAAK,gBAAgB,EACrB,KAAK,qBAAqB,EAC3B,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAsB,KAAK,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAkB3E,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,OAAO,GAAG,YAAY,CAE9D;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,OAAO,GAAG,YAAY,CAMlE;AAED,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,OAAO,GAAG,gBAAgB,CAEtE;AAED,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,OAAO,GAAG,YAAY,CAE9D;AAED,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,OAAO,GAAG,gBAAgB,CAEtE;AAED,wBAAgB,0BAA0B,CAAC,KAAK,EAAE,OAAO,GAAG,qBAAqB,CAEhF"}
1
+ {"version":3,"file":"parse.d.ts","sourceRoot":"","sources":["../src/parse.ts"],"names":[],"mappings":"AAEA,OAAO,EAGL,KAAK,YAAY,EAClB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAA0B,KAAK,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AACxF,OAAO,EAGL,KAAK,gBAAgB,EACrB,KAAK,qBAAqB,EAC3B,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAsB,KAAK,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAC3E,OAAO,EAAiB,KAAK,OAAO,EAAE,MAAM,eAAe,CAAC;AAkB5D,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,OAAO,GAAG,YAAY,CAE9D;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,OAAO,GAAG,YAAY,CAMlE;AAED,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,OAAO,GAAG,gBAAgB,CAEtE;AAED,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,OAAO,GAAG,YAAY,CAE9D;AAED,wBAAgB,YAAY,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAEpD;AAED,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,OAAO,GAAG,gBAAgB,CAEtE;AAED,wBAAgB,0BAA0B,CAAC,KAAK,EAAE,OAAO,GAAG,qBAAqB,CAEhF"}
package/dist/parse.js CHANGED
@@ -3,6 +3,7 @@ import { EvidencePackReadSchema, EvidencePackSchema } from "./evidence-pack.js";
3
3
  import { DecisionLogEntrySchema } from "./decision-log-entry.js";
4
4
  import { DimensionContextInputSchema, DimensionContextSchema } from "./dimension-context.js";
5
5
  import { RecipeConfigSchema } from "./recipe-config.js";
6
+ import { RunPlanSchema } from "./run-plan.js";
6
7
  function schemaError(label, error) {
7
8
  const issues = error.issues.map((issue) => ({
8
9
  path: issue.path.map((segment) => String(segment)).join("."),
@@ -44,6 +45,9 @@ export function parseDecisionLogEntry(input) {
44
45
  export function parseRecipeConfig(input) {
45
46
  return parseOrThrow(RecipeConfigSchema, input, "recipe config");
46
47
  }
48
+ export function parseRunPlan(input) {
49
+ return parseOrThrow(RunPlanSchema, input, "run plan");
50
+ }
47
51
  export function parseDimensionContext(input) {
48
52
  return parseOrThrow(DimensionContextSchema, input, "dimension context");
49
53
  }
package/dist/parse.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"parse.js","sourceRoot":"","sources":["../src/parse.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,EACL,sBAAsB,EACtB,kBAAkB,EAEnB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,sBAAsB,EAAyB,MAAM,yBAAyB,CAAC;AACxF,OAAO,EACL,2BAA2B,EAC3B,sBAAsB,EAGvB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,kBAAkB,EAAqB,MAAM,oBAAoB,CAAC;AAE3E,SAAS,WAAW,CAAC,KAAa,EAAE,KAAiB;IACnD,MAAM,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;QAC1C,IAAI,EAAE,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC;QAC5D,OAAO,EAAE,KAAK,CAAC,OAAO;KACvB,CAAC,CAAC,CAAC;IACJ,OAAO,IAAI,iBAAiB,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;AAC9C,CAAC;AAED,SAAS,YAAY,CAAI,MAAoB,EAAE,KAAc,EAAE,KAAa;IAC1E,MAAM,MAAM,GAAG,MAAM,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;IACvC,IAAI,MAAM,CAAC,OAAO,EAAE,CAAC;QACnB,OAAO,MAAM,CAAC,IAAI,CAAC;IACrB,CAAC;IACD,MAAM,WAAW,CAAC,KAAK,EAAE,MAAM,CAAC,KAAK,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AAM,UAAU,qBAAqB,CAAC,KAAc;IAClD,OAAO,YAAY,CAAC,sBAAsB,EAAE,KAAK,EAAE,oBAAoB,CAAC,CAAC;AAC3E,CAAC;AAED,MAAM,UAAU,iBAAiB,CAAC,KAAc;IAC9C,OAAO,YAAY,CAAC,kBAAkB,EAAE,KAAK,EAAE,eAAe,CAAC,CAAC;AAClE,CAAC;AAED,MAAM,UAAU,YAAY,CAAC,KAAc;IACzC,OAAO,YAAY,CAAC,aAAa,EAAE,KAAK,EAAE,UAAU,CAAC,CAAC;AACxD,CAAC;AAED,MAAM,UAAU,qBAAqB,CAAC,KAAc;IAClD,OAAO,YAAY,CAAC,sBAAsB,EAAE,KAAK,EAAE,mBAAmB,CAAC,CAAC;AAC1E,CAAC;AAED,MAAM,UAAU,0BAA0B,CAAC,KAAc;IACvD,OAAO,YAAY,CAAC,2BAA2B,EAAE,KAAK,EAAE,yBAAyB,CAAC,CAAC;AACrF,CAAC"}
@@ -0,0 +1,142 @@
1
+ import { z } from "zod";
2
+ import { type PlannedDimension } from "./dimension-context.js";
3
+ /**
4
+ * The run plan: which review dimensions this run intends to cover, in what order,
5
+ * with what focus each was asked for.
6
+ *
7
+ * WHY THIS EXISTS. The dimension-coverage contract (`dimension-context`) accounts
8
+ * a plan against what was recorded, and it refuses to invent the plan — that is
9
+ * correct for an accountant and useless without a source. Today the plan exists
10
+ * only inside `iterate.config.yaml` on one side and nowhere on the other: the
11
+ * GlassPane harness renders a coverage line from `planned: []`, which reads as
12
+ * "nothing was verified" forever. So the plan gets its own contract, and whoever
13
+ * configures a run writes it while whoever renders it reads it.
14
+ *
15
+ * THE DIRECTION RULE, STATED SO IT DOES NOT ROT: nothing here reads a config file,
16
+ * a session, or an environment variable. This module validates and digests a value
17
+ * somebody else produced. Pulling `iterate.config.yaml` (or a recipe) in here would
18
+ * weld one consumer's file format into the shared layer, which is the dependency
19
+ * direction the kernel exists to forbid.
20
+ */
21
+ export declare const RUN_PLAN_SCHEMA_VERSION: "iterate.run-plan/0.1";
22
+ /**
23
+ * Not `-draft`, unlike the recipe and decision-entry contracts. Those carry a draft
24
+ * label because archived bytes predate the freeze and must stay distinguishable;
25
+ * a brand-new contract has no such archive, and a draft label on it would only
26
+ * become a compatibility burden with nothing yet to be compatible with.
27
+ */
28
+ export declare const RUN_PLAN_SOURCES: readonly ["config", "recipe", "session", "manual"];
29
+ export declare const RunPlanSourceKindSchema: z.ZodEnum<["config", "recipe", "session", "manual"]>;
30
+ export type RunPlanSourceKind = z.infer<typeof RunPlanSourceKindSchema>;
31
+ export declare const RunPlanSourceSchema: z.ZodObject<{
32
+ kind: z.ZodEnum<["config", "recipe", "session", "manual"]>;
33
+ /**
34
+ * What produced the plan — a config path, a recipe name, a session id. Optional:
35
+ * the rendering must never invent one, and an honest "source kind only" beats a
36
+ * guessed filename.
37
+ */
38
+ name: z.ZodOptional<z.ZodString>;
39
+ }, "strict", z.ZodTypeAny, {
40
+ kind: "config" | "recipe" | "session" | "manual";
41
+ name?: string | undefined;
42
+ }, {
43
+ kind: "config" | "recipe" | "session" | "manual";
44
+ name?: string | undefined;
45
+ }>;
46
+ export type RunPlanSource = z.infer<typeof RunPlanSourceSchema>;
47
+ export declare const RunPlanSchema: z.ZodEffects<z.ZodObject<{
48
+ schemaVersion: z.ZodLiteral<"iterate.run-plan/0.1">;
49
+ dimensions: z.ZodArray<z.ZodObject<{
50
+ id: z.ZodString;
51
+ label: z.ZodOptional<z.ZodString>;
52
+ focus: z.ZodOptional<z.ZodString>;
53
+ }, "strict", z.ZodTypeAny, {
54
+ id: string;
55
+ label?: string | undefined;
56
+ focus?: string | undefined;
57
+ }, {
58
+ id: string;
59
+ label?: string | undefined;
60
+ focus?: string | undefined;
61
+ }>, "many">;
62
+ source: z.ZodOptional<z.ZodObject<{
63
+ kind: z.ZodEnum<["config", "recipe", "session", "manual"]>;
64
+ /**
65
+ * What produced the plan — a config path, a recipe name, a session id. Optional:
66
+ * the rendering must never invent one, and an honest "source kind only" beats a
67
+ * guessed filename.
68
+ */
69
+ name: z.ZodOptional<z.ZodString>;
70
+ }, "strict", z.ZodTypeAny, {
71
+ kind: "config" | "recipe" | "session" | "manual";
72
+ name?: string | undefined;
73
+ }, {
74
+ kind: "config" | "recipe" | "session" | "manual";
75
+ name?: string | undefined;
76
+ }>>;
77
+ }, "strict", z.ZodTypeAny, {
78
+ schemaVersion: "iterate.run-plan/0.1";
79
+ dimensions: {
80
+ id: string;
81
+ label?: string | undefined;
82
+ focus?: string | undefined;
83
+ }[];
84
+ source?: {
85
+ kind: "config" | "recipe" | "session" | "manual";
86
+ name?: string | undefined;
87
+ } | undefined;
88
+ }, {
89
+ schemaVersion: "iterate.run-plan/0.1";
90
+ dimensions: {
91
+ id: string;
92
+ label?: string | undefined;
93
+ focus?: string | undefined;
94
+ }[];
95
+ source?: {
96
+ kind: "config" | "recipe" | "session" | "manual";
97
+ name?: string | undefined;
98
+ } | undefined;
99
+ }>, {
100
+ schemaVersion: "iterate.run-plan/0.1";
101
+ dimensions: {
102
+ id: string;
103
+ label?: string | undefined;
104
+ focus?: string | undefined;
105
+ }[];
106
+ source?: {
107
+ kind: "config" | "recipe" | "session" | "manual";
108
+ name?: string | undefined;
109
+ } | undefined;
110
+ }, {
111
+ schemaVersion: "iterate.run-plan/0.1";
112
+ dimensions: {
113
+ id: string;
114
+ label?: string | undefined;
115
+ focus?: string | undefined;
116
+ }[];
117
+ source?: {
118
+ kind: "config" | "recipe" | "session" | "manual";
119
+ name?: string | undefined;
120
+ } | undefined;
121
+ }>;
122
+ export type RunPlan = z.infer<typeof RunPlanSchema>;
123
+ /** The plan's ids, in planned order. Order is the caller's, never sorted. */
124
+ export declare function plannedIds(plan: RunPlan): string[];
125
+ /**
126
+ * Feed a plan to the dimension-coverage contract without the caller re-shaping it.
127
+ * Kept as one function because the two contracts must not be allowed to develop
128
+ * private conversions between them.
129
+ */
130
+ export declare function plannedDimensionsOf(plan: RunPlan): PlannedDimension[];
131
+ /**
132
+ * A digest of the plan, so a ledger line can say which plan a run was held to —
133
+ * and a reader can notice the plan changed mid-run.
134
+ *
135
+ * `rp_` + sha256 over the canonical form (keys sorted, no insignificant
136
+ * whitespace), so two producers that serialise differently still agree on the
137
+ * digest. Numbers are rendered by the host's shortest roundtrip form, which is
138
+ * why the same rules live in the engine and in the Python half rather than in a
139
+ * format string here.
140
+ */
141
+ export declare function runPlanDigest(plan: RunPlan): string;
142
+ //# sourceMappingURL=run-plan.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"run-plan.d.ts","sourceRoot":"","sources":["../src/run-plan.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,OAAO,EAIL,KAAK,gBAAgB,EACtB,MAAM,wBAAwB,CAAC;AAEhC;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,uBAAuB,EAAG,sBAA+B,CAAC;AAEvE;;;;;GAKG;AACH,eAAO,MAAM,gBAAgB,oDAAqD,CAAC;AAEnF,eAAO,MAAM,uBAAuB,sDAA2B,CAAC;AAChE,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAExE,eAAO,MAAM,mBAAmB;;IAE9B;;;;OAIG;;;;;;;;EAEH,CAAC;AACH,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAEhE,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;QATxB;;;;WAIG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAgCD,CAAC;AACL,MAAM,MAAM,OAAO,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC;AAEpD,6EAA6E;AAC7E,wBAAgB,UAAU,CAAC,IAAI,EAAE,OAAO,GAAG,MAAM,EAAE,CAElD;AAED;;;;GAIG;AACH,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,OAAO,GAAG,gBAAgB,EAAE,CAErE;AAED;;;;;;;;;GASG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,OAAO,GAAG,MAAM,CAEnD"}
@@ -0,0 +1,92 @@
1
+ import { createHash } from "node:crypto";
2
+ import { z } from "zod";
3
+ import { canonicalJson } from "./canonical-json.js";
4
+ import { DIMENSION_MAX_PLANNED, DIMENSION_MIN_PLANNED, PlannedDimensionSchema } from "./dimension-context.js";
5
+ /**
6
+ * The run plan: which review dimensions this run intends to cover, in what order,
7
+ * with what focus each was asked for.
8
+ *
9
+ * WHY THIS EXISTS. The dimension-coverage contract (`dimension-context`) accounts
10
+ * a plan against what was recorded, and it refuses to invent the plan — that is
11
+ * correct for an accountant and useless without a source. Today the plan exists
12
+ * only inside `iterate.config.yaml` on one side and nowhere on the other: the
13
+ * GlassPane harness renders a coverage line from `planned: []`, which reads as
14
+ * "nothing was verified" forever. So the plan gets its own contract, and whoever
15
+ * configures a run writes it while whoever renders it reads it.
16
+ *
17
+ * THE DIRECTION RULE, STATED SO IT DOES NOT ROT: nothing here reads a config file,
18
+ * a session, or an environment variable. This module validates and digests a value
19
+ * somebody else produced. Pulling `iterate.config.yaml` (or a recipe) in here would
20
+ * weld one consumer's file format into the shared layer, which is the dependency
21
+ * direction the kernel exists to forbid.
22
+ */
23
+ export const RUN_PLAN_SCHEMA_VERSION = "iterate.run-plan/0.1";
24
+ /**
25
+ * Not `-draft`, unlike the recipe and decision-entry contracts. Those carry a draft
26
+ * label because archived bytes predate the freeze and must stay distinguishable;
27
+ * a brand-new contract has no such archive, and a draft label on it would only
28
+ * become a compatibility burden with nothing yet to be compatible with.
29
+ */
30
+ export const RUN_PLAN_SOURCES = ["config", "recipe", "session", "manual"];
31
+ export const RunPlanSourceKindSchema = z.enum(RUN_PLAN_SOURCES);
32
+ export const RunPlanSourceSchema = z.strictObject({
33
+ kind: RunPlanSourceKindSchema,
34
+ /**
35
+ * What produced the plan — a config path, a recipe name, a session id. Optional:
36
+ * the rendering must never invent one, and an honest "source kind only" beats a
37
+ * guessed filename.
38
+ */
39
+ name: z.string().min(1).max(512).optional()
40
+ });
41
+ export const RunPlanSchema = z
42
+ .strictObject({
43
+ schemaVersion: z.literal(RUN_PLAN_SCHEMA_VERSION),
44
+ // `PlannedDimensionSchema` is reused rather than re-specified: id shape, label and
45
+ // focus limits belong to the dimension contract, and a second copy of them is a
46
+ // second place to disagree.
47
+ dimensions: z.array(PlannedDimensionSchema).min(DIMENSION_MIN_PLANNED).max(DIMENSION_MAX_PLANNED),
48
+ source: RunPlanSourceSchema.optional()
49
+ })
50
+ .superRefine((plan, ctx) => {
51
+ // Duplicate ids are refused, not collapsed. JSON Schema cannot express id-level
52
+ // uniqueness (`uniqueItems` compares whole objects, so `{id:"security"}` twice with
53
+ // different focus passes it), which makes this the documented place where the zod
54
+ // side is *stricter* than the published schema — not a drift to be fixed later.
55
+ const seen = new Set();
56
+ plan.dimensions.forEach((dimension, index) => {
57
+ if (seen.has(dimension.id)) {
58
+ ctx.addIssue({
59
+ code: z.ZodIssueCode.custom,
60
+ path: ["dimensions", index, "id"],
61
+ message: `duplicate planned dimension "${dimension.id}" (first seen at index ${plan.dimensions.findIndex((other) => other.id === dimension.id)}); a plan that names a dimension twice has two different intents, and this contract cannot tell them apart`
62
+ });
63
+ }
64
+ seen.add(dimension.id);
65
+ });
66
+ });
67
+ /** The plan's ids, in planned order. Order is the caller's, never sorted. */
68
+ export function plannedIds(plan) {
69
+ return plan.dimensions.map((dimension) => dimension.id);
70
+ }
71
+ /**
72
+ * Feed a plan to the dimension-coverage contract without the caller re-shaping it.
73
+ * Kept as one function because the two contracts must not be allowed to develop
74
+ * private conversions between them.
75
+ */
76
+ export function plannedDimensionsOf(plan) {
77
+ return plan.dimensions;
78
+ }
79
+ /**
80
+ * A digest of the plan, so a ledger line can say which plan a run was held to —
81
+ * and a reader can notice the plan changed mid-run.
82
+ *
83
+ * `rp_` + sha256 over the canonical form (keys sorted, no insignificant
84
+ * whitespace), so two producers that serialise differently still agree on the
85
+ * digest. Numbers are rendered by the host's shortest roundtrip form, which is
86
+ * why the same rules live in the engine and in the Python half rather than in a
87
+ * format string here.
88
+ */
89
+ export function runPlanDigest(plan) {
90
+ return `rp_${createHash("sha256").update(canonicalJson(plan)).digest("hex")}`;
91
+ }
92
+ //# sourceMappingURL=run-plan.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"run-plan.js","sourceRoot":"","sources":["../src/run-plan.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EACL,qBAAqB,EACrB,qBAAqB,EACrB,sBAAsB,EAEvB,MAAM,wBAAwB,CAAC;AAEhC;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAG,sBAA+B,CAAC;AAEvE;;;;;GAKG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,QAAQ,EAAE,QAAQ,EAAE,SAAS,EAAE,QAAQ,CAAU,CAAC;AAEnF,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC;AAGhE,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,CAAC,YAAY,CAAC;IAChD,IAAI,EAAE,uBAAuB;IAC7B;;;;OAIG;IACH,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE;CAC5C,CAAC,CAAC;AAGH,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC;KAC3B,YAAY,CAAC;IACZ,aAAa,EAAE,CAAC,CAAC,OAAO,CAAC,uBAAuB,CAAC;IACjD,mFAAmF;IACnF,gFAAgF;IAChF,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AED;;;;;;;;;GASG;AACH,MAAM,UAAU,aAAa,CAAC,IAAa;IACzC,OAAO,MAAM,UAAU,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC;AAChF,CAAC"}
package/dist/schemas.d.ts CHANGED
@@ -1,6 +1,7 @@
1
1
  export declare const EVIDENCE_PACK_SCHEMA_ID: "https://schemas.iterate.dev/evidence-pack-0.1.json";
2
2
  export declare const DECISION_LOG_ENTRY_SCHEMA_ID: "https://schemas.iterate.dev/decision-log-entry-0.1-draft.json";
3
3
  export declare const RECIPE_CONFIG_SCHEMA_ID: "https://schemas.iterate.dev/recipe-config-0.1-draft.json";
4
+ export declare const RUN_PLAN_SCHEMA_ID: "https://schemas.iterate.dev/run-plan-0.1.json";
4
5
  export interface JsonSchemaObject {
5
6
  readonly $id: string;
6
7
  readonly [key: string]: unknown;
@@ -8,4 +9,5 @@ export interface JsonSchemaObject {
8
9
  export declare const EVIDENCE_PACK_JSON_SCHEMA: JsonSchemaObject;
9
10
  export declare const DECISION_LOG_ENTRY_JSON_SCHEMA: JsonSchemaObject;
10
11
  export declare const RECIPE_CONFIG_JSON_SCHEMA: JsonSchemaObject;
12
+ export declare const RUN_PLAN_JSON_SCHEMA: JsonSchemaObject;
11
13
  //# sourceMappingURL=schemas.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../src/schemas.ts"],"names":[],"mappings":"AAWA,eAAO,MAAM,uBAAuB,EAClC,oDAA6D,CAAC;AAChE,eAAO,MAAM,4BAA4B,EACvC,+DAAwE,CAAC;AAC3E,eAAO,MAAM,uBAAuB,EAClC,0DAAmE,CAAC;AAEtE,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,QAAQ,EAAE,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACjC;AAMD,eAAO,MAAM,yBAAyB,EAAE,gBAEvC,CAAC;AAEF,eAAO,MAAM,8BAA8B,EAAE,gBAE5C,CAAC;AAEF,eAAO,MAAM,yBAAyB,EAAE,gBAEvC,CAAC"}
1
+ {"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../src/schemas.ts"],"names":[],"mappings":"AAWA,eAAO,MAAM,uBAAuB,EAClC,oDAA6D,CAAC;AAChE,eAAO,MAAM,4BAA4B,EACvC,+DAAwE,CAAC;AAC3E,eAAO,MAAM,uBAAuB,EAClC,0DAAmE,CAAC;AACtE,eAAO,MAAM,kBAAkB,EAC7B,+CAAwD,CAAC;AAE3D,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,QAAQ,EAAE,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACjC;AAMD,eAAO,MAAM,yBAAyB,EAAE,gBAEvC,CAAC;AAEF,eAAO,MAAM,8BAA8B,EAAE,gBAE5C,CAAC;AAEF,eAAO,MAAM,yBAAyB,EAAE,gBAEvC,CAAC;AAEF,eAAO,MAAM,oBAAoB,EAAE,gBAElC,CAAC"}
package/dist/schemas.js CHANGED
@@ -10,10 +10,12 @@ const nodeRequire = createRequire(import.meta.url);
10
10
  export const EVIDENCE_PACK_SCHEMA_ID = "https://schemas.iterate.dev/evidence-pack-0.1.json";
11
11
  export const DECISION_LOG_ENTRY_SCHEMA_ID = "https://schemas.iterate.dev/decision-log-entry-0.1-draft.json";
12
12
  export const RECIPE_CONFIG_SCHEMA_ID = "https://schemas.iterate.dev/recipe-config-0.1-draft.json";
13
+ export const RUN_PLAN_SCHEMA_ID = "https://schemas.iterate.dev/run-plan-0.1.json";
13
14
  function loadSchema(relativePath) {
14
15
  return nodeRequire(relativePath);
15
16
  }
16
17
  export const EVIDENCE_PACK_JSON_SCHEMA = loadSchema("../schemas/evidence-pack.schema.json");
17
18
  export const DECISION_LOG_ENTRY_JSON_SCHEMA = loadSchema("../schemas/decision-log-entry.schema.json");
18
19
  export const RECIPE_CONFIG_JSON_SCHEMA = loadSchema("../schemas/recipe-config.schema.json");
20
+ export const RUN_PLAN_JSON_SCHEMA = loadSchema("../schemas/run-plan.schema.json");
19
21
  //# sourceMappingURL=schemas.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"schemas.js","sourceRoot":"","sources":["../src/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAE5C;;;;;;GAMG;AACH,MAAM,WAAW,GAAG,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAEnD,MAAM,CAAC,MAAM,uBAAuB,GAClC,oDAA6D,CAAC;AAChE,MAAM,CAAC,MAAM,4BAA4B,GACvC,+DAAwE,CAAC;AAC3E,MAAM,CAAC,MAAM,uBAAuB,GAClC,0DAAmE,CAAC;AAOtE,SAAS,UAAU,CAAC,YAAoB;IACtC,OAAO,WAAW,CAAC,YAAY,CAAqB,CAAC;AACvD,CAAC;AAED,MAAM,CAAC,MAAM,yBAAyB,GAAqB,UAAU,CACnE,sCAAsC,CACvC,CAAC;AAEF,MAAM,CAAC,MAAM,8BAA8B,GAAqB,UAAU,CACxE,2CAA2C,CAC5C,CAAC;AAEF,MAAM,CAAC,MAAM,yBAAyB,GAAqB,UAAU,CACnE,sCAAsC,CACvC,CAAC"}
1
+ {"version":3,"file":"schemas.js","sourceRoot":"","sources":["../src/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAE5C;;;;;;GAMG;AACH,MAAM,WAAW,GAAG,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAEnD,MAAM,CAAC,MAAM,uBAAuB,GAClC,oDAA6D,CAAC;AAChE,MAAM,CAAC,MAAM,4BAA4B,GACvC,+DAAwE,CAAC;AAC3E,MAAM,CAAC,MAAM,uBAAuB,GAClC,0DAAmE,CAAC;AACtE,MAAM,CAAC,MAAM,kBAAkB,GAC7B,+CAAwD,CAAC;AAO3D,SAAS,UAAU,CAAC,YAAoB;IACtC,OAAO,WAAW,CAAC,YAAY,CAAqB,CAAC;AACvD,CAAC;AAED,MAAM,CAAC,MAAM,yBAAyB,GAAqB,UAAU,CACnE,sCAAsC,CACvC,CAAC;AAEF,MAAM,CAAC,MAAM,8BAA8B,GAAqB,UAAU,CACxE,2CAA2C,CAC5C,CAAC;AAEF,MAAM,CAAC,MAAM,yBAAyB,GAAqB,UAAU,CACnE,sCAAsC,CACvC,CAAC;AAEF,MAAM,CAAC,MAAM,oBAAoB,GAAqB,UAAU,CAC9D,iCAAiC,CAClC,CAAC"}
@@ -0,0 +1,541 @@
1
+ {
2
+ "comment": "Cross-implementation anchor for decisionOutcomeFromEvidence and decisionSummaryFromEvidence (kernel/src/evidence-decision.ts). The rules a second implementation must reproduce, written so it can be coded from this file without reading the TypeScript: (1) circuitBreaker.level >= 3 is `blocked`, checked FIRST — the loop was stopped by harness policy and calling that a `fail` would blame the app. (2) Otherwise an assertion present (key present and not null) decides `pass` when its `passed` is true, `fail` when false. (3) Otherwise a diagnosis present decides `NO_ANOMALY` -> pass, `INCONCLUSIVE` -> inconclusive, any T-class -> fail. (4) Otherwise `inconclusive`: nothing was asserted and nothing diagnosed is not a pass. (5) A pass is then downgraded — never upgraded — to `inconclusive` when attribution.contaminated is true or attribution.level is `weak`, because the engine itself refuses to attribute that result to this operation. Absent vs explicit-null for assertion/diagnosis are two shapes the engine really emits and must be treated the same way. The summary is a rendering of the same fields in this order, joined by '; ': 'assertion <property> passed|failed: expected <JSON>, actual <JSON>' when an assertion is present; 'diagnosis <class>: <report.anomaly>' when a diagnosis is present; 'circuitBreaker level <n> (<reason>)' when level > 0 (the parenthetical only when a reason is present); 'attribution <level>' plus ', contaminated' when contaminated. JSON values are rendered as JavaScript's JSON.stringify would (no insignificant whitespace, key order as the pack carries them). Longer than 2048 characters, keep the first 2045 and append '...'. Provenance: four cases are real packs read out of ~/.glasspane/evidence on 2026-10-08 (operationId recorded per case); four are derived by editing exactly one field of a recorded pack, stated in each case's `origin`, because the archived corpus never contains a failed assertion, a weak-or-contaminated pass, or a breaker at the policy limit — those rules can only be pinned by derivation, and a fixture that silently invented them would be unsourced. The `input` bytes are the archived files exactly as the engine wrote them, including a `schemaVersion` of `glasspane.evidence/0.1-draft` and a `pixelDiff` with no `bounds`. A consumer that reads evidence off disk therefore parses them through the read-side contract (`parseEvidencePackRead`), which is what folds the legacy version and tolerates the missing signal — the same path the GlassPane Harness ledger uses. The transcription itself reads only `attribution`, `assertion`, `diagnosis` and `circuitBreaker`, which are identical under both contracts; nothing here depends on version folding.",
3
+ "cases": [
4
+ {
5
+ "name": "no-assertion-no-diagnosis-soft-breaker0",
6
+ "origin": "real",
7
+ "sourceOperationId": "op_01M2QS5A2AMWPNKCMTH0KFARC2",
8
+ "input": {
9
+ "assertion": null,
10
+ "attribution": {
11
+ "contaminated": false,
12
+ "level": "soft"
13
+ },
14
+ "circuitBreaker": {
15
+ "level": 0
16
+ },
17
+ "createdAt": "2026-09-17T13:33:39.275Z",
18
+ "diagnosis": null,
19
+ "operationId": "op_01M2QS5A2AMWPNKCMTH0KFARC2",
20
+ "schemaVersion": "glasspane.evidence/0.1-draft",
21
+ "signals": {
22
+ "act": {
23
+ "actConfirmed": true,
24
+ "action": "press",
25
+ "selector": {
26
+ "role": "AXButton",
27
+ "title": "Submit"
28
+ }
29
+ },
30
+ "axEvent": {
31
+ "axChanged": false,
32
+ "latencyMs": 0.0050067901611328125,
33
+ "nodeCount": 4,
34
+ "treeDigestAfter": "f84988c2d9a2edf3972aa9a247279fce",
35
+ "treeDigestBefore": "f84988c2d9a2edf3972aa9a247279fce"
36
+ },
37
+ "crash": {
38
+ "processAliveAfter": true,
39
+ "processAliveBefore": true
40
+ },
41
+ "handlerProbe": null,
42
+ "pixelDiff": {
43
+ "changedPixelRatio": 0,
44
+ "windowId": 12
45
+ },
46
+ "responsiveness": {
47
+ "pingMs": 3,
48
+ "responsive": true
49
+ },
50
+ "stateDiff": null
51
+ }
52
+ },
53
+ "expectedOutcome": "inconclusive",
54
+ "expectedSummary": "attribution soft"
55
+ },
56
+ {
57
+ "name": "diagnosis-T5-strong-breaker1",
58
+ "origin": "real",
59
+ "sourceOperationId": "op_01M2WNQN9TTG0MCR0ZRNZ5V5G1",
60
+ "input": {
61
+ "assertion": null,
62
+ "attribution": {
63
+ "contaminated": false,
64
+ "level": "strong"
65
+ },
66
+ "circuitBreaker": {
67
+ "level": 1,
68
+ "reason": "screen-recording-denied"
69
+ },
70
+ "createdAt": "2026-09-19T11:09:58.741Z",
71
+ "diagnosis": {
72
+ "class": "T5",
73
+ "report": {
74
+ "anomaly": "SwiftUI dependency loss: handler hit and state changed (source=z3-kvc, changed=true, keys=[demo.hidden]) but AX tree and pixels stayed silent",
75
+ "evidence": "op_01M2WNQN9TTG0MCR0ZRNZ5V5G1 strong attribution; actConfirmed=true; axChanged=false (digest 37521cc12c2829f47cca0287517a6d9c -> 37521cc12c2829f47cca0287517a6d9c, 171 nodes, 281.99493885040283ms); pixelDiff=unavailable; responsive=true pingMs=0.028967857360839844; alive true -> true; handlerProbe hitCount=1 late=0 [probe_demo/ProbeDemoApp.swift:68]; source=z3-kvc, changed=true, keys=[demo.hidden]; circuitBreaker=1",
76
+ "next": "check the view's observation of the changed key (Z1b-style direct @State writes and missing @Observable registration are the usual roots); re-bind or route through the observed model",
77
+ "path": "act.press -> probe-window -> handler/state -> ax-digest -> pixel-diff"
78
+ }
79
+ },
80
+ "operationId": "op_01M2WNQN9TTG0MCR0ZRNZ5V5G1",
81
+ "schemaVersion": "glasspane.evidence/0.1-draft",
82
+ "signals": {
83
+ "act": {
84
+ "actConfirmed": true,
85
+ "action": "press",
86
+ "selector": {
87
+ "identifier": "hidden-write",
88
+ "role": "AXButton"
89
+ }
90
+ },
91
+ "axEvent": {
92
+ "axChanged": false,
93
+ "latencyMs": 281.99493885040283,
94
+ "nodeCount": 171,
95
+ "treeDigestAfter": "37521cc12c2829f47cca0287517a6d9c",
96
+ "treeDigestBefore": "37521cc12c2829f47cca0287517a6d9c"
97
+ },
98
+ "crash": {
99
+ "processAliveAfter": true,
100
+ "processAliveBefore": true
101
+ },
102
+ "handlerProbe": {
103
+ "handlers": [
104
+ {
105
+ "file": "probe_demo/ProbeDemoApp.swift",
106
+ "line": 68
107
+ }
108
+ ],
109
+ "hitCount": 1,
110
+ "lateCount": 0,
111
+ "probeVersion": "gp-probe/0.1.0"
112
+ },
113
+ "responsiveness": {
114
+ "pingMs": 0.028967857360839844,
115
+ "responsive": true
116
+ },
117
+ "stateDiff": {
118
+ "changed": true,
119
+ "entries": [
120
+ {
121
+ "after": "1",
122
+ "before": "0",
123
+ "key": "demo.hidden"
124
+ }
125
+ ],
126
+ "source": "z3-kvc"
127
+ }
128
+ }
129
+ },
130
+ "expectedOutcome": "fail",
131
+ "expectedSummary": "diagnosis T5: SwiftUI dependency loss: handler hit and state changed (source=z3-kvc, changed=true, keys=[demo.hidden]) but AX tree and pixels stayed silent; circuitBreaker level 1 (screen-recording-denied); attribution strong"
132
+ },
133
+ {
134
+ "name": "diagnosis-INCONCLUSIVE-strong-breaker1",
135
+ "origin": "real",
136
+ "sourceOperationId": "op_01M2WNQMK2NEEZDNMK58NP2JYQ",
137
+ "input": {
138
+ "assertion": null,
139
+ "attribution": {
140
+ "contaminated": false,
141
+ "level": "strong"
142
+ },
143
+ "circuitBreaker": {
144
+ "level": 1,
145
+ "reason": "screen-recording-denied"
146
+ },
147
+ "createdAt": "2026-09-19T11:09:58.103Z",
148
+ "diagnosis": {
149
+ "class": "INCONCLUSIVE",
150
+ "report": {
151
+ "anomaly": "AX tree changed but the pixel signal is unavailable (circuitBreaker level 1); T6 is undecidable without screen capture",
152
+ "evidence": "op_01M2WNQMK2NEEZDNMK58NP2JYQ strong attribution; actConfirmed=true; axChanged=true (digest c624dee7d3644a4b64f8f8b6739917de -> 37521cc12c2829f47cca0287517a6d9c, 171 nodes, 372.1029758453369ms); pixelDiff=unavailable; responsive=true pingMs=0.054955482482910156; alive true -> true; handlerProbe hitCount=1 late=0 [probe_demo/ProbeDemoApp.swift:60]; source=z3-kvc, changed=true, keys=[count-domain.count, demo.count]; circuitBreaker=1",
153
+ "next": "grant screen recording permission to the daemon and replay the act for a decidable T6/NO_ANOMALY verdict",
154
+ "path": "act.press -> probe-window -> handler/state -> ax-digest -> pixel-diff"
155
+ }
156
+ },
157
+ "operationId": "op_01M2WNQMK2NEEZDNMK58NP2JYQ",
158
+ "schemaVersion": "glasspane.evidence/0.1-draft",
159
+ "signals": {
160
+ "act": {
161
+ "actConfirmed": true,
162
+ "action": "press",
163
+ "selector": {
164
+ "identifier": "ok-press",
165
+ "role": "AXButton"
166
+ }
167
+ },
168
+ "axEvent": {
169
+ "axChanged": true,
170
+ "latencyMs": 372.1029758453369,
171
+ "nodeCount": 171,
172
+ "treeDigestAfter": "37521cc12c2829f47cca0287517a6d9c",
173
+ "treeDigestBefore": "c624dee7d3644a4b64f8f8b6739917de"
174
+ },
175
+ "crash": {
176
+ "processAliveAfter": true,
177
+ "processAliveBefore": true
178
+ },
179
+ "handlerProbe": {
180
+ "handlers": [
181
+ {
182
+ "file": "probe_demo/ProbeDemoApp.swift",
183
+ "line": 60
184
+ }
185
+ ],
186
+ "hitCount": 1,
187
+ "lateCount": 0,
188
+ "probeVersion": "gp-probe/0.1.0"
189
+ },
190
+ "responsiveness": {
191
+ "pingMs": 0.054955482482910156,
192
+ "responsive": true
193
+ },
194
+ "stateDiff": {
195
+ "changed": true,
196
+ "entries": [
197
+ {
198
+ "after": "1",
199
+ "before": "0",
200
+ "key": "count-domain.count"
201
+ },
202
+ {
203
+ "after": "1",
204
+ "before": "0",
205
+ "key": "demo.count"
206
+ }
207
+ ],
208
+ "source": "z3-kvc"
209
+ }
210
+ }
211
+ },
212
+ "expectedOutcome": "inconclusive",
213
+ "expectedSummary": "diagnosis INCONCLUSIVE: AX tree changed but the pixel signal is unavailable (circuitBreaker level 1); T6 is undecidable without screen capture; circuitBreaker level 1 (screen-recording-denied); attribution strong"
214
+ },
215
+ {
216
+ "name": "assertion-pass-with-diagnosis-T3-soft",
217
+ "origin": "real",
218
+ "sourceOperationId": "op_01M2STQMY23REZG9CPD6Z3CYGT",
219
+ "input": {
220
+ "assertion": {
221
+ "actual": true,
222
+ "expected": true,
223
+ "kind": "element_property",
224
+ "passed": true,
225
+ "property": "enabled",
226
+ "selector": {
227
+ "role": "AXButton"
228
+ }
229
+ },
230
+ "attribution": {
231
+ "contaminated": false,
232
+ "level": "soft"
233
+ },
234
+ "circuitBreaker": {
235
+ "level": 1,
236
+ "reason": "screen-recording-denied"
237
+ },
238
+ "createdAt": "2026-09-18T08:39:37.667Z",
239
+ "diagnosis": {
240
+ "class": "T3",
241
+ "report": {
242
+ "anomaly": "operation confirmed but neither the AX tree nor pixels changed; binding lost",
243
+ "evidence": "op_01M2STQMY23REZG9CPD6Z3CYGT soft attribution; actConfirmed=true; axChanged=false (digest bd76f2aba5c08ea202103eeca782292b -> bd76f2aba5c08ea202103eeca782292b, 820 nodes, 811.6888999938965ms); pixelDiff=unavailable; responsive=true pingMs=0.1289844512939453; alive true -> true; circuitBreaker=1",
244
+ "next": "verify the selector matches an enabled control; observe the tree; check the action binding and isEnabled state",
245
+ "path": "act.press -> ax-confirm -> tree-digest -> pixel-diff"
246
+ }
247
+ },
248
+ "operationId": "op_01M2STQMY23REZG9CPD6Z3CYGT",
249
+ "schemaVersion": "glasspane.evidence/0.1-draft",
250
+ "signals": {
251
+ "act": {
252
+ "actConfirmed": true,
253
+ "action": "press",
254
+ "selector": {
255
+ "role": "AXButton"
256
+ }
257
+ },
258
+ "axEvent": {
259
+ "axChanged": false,
260
+ "latencyMs": 811.6888999938965,
261
+ "nodeCount": 820,
262
+ "treeDigestAfter": "bd76f2aba5c08ea202103eeca782292b",
263
+ "treeDigestBefore": "bd76f2aba5c08ea202103eeca782292b"
264
+ },
265
+ "crash": {
266
+ "processAliveAfter": true,
267
+ "processAliveBefore": true
268
+ },
269
+ "handlerProbe": null,
270
+ "responsiveness": {
271
+ "pingMs": 0.1289844512939453,
272
+ "responsive": true
273
+ },
274
+ "stateDiff": null
275
+ }
276
+ },
277
+ "expectedOutcome": "pass",
278
+ "expectedSummary": "assertion enabled passed: expected true, actual true; diagnosis T3: operation confirmed but neither the AX tree nor pixels changed; binding lost; circuitBreaker level 1 (screen-recording-denied); attribution soft"
279
+ },
280
+ {
281
+ "name": "assertion-pass-but-weak-attribution",
282
+ "origin": "derived: attribution.level strong->weak",
283
+ "sourceOperationId": "op_01M2STQMY23REZG9CPD6Z3CYGT",
284
+ "input": {
285
+ "assertion": {
286
+ "actual": true,
287
+ "expected": true,
288
+ "kind": "element_property",
289
+ "passed": true,
290
+ "property": "enabled",
291
+ "selector": {
292
+ "role": "AXButton"
293
+ }
294
+ },
295
+ "attribution": {
296
+ "contaminated": false,
297
+ "level": "weak"
298
+ },
299
+ "circuitBreaker": {
300
+ "level": 1,
301
+ "reason": "screen-recording-denied"
302
+ },
303
+ "createdAt": "2026-09-18T08:39:37.667Z",
304
+ "diagnosis": {
305
+ "class": "T3",
306
+ "report": {
307
+ "anomaly": "operation confirmed but neither the AX tree nor pixels changed; binding lost",
308
+ "evidence": "op_01M2STQMY23REZG9CPD6Z3CYGT soft attribution; actConfirmed=true; axChanged=false (digest bd76f2aba5c08ea202103eeca782292b -> bd76f2aba5c08ea202103eeca782292b, 820 nodes, 811.6888999938965ms); pixelDiff=unavailable; responsive=true pingMs=0.1289844512939453; alive true -> true; circuitBreaker=1",
309
+ "next": "verify the selector matches an enabled control; observe the tree; check the action binding and isEnabled state",
310
+ "path": "act.press -> ax-confirm -> tree-digest -> pixel-diff"
311
+ }
312
+ },
313
+ "operationId": "op_01M2STQMY23REZG9CPD6Z3CYGT",
314
+ "schemaVersion": "glasspane.evidence/0.1-draft",
315
+ "signals": {
316
+ "act": {
317
+ "actConfirmed": true,
318
+ "action": "press",
319
+ "selector": {
320
+ "role": "AXButton"
321
+ }
322
+ },
323
+ "axEvent": {
324
+ "axChanged": false,
325
+ "latencyMs": 811.6888999938965,
326
+ "nodeCount": 820,
327
+ "treeDigestAfter": "bd76f2aba5c08ea202103eeca782292b",
328
+ "treeDigestBefore": "bd76f2aba5c08ea202103eeca782292b"
329
+ },
330
+ "crash": {
331
+ "processAliveAfter": true,
332
+ "processAliveBefore": true
333
+ },
334
+ "handlerProbe": null,
335
+ "responsiveness": {
336
+ "pingMs": 0.1289844512939453,
337
+ "responsive": true
338
+ },
339
+ "stateDiff": null
340
+ }
341
+ },
342
+ "expectedOutcome": "inconclusive",
343
+ "expectedSummary": "assertion enabled passed: expected true, actual true; diagnosis T3: operation confirmed but neither the AX tree nor pixels changed; binding lost; circuitBreaker level 1 (screen-recording-denied); attribution weak"
344
+ },
345
+ {
346
+ "name": "assertion-pass-but-contaminated",
347
+ "origin": "derived: attribution.contaminated -> true",
348
+ "sourceOperationId": "op_01M2STQMY23REZG9CPD6Z3CYGT",
349
+ "input": {
350
+ "assertion": {
351
+ "actual": true,
352
+ "expected": true,
353
+ "kind": "element_property",
354
+ "passed": true,
355
+ "property": "enabled",
356
+ "selector": {
357
+ "role": "AXButton"
358
+ }
359
+ },
360
+ "attribution": {
361
+ "contaminated": true,
362
+ "level": "soft"
363
+ },
364
+ "circuitBreaker": {
365
+ "level": 1,
366
+ "reason": "screen-recording-denied"
367
+ },
368
+ "createdAt": "2026-09-18T08:39:37.667Z",
369
+ "diagnosis": {
370
+ "class": "T3",
371
+ "report": {
372
+ "anomaly": "operation confirmed but neither the AX tree nor pixels changed; binding lost",
373
+ "evidence": "op_01M2STQMY23REZG9CPD6Z3CYGT soft attribution; actConfirmed=true; axChanged=false (digest bd76f2aba5c08ea202103eeca782292b -> bd76f2aba5c08ea202103eeca782292b, 820 nodes, 811.6888999938965ms); pixelDiff=unavailable; responsive=true pingMs=0.1289844512939453; alive true -> true; circuitBreaker=1",
374
+ "next": "verify the selector matches an enabled control; observe the tree; check the action binding and isEnabled state",
375
+ "path": "act.press -> ax-confirm -> tree-digest -> pixel-diff"
376
+ }
377
+ },
378
+ "operationId": "op_01M2STQMY23REZG9CPD6Z3CYGT",
379
+ "schemaVersion": "glasspane.evidence/0.1-draft",
380
+ "signals": {
381
+ "act": {
382
+ "actConfirmed": true,
383
+ "action": "press",
384
+ "selector": {
385
+ "role": "AXButton"
386
+ }
387
+ },
388
+ "axEvent": {
389
+ "axChanged": false,
390
+ "latencyMs": 811.6888999938965,
391
+ "nodeCount": 820,
392
+ "treeDigestAfter": "bd76f2aba5c08ea202103eeca782292b",
393
+ "treeDigestBefore": "bd76f2aba5c08ea202103eeca782292b"
394
+ },
395
+ "crash": {
396
+ "processAliveAfter": true,
397
+ "processAliveBefore": true
398
+ },
399
+ "handlerProbe": null,
400
+ "responsiveness": {
401
+ "pingMs": 0.1289844512939453,
402
+ "responsive": true
403
+ },
404
+ "stateDiff": null
405
+ }
406
+ },
407
+ "expectedOutcome": "inconclusive",
408
+ "expectedSummary": "assertion enabled passed: expected true, actual true; diagnosis T3: operation confirmed but neither the AX tree nor pixels changed; binding lost; circuitBreaker level 1 (screen-recording-denied); attribution soft, contaminated"
409
+ },
410
+ {
411
+ "name": "assertion-failed",
412
+ "origin": "derived: assertion.passed -> false, assertion.actual -> false",
413
+ "sourceOperationId": "op_01M2STQMY23REZG9CPD6Z3CYGT",
414
+ "input": {
415
+ "assertion": {
416
+ "actual": false,
417
+ "expected": true,
418
+ "kind": "element_property",
419
+ "passed": false,
420
+ "property": "enabled",
421
+ "selector": {
422
+ "role": "AXButton"
423
+ }
424
+ },
425
+ "attribution": {
426
+ "contaminated": false,
427
+ "level": "soft"
428
+ },
429
+ "circuitBreaker": {
430
+ "level": 1,
431
+ "reason": "screen-recording-denied"
432
+ },
433
+ "createdAt": "2026-09-18T08:39:37.667Z",
434
+ "diagnosis": {
435
+ "class": "T3",
436
+ "report": {
437
+ "anomaly": "operation confirmed but neither the AX tree nor pixels changed; binding lost",
438
+ "evidence": "op_01M2STQMY23REZG9CPD6Z3CYGT soft attribution; actConfirmed=true; axChanged=false (digest bd76f2aba5c08ea202103eeca782292b -> bd76f2aba5c08ea202103eeca782292b, 820 nodes, 811.6888999938965ms); pixelDiff=unavailable; responsive=true pingMs=0.1289844512939453; alive true -> true; circuitBreaker=1",
439
+ "next": "verify the selector matches an enabled control; observe the tree; check the action binding and isEnabled state",
440
+ "path": "act.press -> ax-confirm -> tree-digest -> pixel-diff"
441
+ }
442
+ },
443
+ "operationId": "op_01M2STQMY23REZG9CPD6Z3CYGT",
444
+ "schemaVersion": "glasspane.evidence/0.1-draft",
445
+ "signals": {
446
+ "act": {
447
+ "actConfirmed": true,
448
+ "action": "press",
449
+ "selector": {
450
+ "role": "AXButton"
451
+ }
452
+ },
453
+ "axEvent": {
454
+ "axChanged": false,
455
+ "latencyMs": 811.6888999938965,
456
+ "nodeCount": 820,
457
+ "treeDigestAfter": "bd76f2aba5c08ea202103eeca782292b",
458
+ "treeDigestBefore": "bd76f2aba5c08ea202103eeca782292b"
459
+ },
460
+ "crash": {
461
+ "processAliveAfter": true,
462
+ "processAliveBefore": true
463
+ },
464
+ "handlerProbe": null,
465
+ "responsiveness": {
466
+ "pingMs": 0.1289844512939453,
467
+ "responsive": true
468
+ },
469
+ "stateDiff": null
470
+ }
471
+ },
472
+ "expectedOutcome": "fail",
473
+ "expectedSummary": "assertion enabled failed: expected true, actual false; diagnosis T3: operation confirmed but neither the AX tree nor pixels changed; binding lost; circuitBreaker level 1 (screen-recording-denied); attribution soft"
474
+ },
475
+ {
476
+ "name": "breaker-at-policy-limit",
477
+ "origin": "derived: circuitBreaker.level -> 3",
478
+ "sourceOperationId": "op_01M2STQMY23REZG9CPD6Z3CYGT",
479
+ "input": {
480
+ "assertion": {
481
+ "actual": true,
482
+ "expected": true,
483
+ "kind": "element_property",
484
+ "passed": true,
485
+ "property": "enabled",
486
+ "selector": {
487
+ "role": "AXButton"
488
+ }
489
+ },
490
+ "attribution": {
491
+ "contaminated": false,
492
+ "level": "soft"
493
+ },
494
+ "circuitBreaker": {
495
+ "level": 3,
496
+ "reason": "fixture: breaker raised to the policy limit"
497
+ },
498
+ "createdAt": "2026-09-18T08:39:37.667Z",
499
+ "diagnosis": {
500
+ "class": "T3",
501
+ "report": {
502
+ "anomaly": "operation confirmed but neither the AX tree nor pixels changed; binding lost",
503
+ "evidence": "op_01M2STQMY23REZG9CPD6Z3CYGT soft attribution; actConfirmed=true; axChanged=false (digest bd76f2aba5c08ea202103eeca782292b -> bd76f2aba5c08ea202103eeca782292b, 820 nodes, 811.6888999938965ms); pixelDiff=unavailable; responsive=true pingMs=0.1289844512939453; alive true -> true; circuitBreaker=1",
504
+ "next": "verify the selector matches an enabled control; observe the tree; check the action binding and isEnabled state",
505
+ "path": "act.press -> ax-confirm -> tree-digest -> pixel-diff"
506
+ }
507
+ },
508
+ "operationId": "op_01M2STQMY23REZG9CPD6Z3CYGT",
509
+ "schemaVersion": "glasspane.evidence/0.1-draft",
510
+ "signals": {
511
+ "act": {
512
+ "actConfirmed": true,
513
+ "action": "press",
514
+ "selector": {
515
+ "role": "AXButton"
516
+ }
517
+ },
518
+ "axEvent": {
519
+ "axChanged": false,
520
+ "latencyMs": 811.6888999938965,
521
+ "nodeCount": 820,
522
+ "treeDigestAfter": "bd76f2aba5c08ea202103eeca782292b",
523
+ "treeDigestBefore": "bd76f2aba5c08ea202103eeca782292b"
524
+ },
525
+ "crash": {
526
+ "processAliveAfter": true,
527
+ "processAliveBefore": true
528
+ },
529
+ "handlerProbe": null,
530
+ "responsiveness": {
531
+ "pingMs": 0.1289844512939453,
532
+ "responsive": true
533
+ },
534
+ "stateDiff": null
535
+ }
536
+ },
537
+ "expectedOutcome": "blocked",
538
+ "expectedSummary": "assertion enabled passed: expected true, actual true; diagnosis T3: operation confirmed but neither the AX tree nor pixels changed; binding lost; circuitBreaker level 3 (fixture: breaker raised to the policy limit); attribution soft"
539
+ }
540
+ ]
541
+ }
@@ -0,0 +1,152 @@
1
+ {
2
+ "comment": "Cross-implementation anchor for the run-plan contract (kernel/src/run-plan.ts): what a plan is, and how to digest one so two shells and a ledger can say 'this run was held to this plan'. Rules a second implementation must reproduce, stated here so it need not read the TypeScript: (1) schemaVersion is exactly `iterate.run-plan/0.1`. (2) `dimensions` is 1..64 entries, each an object with a required `id` matching `^[a-z0-9]+(?:-[a-z0-9]+)*$` and at most 64 chars, and optional `label` (<=256) and `focus` (<=4096); no other keys. An empty plan is refused: a run with nothing to verify has a configuration problem, and reporting 0/0 dimensions as success is how that gets hidden. (3) Planned order is the caller's and is never sorted. (4) A repeated id is refused, not collapsed — the two entries can carry different focus, so collapsing picks one silently. JSON Schema cannot express id-level uniqueness (`uniqueItems` compares whole objects), so that rule lives on the validator side; the case named `duplicate-ids-differ-only-by-focus` below is the documented shape where the published schema accepts and the validator refuses. (5) `source`, when present, has a required `kind` in `config|recipe|session|manual` and an optional non-empty `name` <=512; nothing here reads a config file to invent a source. (6) The digest is `rp_` + sha256 of the canonical JSON form: UTF-16-code-unit-sorted keys, no insignificant whitespace, arrays in order, strings as JSON escapes them; numbers use the host's shortest roundtrip form, which is why none appear in this fixture — that concern is pinned by the canonical-JSON cases in the C35 suite instead. Provenance: the nine ids and both focus strings are taken verbatim from GlassPane's own iterate.config.yaml (`dimensions:` and `dimension_sets.engine|gui.focus`), because a vocabulary invented for a fixture would let both sides agree on something neither product uses.",
3
+ "input": {
4
+ "schemaVersion": "iterate.run-plan/0.1",
5
+ "dimensions": [
6
+ {
7
+ "id": "correctness",
8
+ "focus": "归因/证据语义不可让步:不得为通过断言而伪造测量或借用他卡读数"
9
+ },
10
+ {
11
+ "id": "security"
12
+ },
13
+ {
14
+ "id": "performance",
15
+ "focus": "注意 latency budget 与快照保留上限(EngineCore 常量)"
16
+ },
17
+ {
18
+ "id": "architecture"
19
+ },
20
+ {
21
+ "id": "style-tests"
22
+ },
23
+ {
24
+ "id": "tech-debt"
25
+ },
26
+ {
27
+ "id": "spec-compliance"
28
+ },
29
+ {
30
+ "id": "frontend-backend"
31
+ },
32
+ {
33
+ "id": "ui-ux",
34
+ "label": "UI/UX"
35
+ }
36
+ ],
37
+ "source": {
38
+ "kind": "config",
39
+ "name": "iterate.config.yaml"
40
+ }
41
+ },
42
+ "expectedDigest": "rp_f90ea606d2697278fb6e0c1cfd84cc6d21536332ca88970740e48d4b2429d61a",
43
+ "expectedIds": [
44
+ "correctness",
45
+ "security",
46
+ "performance",
47
+ "architecture",
48
+ "style-tests",
49
+ "tech-debt",
50
+ "spec-compliance",
51
+ "frontend-backend",
52
+ "ui-ux"
53
+ ],
54
+ "cases": [
55
+ {
56
+ "name": "empty-plan",
57
+ "input": {
58
+ "schemaVersion": "iterate.run-plan/0.1",
59
+ "dimensions": []
60
+ },
61
+ "expect": "refused",
62
+ "path": "dimensions"
63
+ },
64
+ {
65
+ "name": "uppercase-id",
66
+ "input": {
67
+ "schemaVersion": "iterate.run-plan/0.1",
68
+ "dimensions": [
69
+ {
70
+ "id": "Security"
71
+ }
72
+ ]
73
+ },
74
+ "expect": "refused",
75
+ "path": "dimensions.0.id"
76
+ },
77
+ {
78
+ "name": "duplicate-ids-differ-only-by-focus",
79
+ "input": {
80
+ "schemaVersion": "iterate.run-plan/0.1",
81
+ "dimensions": [
82
+ {
83
+ "id": "security"
84
+ },
85
+ {
86
+ "id": "security",
87
+ "focus": "auth surface"
88
+ }
89
+ ]
90
+ },
91
+ "expect": "refused",
92
+ "path": "dimensions.1.id",
93
+ "jsonSchemaAccepts": true
94
+ },
95
+ {
96
+ "name": "unknown-source-kind",
97
+ "input": {
98
+ "schemaVersion": "iterate.run-plan/0.1",
99
+ "dimensions": [
100
+ {
101
+ "id": "correctness"
102
+ }
103
+ ],
104
+ "source": {
105
+ "kind": "vibe"
106
+ }
107
+ },
108
+ "expect": "refused",
109
+ "path": "source.kind"
110
+ },
111
+ {
112
+ "name": "extra-top-level-key",
113
+ "input": {
114
+ "schemaVersion": "iterate.run-plan/0.1",
115
+ "dimensions": [
116
+ {
117
+ "id": "correctness"
118
+ }
119
+ ],
120
+ "notes": "not part of the contract"
121
+ },
122
+ "expect": "refused",
123
+ "path": "",
124
+ "messageIncludes": "notes"
125
+ },
126
+ {
127
+ "name": "missing-schemaVersion",
128
+ "input": {
129
+ "dimensions": [
130
+ {
131
+ "id": "correctness"
132
+ }
133
+ ]
134
+ },
135
+ "expect": "refused",
136
+ "path": "schemaVersion"
137
+ },
138
+ {
139
+ "name": "minimal-plan-no-source",
140
+ "input": {
141
+ "schemaVersion": "iterate.run-plan/0.1",
142
+ "dimensions": [
143
+ {
144
+ "id": "correctness"
145
+ }
146
+ ]
147
+ },
148
+ "expect": "accepted",
149
+ "digestPrefix": "rp_"
150
+ }
151
+ ]
152
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "iterate-kernel",
3
- "version": "0.1.2",
3
+ "version": "0.1.4",
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",
@@ -50,6 +50,10 @@
50
50
  "types": "./dist/recipe-config.d.ts",
51
51
  "default": "./dist/recipe-config.js"
52
52
  },
53
+ "./run-plan": {
54
+ "types": "./dist/run-plan.d.ts",
55
+ "default": "./dist/run-plan.js"
56
+ },
53
57
  "./schemas": {
54
58
  "types": "./dist/schemas.d.ts",
55
59
  "default": "./dist/schemas.js"
@@ -0,0 +1,60 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://schemas.iterate.dev/run-plan-0.1.json",
4
+ "title": "RunPlan",
5
+ "description": "Which review dimensions a run intends to cover, in planned order (5.7 R40 scenario 2: dimension-aware context compression needs a plan to be aware of). Whoever configures the run produces this; whoever renders coverage reads it. Nothing in the kernel reads a config file to make one. NOTE ON SOURCE OF TRUTH: the id/label/focus constraints are duplicated from `src/dimension-context.ts`, which has no JSON Schema of its own — until that gap is closed, the zod side is the definition and this file mirrors it. ID-LEVEL UNIQUENESS IS ENFORCED BY ZOD ONLY: `uniqueItems` compares whole objects, so two entries with the same id but different focus pass this schema and are refused by `RunPlanSchema`.",
6
+ "type": "object",
7
+ "additionalProperties": false,
8
+ "required": ["schemaVersion", "dimensions"],
9
+ "properties": {
10
+ "schemaVersion": {
11
+ "const": "iterate.run-plan/0.1"
12
+ },
13
+ "dimensions": {
14
+ "type": "array",
15
+ "minItems": 1,
16
+ "maxItems": 64,
17
+ "uniqueItems": true,
18
+ "items": {
19
+ "$ref": "#/$defs/plannedDimension"
20
+ }
21
+ },
22
+ "source": {
23
+ "type": "object",
24
+ "additionalProperties": false,
25
+ "required": ["kind"],
26
+ "properties": {
27
+ "kind": {
28
+ "enum": ["config", "recipe", "session", "manual"]
29
+ },
30
+ "name": {
31
+ "type": "string",
32
+ "minLength": 1,
33
+ "maxLength": 512
34
+ }
35
+ }
36
+ }
37
+ },
38
+ "$defs": {
39
+ "plannedDimension": {
40
+ "type": "object",
41
+ "additionalProperties": false,
42
+ "required": ["id"],
43
+ "properties": {
44
+ "id": {
45
+ "type": "string",
46
+ "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$",
47
+ "maxLength": 64
48
+ },
49
+ "label": {
50
+ "type": "string",
51
+ "maxLength": 256
52
+ },
53
+ "focus": {
54
+ "type": "string",
55
+ "maxLength": 4096
56
+ }
57
+ }
58
+ }
59
+ }
60
+ }