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.
Files changed (47) hide show
  1. patchrail/__init__.py +7 -0
  2. patchrail/__main__.py +7 -0
  3. patchrail/ci/__init__.py +7 -0
  4. patchrail/ci/classify.py +888 -0
  5. patchrail/cli.py +8566 -0
  6. patchrail/funded_issues/__init__.py +138 -0
  7. patchrail/funded_issues/algora_board.py +240 -0
  8. patchrail/funded_issues/blocklist.py +112 -0
  9. patchrail/funded_issues/discovery.py +4091 -0
  10. patchrail/funded_issues/importers.py +316 -0
  11. patchrail/funded_issues/source_noise.py +349 -0
  12. patchrail/funded_issues/store.py +459 -0
  13. patchrail/queue/__init__.py +75 -0
  14. patchrail/queue/server.py +273 -0
  15. patchrail/queue/status.py +756 -0
  16. patchrail/queue/store.py +600 -0
  17. patchrail/reviewer_quick_check.py +650 -0
  18. patchrail/schemas/__init__.py +1 -0
  19. patchrail/schemas/application-dossier.v1.schema.json +305 -0
  20. patchrail/schemas/ci-benchmark.v1.schema.json +174 -0
  21. patchrail/schemas/ci-fixture-check.v1.schema.json +122 -0
  22. patchrail/schemas/ci-pilot-metrics.v1.schema.json +164 -0
  23. patchrail/schemas/ci-pilot-summary.v1.schema.json +146 -0
  24. patchrail/schemas/ci-result.v1.schema.json +133 -0
  25. patchrail/schemas/funded-issues-client-report.v1.schema.json +524 -0
  26. patchrail/schemas/funded-issues-recheck-queue.v1.schema.json +333 -0
  27. patchrail/schemas/funded-issues-recheck-summary.v1.schema.json +136 -0
  28. patchrail/schemas/funded-issues-report.v1.schema.json +836 -0
  29. patchrail/schemas/funded-issues-shortlist.v1.schema.json +953 -0
  30. patchrail/schemas/funded-issues-store-status.v1.schema.json +96 -0
  31. patchrail/schemas/funded-issues-store.v1.schema.json +117 -0
  32. patchrail/schemas/queue-audit-event.v1.schema.json +44 -0
  33. patchrail/schemas/queue-audit-summary.v1.schema.json +169 -0
  34. patchrail/schemas/queue-gate-report.v1.schema.json +158 -0
  35. patchrail/schemas/queue-policy-resolution.v1.schema.json +188 -0
  36. patchrail/schemas/queue-policy-scan.v1.schema.json +175 -0
  37. patchrail/schemas/queue-proposal.v1.schema.json +61 -0
  38. patchrail/schemas/queue-review.v1.schema.json +218 -0
  39. patchrail/schemas/queue-status.v1.schema.json +179 -0
  40. patchrail/schemas/queue-work-item.v1.schema.json +64 -0
  41. patchrail/schemas/reviewer-quick-check-artifacts.v1.schema.json +104 -0
  42. patchrail/web_metrics.py +649 -0
  43. patchrail-0.1.0.dist-info/METADATA +279 -0
  44. patchrail-0.1.0.dist-info/RECORD +47 -0
  45. patchrail-0.1.0.dist-info/WHEEL +4 -0
  46. patchrail-0.1.0.dist-info/entry_points.txt +2 -0
  47. patchrail-0.1.0.dist-info/licenses/LICENSE +202 -0
