agentskeptic 0.1.1 → 0.1.2

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.
Files changed (43) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +342 -342
  3. package/dist/cli.js +157 -157
  4. package/dist/debug-ui/app.css +188 -188
  5. package/dist/debug-ui/app.js +245 -245
  6. package/dist/debug-ui/index.html +79 -79
  7. package/dist/enforceCli.js +11 -11
  8. package/dist/planTransition.test.js +235 -235
  9. package/dist/planTransitionPathHarvest.test.js +116 -116
  10. package/dist/quickVerify/postgresCatalog.js +53 -53
  11. package/package.json +1 -1
  12. package/schemas/agent-run-record-v1.schema.json +51 -51
  13. package/schemas/agent-run-record-v2.schema.json +61 -61
  14. package/schemas/assurance-manifest-v1.schema.json +28 -28
  15. package/schemas/assurance-run-report-v1.schema.json +28 -28
  16. package/schemas/ci-lock-v1.schema.json +163 -163
  17. package/schemas/cli-error-envelope.schema.json +48 -48
  18. package/schemas/event.schema.json +111 -111
  19. package/schemas/execution-trace-view.schema.json +122 -122
  20. package/schemas/plan-validation-core.schema.json +95 -95
  21. package/schemas/quick-verify-report.schema.json +251 -251
  22. package/schemas/registry-validation-result.schema.json +99 -99
  23. package/schemas/run-comparison-report.schema.json +513 -513
  24. package/schemas/tools-registry-export.schema.json +9 -9
  25. package/schemas/tools-registry.schema.json +284 -284
  26. package/schemas/workflow-engine-result.schema.json +591 -591
  27. package/schemas/workflow-result-compare-input.schema.json +15 -15
  28. package/schemas/workflow-result-signature.schema.json +20 -20
  29. package/schemas/workflow-result-v9.schema.json +85 -85
  30. package/schemas/workflow-result.schema.json +80 -80
  31. package/schemas/workflow-truth-report.schema.json +761 -761
  32. package/dist/failureOriginSchemaEnum.test.d.ts +0 -2
  33. package/dist/failureOriginSchemaEnum.test.d.ts.map +0 -1
  34. package/dist/failureOriginSchemaEnum.test.js +0 -21
  35. package/dist/failureOriginSchemaEnum.test.js.map +0 -1
  36. package/dist/failureOriginSchemaParity.test.d.ts +0 -2
  37. package/dist/failureOriginSchemaParity.test.d.ts.map +0 -1
  38. package/dist/failureOriginSchemaParity.test.js +0 -33
  39. package/dist/failureOriginSchemaParity.test.js.map +0 -1
  40. package/dist/slice6.compare.ac.test.d.ts +0 -2
  41. package/dist/slice6.compare.ac.test.d.ts.map +0 -1
  42. package/dist/slice6.compare.ac.test.js +0 -81
  43. package/dist/slice6.compare.ac.test.js.map +0 -1
