patchrail 0.1.0__py3-none-any.whl
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.
- patchrail/__init__.py +7 -0
- patchrail/__main__.py +7 -0
- patchrail/ci/__init__.py +7 -0
- patchrail/ci/classify.py +888 -0
- patchrail/cli.py +8566 -0
- patchrail/funded_issues/__init__.py +138 -0
- patchrail/funded_issues/algora_board.py +240 -0
- patchrail/funded_issues/blocklist.py +112 -0
- patchrail/funded_issues/discovery.py +4091 -0
- patchrail/funded_issues/importers.py +316 -0
- patchrail/funded_issues/source_noise.py +349 -0
- patchrail/funded_issues/store.py +459 -0
- patchrail/queue/__init__.py +75 -0
- patchrail/queue/server.py +273 -0
- patchrail/queue/status.py +756 -0
- patchrail/queue/store.py +600 -0
- patchrail/reviewer_quick_check.py +650 -0
- patchrail/schemas/__init__.py +1 -0
- patchrail/schemas/application-dossier.v1.schema.json +305 -0
- patchrail/schemas/ci-benchmark.v1.schema.json +174 -0
- patchrail/schemas/ci-fixture-check.v1.schema.json +122 -0
- patchrail/schemas/ci-pilot-metrics.v1.schema.json +164 -0
- patchrail/schemas/ci-pilot-summary.v1.schema.json +146 -0
- patchrail/schemas/ci-result.v1.schema.json +133 -0
- patchrail/schemas/funded-issues-client-report.v1.schema.json +524 -0
- patchrail/schemas/funded-issues-recheck-queue.v1.schema.json +333 -0
- patchrail/schemas/funded-issues-recheck-summary.v1.schema.json +136 -0
- patchrail/schemas/funded-issues-report.v1.schema.json +836 -0
- patchrail/schemas/funded-issues-shortlist.v1.schema.json +953 -0
- patchrail/schemas/funded-issues-store-status.v1.schema.json +96 -0
- patchrail/schemas/funded-issues-store.v1.schema.json +117 -0
- patchrail/schemas/queue-audit-event.v1.schema.json +44 -0
- patchrail/schemas/queue-audit-summary.v1.schema.json +169 -0
- patchrail/schemas/queue-gate-report.v1.schema.json +158 -0
- patchrail/schemas/queue-policy-resolution.v1.schema.json +188 -0
- patchrail/schemas/queue-policy-scan.v1.schema.json +175 -0
- patchrail/schemas/queue-proposal.v1.schema.json +61 -0
- patchrail/schemas/queue-review.v1.schema.json +218 -0
- patchrail/schemas/queue-status.v1.schema.json +179 -0
- patchrail/schemas/queue-work-item.v1.schema.json +64 -0
- patchrail/schemas/reviewer-quick-check-artifacts.v1.schema.json +104 -0
- patchrail/web_metrics.py +649 -0
- patchrail-0.1.0.dist-info/METADATA +279 -0
- patchrail-0.1.0.dist-info/RECORD +47 -0
- patchrail-0.1.0.dist-info/WHEEL +4 -0
- patchrail-0.1.0.dist-info/entry_points.txt +2 -0
- patchrail-0.1.0.dist-info/licenses/LICENSE +202 -0
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://patchrail.dev/schemas/ci-pilot-metrics.v1.schema.json",
|
|
4
|
+
"title": "PatchRail CI Pilot Metrics",
|
|
5
|
+
"description": "Safe aggregate pilot metrics emitted by patchrail ci pilot-metrics --format json.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"required": [
|
|
8
|
+
"schema_version",
|
|
9
|
+
"total_pilot_summaries",
|
|
10
|
+
"public_repository_mentions",
|
|
11
|
+
"private_or_unapproved_repository_mentions",
|
|
12
|
+
"owned_repository_mentions",
|
|
13
|
+
"external_repository_mentions",
|
|
14
|
+
"public_repositories",
|
|
15
|
+
"owned_repositories",
|
|
16
|
+
"external_repositories",
|
|
17
|
+
"evidence_readiness",
|
|
18
|
+
"classification_correct",
|
|
19
|
+
"maintainer_action_useful",
|
|
20
|
+
"local_only_and_no_raw_log",
|
|
21
|
+
"requirements",
|
|
22
|
+
"source_files"
|
|
23
|
+
],
|
|
24
|
+
"properties": {
|
|
25
|
+
"schema_version": {
|
|
26
|
+
"const": "patchrail.ci_pilot_metrics.v1"
|
|
27
|
+
},
|
|
28
|
+
"total_pilot_summaries": {
|
|
29
|
+
"type": "integer",
|
|
30
|
+
"minimum": 0
|
|
31
|
+
},
|
|
32
|
+
"public_repository_mentions": {
|
|
33
|
+
"type": "integer",
|
|
34
|
+
"minimum": 0
|
|
35
|
+
},
|
|
36
|
+
"private_or_unapproved_repository_mentions": {
|
|
37
|
+
"type": "integer",
|
|
38
|
+
"minimum": 0
|
|
39
|
+
},
|
|
40
|
+
"owned_repository_mentions": {
|
|
41
|
+
"type": "integer",
|
|
42
|
+
"minimum": 0
|
|
43
|
+
},
|
|
44
|
+
"external_repository_mentions": {
|
|
45
|
+
"type": "integer",
|
|
46
|
+
"minimum": 0
|
|
47
|
+
},
|
|
48
|
+
"public_repositories": {
|
|
49
|
+
"type": "array",
|
|
50
|
+
"items": {
|
|
51
|
+
"type": "string"
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
"owned_repositories": {
|
|
55
|
+
"type": "array",
|
|
56
|
+
"items": {
|
|
57
|
+
"type": "string"
|
|
58
|
+
}
|
|
59
|
+
},
|
|
60
|
+
"external_repositories": {
|
|
61
|
+
"type": "array",
|
|
62
|
+
"items": {
|
|
63
|
+
"type": "string"
|
|
64
|
+
}
|
|
65
|
+
},
|
|
66
|
+
"evidence_readiness": {
|
|
67
|
+
"type": "object",
|
|
68
|
+
"required": [
|
|
69
|
+
"status",
|
|
70
|
+
"external_adopters_countable",
|
|
71
|
+
"owned_repo_evidence_countable",
|
|
72
|
+
"private_feedback_count",
|
|
73
|
+
"do_not_count_private_or_unapproved_as_public"
|
|
74
|
+
],
|
|
75
|
+
"properties": {
|
|
76
|
+
"status": {
|
|
77
|
+
"enum": [
|
|
78
|
+
"external_evidence_ready",
|
|
79
|
+
"owned_repo_evidence_only",
|
|
80
|
+
"private_feedback_only"
|
|
81
|
+
]
|
|
82
|
+
},
|
|
83
|
+
"external_adopters_countable": {
|
|
84
|
+
"type": "integer",
|
|
85
|
+
"minimum": 0
|
|
86
|
+
},
|
|
87
|
+
"owned_repo_evidence_countable": {
|
|
88
|
+
"type": "integer",
|
|
89
|
+
"minimum": 0
|
|
90
|
+
},
|
|
91
|
+
"private_feedback_count": {
|
|
92
|
+
"type": "integer",
|
|
93
|
+
"minimum": 0
|
|
94
|
+
},
|
|
95
|
+
"do_not_count_private_or_unapproved_as_public": {
|
|
96
|
+
"const": true
|
|
97
|
+
}
|
|
98
|
+
},
|
|
99
|
+
"additionalProperties": false
|
|
100
|
+
},
|
|
101
|
+
"classification_correct": {
|
|
102
|
+
"$ref": "#/$defs/yes_no_unknown_counts"
|
|
103
|
+
},
|
|
104
|
+
"maintainer_action_useful": {
|
|
105
|
+
"$ref": "#/$defs/yes_no_unknown_counts"
|
|
106
|
+
},
|
|
107
|
+
"local_only_and_no_raw_log": {
|
|
108
|
+
"type": "integer",
|
|
109
|
+
"minimum": 0
|
|
110
|
+
},
|
|
111
|
+
"requirements": {
|
|
112
|
+
"type": "object",
|
|
113
|
+
"required": [
|
|
114
|
+
"billing_required",
|
|
115
|
+
"external_model_required",
|
|
116
|
+
"network_required",
|
|
117
|
+
"github_write_permission_required"
|
|
118
|
+
],
|
|
119
|
+
"properties": {
|
|
120
|
+
"billing_required": {
|
|
121
|
+
"const": false
|
|
122
|
+
},
|
|
123
|
+
"external_model_required": {
|
|
124
|
+
"const": false
|
|
125
|
+
},
|
|
126
|
+
"network_required": {
|
|
127
|
+
"const": false
|
|
128
|
+
},
|
|
129
|
+
"github_write_permission_required": {
|
|
130
|
+
"const": false
|
|
131
|
+
}
|
|
132
|
+
},
|
|
133
|
+
"additionalProperties": false
|
|
134
|
+
},
|
|
135
|
+
"source_files": {
|
|
136
|
+
"type": "array",
|
|
137
|
+
"items": {
|
|
138
|
+
"type": "string"
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
},
|
|
142
|
+
"$defs": {
|
|
143
|
+
"yes_no_unknown_counts": {
|
|
144
|
+
"type": "object",
|
|
145
|
+
"required": ["yes", "no", "unknown"],
|
|
146
|
+
"properties": {
|
|
147
|
+
"yes": {
|
|
148
|
+
"type": "integer",
|
|
149
|
+
"minimum": 0
|
|
150
|
+
},
|
|
151
|
+
"no": {
|
|
152
|
+
"type": "integer",
|
|
153
|
+
"minimum": 0
|
|
154
|
+
},
|
|
155
|
+
"unknown": {
|
|
156
|
+
"type": "integer",
|
|
157
|
+
"minimum": 0
|
|
158
|
+
}
|
|
159
|
+
},
|
|
160
|
+
"additionalProperties": false
|
|
161
|
+
}
|
|
162
|
+
},
|
|
163
|
+
"additionalProperties": true
|
|
164
|
+
}
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://patchrail.dev/schemas/ci-pilot-summary.v1.schema.json",
|
|
4
|
+
"title": "PatchRail CI Pilot Summary",
|
|
5
|
+
"description": "Consent-only pilot outcome emitted by patchrail ci pilot-summary --format json.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"required": [
|
|
8
|
+
"schema_version",
|
|
9
|
+
"pilot_pack",
|
|
10
|
+
"public_listing",
|
|
11
|
+
"pilot_context",
|
|
12
|
+
"classification",
|
|
13
|
+
"requirements",
|
|
14
|
+
"blocked_actions"
|
|
15
|
+
],
|
|
16
|
+
"properties": {
|
|
17
|
+
"schema_version": {
|
|
18
|
+
"const": "patchrail.ci_pilot_summary.v1"
|
|
19
|
+
},
|
|
20
|
+
"pilot_pack": {
|
|
21
|
+
"type": "object",
|
|
22
|
+
"required": [
|
|
23
|
+
"manifest_path",
|
|
24
|
+
"raw_log_copied",
|
|
25
|
+
"redaction_local_only",
|
|
26
|
+
"maintainer_review_required_before_sharing"
|
|
27
|
+
],
|
|
28
|
+
"properties": {
|
|
29
|
+
"manifest_path": {
|
|
30
|
+
"type": "string",
|
|
31
|
+
"minLength": 1
|
|
32
|
+
},
|
|
33
|
+
"raw_log_copied": {
|
|
34
|
+
"const": false
|
|
35
|
+
},
|
|
36
|
+
"redaction_local_only": {
|
|
37
|
+
"const": true
|
|
38
|
+
},
|
|
39
|
+
"maintainer_review_required_before_sharing": {
|
|
40
|
+
"const": true
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
"additionalProperties": true
|
|
44
|
+
},
|
|
45
|
+
"public_listing": {
|
|
46
|
+
"type": "object",
|
|
47
|
+
"required": ["repository_mention_approved", "repository"],
|
|
48
|
+
"properties": {
|
|
49
|
+
"repository_mention_approved": {
|
|
50
|
+
"type": "boolean"
|
|
51
|
+
},
|
|
52
|
+
"repository": {
|
|
53
|
+
"type": ["string", "null"]
|
|
54
|
+
}
|
|
55
|
+
},
|
|
56
|
+
"additionalProperties": false
|
|
57
|
+
},
|
|
58
|
+
"pilot_context": {
|
|
59
|
+
"type": "object",
|
|
60
|
+
"required": [
|
|
61
|
+
"ci_provider",
|
|
62
|
+
"toolchain",
|
|
63
|
+
"classification_correct",
|
|
64
|
+
"maintainer_action_useful"
|
|
65
|
+
],
|
|
66
|
+
"properties": {
|
|
67
|
+
"ci_provider": {
|
|
68
|
+
"type": "string"
|
|
69
|
+
},
|
|
70
|
+
"toolchain": {
|
|
71
|
+
"type": "string"
|
|
72
|
+
},
|
|
73
|
+
"classification_correct": {
|
|
74
|
+
"enum": ["yes", "no", "unknown"]
|
|
75
|
+
},
|
|
76
|
+
"maintainer_action_useful": {
|
|
77
|
+
"enum": ["yes", "no", "unknown"]
|
|
78
|
+
}
|
|
79
|
+
},
|
|
80
|
+
"additionalProperties": false
|
|
81
|
+
},
|
|
82
|
+
"classification": {
|
|
83
|
+
"type": "object",
|
|
84
|
+
"required": [
|
|
85
|
+
"failure_class",
|
|
86
|
+
"confidence",
|
|
87
|
+
"likely_subsystem",
|
|
88
|
+
"minimal_repair_strategy"
|
|
89
|
+
],
|
|
90
|
+
"properties": {
|
|
91
|
+
"failure_class": {
|
|
92
|
+
"type": "string",
|
|
93
|
+
"minLength": 1
|
|
94
|
+
},
|
|
95
|
+
"confidence": {
|
|
96
|
+
"type": "number",
|
|
97
|
+
"minimum": 0,
|
|
98
|
+
"maximum": 1
|
|
99
|
+
},
|
|
100
|
+
"likely_subsystem": {
|
|
101
|
+
"type": "string",
|
|
102
|
+
"minLength": 1
|
|
103
|
+
},
|
|
104
|
+
"minimal_repair_strategy": {
|
|
105
|
+
"type": "string",
|
|
106
|
+
"minLength": 1
|
|
107
|
+
}
|
|
108
|
+
},
|
|
109
|
+
"additionalProperties": false
|
|
110
|
+
},
|
|
111
|
+
"requirements": {
|
|
112
|
+
"type": "object",
|
|
113
|
+
"required": [
|
|
114
|
+
"billing_required",
|
|
115
|
+
"external_model_required",
|
|
116
|
+
"network_required",
|
|
117
|
+
"github_write_permission_required"
|
|
118
|
+
],
|
|
119
|
+
"properties": {
|
|
120
|
+
"billing_required": {
|
|
121
|
+
"const": false
|
|
122
|
+
},
|
|
123
|
+
"external_model_required": {
|
|
124
|
+
"const": false
|
|
125
|
+
},
|
|
126
|
+
"network_required": {
|
|
127
|
+
"const": false
|
|
128
|
+
},
|
|
129
|
+
"github_write_permission_required": {
|
|
130
|
+
"const": false
|
|
131
|
+
}
|
|
132
|
+
},
|
|
133
|
+
"additionalProperties": true
|
|
134
|
+
},
|
|
135
|
+
"blocked_actions": {
|
|
136
|
+
"type": "array",
|
|
137
|
+
"contains": {
|
|
138
|
+
"const": "copy_raw_log"
|
|
139
|
+
},
|
|
140
|
+
"items": {
|
|
141
|
+
"type": "string"
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
},
|
|
145
|
+
"additionalProperties": true
|
|
146
|
+
}
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://patchrail.dev/schemas/ci-result.v1.schema.json",
|
|
4
|
+
"title": "PatchRail CI Result",
|
|
5
|
+
"description": "Local CI failure classification result emitted by patchrail ci classify and patchrail ci explain --format json.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"required": [
|
|
8
|
+
"schema_version",
|
|
9
|
+
"failure_class",
|
|
10
|
+
"likely_subsystem",
|
|
11
|
+
"reproduction_command",
|
|
12
|
+
"minimal_repair_strategy",
|
|
13
|
+
"confidence",
|
|
14
|
+
"signals",
|
|
15
|
+
"requirements"
|
|
16
|
+
],
|
|
17
|
+
"properties": {
|
|
18
|
+
"schema_version": {
|
|
19
|
+
"const": "patchrail.ci_result.v1"
|
|
20
|
+
},
|
|
21
|
+
"failure_class": {
|
|
22
|
+
"type": "string",
|
|
23
|
+
"enum": [
|
|
24
|
+
"unknown",
|
|
25
|
+
"runner_resource_exhaustion",
|
|
26
|
+
"network_transient_failure",
|
|
27
|
+
"ci_job_timeout",
|
|
28
|
+
"python_dependency_resolution",
|
|
29
|
+
"code_coverage_threshold",
|
|
30
|
+
"python_type_check",
|
|
31
|
+
"python_lint",
|
|
32
|
+
"python_test_failure",
|
|
33
|
+
"node_dependency_install",
|
|
34
|
+
"typescript_typecheck",
|
|
35
|
+
"javascript_lint",
|
|
36
|
+
"github_actions_workflow",
|
|
37
|
+
"artifact_or_cache_failure",
|
|
38
|
+
"security_scan_failure",
|
|
39
|
+
"dotnet_build_failure",
|
|
40
|
+
"java_build_failure",
|
|
41
|
+
"docker_build_failure",
|
|
42
|
+
"cpp_build_failure",
|
|
43
|
+
"browser_test_failure",
|
|
44
|
+
"rust_test_failure",
|
|
45
|
+
"ruby_bundle_failure",
|
|
46
|
+
"php_composer_failure",
|
|
47
|
+
"go_test_failure",
|
|
48
|
+
"node_test_failure",
|
|
49
|
+
"rust_lint",
|
|
50
|
+
"go_lint",
|
|
51
|
+
"release_publish_failure",
|
|
52
|
+
"git_checkout_failure",
|
|
53
|
+
"git_merge_conflict",
|
|
54
|
+
"secrets_or_permissions_failure",
|
|
55
|
+
"terraform_iac_failure"
|
|
56
|
+
]
|
|
57
|
+
},
|
|
58
|
+
"likely_subsystem": {
|
|
59
|
+
"type": "string",
|
|
60
|
+
"minLength": 1
|
|
61
|
+
},
|
|
62
|
+
"reproduction_command": {
|
|
63
|
+
"type": "string",
|
|
64
|
+
"minLength": 1
|
|
65
|
+
},
|
|
66
|
+
"minimal_repair_strategy": {
|
|
67
|
+
"type": "string",
|
|
68
|
+
"minLength": 1
|
|
69
|
+
},
|
|
70
|
+
"confidence": {
|
|
71
|
+
"type": "number",
|
|
72
|
+
"minimum": 0,
|
|
73
|
+
"maximum": 1
|
|
74
|
+
},
|
|
75
|
+
"signals": {
|
|
76
|
+
"type": "array",
|
|
77
|
+
"items": {
|
|
78
|
+
"type": "string",
|
|
79
|
+
"minLength": 1
|
|
80
|
+
}
|
|
81
|
+
},
|
|
82
|
+
"requirements": {
|
|
83
|
+
"type": "object",
|
|
84
|
+
"required": [
|
|
85
|
+
"billing_required",
|
|
86
|
+
"webhook_required_for_local_classification",
|
|
87
|
+
"github_app_required_for_local_classification",
|
|
88
|
+
"pr_creation_required",
|
|
89
|
+
"external_model_required"
|
|
90
|
+
],
|
|
91
|
+
"properties": {
|
|
92
|
+
"billing_required": {
|
|
93
|
+
"const": false
|
|
94
|
+
},
|
|
95
|
+
"webhook_required_for_local_classification": {
|
|
96
|
+
"const": false
|
|
97
|
+
},
|
|
98
|
+
"github_app_required_for_local_classification": {
|
|
99
|
+
"const": false
|
|
100
|
+
},
|
|
101
|
+
"pr_creation_required": {
|
|
102
|
+
"type": "string",
|
|
103
|
+
"pattern": "^no;"
|
|
104
|
+
},
|
|
105
|
+
"external_model_required": {
|
|
106
|
+
"const": false
|
|
107
|
+
}
|
|
108
|
+
},
|
|
109
|
+
"additionalProperties": false
|
|
110
|
+
},
|
|
111
|
+
"redaction": {
|
|
112
|
+
"type": "object",
|
|
113
|
+
"required": ["redacted", "redactions", "local_only"],
|
|
114
|
+
"properties": {
|
|
115
|
+
"redacted": {
|
|
116
|
+
"type": "string"
|
|
117
|
+
},
|
|
118
|
+
"redactions": {
|
|
119
|
+
"type": "object",
|
|
120
|
+
"additionalProperties": {
|
|
121
|
+
"type": "integer",
|
|
122
|
+
"minimum": 1
|
|
123
|
+
}
|
|
124
|
+
},
|
|
125
|
+
"local_only": {
|
|
126
|
+
"const": true
|
|
127
|
+
}
|
|
128
|
+
},
|
|
129
|
+
"additionalProperties": false
|
|
130
|
+
}
|
|
131
|
+
},
|
|
132
|
+
"additionalProperties": false
|
|
133
|
+
}
|