@@ -0,0 +1,179 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://patchrail.dev/schemas/queue-status.v1.schema.json",
4
+ "title": "PatchRail Queue Status",
5
+ "description": "Local status summary emitted by patchrail queue status and the local queue API /status endpoint.",
6
+ "type": "object",
7
+ "required": [
8
+ "schema_version",
9
+ "queue_schema_version",
10
+ "patchrail_version",
11
+ "db_path",
12
+ "local_first",
13
+ "host_boundary",
14
+ "counts",
15
+ "human_gate_summary",
16
+ "latest_audit_event",
17
+ "safety"
18
+ ],
19
+ "properties": {
20
+ "schema_version": {
21
+ "const": "patchrail.queue_status.v1"
22
+ },
23
+ "queue_schema_version": {
24
+ "const": "patchrail.queue.v1"
25
+ },
26
+ "patchrail_version": {
27
+ "type": "string",
28
+ "minLength": 1
29
+ },
30
+ "db_path": {
31
+ "type": "string",
32
+ "minLength": 1
33
+ },
34
+ "local_first": {
35
+ "const": true
36
+ },
37
+ "host_boundary": {
38
+ "type": "string",
39
+ "minLength": 1
40
+ },
41
+ "counts": {
42
+ "type": "object",
43
+ "required": [
44
+ "work_items_total",
45
+ "work_items_by_status",
46
+ "work_items_by_approval_state",
47
+ "proposals_total",
48
+ "proposals_by_approval_state",
49
+ "audit_events_total"
50
+ ],
51
+ "properties": {
52
+ "work_items_total": {
53
+ "type": "integer",
54
+ "minimum": 0
55
+ },
56
+ "work_items_by_status": {
57
+ "type": "object",
58
+ "additionalProperties": {
59
+ "type": "integer",
60
+ "minimum": 0
61
+ }
62
+ },
63
+ "work_items_by_approval_state": {
64
+ "type": "object",
65
+ "additionalProperties": {
66
+ "type": "integer",
67
+ "minimum": 0
68
+ }
69
+ },
70
+ "proposals_total": {
71
+ "type": "integer",
72
+ "minimum": 0
73
+ },
74
+ "proposals_by_approval_state": {
75
+ "type": "object",
76
+ "additionalProperties": {
77
+ "type": "integer",
78
+ "minimum": 0
79
+ }
80
+ },
81
+ "audit_events_total": {
82
+ "type": "integer",
83
+ "minimum": 0
84
+ }
85
+ },
86
+ "additionalProperties": false
87
+ },
88
+ "human_gate_summary": {
89
+ "type": "object",
90
+ "required": [
91
+ "status",
92
+ "pending_work_items",
93
+ "pending_proposals",
94
+ "total_pending_decisions",
95
+ "approved_work_items",
96
+ "rejected_work_items",
97
+ "approved_proposals",
98
+ "rejected_proposals",
99
+ "write_actions_unlocked"
100
+ ],
101
+ "properties": {
102
+ "status": {
103
+ "enum": ["awaiting_human_review", "no_pending_decisions"]
104
+ },
105
+ "pending_work_items": {
106
+ "type": "integer",
107
+ "minimum": 0
108
+ },
109
+ "pending_proposals": {
110
+ "type": "integer",
111
+ "minimum": 0
112
+ },
113
+ "total_pending_decisions": {
114
+ "type": "integer",
115
+ "minimum": 0
116
+ },
117
+ "approved_work_items": {
118
+ "type": "integer",
119
+ "minimum": 0
120
+ },
121
+ "rejected_work_items": {
122
+ "type": "integer",
123
+ "minimum": 0
124
+ },
125
+ "approved_proposals": {
126
+ "type": "integer",
127
+ "minimum": 0
128
+ },
129
+ "rejected_proposals": {
130
+ "type": "integer",
131
+ "minimum": 0
132
+ },
133
+ "write_actions_unlocked": {
134
+ "const": false
135
+ }
136
+ },
137
+ "additionalProperties": false
138
+ },
139
+ "latest_audit_event": {
140
+ "oneOf": [
141
+ { "type": "null" },
142
+ { "$ref": "queue-audit-event.v1.schema.json" }
143
+ ]
144
+ },
145
+ "safety": {
146
+ "type": "object",
147
+ "required": [
148
+ "write_actions_allowed_by_default",
149
+ "github_write_permission_required",
150
+ "network_required",
151
+ "external_model_required",
152
+ "billing_required",
153
+ "approval_records_execute_actions"
154
+ ],
155
+ "properties": {
156
+ "write_actions_allowed_by_default": {
157
+ "const": false
158
+ },
159
+ "github_write_permission_required": {
160
+ "const": false
161
+ },
162
+ "network_required": {
163
+ "const": false
164
+ },
165
+ "external_model_required": {
166
+ "const": false
167
+ },
168
+ "billing_required": {
169
+ "const": false
170
+ },
171
+ "approval_records_execute_actions": {
172
+ "const": false
173
+ }
174
+ },
175
+ "additionalProperties": false
176
+ }
177
+ },
178
+ "additionalProperties": true
179
+ }
@@ -0,0 +1,64 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://patchrail.dev/schemas/queue-work-item.v1.schema.json",
4
+ "title": "PatchRail Queue Work Item",
5
+ "description": "Local, human-gated work item emitted by patchrail queue commands and the local queue API.",
6
+ "type": "object",
7
+ "required": [
8
+ "id",
9
+ "kind",
10
+ "title",
11
+ "source",
12
+ "status",
13
+ "approval_state",
14
+ "write_actions_allowed",
15
+ "created_at",
16
+ "updated_at",
17
+ "payload",
18
+ "decision_note"
19
+ ],
20
+ "properties": {
21
+ "id": {
22
+ "type": "string",
23
+ "pattern": "^prq_[0-9a-f]{12}$"
24
+ },
25
+ "kind": {
26
+ "type": "string",
27
+ "minLength": 1
28
+ },
29
+ "title": {
30
+ "type": "string",
31
+ "minLength": 1
32
+ },
33
+ "source": {
34
+ "type": "string",
35
+ "minLength": 1
36
+ },
37
+ "status": {
38
+ "type": "string",
39
+ "enum": ["open", "pending", "approved", "rejected", "skipped"]
40
+ },
41
+ "approval_state": {
42
+ "type": "string",
43
+ "enum": ["pending", "approved", "rejected"]
44
+ },
45
+ "write_actions_allowed": {
46
+ "const": false
47
+ },
48
+ "created_at": {
49
+ "type": "string",
50
+ "pattern": "^\\d{4}-\\d{2}-\\d{2}T"
51
+ },
52
+ "updated_at": {
53
+ "type": "string",
54
+ "pattern": "^\\d{4}-\\d{2}-\\d{2}T"
55
+ },
56
+ "payload": {
57
+ "type": "object"
58
+ },
59
+ "decision_note": {
60
+ "type": ["string", "null"]
61
+ }
62
+ },
63
+ "additionalProperties": false
64
+ }
@@ -0,0 +1,104 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://patchrail.dev/schemas/reviewer-quick-check-artifacts.v1.schema.json",
4
+ "title": "PatchRail Reviewer Quick Check Artifact Manifest",
5
+ "description": "Local manifest emitted by patchrail evidence reviewer-packet --out-dir, with scripts/reviewer_quick_check.py --out-dir as a compatibility wrapper. The packet is a reviewer-facing local evidence bundle and never performs network, write, publish, or application-submission actions.",
6
+ "type": "object",
7
+ "required": [
8
+ "schema_version",
9
+ "generated_from",
10
+ "network_required",
11
+ "write_action_required",
12
+ "application_form_submission_performed",
13
+ "artifacts",
14
+ "artifact_details"
15
+ ],
16
+ "properties": {
17
+ "schema_version": {
18
+ "const": "patchrail.reviewer_quick_check_artifacts.v1"
19
+ },
20
+ "generated_from": {
21
+ "const": "local_checkout"
22
+ },
23
+ "network_required": {
24
+ "const": false
25
+ },
26
+ "write_action_required": {
27
+ "const": false
28
+ },
29
+ "application_form_submission_performed": {
30
+ "const": false
31
+ },
32
+ "artifacts": {
33
+ "type": "array",
34
+ "minItems": 15,
35
+ "uniqueItems": true,
36
+ "contains": {
37
+ "const": "reviewer-quick-check.md"
38
+ },
39
+ "items": {
40
+ "enum": [
41
+ "README.md",
42
+ "artifact-index.md",
43
+ "reviewer-quick-check.md",
44
+ "application-dossier.json",
45
+ "application-dossier.schema.json",
46
+ "application-dossier.txt",
47
+ "application-gate.txt",
48
+ "ci-triage-demo.md",
49
+ "control-plane-evidence.json",
50
+ "control-plane-evidence.md",
51
+ "http-api-evidence.json",
52
+ "http-api-evidence.md",
53
+ "release-readiness.json",
54
+ "release-readiness.md",
55
+ "reviewer-quick-check-artifacts.schema.json"
56
+ ]
57
+ }
58
+ },
59
+ "artifact_details": {
60
+ "type": "array",
61
+ "minItems": 15,
62
+ "description": "Offline integrity details for each reviewer packet artifact. Each path must also appear in artifacts.",
63
+ "items": {
64
+ "type": "object",
65
+ "required": [
66
+ "path",
67
+ "size_bytes",
68
+ "sha256"
69
+ ],
70
+ "properties": {
71
+ "path": {
72
+ "enum": [
73
+ "README.md",
74
+ "artifact-index.md",
75
+ "reviewer-quick-check.md",
76
+ "application-dossier.json",
77
+ "application-dossier.schema.json",
78
+ "application-dossier.txt",
79
+ "application-gate.txt",
80
+ "ci-triage-demo.md",
81
+ "control-plane-evidence.json",
82
+ "control-plane-evidence.md",
83
+ "http-api-evidence.json",
84
+ "http-api-evidence.md",
85
+ "release-readiness.json",
86
+ "release-readiness.md",
87
+ "reviewer-quick-check-artifacts.schema.json"
88
+ ]
89
+ },
90
+ "size_bytes": {
91
+ "type": "integer",
92
+ "minimum": 1
93
+ },
94
+ "sha256": {
95
+ "type": "string",
96
+ "pattern": "^[0-9a-f]{64}$"
97
+ }
98
+ },
99
+ "additionalProperties": false
100
+ }
101
+ }
102
+ },
103
+ "additionalProperties": false
104
+ }