rail_verdict 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/LICENSE +21 -0
- data/NOTICE +14 -0
- data/README.md +192 -0
- data/exe/railverdict +6 -0
- data/exe/railverdict-minitest-reporter.rb +90 -0
- data/lib/rail_verdict/analyzers/_shared.rb +54 -0
- data/lib/rail_verdict/analyzers/bundler_audit.rb +186 -0
- data/lib/rail_verdict/analyzers/minitest.rb +312 -0
- data/lib/rail_verdict/analyzers/rspec.rb +274 -0
- data/lib/rail_verdict/analyzers/rubocop.rb +289 -0
- data/lib/rail_verdict/analyzers/simplecov.rb +178 -0
- data/lib/rail_verdict/baseline.rb +151 -0
- data/lib/rail_verdict/check.rb +415 -0
- data/lib/rail_verdict/cli.rb +471 -0
- data/lib/rail_verdict/comparison.rb +216 -0
- data/lib/rail_verdict/configuration.rb +165 -0
- data/lib/rail_verdict/contracts/analyzer_result.rb +138 -0
- data/lib/rail_verdict/contracts/finding.rb +154 -0
- data/lib/rail_verdict/contracts/gate_result.rb +171 -0
- data/lib/rail_verdict/coverage/changed_line_evaluator.rb +70 -0
- data/lib/rail_verdict/doctor.rb +132 -0
- data/lib/rail_verdict/errors.rb +17 -0
- data/lib/rail_verdict/findings_command.rb +24 -0
- data/lib/rail_verdict/fingerprint.rb +72 -0
- data/lib/rail_verdict/git/command.rb +48 -0
- data/lib/rail_verdict/git/context.rb +361 -0
- data/lib/rail_verdict/git/diff_parser.rb +200 -0
- data/lib/rail_verdict/git/errors.rb +16 -0
- data/lib/rail_verdict/init.rb +38 -0
- data/lib/rail_verdict/intelligence/ai_analysis.rb +82 -0
- data/lib/rail_verdict/intelligence/ai_failure.rb +44 -0
- data/lib/rail_verdict/intelligence/budget.rb +36 -0
- data/lib/rail_verdict/intelligence/cache.rb +74 -0
- data/lib/rail_verdict/intelligence/context_builder.rb +92 -0
- data/lib/rail_verdict/intelligence/manifest.rb +70 -0
- data/lib/rail_verdict/intelligence/orchestrator.rb +77 -0
- data/lib/rail_verdict/intelligence/prompt.rb +28 -0
- data/lib/rail_verdict/intelligence/provider.rb +14 -0
- data/lib/rail_verdict/intelligence/providers/fake_provider.rb +31 -0
- data/lib/rail_verdict/intelligence/providers/openai_compat.rb +119 -0
- data/lib/rail_verdict/intelligence/redactor.rb +51 -0
- data/lib/rail_verdict/intelligence/secret_detector.rb +45 -0
- data/lib/rail_verdict/intelligence/source_reader.rb +49 -0
- data/lib/rail_verdict/intelligence.rb +11 -0
- data/lib/rail_verdict/mcp/cache.rb +233 -0
- data/lib/rail_verdict/mcp/repository_root.rb +31 -0
- data/lib/rail_verdict/mcp/serializers.rb +98 -0
- data/lib/rail_verdict/mcp/server.rb +110 -0
- data/lib/rail_verdict/mcp/tools/build_repair_packet.rb +85 -0
- data/lib/rail_verdict/mcp/tools/explain.rb +100 -0
- data/lib/rail_verdict/mcp/tools/get_finding.rb +139 -0
- data/lib/rail_verdict/mcp/tools/investigate.rb +107 -0
- data/lib/rail_verdict/mcp/tools/list_findings.rb +119 -0
- data/lib/rail_verdict/mcp/tools/verify.rb +137 -0
- data/lib/rail_verdict/mcp/tools/verify_repair.rb +105 -0
- data/lib/rail_verdict/mcp/validators.rb +81 -0
- data/lib/rail_verdict/mcp.rb +7 -0
- data/lib/rail_verdict/process_runner.rb +292 -0
- data/lib/rail_verdict/rails_context/classifier.rb +57 -0
- data/lib/rail_verdict/rails_context/confidence.rb +13 -0
- data/lib/rail_verdict/rails_context/constant_inferencer.rb +56 -0
- data/lib/rail_verdict/rails_context/context.rb +115 -0
- data/lib/rail_verdict/rails_context/detector.rb +141 -0
- data/lib/rail_verdict/rails_context/limits.rb +17 -0
- data/lib/rail_verdict/rails_context/resolvers/association_extractor.rb +48 -0
- data/lib/rail_verdict/rails_context/resolvers/policy_resolver.rb +45 -0
- data/lib/rail_verdict/rails_context/resolvers/route_resolver.rb +40 -0
- data/lib/rail_verdict/rails_context/resolvers/route_scanner.rb +55 -0
- data/lib/rail_verdict/rails_context/resolvers/schema_resolver.rb +90 -0
- data/lib/rail_verdict/rails_context/resolvers/test_candidates.rb +75 -0
- data/lib/rail_verdict/rails_context/resolvers/view_resolver.rb +45 -0
- data/lib/rail_verdict/rails_context/schema_parser.rb +50 -0
- data/lib/rail_verdict/rails_context.rb +21 -0
- data/lib/rail_verdict/repair/boundary.rb +36 -0
- data/lib/rail_verdict/repair/command.rb +89 -0
- data/lib/rail_verdict/repair/constraints.rb +31 -0
- data/lib/rail_verdict/repair/context_assembler.rb +301 -0
- data/lib/rail_verdict/repair/diff_context.rb +51 -0
- data/lib/rail_verdict/repair/packet.rb +158 -0
- data/lib/rail_verdict/repair/prompt_renderer.rb +27 -0
- data/lib/rail_verdict/repair/verification_plan.rb +45 -0
- data/lib/rail_verdict/repair/verifier.rb +84 -0
- data/lib/rail_verdict/reporters/console.rb +107 -0
- data/lib/rail_verdict/reporters/github_annotations.rb +104 -0
- data/lib/rail_verdict/reporters/json_reporter.rb +19 -0
- data/lib/rail_verdict/reporters/sarif.rb +138 -0
- data/lib/rail_verdict/run_context.rb +99 -0
- data/lib/rail_verdict/schema_validator.rb +85 -0
- data/lib/rail_verdict/strict_yaml.rb +134 -0
- data/lib/rail_verdict/verification/policy.rb +359 -0
- data/lib/rail_verdict/version.rb +5 -0
- data/lib/rail_verdict/waiver.rb +67 -0
- data/lib/rail_verdict/waiver_store.rb +59 -0
- data/lib/rail_verdict.rb +64 -0
- data/schemas/ai-analysis-v1.schema.json +54 -0
- data/schemas/baseline-v1.schema.json +108 -0
- data/schemas/configuration-v1.1.schema.json +150 -0
- data/schemas/configuration-v1.2.schema.json +182 -0
- data/schemas/configuration-v1.3.schema.json +198 -0
- data/schemas/configuration-v1.4.schema.json +146 -0
- data/schemas/configuration-v1.schema.json +72 -0
- data/schemas/coverage-v1.schema.json +51 -0
- data/schemas/finding-v1.schema.json +131 -0
- data/schemas/minitest-reporter-v1.schema.json +113 -0
- data/schemas/repair-packet-v1.schema.json +364 -0
- data/schemas/result-v1.schema.json +378 -0
- data/schemas/waiver-v1.schema.json +45 -0
- data/schemas/waivers-v1.schema.json +67 -0
- metadata +192 -0
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://railverdict.dev/schemas/configuration/v1.4.schema.json",
|
|
4
|
+
"title": "RailVerdict Parsed Configuration v1.4",
|
|
5
|
+
"description": "Versioned contract for .railverdict.yml with baseline, waivers, git base, and optional AI.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"required": ["version", "mode", "analyzers"],
|
|
8
|
+
"properties": {
|
|
9
|
+
"version": { "const": 1.4 },
|
|
10
|
+
"mode": { "enum": ["advisory", "no_new_debt", "strict"] },
|
|
11
|
+
"analyzers": { "$ref": "#/$defs/analyzers" },
|
|
12
|
+
"baseline": { "$ref": "#/$defs/baselineConfig" },
|
|
13
|
+
"waivers": { "$ref": "#/$defs/waiversConfig" },
|
|
14
|
+
"git": { "$ref": "#/$defs/gitConfig" },
|
|
15
|
+
"ai": { "$ref": "#/$defs/aiConfig" }
|
|
16
|
+
},
|
|
17
|
+
"additionalProperties": false,
|
|
18
|
+
"unevaluatedProperties": false,
|
|
19
|
+
"$defs": {
|
|
20
|
+
"analyzers": {
|
|
21
|
+
"type": "object",
|
|
22
|
+
"required": ["rubocop"],
|
|
23
|
+
"properties": {
|
|
24
|
+
"rubocop": { "$ref": "#/$defs/analyzerSelection" },
|
|
25
|
+
"minitest": { "$ref": "#/$defs/analyzerSelection" },
|
|
26
|
+
"rspec": { "$ref": "#/$defs/analyzerSelection" },
|
|
27
|
+
"simplecov": { "$ref": "#/$defs/simplecovSelection" },
|
|
28
|
+
"bundler_audit": { "$ref": "#/$defs/bundlerAuditSelection" }
|
|
29
|
+
},
|
|
30
|
+
"additionalProperties": false,
|
|
31
|
+
"unevaluatedProperties": false
|
|
32
|
+
},
|
|
33
|
+
"analyzerSelection": {
|
|
34
|
+
"type": "object",
|
|
35
|
+
"required": ["enabled", "required"],
|
|
36
|
+
"properties": {
|
|
37
|
+
"enabled": { "type": "boolean" },
|
|
38
|
+
"required": { "type": "boolean" }
|
|
39
|
+
},
|
|
40
|
+
"additionalProperties": false,
|
|
41
|
+
"unevaluatedProperties": false,
|
|
42
|
+
"not": {
|
|
43
|
+
"required": ["enabled", "required"],
|
|
44
|
+
"properties": { "enabled": { "const": false }, "required": { "const": true } }
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
"simplecovSelection": {
|
|
48
|
+
"type": "object",
|
|
49
|
+
"required": ["enabled", "required"],
|
|
50
|
+
"properties": {
|
|
51
|
+
"enabled": { "type": "boolean" },
|
|
52
|
+
"required": { "type": "boolean" },
|
|
53
|
+
"coverage_path": { "type": "string", "minLength": 1, "maxLength": 1024 },
|
|
54
|
+
"freshness_window_seconds": { "type": "integer", "minimum": 1, "maximum": 2592000 }
|
|
55
|
+
},
|
|
56
|
+
"additionalProperties": false,
|
|
57
|
+
"unevaluatedProperties": false,
|
|
58
|
+
"not": {
|
|
59
|
+
"required": ["enabled", "required"],
|
|
60
|
+
"properties": { "enabled": { "const": false }, "required": { "const": true } }
|
|
61
|
+
}
|
|
62
|
+
},
|
|
63
|
+
"bundlerAuditSelection": {
|
|
64
|
+
"type": "object",
|
|
65
|
+
"required": ["enabled", "required"],
|
|
66
|
+
"properties": {
|
|
67
|
+
"enabled": { "type": "boolean" },
|
|
68
|
+
"required": { "type": "boolean" }
|
|
69
|
+
},
|
|
70
|
+
"additionalProperties": false,
|
|
71
|
+
"unevaluatedProperties": false,
|
|
72
|
+
"not": {
|
|
73
|
+
"required": ["enabled", "required"],
|
|
74
|
+
"properties": { "enabled": { "const": false }, "required": { "const": true } }
|
|
75
|
+
}
|
|
76
|
+
},
|
|
77
|
+
"baselineConfig": {
|
|
78
|
+
"type": "object",
|
|
79
|
+
"required": [],
|
|
80
|
+
"properties": { "path": { "type": "string", "minLength": 1, "maxLength": 1024 } },
|
|
81
|
+
"additionalProperties": false,
|
|
82
|
+
"unevaluatedProperties": false
|
|
83
|
+
},
|
|
84
|
+
"waiversConfig": {
|
|
85
|
+
"type": "object",
|
|
86
|
+
"required": [],
|
|
87
|
+
"properties": { "path": { "type": "string", "minLength": 1, "maxLength": 1024 } },
|
|
88
|
+
"additionalProperties": false,
|
|
89
|
+
"unevaluatedProperties": false
|
|
90
|
+
},
|
|
91
|
+
"gitConfig": {
|
|
92
|
+
"type": "object",
|
|
93
|
+
"required": [],
|
|
94
|
+
"properties": { "base": { "type": "string", "minLength": 1, "maxLength": 1024 } },
|
|
95
|
+
"additionalProperties": false,
|
|
96
|
+
"unevaluatedProperties": false
|
|
97
|
+
},
|
|
98
|
+
"aiConfig": {
|
|
99
|
+
"type": "object",
|
|
100
|
+
"required": [],
|
|
101
|
+
"properties": {
|
|
102
|
+
"enabled": { "type": "boolean" },
|
|
103
|
+
"mode": { "enum": ["off", "explain", "investigate"] },
|
|
104
|
+
"provider": { "type": "string", "minLength": 1, "maxLength": 64 },
|
|
105
|
+
"model": { "type": "string", "minLength": 1, "maxLength": 128 },
|
|
106
|
+
"remote": { "$ref": "#/$defs/aiRemoteConfig" },
|
|
107
|
+
"budgets": { "$ref": "#/$defs/aiBudgetsConfig" },
|
|
108
|
+
"cache": { "$ref": "#/$defs/aiCacheConfig" }
|
|
109
|
+
},
|
|
110
|
+
"additionalProperties": false,
|
|
111
|
+
"unevaluatedProperties": false
|
|
112
|
+
},
|
|
113
|
+
"aiRemoteConfig": {
|
|
114
|
+
"type": "object",
|
|
115
|
+
"required": [],
|
|
116
|
+
"properties": {
|
|
117
|
+
"enabled": { "type": "boolean" },
|
|
118
|
+
"trust": { "enum": ["redacted", "full"] },
|
|
119
|
+
"endpoint": { "type": "string", "minLength": 1, "maxLength": 1024 }
|
|
120
|
+
},
|
|
121
|
+
"additionalProperties": false,
|
|
122
|
+
"unevaluatedProperties": false
|
|
123
|
+
},
|
|
124
|
+
"aiBudgetsConfig": {
|
|
125
|
+
"type": "object",
|
|
126
|
+
"required": [],
|
|
127
|
+
"properties": {
|
|
128
|
+
"max_findings": { "type": "integer", "minimum": 1, "maximum": 10 },
|
|
129
|
+
"max_requests": { "type": "integer", "minimum": 1, "maximum": 10 },
|
|
130
|
+
"max_context_bytes": { "type": "integer", "minimum": 1024, "maximum": 262144 }
|
|
131
|
+
},
|
|
132
|
+
"additionalProperties": false,
|
|
133
|
+
"unevaluatedProperties": false
|
|
134
|
+
},
|
|
135
|
+
"aiCacheConfig": {
|
|
136
|
+
"type": "object",
|
|
137
|
+
"required": [],
|
|
138
|
+
"properties": {
|
|
139
|
+
"enabled": { "type": "boolean" },
|
|
140
|
+
"max_bytes": { "type": "integer", "minimum": 1024, "maximum": 104857600 }
|
|
141
|
+
},
|
|
142
|
+
"additionalProperties": false,
|
|
143
|
+
"unevaluatedProperties": false
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://railverdict.dev/schemas/configuration/v1.schema.json",
|
|
4
|
+
"title": "RailVerdict Parsed Configuration v1 (Draft / Unimplemented)",
|
|
5
|
+
"description": "Draft, independently versioned contract for the safely parsed data value of .railverdict.yml. This contract is not implemented.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"required": [
|
|
8
|
+
"version",
|
|
9
|
+
"mode",
|
|
10
|
+
"analyzers"
|
|
11
|
+
],
|
|
12
|
+
"properties": {
|
|
13
|
+
"version": {
|
|
14
|
+
"const": 1
|
|
15
|
+
},
|
|
16
|
+
"mode": {
|
|
17
|
+
"enum": [
|
|
18
|
+
"advisory",
|
|
19
|
+
"no_new_debt",
|
|
20
|
+
"strict"
|
|
21
|
+
]
|
|
22
|
+
},
|
|
23
|
+
"analyzers": {
|
|
24
|
+
"$ref": "#/$defs/analyzers"
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
"additionalProperties": false,
|
|
28
|
+
"unevaluatedProperties": false,
|
|
29
|
+
"$defs": {
|
|
30
|
+
"analyzers": {
|
|
31
|
+
"type": "object",
|
|
32
|
+
"required": [
|
|
33
|
+
"rubocop"
|
|
34
|
+
],
|
|
35
|
+
"properties": {
|
|
36
|
+
"rubocop": {
|
|
37
|
+
"$ref": "#/$defs/analyzerSelection"
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
"additionalProperties": false,
|
|
41
|
+
"unevaluatedProperties": false
|
|
42
|
+
},
|
|
43
|
+
"analyzerSelection": {
|
|
44
|
+
"type": "object",
|
|
45
|
+
"required": [
|
|
46
|
+
"enabled",
|
|
47
|
+
"required"
|
|
48
|
+
],
|
|
49
|
+
"properties": {
|
|
50
|
+
"enabled": {
|
|
51
|
+
"type": "boolean"
|
|
52
|
+
},
|
|
53
|
+
"required": {
|
|
54
|
+
"type": "boolean"
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
"additionalProperties": false,
|
|
58
|
+
"unevaluatedProperties": false,
|
|
59
|
+
"not": {
|
|
60
|
+
"required": ["enabled", "required"],
|
|
61
|
+
"properties": {
|
|
62
|
+
"enabled": {
|
|
63
|
+
"const": false
|
|
64
|
+
},
|
|
65
|
+
"required": {
|
|
66
|
+
"const": true
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://railverdict.dev/schemas/coverage/v1.schema.json",
|
|
4
|
+
"title": "SimpleCov public coverage JSON v1 (RailVerdict ingestion)",
|
|
5
|
+
"description": "Strict internal contract for SimpleCov public coverage.json consumed by RailVerdict. Not a SimpleCov upstream schema replica.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"required": ["version", "timestamp", "files"],
|
|
8
|
+
"properties": {
|
|
9
|
+
"version": {
|
|
10
|
+
"type": "string",
|
|
11
|
+
"pattern": "^1($|\\.)"
|
|
12
|
+
},
|
|
13
|
+
"timestamp": {
|
|
14
|
+
"type": "integer",
|
|
15
|
+
"minimum": 0
|
|
16
|
+
},
|
|
17
|
+
"command_name": {
|
|
18
|
+
"type": "string",
|
|
19
|
+
"maxLength": 512
|
|
20
|
+
},
|
|
21
|
+
"files": {
|
|
22
|
+
"type": "array",
|
|
23
|
+
"items": { "$ref": "#/$defs/file" }
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
"additionalProperties": false,
|
|
27
|
+
"unevaluatedProperties": false,
|
|
28
|
+
"$defs": {
|
|
29
|
+
"file": {
|
|
30
|
+
"type": "object",
|
|
31
|
+
"required": ["filename", "coverage"],
|
|
32
|
+
"properties": {
|
|
33
|
+
"filename": { "type": "string", "minLength": 1, "maxLength": 1024 },
|
|
34
|
+
"coverage": {
|
|
35
|
+
"type": "object",
|
|
36
|
+
"required": ["lines"],
|
|
37
|
+
"properties": {
|
|
38
|
+
"lines": {
|
|
39
|
+
"type": "array",
|
|
40
|
+
"items": { "type": ["integer", "null"], "minimum": 0 }
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
"additionalProperties": false,
|
|
44
|
+
"unevaluatedProperties": false
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
"additionalProperties": false,
|
|
48
|
+
"unevaluatedProperties": false
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
}
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://railverdict.dev/schemas/finding/v1.schema.json",
|
|
4
|
+
"title": "RailVerdict Finding v1 (Draft / Unimplemented)",
|
|
5
|
+
"description": "Draft, independently versioned contract for analyzer-independent finding evidence. This contract is not implemented and grants no gate authority.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"required": [
|
|
8
|
+
"schema_version",
|
|
9
|
+
"id",
|
|
10
|
+
"fingerprint",
|
|
11
|
+
"origin",
|
|
12
|
+
"analyzer",
|
|
13
|
+
"rule_id",
|
|
14
|
+
"category",
|
|
15
|
+
"severity",
|
|
16
|
+
"confidence",
|
|
17
|
+
"state",
|
|
18
|
+
"evidence_ref",
|
|
19
|
+
"location",
|
|
20
|
+
"message"
|
|
21
|
+
],
|
|
22
|
+
"properties": {
|
|
23
|
+
"schema_version": {
|
|
24
|
+
"const": "1.0"
|
|
25
|
+
},
|
|
26
|
+
"id": {
|
|
27
|
+
"type": "string",
|
|
28
|
+
"minLength": 1,
|
|
29
|
+
"maxLength": 256
|
|
30
|
+
},
|
|
31
|
+
"fingerprint": {
|
|
32
|
+
"type": "string",
|
|
33
|
+
"pattern": "^sha256:[0-9a-f]{64}$",
|
|
34
|
+
"description": "Opaque deterministic evidence identity; exact canonicalization is owned by the baseline phase."
|
|
35
|
+
},
|
|
36
|
+
"origin": {
|
|
37
|
+
"enum": [
|
|
38
|
+
"deterministic",
|
|
39
|
+
"runtime",
|
|
40
|
+
"ai",
|
|
41
|
+
"custom"
|
|
42
|
+
]
|
|
43
|
+
},
|
|
44
|
+
"analyzer": {
|
|
45
|
+
"type": "string",
|
|
46
|
+
"minLength": 1,
|
|
47
|
+
"maxLength": 256
|
|
48
|
+
},
|
|
49
|
+
"rule_id": {
|
|
50
|
+
"type": "string",
|
|
51
|
+
"minLength": 1,
|
|
52
|
+
"maxLength": 256
|
|
53
|
+
},
|
|
54
|
+
"category": {
|
|
55
|
+
"type": "string",
|
|
56
|
+
"minLength": 1,
|
|
57
|
+
"maxLength": 256
|
|
58
|
+
},
|
|
59
|
+
"severity": {
|
|
60
|
+
"enum": [
|
|
61
|
+
"info",
|
|
62
|
+
"low",
|
|
63
|
+
"medium",
|
|
64
|
+
"high",
|
|
65
|
+
"critical"
|
|
66
|
+
]
|
|
67
|
+
},
|
|
68
|
+
"confidence": {
|
|
69
|
+
"enum": [
|
|
70
|
+
"low",
|
|
71
|
+
"medium",
|
|
72
|
+
"high"
|
|
73
|
+
]
|
|
74
|
+
},
|
|
75
|
+
"state": {
|
|
76
|
+
"enum": [
|
|
77
|
+
"observed",
|
|
78
|
+
"introduced",
|
|
79
|
+
"existing",
|
|
80
|
+
"resolved",
|
|
81
|
+
"changed",
|
|
82
|
+
"moved",
|
|
83
|
+
"suppressed",
|
|
84
|
+
"waived"
|
|
85
|
+
]
|
|
86
|
+
},
|
|
87
|
+
"evidence_ref": {
|
|
88
|
+
"type": "string",
|
|
89
|
+
"minLength": 1,
|
|
90
|
+
"maxLength": 512,
|
|
91
|
+
"description": "Opaque reference into the producing AnalyzerResult's native evidence, never analyzer-specific fields."
|
|
92
|
+
},
|
|
93
|
+
"location": {
|
|
94
|
+
"$ref": "#/$defs/location"
|
|
95
|
+
},
|
|
96
|
+
"message": {
|
|
97
|
+
"type": "string",
|
|
98
|
+
"minLength": 1,
|
|
99
|
+
"maxLength": 4096
|
|
100
|
+
}
|
|
101
|
+
},
|
|
102
|
+
"additionalProperties": false,
|
|
103
|
+
"unevaluatedProperties": false,
|
|
104
|
+
"$defs": {
|
|
105
|
+
"location": {
|
|
106
|
+
"type": "object",
|
|
107
|
+
"required": [
|
|
108
|
+
"path"
|
|
109
|
+
],
|
|
110
|
+
"properties": {
|
|
111
|
+
"path": {
|
|
112
|
+
"type": "string",
|
|
113
|
+
"minLength": 1,
|
|
114
|
+
"maxLength": 4096,
|
|
115
|
+
"pattern": "^(?!/)(?!.*\\\\)(?!.*//)(?!(?:\\.{1,2})(?:/|$))(?!.*\\/(?:\\.{1,2})(?:/|$))[^\\u0000-\\u001f/]+(?:/[^\\u0000-\\u001f/]+)*$"
|
|
116
|
+
},
|
|
117
|
+
"start_line": {
|
|
118
|
+
"type": "integer",
|
|
119
|
+
"minimum": 1
|
|
120
|
+
},
|
|
121
|
+
"end_line": {
|
|
122
|
+
"type": "integer",
|
|
123
|
+
"minimum": 1
|
|
124
|
+
}
|
|
125
|
+
},
|
|
126
|
+
"description": "If both line fields are present, runtime validation must enforce end_line >= start_line; Draft 2020-12 cannot express this invariant without overcomplicating the location shape.",
|
|
127
|
+
"additionalProperties": false,
|
|
128
|
+
"unevaluatedProperties": false
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
}
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://railverdict.dev/schemas/minitest-reporter/v1.schema.json",
|
|
4
|
+
"title": "RailVerdict Minitest Reporter v1",
|
|
5
|
+
"description": "Machine contract emitted by the RailVerdict-owned Minitest reporter. Versioned, internal.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"required": [
|
|
8
|
+
"schema_version",
|
|
9
|
+
"runner",
|
|
10
|
+
"seed",
|
|
11
|
+
"tests_total",
|
|
12
|
+
"assertions",
|
|
13
|
+
"failures",
|
|
14
|
+
"errors",
|
|
15
|
+
"skips",
|
|
16
|
+
"duration_seconds",
|
|
17
|
+
"tests"
|
|
18
|
+
],
|
|
19
|
+
"properties": {
|
|
20
|
+
"schema_version": {
|
|
21
|
+
"const": "1.0"
|
|
22
|
+
},
|
|
23
|
+
"runner": {
|
|
24
|
+
"type": "string",
|
|
25
|
+
"minLength": 1,
|
|
26
|
+
"maxLength": 128
|
|
27
|
+
},
|
|
28
|
+
"seed": {
|
|
29
|
+
"type": ["integer", "null"],
|
|
30
|
+
"minimum": 0
|
|
31
|
+
},
|
|
32
|
+
"tests_total": {
|
|
33
|
+
"type": "integer",
|
|
34
|
+
"minimum": 0
|
|
35
|
+
},
|
|
36
|
+
"assertions": {
|
|
37
|
+
"type": "integer",
|
|
38
|
+
"minimum": 0
|
|
39
|
+
},
|
|
40
|
+
"failures": {
|
|
41
|
+
"type": "integer",
|
|
42
|
+
"minimum": 0
|
|
43
|
+
},
|
|
44
|
+
"errors": {
|
|
45
|
+
"type": "integer",
|
|
46
|
+
"minimum": 0
|
|
47
|
+
},
|
|
48
|
+
"skips": {
|
|
49
|
+
"type": "integer",
|
|
50
|
+
"minimum": 0
|
|
51
|
+
},
|
|
52
|
+
"duration_seconds": {
|
|
53
|
+
"type": "number",
|
|
54
|
+
"minimum": 0
|
|
55
|
+
},
|
|
56
|
+
"tests": {
|
|
57
|
+
"type": "array",
|
|
58
|
+
"items": {
|
|
59
|
+
"$ref": "#/$defs/test"
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
},
|
|
63
|
+
"additionalProperties": false,
|
|
64
|
+
"unevaluatedProperties": false,
|
|
65
|
+
"$defs": {
|
|
66
|
+
"test": {
|
|
67
|
+
"type": "object",
|
|
68
|
+
"required": [
|
|
69
|
+
"class_name",
|
|
70
|
+
"method_name",
|
|
71
|
+
"status",
|
|
72
|
+
"time_seconds"
|
|
73
|
+
],
|
|
74
|
+
"properties": {
|
|
75
|
+
"class_name": {
|
|
76
|
+
"type": "string",
|
|
77
|
+
"minLength": 1,
|
|
78
|
+
"maxLength": 256
|
|
79
|
+
},
|
|
80
|
+
"method_name": {
|
|
81
|
+
"type": "string",
|
|
82
|
+
"minLength": 1,
|
|
83
|
+
"maxLength": 256
|
|
84
|
+
},
|
|
85
|
+
"status": {
|
|
86
|
+
"enum": ["passed", "failed", "errored", "skipped"]
|
|
87
|
+
},
|
|
88
|
+
"time_seconds": {
|
|
89
|
+
"type": "number",
|
|
90
|
+
"minimum": 0
|
|
91
|
+
},
|
|
92
|
+
"failure_message": {
|
|
93
|
+
"type": "string",
|
|
94
|
+
"maxLength": 4096
|
|
95
|
+
},
|
|
96
|
+
"failure_class": {
|
|
97
|
+
"type": "string",
|
|
98
|
+
"maxLength": 256
|
|
99
|
+
},
|
|
100
|
+
"file": {
|
|
101
|
+
"type": "string",
|
|
102
|
+
"maxLength": 1024
|
|
103
|
+
},
|
|
104
|
+
"line": {
|
|
105
|
+
"type": "integer",
|
|
106
|
+
"minimum": 1
|
|
107
|
+
}
|
|
108
|
+
},
|
|
109
|
+
"additionalProperties": false,
|
|
110
|
+
"unevaluatedProperties": false
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
}
|