@@ -1,761 +1,761 @@
1
- {
2
- "$id": "https://agentskeptic.com/schemas/workflow-truth-report.schema.json",
3
- "title": "WorkflowTruthReport",
4
- "type": "object",
5
- "additionalProperties": false,
6
- "required": [
7
- "schemaVersion",
8
- "workflowId",
9
- "workflowStatus",
10
- "trustSummary",
11
- "runLevelIssues",
12
- "eventSequence",
13
- "steps",
14
- "failureAnalysis",
15
- "failureExplanation",
16
- "correctnessDefinition",
17
- "executionPathFindings",
18
- "executionPathSummary"
19
- ],
20
- "properties": {
21
- "schemaVersion": { "const": 9 },
22
- "workflowId": { "type": "string" },
23
- "workflowStatus": {
24
- "type": "string",
25
- "enum": ["complete", "incomplete", "inconsistent"]
26
- },
27
- "trustSummary": { "type": "string" },
28
- "runLevelIssues": {
29
- "type": "array",
30
- "items": { "$ref": "#/$defs/truthIssue" }
31
- },
32
- "eventSequence": {
33
- "oneOf": [
34
- {
35
- "type": "object",
36
- "additionalProperties": false,
37
- "required": ["kind"],
38
- "properties": {
39
- "kind": { "const": "normal" }
40
- }
41
- },
42
- {
43
- "type": "object",
44
- "additionalProperties": false,
45
- "required": ["kind", "issues"],
46
- "properties": {
47
- "kind": { "const": "irregular" },
48
- "issues": {
49
- "type": "array",
50
- "minItems": 1,
51
- "items": { "$ref": "#/$defs/truthIssue" }
52
- }
53
- }
54
- }
55
- ]
56
- },
57
- "steps": {
58
- "type": "array",
59
- "items": { "$ref": "#/$defs/truthStep" }
60
- },
61
- "failureAnalysis": {
62
- "oneOf": [{ "type": "null" }, { "$ref": "#/$defs/failureAnalysis" }]
63
- },
64
- "failureExplanation": {
65
- "oneOf": [{ "type": "null" }, { "$ref": "#/$defs/failureExplanationV1" }]
66
- },
67
- "correctnessDefinition": {
68
- "oneOf": [{ "type": "null" }, { "$ref": "#/$defs/correctnessDefinitionV1" }]
69
- },
70
- "executionPathFindings": {
71
- "type": "array",
72
- "items": { "$ref": "#/$defs/executionPathFinding" }
73
- },
74
- "executionPathSummary": { "type": "string", "maxLength": 4096 }
75
- },
76
- "allOf": [
77
- {
78
- "if": {
79
- "properties": { "workflowStatus": { "const": "complete" } },
80
- "required": ["workflowStatus"]
81
- },
82
- "then": {
83
- "properties": {
84
- "failureExplanation": { "type": "null" },
85
- "failureAnalysis": { "type": "null" },
86
- "correctnessDefinition": { "type": "null" }
87
- }
88
- }
89
- },
90
- {
91
- "if": {
92
- "properties": {
93
- "workflowStatus": { "enum": ["incomplete", "inconsistent"] }
94
- },
95
- "required": ["workflowStatus"]
96
- },
97
- "then": {
98
- "properties": {
99
- "failureExplanation": { "$ref": "#/$defs/failureExplanationV1" },
100
- "failureAnalysis": { "$ref": "#/$defs/failureAnalysis" },
101
- "correctnessDefinition": { "$ref": "#/$defs/correctnessDefinitionV1" }
102
- }
103
- }
104
- }
105
- ],
106
- "$defs": {
107
- "failureExplanationFactId": {
108
- "type": "string",
109
- "enum": [
110
- "trust_summary",
111
- "workflow_status",
112
- "verification_policy",
113
- "primary_origin",
114
- "classification_confidence",
115
- "failure_analysis_summary",
116
- "primary_scope",
117
- "primary_codes",
118
- "primary_ingest_index",
119
- "primary_tool_id",
120
- "primary_source",
121
- "primary_run_event_id",
122
- "primary_seq",
123
- "primary_effect_id",
124
- "verify_target",
125
- "intended_effect_narrative",
126
- "evidence_summary_field",
127
- "evidence_summary_expected",
128
- "evidence_summary_actual",
129
- "evidence_summary_row_count"
130
- ]
131
- },
132
- "failureExplanationUnknownId": {
133
- "type": "string",
134
- "enum": ["unknown_reason_code", "classification_confidence_band", "competing_hypothesis"]
135
- },
136
- "failureExplanationFactRow": {
137
- "type": "object",
138
- "additionalProperties": false,
139
- "required": ["id", "value"],
140
- "properties": {
141
- "id": { "$ref": "#/$defs/failureExplanationFactId" },
142
- "value": { "type": "string", "maxLength": 4096 }
143
- }
144
- },
145
- "failureExplanationUnknownRow": {
146
- "type": "object",
147
- "additionalProperties": false,
148
- "required": ["id", "value"],
149
- "properties": {
150
- "id": { "$ref": "#/$defs/failureExplanationUnknownId" },
151
- "value": { "type": "string", "maxLength": 4096 }
152
- }
153
- },
154
- "failureExplanationV1": {
155
- "type": "object",
156
- "additionalProperties": false,
157
- "required": ["schemaVersion", "expected", "observed", "divergence", "knownFacts", "unknowns"],
158
- "properties": {
159
- "schemaVersion": { "const": 1 },
160
- "expected": { "type": "string", "maxLength": 2048 },
161
- "observed": { "type": "string", "maxLength": 2048 },
162
- "divergence": { "type": "string", "maxLength": 2048 },
163
- "knownFacts": {
164
- "type": "array",
165
- "minItems": 1,
166
- "items": { "$ref": "#/$defs/failureExplanationFactRow" }
167
- },
168
- "unknowns": {
169
- "type": "array",
170
- "items": { "$ref": "#/$defs/failureExplanationUnknownRow" }
171
- }
172
- }
173
- },
174
- "pathConcernCategory": {
175
- "type": "string",
176
- "enum": [
177
- "context_quality",
178
- "decision_execution",
179
- "tool_selection_execution",
180
- "action_inputs_invalid",
181
- "workflow_completeness",
182
- "capture_integrity"
183
- ]
184
- },
185
- "pathFindingSeverity": {
186
- "type": "string",
187
- "enum": ["high", "medium", "low"]
188
- },
189
- "executionPathEvidence": {
190
- "type": "object",
191
- "additionalProperties": false,
192
- "required": ["scope"],
193
- "properties": {
194
- "scope": {
195
- "type": "string",
196
- "enum": ["run_context", "run_level", "event_sequence", "step"]
197
- },
198
- "codes": {
199
- "type": "array",
200
- "items": { "type": "string" }
201
- },
202
- "ingestIndex": { "type": "integer", "minimum": 0 },
203
- "seq": { "type": "integer", "minimum": 0 },
204
- "toolId": { "type": "string" },
205
- "source": { "type": "string" },
206
- "runEventId": { "type": ["string", "null"] }
207
- }
208
- },
209
- "executionPathFinding": {
210
- "type": "object",
211
- "additionalProperties": false,
212
- "required": ["code", "severity", "concernCategory", "message", "evidence"],
213
- "properties": {
214
- "code": { "type": "string", "minLength": 1 },
215
- "severity": { "$ref": "#/$defs/pathFindingSeverity" },
216
- "concernCategory": { "$ref": "#/$defs/pathConcernCategory" },
217
- "message": { "type": "string", "maxLength": 2048 },
218
- "evidence": { "$ref": "#/$defs/executionPathEvidence" }
219
- }
220
- },
221
- "failureOrigin": {
222
- "type": "string",
223
- "enum": [
224
- "decision_making",
225
- "inputs",
226
- "retrieval",
227
- "tool_use",
228
- "workflow_flow",
229
- "downstream_system_state"
230
- ]
231
- },
232
- "failureConfidence": {
233
- "type": "string",
234
- "enum": ["high", "medium", "low"]
235
- },
236
- "failureAnalysisEvidence": {
237
- "type": "object",
238
- "additionalProperties": false,
239
- "required": ["scope"],
240
- "properties": {
241
- "scope": {
242
- "type": "string",
243
- "enum": ["run_context", "run_level", "event_sequence", "step", "effect"]
244
- },
245
- "codes": {
246
- "type": "array",
247
- "items": { "type": "string" }
248
- },
249
- "ingestIndex": { "type": "integer", "minimum": 0 },
250
- "seq": { "type": "integer", "minimum": 0 },
251
- "toolId": { "type": "string" },
252
- "effectId": { "type": "string" },
253
- "source": { "type": "string" },
254
- "runEventId": { "type": ["string", "null"] }
255
- }
256
- },
257
- "failureAnalysisAlternative": {
258
- "type": "object",
259
- "additionalProperties": false,
260
- "required": ["primaryOrigin", "rationale"],
261
- "properties": {
262
- "primaryOrigin": { "$ref": "#/$defs/failureOrigin" },
263
- "rationale": { "type": "string", "maxLength": 2048 }
264
- }
265
- },
266
- "actionableFailureCategory": {
267
- "type": "string",
268
- "enum": [
269
- "decision_error",
270
- "bad_input",
271
- "retrieval_failure",
272
- "control_flow_problem",
273
- "state_inconsistency",
274
- "downstream_execution_failure",
275
- "ambiguous",
276
- "unclassified"
277
- ]
278
- },
279
- "actionableFailureSeverity": {
280
- "type": "string",
281
- "enum": ["high", "medium", "low"]
282
- },
283
- "recommendedAction": {
284
- "type": "string",
285
- "enum": [
286
- "none",
287
- "manual_review",
288
- "deduplicate",
289
- "reconcile_downstream_state",
290
- "correct_verification_inputs",
291
- "improve_read_connectivity",
292
- "resolve_multi_effect_failures",
293
- "align_tool_observations",
294
- "fix_event_ingest_and_steps",
295
- "fix_event_sequence_order",
296
- "fix_run_context_controls",
297
- "fix_cli_usage",
298
- "fix_registry_events_or_compare_files",
299
- "fix_verification_database_connection",
300
- "fix_saved_workflow_json",
301
- "fix_compare_workflow_inputs",
302
- "fix_execution_trace_structure",
303
- "fix_verification_policy_and_hook",
304
- "fix_plan_document_and_patterns",
305
- "fix_plan_transition_cli_and_refs",
306
- "upgrade_git_or_retry_git"
307
- ]
308
- },
309
- "actionableFailure": {
310
- "type": "object",
311
- "additionalProperties": false,
312
- "required": ["category", "severity", "recommendedAction", "automationSafe"],
313
- "properties": {
314
- "category": { "$ref": "#/$defs/actionableFailureCategory" },
315
- "severity": { "$ref": "#/$defs/actionableFailureSeverity" },
316
- "recommendedAction": { "$ref": "#/$defs/recommendedAction" },
317
- "automationSafe": { "type": "boolean" }
318
- }
319
- },
320
- "failureAnalysis": {
321
- "type": "object",
322
- "additionalProperties": false,
323
- "required": [
324
- "summary",
325
- "primaryOrigin",
326
- "confidence",
327
- "unknownReasonCodes",
328
- "evidence",
329
- "actionableFailure"
330
- ],
331
- "properties": {
332
- "summary": { "type": "string", "maxLength": 2048 },
333
- "primaryOrigin": { "$ref": "#/$defs/failureOrigin" },
334
- "confidence": { "$ref": "#/$defs/failureConfidence" },
335
- "unknownReasonCodes": {
336
- "type": "array",
337
- "items": { "type": "string" }
338
- },
339
- "evidence": {
340
- "type": "array",
341
- "minItems": 1,
342
- "items": { "$ref": "#/$defs/failureAnalysisEvidence" }
343
- },
344
- "alternativeHypotheses": {
345
- "type": "array",
346
- "items": { "$ref": "#/$defs/failureAnalysisAlternative" }
347
- },
348
- "actionableFailure": { "$ref": "#/$defs/actionableFailure" }
349
- }
350
- },
351
- "truthIssue": {
352
- "type": "object",
353
- "additionalProperties": false,
354
- "required": ["code", "message", "category"],
355
- "properties": {
356
- "code": { "type": "string" },
357
- "message": { "type": "string" },
358
- "category": {
359
- "type": "string",
360
- "enum": [
361
- "workflow_execution",
362
- "verification_setup",
363
- "observation_uncertainty"
364
- ]
365
- }
366
- }
367
- },
368
- "reason": {
369
- "type": "object",
370
- "additionalProperties": false,
371
- "required": ["code", "message"],
372
- "properties": {
373
- "code": { "type": "string" },
374
- "message": { "type": "string" },
375
- "field": { "type": "string" }
376
- }
377
- },
378
- "truthEffect": {
379
- "type": "object",
380
- "additionalProperties": false,
381
- "required": ["id", "outcomeLabel", "reasons"],
382
- "properties": {
383
- "id": { "type": "string" },
384
- "outcomeLabel": {
385
- "type": "string",
386
- "enum": [
387
- "VERIFIED",
388
- "FAILED_ROW_MISSING",
389
- "FAILED_VALUE_MISMATCH",
390
- "INCOMPLETE_CANNOT_VERIFY"
391
- ]
392
- },
393
- "reasons": {
394
- "type": "array",
395
- "items": { "$ref": "#/$defs/reason" }
396
- }
397
- }
398
- },
399
- "truthStep": {
400
- "allOf": [
401
- {
402
- "type": "object",
403
- "additionalProperties": false,
404
- "required": [
405
- "seq",
406
- "toolId",
407
- "outcomeLabel",
408
- "observations",
409
- "reasons",
410
- "intendedEffect",
411
- "observedExecution",
412
- "verifyTarget",
413
- "observedStateSummary"
414
- ],
415
- "properties": {
416
- "seq": { "type": "integer", "minimum": 0 },
417
- "toolId": { "type": "string" },
418
- "outcomeLabel": {
419
- "type": "string",
420
- "enum": [
421
- "VERIFIED",
422
- "FAILED_ROW_MISSING",
423
- "FAILED_VALUE_MISMATCH",
424
- "INCOMPLETE_CANNOT_VERIFY",
425
- "PARTIALLY_VERIFIED",
426
- "UNCERTAIN_NOT_OBSERVED_WITHIN_WINDOW"
427
- ]
428
- },
429
- "observations": {
430
- "type": "object",
431
- "additionalProperties": false,
432
- "required": ["evaluatedOrdinal", "repeatCount"],
433
- "properties": {
434
- "evaluatedOrdinal": { "type": "integer", "minimum": 1 },
435
- "repeatCount": { "type": "integer", "minimum": 1 }
436
- }
437
- },
438
- "reasons": {
439
- "type": "array",
440
- "items": { "$ref": "#/$defs/reason" }
441
- },
442
- "intendedEffect": {
443
- "type": "object",
444
- "additionalProperties": false,
445
- "required": ["narrative"],
446
- "properties": {
447
- "narrative": { "type": "string" }
448
- }
449
- },
450
- "observedExecution": {
451
- "type": "object",
452
- "additionalProperties": false,
453
- "required": ["paramsCanonical"],
454
- "properties": {
455
- "paramsCanonical": { "type": "string" }
456
- }
457
- },
458
- "failureCategory": {
459
- "type": "string",
460
- "enum": [
461
- "workflow_execution",
462
- "verification_setup",
463
- "observation_uncertainty"
464
- ]
465
- },
466
- "verifyTarget": {
467
- "type": ["string", "null"]
468
- },
469
- "observedStateSummary": { "type": "string" },
470
- "effects": {
471
- "type": "array",
472
- "minItems": 1,
473
- "items": { "$ref": "#/$defs/truthEffect" }
474
- }
475
- }
476
- },
477
- {
478
- "if": {
479
- "type": "object",
480
- "required": ["outcomeLabel"],
481
- "properties": { "outcomeLabel": { "const": "VERIFIED" } }
482
- },
483
- "then": {
484
- "type": "object",
485
- "properties": { "failureCategory": false }
486
- },
487
- "else": {
488
- "type": "object",
489
- "required": ["failureCategory"]
490
- }
491
- }
492
- ]
493
- },
494
- "correctnessEnforcementKind": {
495
- "type": "string",
496
- "enum": [
497
- "run_ingest_integrity",
498
- "event_capture_integrity",
499
- "run_context_fairness",
500
- "step_sql_expectation",
501
- "plan_transition_expectation",
502
- "quick_inferred_sql_row",
503
- "quick_inferred_relational",
504
- "quick_mapping_gap"
505
- ]
506
- },
507
- "correctnessRequiredUpstreamContract": {
508
- "type": "string",
509
- "enum": [
510
- "retrieval_ok_before_observation",
511
- "model_turn_completed_before_observation",
512
- "no_interrupt_before_observation",
513
- "branch_not_skipped_before_observation",
514
- "gate_not_skipped_before_observation",
515
- "tool_not_skipped_before_observation"
516
- ]
517
- },
518
- "correctnessIngestContractRequirement": {
519
- "type": "string",
520
- "enum": ["no_run_level_failures", "non_empty_tool_observed_steps"]
521
- },
522
- "correctnessRemediationAlignment": {
523
- "type": "object",
524
- "additionalProperties": false,
525
- "required": ["recommendedAction", "automationSafe"],
526
- "properties": {
527
- "recommendedAction": { "$ref": "#/$defs/recommendedAction" },
528
- "automationSafe": { "type": "boolean" }
529
- }
530
- },
531
- "correctnessEnforceableProjection": {
532
- "oneOf": [
533
- {
534
- "type": "object",
535
- "additionalProperties": false,
536
- "required": [
537
- "projectionKind",
538
- "workflowId",
539
- "verificationPolicyFragment",
540
- "primaryFailureCodes",
541
- "ingestContractRequirement"
542
- ],
543
- "properties": {
544
- "projectionKind": { "const": "run_ingest_integrity" },
545
- "workflowId": { "type": "string" },
546
- "verificationPolicyFragment": { "type": "string" },
547
- "primaryFailureCodes": {
548
- "type": "array",
549
- "items": { "type": "string" }
550
- },
551
- "ingestContractRequirement": { "$ref": "#/$defs/correctnessIngestContractRequirement" }
552
- }
553
- },
554
- {
555
- "type": "object",
556
- "additionalProperties": false,
557
- "required": [
558
- "projectionKind",
559
- "workflowId",
560
- "verificationPolicyFragment",
561
- "forbiddenEventSequenceCodes"
562
- ],
563
- "properties": {
564
- "projectionKind": { "const": "event_capture_integrity" },
565
- "workflowId": { "type": "string" },
566
- "verificationPolicyFragment": { "type": "string" },
567
- "forbiddenEventSequenceCodes": {
568
- "type": "array",
569
- "items": { "type": "string" }
570
- }
571
- }
572
- },
573
- {
574
- "type": "object",
575
- "additionalProperties": false,
576
- "required": [
577
- "projectionKind",
578
- "workflowId",
579
- "verificationPolicyFragment",
580
- "ingestIndex",
581
- "requiredUpstreamContract",
582
- "primaryRunContextCodes"
583
- ],
584
- "properties": {
585
- "projectionKind": { "const": "run_context_fairness" },
586
- "workflowId": { "type": "string" },
587
- "verificationPolicyFragment": { "type": "string" },
588
- "ingestIndex": { "type": "integer", "minimum": 0 },
589
- "requiredUpstreamContract": { "$ref": "#/$defs/correctnessRequiredUpstreamContract" },
590
- "primaryRunContextCodes": {
591
- "type": "array",
592
- "items": { "type": "string" }
593
- }
594
- }
595
- },
596
- {
597
- "type": "object",
598
- "additionalProperties": false,
599
- "required": [
600
- "projectionKind",
601
- "workflowId",
602
- "verificationPolicyFragment",
603
- "seq",
604
- "toolId",
605
- "verificationRequest"
606
- ],
607
- "properties": {
608
- "projectionKind": { "const": "step_sql_expectation" },
609
- "workflowId": { "type": "string" },
610
- "verificationPolicyFragment": { "type": "string" },
611
- "seq": { "type": "integer", "minimum": 0 },
612
- "toolId": { "type": "string" },
613
- "verificationRequest": {
614
- "oneOf": [
615
- { "type": "null" },
616
- {
617
- "$ref": "https://agentskeptic.com/schemas/workflow-engine-result.schema.json#/$defs/verificationRequestSqlRow"
618
- },
619
- {
620
- "$ref": "https://agentskeptic.com/schemas/workflow-engine-result.schema.json#/$defs/verificationRequestSqlRowAbsent"
621
- },
622
- {
623
- "$ref": "https://agentskeptic.com/schemas/workflow-engine-result.schema.json#/$defs/verificationRequestSqlEffects"
624
- },
625
- {
626
- "$ref": "https://agentskeptic.com/schemas/workflow-engine-result.schema.json#/$defs/verificationRequestSqlRelational"
627
- }
628
- ]
629
- }
630
- }
631
- },
632
- {
633
- "type": "object",
634
- "additionalProperties": false,
635
- "required": [
636
- "projectionKind",
637
- "workflowId",
638
- "verificationPolicyFragment",
639
- "seq",
640
- "toolId",
641
- "verifyTarget",
642
- "primaryCodes"
643
- ],
644
- "properties": {
645
- "projectionKind": { "const": "plan_transition_expectation" },
646
- "workflowId": { "type": "string" },
647
- "verificationPolicyFragment": { "type": "string" },
648
- "seq": { "type": "integer", "minimum": 0 },
649
- "toolId": { "type": "string" },
650
- "verifyTarget": { "type": ["string", "null"] },
651
- "primaryCodes": {
652
- "type": "array",
653
- "items": { "type": "string" }
654
- }
655
- }
656
- },
657
- {
658
- "type": "object",
659
- "additionalProperties": false,
660
- "required": [
661
- "projectionKind",
662
- "quickProvisional",
663
- "unitId",
664
- "toolName",
665
- "actionIndex",
666
- "table",
667
- "sqlRowRequest"
668
- ],
669
- "properties": {
670
- "projectionKind": { "const": "quick_inferred_sql_row" },
671
- "quickProvisional": { "const": true },
672
- "unitId": { "type": "string", "minLength": 1 },
673
- "toolName": { "type": "string" },
674
- "actionIndex": { "type": "integer", "minimum": 0 },
675
- "table": { "type": "string" },
676
- "sqlRowRequest": {
677
- "$ref": "https://agentskeptic.com/schemas/workflow-engine-result.schema.json#/$defs/verificationRequestSqlRow"
678
- }
679
- }
680
- },
681
- {
682
- "type": "object",
683
- "additionalProperties": false,
684
- "required": [
685
- "projectionKind",
686
- "quickProvisional",
687
- "unitId",
688
- "toolName",
689
- "actionIndex",
690
- "childTable",
691
- "checkId",
692
- "matchEq"
693
- ],
694
- "properties": {
695
- "projectionKind": { "const": "quick_inferred_relational" },
696
- "quickProvisional": { "const": true },
697
- "unitId": { "type": "string", "minLength": 1 },
698
- "toolName": { "type": "string" },
699
- "actionIndex": { "type": "integer", "minimum": 0 },
700
- "childTable": { "type": "string" },
701
- "checkId": { "type": "string" },
702
- "matchEq": {
703
- "type": "array",
704
- "minItems": 1,
705
- "items": {
706
- "$ref": "https://agentskeptic.com/schemas/workflow-engine-result.schema.json#/$defs/identityEqPair"
707
- }
708
- }
709
- }
710
- },
711
- {
712
- "type": "object",
713
- "additionalProperties": false,
714
- "required": [
715
- "projectionKind",
716
- "quickProvisional",
717
- "toolName",
718
- "actionIndex",
719
- "reasonCodes",
720
- "table"
721
- ],
722
- "properties": {
723
- "projectionKind": { "const": "quick_mapping_gap" },
724
- "quickProvisional": { "const": true },
725
- "toolName": { "type": "string" },
726
- "actionIndex": { "type": "integer", "minimum": 0 },
727
- "reasonCodes": {
728
- "type": "array",
729
- "items": { "type": "string" }
730
- },
731
- "table": { "type": ["string", "null"] }
732
- }
733
- }
734
- ]
735
- },
736
- "correctnessDefinitionV1": {
737
- "type": "object",
738
- "additionalProperties": false,
739
- "required": [
740
- "schemaVersion",
741
- "enforcementKind",
742
- "mustAlwaysHold",
743
- "enforceAs",
744
- "enforceableProjection",
745
- "remediationAlignment"
746
- ],
747
- "properties": {
748
- "schemaVersion": { "const": 1 },
749
- "enforcementKind": { "$ref": "#/$defs/correctnessEnforcementKind" },
750
- "mustAlwaysHold": { "type": "string", "maxLength": 2048 },
751
- "enforceAs": {
752
- "type": "array",
753
- "minItems": 2,
754
- "items": { "type": "string", "maxLength": 2048 }
755
- },
756
- "enforceableProjection": { "$ref": "#/$defs/correctnessEnforceableProjection" },
757
- "remediationAlignment": { "$ref": "#/$defs/correctnessRemediationAlignment" }
758
- }
759
- }
760
- }
761
- }
1
+ {
2
+ "$id": "https://agentskeptic.com/schemas/workflow-truth-report.schema.json",
3
+ "title": "WorkflowTruthReport",
4
+ "type": "object",
5
+ "additionalProperties": false,
6
+ "required": [
7
+ "schemaVersion",
8
+ "workflowId",
9
+ "workflowStatus",
10
+ "trustSummary",
11
+ "runLevelIssues",
12
+ "eventSequence",
13
+ "steps",
14
+ "failureAnalysis",
15
+ "failureExplanation",
16
+ "correctnessDefinition",
17
+ "executionPathFindings",
18
+ "executionPathSummary"
19
+ ],
20
+ "properties": {
21
+ "schemaVersion": { "const": 9 },
22
+ "workflowId": { "type": "string" },
23
+ "workflowStatus": {
24
+ "type": "string",
25
+ "enum": ["complete", "incomplete", "inconsistent"]
26
+ },
27
+ "trustSummary": { "type": "string" },
28
+ "runLevelIssues": {
29
+ "type": "array",
30
+ "items": { "$ref": "#/$defs/truthIssue" }
31
+ },
32
+ "eventSequence": {
33
+ "oneOf": [
34
+ {
35
+ "type": "object",
36
+ "additionalProperties": false,
37
+ "required": ["kind"],
38
+ "properties": {
39
+ "kind": { "const": "normal" }
40
+ }
41
+ },
42
+ {
43
+ "type": "object",
44
+ "additionalProperties": false,
45
+ "required": ["kind", "issues"],
46
+ "properties": {
47
+ "kind": { "const": "irregular" },
48
+ "issues": {
49
+ "type": "array",
50
+ "minItems": 1,
51
+ "items": { "$ref": "#/$defs/truthIssue" }
52
+ }
53
+ }
54
+ }
55
+ ]
56
+ },
57
+ "steps": {
58
+ "type": "array",
59
+ "items": { "$ref": "#/$defs/truthStep" }
60
+ },
61
+ "failureAnalysis": {
62
+ "oneOf": [{ "type": "null" }, { "$ref": "#/$defs/failureAnalysis" }]
63
+ },
64
+ "failureExplanation": {
65
+ "oneOf": [{ "type": "null" }, { "$ref": "#/$defs/failureExplanationV1" }]
66
+ },
67
+ "correctnessDefinition": {
68
+ "oneOf": [{ "type": "null" }, { "$ref": "#/$defs/correctnessDefinitionV1" }]
69
+ },
70
+ "executionPathFindings": {
71
+ "type": "array",
72
+ "items": { "$ref": "#/$defs/executionPathFinding" }
73
+ },
74
+ "executionPathSummary": { "type": "string", "maxLength": 4096 }
75
+ },
76
+ "allOf": [
77
+ {
78
+ "if": {
79
+ "properties": { "workflowStatus": { "const": "complete" } },
80
+ "required": ["workflowStatus"]
81
+ },
82
+ "then": {
83
+ "properties": {
84
+ "failureExplanation": { "type": "null" },
85
+ "failureAnalysis": { "type": "null" },
86
+ "correctnessDefinition": { "type": "null" }
87
+ }
88
+ }
89
+ },
90
+ {
91
+ "if": {
92
+ "properties": {
93
+ "workflowStatus": { "enum": ["incomplete", "inconsistent"] }
94
+ },
95
+ "required": ["workflowStatus"]
96
+ },
97
+ "then": {
98
+ "properties": {
99
+ "failureExplanation": { "$ref": "#/$defs/failureExplanationV1" },
100
+ "failureAnalysis": { "$ref": "#/$defs/failureAnalysis" },
101
+ "correctnessDefinition": { "$ref": "#/$defs/correctnessDefinitionV1" }
102
+ }
103
+ }
104
+ }
105
+ ],
106
+ "$defs": {
107
+ "failureExplanationFactId": {
108
+ "type": "string",
109
+ "enum": [
110
+ "trust_summary",
111
+ "workflow_status",
112
+ "verification_policy",
113
+ "primary_origin",
114
+ "classification_confidence",
115
+ "failure_analysis_summary",
116
+ "primary_scope",
117
+ "primary_codes",
118
+ "primary_ingest_index",
119
+ "primary_tool_id",
120
+ "primary_source",
121
+ "primary_run_event_id",
122
+ "primary_seq",
123
+ "primary_effect_id",
124
+ "verify_target",
125
+ "intended_effect_narrative",
126
+ "evidence_summary_field",
127
+ "evidence_summary_expected",
128
+ "evidence_summary_actual",
129
+ "evidence_summary_row_count"
130
+ ]
131
+ },
132
+ "failureExplanationUnknownId": {
133
+ "type": "string",
134
+ "enum": ["unknown_reason_code", "classification_confidence_band", "competing_hypothesis"]
135
+ },
136
+ "failureExplanationFactRow": {
137
+ "type": "object",
138
+ "additionalProperties": false,
139
+ "required": ["id", "value"],
140
+ "properties": {
141
+ "id": { "$ref": "#/$defs/failureExplanationFactId" },
142
+ "value": { "type": "string", "maxLength": 4096 }
143
+ }
144
+ },
145
+ "failureExplanationUnknownRow": {
146
+ "type": "object",
147
+ "additionalProperties": false,
148
+ "required": ["id", "value"],
149
+ "properties": {
150
+ "id": { "$ref": "#/$defs/failureExplanationUnknownId" },
151
+ "value": { "type": "string", "maxLength": 4096 }
152
+ }
153
+ },
154
+ "failureExplanationV1": {
155
+ "type": "object",
156
+ "additionalProperties": false,
157
+ "required": ["schemaVersion", "expected", "observed", "divergence", "knownFacts", "unknowns"],
158
+ "properties": {
159
+ "schemaVersion": { "const": 1 },
160
+ "expected": { "type": "string", "maxLength": 2048 },
161
+ "observed": { "type": "string", "maxLength": 2048 },
162
+ "divergence": { "type": "string", "maxLength": 2048 },
163
+ "knownFacts": {
164
+ "type": "array",
165
+ "minItems": 1,
166
+ "items": { "$ref": "#/$defs/failureExplanationFactRow" }
167
+ },
168
+ "unknowns": {
169
+ "type": "array",
170
+ "items": { "$ref": "#/$defs/failureExplanationUnknownRow" }
171
+ }
172
+ }
173
+ },
174
+ "pathConcernCategory": {
175
+ "type": "string",
176
+ "enum": [
177
+ "context_quality",
178
+ "decision_execution",
179
+ "tool_selection_execution",
180
+ "action_inputs_invalid",
181
+ "workflow_completeness",
182
+ "capture_integrity"
183
+ ]
184
+ },
185
+ "pathFindingSeverity": {
186
+ "type": "string",
187
+ "enum": ["high", "medium", "low"]
188
+ },
189
+ "executionPathEvidence": {
190
+ "type": "object",
191
+ "additionalProperties": false,
192
+ "required": ["scope"],
193
+ "properties": {
194
+ "scope": {
195
+ "type": "string",
196
+ "enum": ["run_context", "run_level", "event_sequence", "step"]
197
+ },
198
+ "codes": {
199
+ "type": "array",
200
+ "items": { "type": "string" }
201
+ },
202
+ "ingestIndex": { "type": "integer", "minimum": 0 },
203
+ "seq": { "type": "integer", "minimum": 0 },
204
+ "toolId": { "type": "string" },
205
+ "source": { "type": "string" },
206
+ "runEventId": { "type": ["string", "null"] }
207
+ }
208
+ },
209
+ "executionPathFinding": {
210
+ "type": "object",
211
+ "additionalProperties": false,
212
+ "required": ["code", "severity", "concernCategory", "message", "evidence"],
213
+ "properties": {
214
+ "code": { "type": "string", "minLength": 1 },
215
+ "severity": { "$ref": "#/$defs/pathFindingSeverity" },
216
+ "concernCategory": { "$ref": "#/$defs/pathConcernCategory" },
217
+ "message": { "type": "string", "maxLength": 2048 },
218
+ "evidence": { "$ref": "#/$defs/executionPathEvidence" }
219
+ }
220
+ },
221
+ "failureOrigin": {
222
+ "type": "string",
223
+ "enum": [
224
+ "decision_making",
225
+ "inputs",
226
+ "retrieval",
227
+ "tool_use",
228
+ "workflow_flow",
229
+ "downstream_system_state"
230
+ ]
231
+ },
232
+ "failureConfidence": {
233
+ "type": "string",
234
+ "enum": ["high", "medium", "low"]
235
+ },
236
+ "failureAnalysisEvidence": {
237
+ "type": "object",
238
+ "additionalProperties": false,
239
+ "required": ["scope"],
240
+ "properties": {
241
+ "scope": {
242
+ "type": "string",
243
+ "enum": ["run_context", "run_level", "event_sequence", "step", "effect"]
244
+ },
245
+ "codes": {
246
+ "type": "array",
247
+ "items": { "type": "string" }
248
+ },
249
+ "ingestIndex": { "type": "integer", "minimum": 0 },
250
+ "seq": { "type": "integer", "minimum": 0 },
251
+ "toolId": { "type": "string" },
252
+ "effectId": { "type": "string" },
253
+ "source": { "type": "string" },
254
+ "runEventId": { "type": ["string", "null"] }
255
+ }
256
+ },
257
+ "failureAnalysisAlternative": {
258
+ "type": "object",
259
+ "additionalProperties": false,
260
+ "required": ["primaryOrigin", "rationale"],
261
+ "properties": {
262
+ "primaryOrigin": { "$ref": "#/$defs/failureOrigin" },
263
+ "rationale": { "type": "string", "maxLength": 2048 }
264
+ }
265
+ },
266
+ "actionableFailureCategory": {
267
+ "type": "string",
268
+ "enum": [
269
+ "decision_error",
270
+ "bad_input",
271
+ "retrieval_failure",
272
+ "control_flow_problem",
273
+ "state_inconsistency",
274
+ "downstream_execution_failure",
275
+ "ambiguous",
276
+ "unclassified"
277
+ ]
278
+ },
279
+ "actionableFailureSeverity": {
280
+ "type": "string",
281
+ "enum": ["high", "medium", "low"]
282
+ },
283
+ "recommendedAction": {
284
+ "type": "string",
285
+ "enum": [
286
+ "none",
287
+ "manual_review",
288
+ "deduplicate",
289
+ "reconcile_downstream_state",
290
+ "correct_verification_inputs",
291
+ "improve_read_connectivity",
292
+ "resolve_multi_effect_failures",
293
+ "align_tool_observations",
294
+ "fix_event_ingest_and_steps",
295
+ "fix_event_sequence_order",
296
+ "fix_run_context_controls",
297
+ "fix_cli_usage",
298
+ "fix_registry_events_or_compare_files",
299
+ "fix_verification_database_connection",
300
+ "fix_saved_workflow_json",
301
+ "fix_compare_workflow_inputs",
302
+ "fix_execution_trace_structure",
303
+ "fix_verification_policy_and_hook",
304
+ "fix_plan_document_and_patterns",
305
+ "fix_plan_transition_cli_and_refs",
306
+ "upgrade_git_or_retry_git"
307
+ ]
308
+ },
309
+ "actionableFailure": {
310
+ "type": "object",
311
+ "additionalProperties": false,
312
+ "required": ["category", "severity", "recommendedAction", "automationSafe"],
313
+ "properties": {
314
+ "category": { "$ref": "#/$defs/actionableFailureCategory" },
315
+ "severity": { "$ref": "#/$defs/actionableFailureSeverity" },
316
+ "recommendedAction": { "$ref": "#/$defs/recommendedAction" },
317
+ "automationSafe": { "type": "boolean" }
318
+ }
319
+ },
320
+ "failureAnalysis": {
321
+ "type": "object",
322
+ "additionalProperties": false,
323
+ "required": [
324
+ "summary",
325
+ "primaryOrigin",
326
+ "confidence",
327
+ "unknownReasonCodes",
328
+ "evidence",
329
+ "actionableFailure"
330
+ ],
331
+ "properties": {
332
+ "summary": { "type": "string", "maxLength": 2048 },
333
+ "primaryOrigin": { "$ref": "#/$defs/failureOrigin" },
334
+ "confidence": { "$ref": "#/$defs/failureConfidence" },
335
+ "unknownReasonCodes": {
336
+ "type": "array",
337
+ "items": { "type": "string" }
338
+ },
339
+ "evidence": {
340
+ "type": "array",
341
+ "minItems": 1,
342
+ "items": { "$ref": "#/$defs/failureAnalysisEvidence" }
343
+ },
344
+ "alternativeHypotheses": {
345
+ "type": "array",
346
+ "items": { "$ref": "#/$defs/failureAnalysisAlternative" }
347
+ },
348
+ "actionableFailure": { "$ref": "#/$defs/actionableFailure" }
349
+ }
350
+ },
351
+ "truthIssue": {
352
+ "type": "object",
353
+ "additionalProperties": false,
354
+ "required": ["code", "message", "category"],
355
+ "properties": {
356
+ "code": { "type": "string" },
357
+ "message": { "type": "string" },
358
+ "category": {
359
+ "type": "string",
360
+ "enum": [
361
+ "workflow_execution",
362
+ "verification_setup",
363
+ "observation_uncertainty"
364
+ ]
365
+ }
366
+ }
367
+ },
368
+ "reason": {
369
+ "type": "object",
370
+ "additionalProperties": false,
371
+ "required": ["code", "message"],
372
+ "properties": {
373
+ "code": { "type": "string" },
374
+ "message": { "type": "string" },
375
+ "field": { "type": "string" }
376
+ }
377
+ },
378
+ "truthEffect": {
379
+ "type": "object",
380
+ "additionalProperties": false,
381
+ "required": ["id", "outcomeLabel", "reasons"],
382
+ "properties": {
383
+ "id": { "type": "string" },
384
+ "outcomeLabel": {
385
+ "type": "string",
386
+ "enum": [
387
+ "VERIFIED",
388
+ "FAILED_ROW_MISSING",
389
+ "FAILED_VALUE_MISMATCH",
390
+ "INCOMPLETE_CANNOT_VERIFY"
391
+ ]
392
+ },
393
+ "reasons": {
394
+ "type": "array",
395
+ "items": { "$ref": "#/$defs/reason" }
396
+ }
397
+ }
398
+ },
399
+ "truthStep": {
400
+ "allOf": [
401
+ {
402
+ "type": "object",
403
+ "additionalProperties": false,
404
+ "required": [
405
+ "seq",
406
+ "toolId",
407
+ "outcomeLabel",
408
+ "observations",
409
+ "reasons",
410
+ "intendedEffect",
411
+ "observedExecution",
412
+ "verifyTarget",
413
+ "observedStateSummary"
414
+ ],
415
+ "properties": {
416
+ "seq": { "type": "integer", "minimum": 0 },
417
+ "toolId": { "type": "string" },
418
+ "outcomeLabel": {
419
+ "type": "string",
420
+ "enum": [
421
+ "VERIFIED",
422
+ "FAILED_ROW_MISSING",
423
+ "FAILED_VALUE_MISMATCH",
424
+ "INCOMPLETE_CANNOT_VERIFY",
425
+ "PARTIALLY_VERIFIED",
426
+ "UNCERTAIN_NOT_OBSERVED_WITHIN_WINDOW"
427
+ ]
428
+ },
429
+ "observations": {
430
+ "type": "object",
431
+ "additionalProperties": false,
432
+ "required": ["evaluatedOrdinal", "repeatCount"],
433
+ "properties": {
434
+ "evaluatedOrdinal": { "type": "integer", "minimum": 1 },
435
+ "repeatCount": { "type": "integer", "minimum": 1 }
436
+ }
437
+ },
438
+ "reasons": {
439
+ "type": "array",
440
+ "items": { "$ref": "#/$defs/reason" }
441
+ },
442
+ "intendedEffect": {
443
+ "type": "object",
444
+ "additionalProperties": false,
445
+ "required": ["narrative"],
446
+ "properties": {
447
+ "narrative": { "type": "string" }
448
+ }
449
+ },
450
+ "observedExecution": {
451
+ "type": "object",
452
+ "additionalProperties": false,
453
+ "required": ["paramsCanonical"],
454
+ "properties": {
455
+ "paramsCanonical": { "type": "string" }
456
+ }
457
+ },
458
+ "failureCategory": {
459
+ "type": "string",
460
+ "enum": [
461
+ "workflow_execution",
462
+ "verification_setup",
463
+ "observation_uncertainty"
464
+ ]
465
+ },
466
+ "verifyTarget": {
467
+ "type": ["string", "null"]
468
+ },
469
+ "observedStateSummary": { "type": "string" },
470
+ "effects": {
471
+ "type": "array",
472
+ "minItems": 1,
473
+ "items": { "$ref": "#/$defs/truthEffect" }
474
+ }
475
+ }
476
+ },
477
+ {
478
+ "if": {
479
+ "type": "object",
480
+ "required": ["outcomeLabel"],
481
+ "properties": { "outcomeLabel": { "const": "VERIFIED" } }
482
+ },
483
+ "then": {
484
+ "type": "object",
485
+ "properties": { "failureCategory": false }
486
+ },
487
+ "else": {
488
+ "type": "object",
489
+ "required": ["failureCategory"]
490
+ }
491
+ }
492
+ ]
493
+ },
494
+ "correctnessEnforcementKind": {
495
+ "type": "string",
496
+ "enum": [
497
+ "run_ingest_integrity",
498
+ "event_capture_integrity",
499
+ "run_context_fairness",
500
+ "step_sql_expectation",
501
+ "plan_transition_expectation",
502
+ "quick_inferred_sql_row",
503
+ "quick_inferred_relational",
504
+ "quick_mapping_gap"
505
+ ]
506
+ },
507
+ "correctnessRequiredUpstreamContract": {
508
+ "type": "string",
509
+ "enum": [
510
+ "retrieval_ok_before_observation",
511
+ "model_turn_completed_before_observation",
512
+ "no_interrupt_before_observation",
513
+ "branch_not_skipped_before_observation",
514
+ "gate_not_skipped_before_observation",
515
+ "tool_not_skipped_before_observation"
516
+ ]
517
+ },
518
+ "correctnessIngestContractRequirement": {
519
+ "type": "string",
520
+ "enum": ["no_run_level_failures", "non_empty_tool_observed_steps"]
521
+ },
522
+ "correctnessRemediationAlignment": {
523
+ "type": "object",
524
+ "additionalProperties": false,
525
+ "required": ["recommendedAction", "automationSafe"],
526
+ "properties": {
527
+ "recommendedAction": { "$ref": "#/$defs/recommendedAction" },
528
+ "automationSafe": { "type": "boolean" }
529
+ }
530
+ },
531
+ "correctnessEnforceableProjection": {
532
+ "oneOf": [
533
+ {
534
+ "type": "object",
535
+ "additionalProperties": false,
536
+ "required": [
537
+ "projectionKind",
538
+ "workflowId",
539
+ "verificationPolicyFragment",
540
+ "primaryFailureCodes",
541
+ "ingestContractRequirement"
542
+ ],
543
+ "properties": {
544
+ "projectionKind": { "const": "run_ingest_integrity" },
545
+ "workflowId": { "type": "string" },
546
+ "verificationPolicyFragment": { "type": "string" },
547
+ "primaryFailureCodes": {
548
+ "type": "array",
549
+ "items": { "type": "string" }
550
+ },
551
+ "ingestContractRequirement": { "$ref": "#/$defs/correctnessIngestContractRequirement" }
552
+ }
553
+ },
554
+ {
555
+ "type": "object",
556
+ "additionalProperties": false,
557
+ "required": [
558
+ "projectionKind",
559
+ "workflowId",
560
+ "verificationPolicyFragment",
561
+ "forbiddenEventSequenceCodes"
562
+ ],
563
+ "properties": {
564
+ "projectionKind": { "const": "event_capture_integrity" },
565
+ "workflowId": { "type": "string" },
566
+ "verificationPolicyFragment": { "type": "string" },
567
+ "forbiddenEventSequenceCodes": {
568
+ "type": "array",
569
+ "items": { "type": "string" }
570
+ }
571
+ }
572
+ },
573
+ {
574
+ "type": "object",
575
+ "additionalProperties": false,
576
+ "required": [
577
+ "projectionKind",
578
+ "workflowId",
579
+ "verificationPolicyFragment",
580
+ "ingestIndex",
581
+ "requiredUpstreamContract",
582
+ "primaryRunContextCodes"
583
+ ],
584
+ "properties": {
585
+ "projectionKind": { "const": "run_context_fairness" },
586
+ "workflowId": { "type": "string" },
587
+ "verificationPolicyFragment": { "type": "string" },
588
+ "ingestIndex": { "type": "integer", "minimum": 0 },
589
+ "requiredUpstreamContract": { "$ref": "#/$defs/correctnessRequiredUpstreamContract" },
590
+ "primaryRunContextCodes": {
591
+ "type": "array",
592
+ "items": { "type": "string" }
593
+ }
594
+ }
595
+ },
596
+ {
597
+ "type": "object",
598
+ "additionalProperties": false,
599
+ "required": [
600
+ "projectionKind",
601
+ "workflowId",
602
+ "verificationPolicyFragment",
603
+ "seq",
604
+ "toolId",
605
+ "verificationRequest"
606
+ ],
607
+ "properties": {
608
+ "projectionKind": { "const": "step_sql_expectation" },
609
+ "workflowId": { "type": "string" },
610
+ "verificationPolicyFragment": { "type": "string" },
611
+ "seq": { "type": "integer", "minimum": 0 },
612
+ "toolId": { "type": "string" },
613
+ "verificationRequest": {
614
+ "oneOf": [
615
+ { "type": "null" },
616
+ {
617
+ "$ref": "https://agentskeptic.com/schemas/workflow-engine-result.schema.json#/$defs/verificationRequestSqlRow"
618
+ },
619
+ {
620
+ "$ref": "https://agentskeptic.com/schemas/workflow-engine-result.schema.json#/$defs/verificationRequestSqlRowAbsent"
621
+ },
622
+ {
623
+ "$ref": "https://agentskeptic.com/schemas/workflow-engine-result.schema.json#/$defs/verificationRequestSqlEffects"
624
+ },
625
+ {
626
+ "$ref": "https://agentskeptic.com/schemas/workflow-engine-result.schema.json#/$defs/verificationRequestSqlRelational"
627
+ }
628
+ ]
629
+ }
630
+ }
631
+ },
632
+ {
633
+ "type": "object",
634
+ "additionalProperties": false,
635
+ "required": [
636
+ "projectionKind",
637
+ "workflowId",
638
+ "verificationPolicyFragment",
639
+ "seq",
640
+ "toolId",
641
+ "verifyTarget",
642
+ "primaryCodes"
643
+ ],
644
+ "properties": {
645
+ "projectionKind": { "const": "plan_transition_expectation" },
646
+ "workflowId": { "type": "string" },
647
+ "verificationPolicyFragment": { "type": "string" },
648
+ "seq": { "type": "integer", "minimum": 0 },
649
+ "toolId": { "type": "string" },
650
+ "verifyTarget": { "type": ["string", "null"] },
651
+ "primaryCodes": {
652
+ "type": "array",
653
+ "items": { "type": "string" }
654
+ }
655
+ }
656
+ },
657
+ {
658
+ "type": "object",
659
+ "additionalProperties": false,
660
+ "required": [
661
+ "projectionKind",
662
+ "quickProvisional",
663
+ "unitId",
664
+ "toolName",
665
+ "actionIndex",
666
+ "table",
667
+ "sqlRowRequest"
668
+ ],
669
+ "properties": {
670
+ "projectionKind": { "const": "quick_inferred_sql_row" },
671
+ "quickProvisional": { "const": true },
672
+ "unitId": { "type": "string", "minLength": 1 },
673
+ "toolName": { "type": "string" },
674
+ "actionIndex": { "type": "integer", "minimum": 0 },
675
+ "table": { "type": "string" },
676
+ "sqlRowRequest": {
677
+ "$ref": "https://agentskeptic.com/schemas/workflow-engine-result.schema.json#/$defs/verificationRequestSqlRow"
678
+ }
679
+ }
680
+ },
681
+ {
682
+ "type": "object",
683
+ "additionalProperties": false,
684
+ "required": [
685
+ "projectionKind",
686
+ "quickProvisional",
687
+ "unitId",
688
+ "toolName",
689
+ "actionIndex",
690
+ "childTable",
691
+ "checkId",
692
+ "matchEq"
693
+ ],
694
+ "properties": {
695
+ "projectionKind": { "const": "quick_inferred_relational" },
696
+ "quickProvisional": { "const": true },
697
+ "unitId": { "type": "string", "minLength": 1 },
698
+ "toolName": { "type": "string" },
699
+ "actionIndex": { "type": "integer", "minimum": 0 },
700
+ "childTable": { "type": "string" },
701
+ "checkId": { "type": "string" },
702
+ "matchEq": {
703
+ "type": "array",
704
+ "minItems": 1,
705
+ "items": {
706
+ "$ref": "https://agentskeptic.com/schemas/workflow-engine-result.schema.json#/$defs/identityEqPair"
707
+ }
708
+ }
709
+ }
710
+ },
711
+ {
712
+ "type": "object",
713
+ "additionalProperties": false,
714
+ "required": [
715
+ "projectionKind",
716
+ "quickProvisional",
717
+ "toolName",
718
+ "actionIndex",
719
+ "reasonCodes",
720
+ "table"
721
+ ],
722
+ "properties": {
723
+ "projectionKind": { "const": "quick_mapping_gap" },
724
+ "quickProvisional": { "const": true },
725
+ "toolName": { "type": "string" },
726
+ "actionIndex": { "type": "integer", "minimum": 0 },
727
+ "reasonCodes": {
728
+ "type": "array",
729
+ "items": { "type": "string" }
730
+ },
731
+ "table": { "type": ["string", "null"] }
732
+ }
733
+ }
734
+ ]
735
+ },
736
+ "correctnessDefinitionV1": {
737
+ "type": "object",
738
+ "additionalProperties": false,
739
+ "required": [
740
+ "schemaVersion",
741
+ "enforcementKind",
742
+ "mustAlwaysHold",
743
+ "enforceAs",
744
+ "enforceableProjection",
745
+ "remediationAlignment"
746
+ ],
747
+ "properties": {
748
+ "schemaVersion": { "const": 1 },
749
+ "enforcementKind": { "$ref": "#/$defs/correctnessEnforcementKind" },
750
+ "mustAlwaysHold": { "type": "string", "maxLength": 2048 },
751
+ "enforceAs": {
752
+ "type": "array",
753
+ "minItems": 2,
754
+ "items": { "type": "string", "maxLength": 2048 }
755
+ },
756
+ "enforceableProjection": { "$ref": "#/$defs/correctnessEnforceableProjection" },
757
+ "remediationAlignment": { "$ref": "#/$defs/correctnessRemediationAlignment" }
758
+ }
759
+ }
760
+ }
761
+ }