@diff-review-system/drs 4.0.1 → 4.1.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.
- package/.pi/agents/review/unified-reviewer.md +2 -6
- package/.pi/agents/task/review-assistant.md +22 -0
- package/.pi/workflows/github-pr-fix-review-issues-stacked.yaml +10 -4
- package/.pi/workflows/github-pr-review-post.yaml +0 -1
- package/.pi/workflows/github-pr-review.yaml +14 -8
- package/.pi/workflows/github-pr-visual-explain.yaml +46 -1
- package/.pi/workflows/gitlab-mr-fix-review-issues-stacked.yaml +10 -4
- package/.pi/workflows/gitlab-mr-review.yaml +14 -8
- package/.pi/workflows/gitlab-mr-visual-explain.yaml +46 -1
- package/.pi/workflows/local-fix-review-issues.yaml +13 -6
- package/.pi/workflows/local-review.yaml +7 -1
- package/.pi/workflows/local-visual-explain.yaml +46 -1
- package/.pi/workflows/temporal-control-smoke.yaml +63 -0
- package/README.md +39 -0
- package/dist/cli/index.js +211 -4
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/init.d.ts +6 -1
- package/dist/cli/init.d.ts.map +1 -1
- package/dist/cli/init.js +29 -10
- package/dist/cli/init.js.map +1 -1
- package/dist/cli/run-agent.d.ts +2 -7
- package/dist/cli/run-agent.d.ts.map +1 -1
- package/dist/cli/run-agent.js.map +1 -1
- package/dist/cli/workflow-executor-selection.d.ts +3 -0
- package/dist/cli/workflow-executor-selection.d.ts.map +1 -0
- package/dist/cli/workflow-executor-selection.js +15 -0
- package/dist/cli/workflow-executor-selection.js.map +1 -0
- package/dist/cli/workflow.d.ts +38 -42
- package/dist/cli/workflow.d.ts.map +1 -1
- package/dist/cli/workflow.js +190 -838
- package/dist/cli/workflow.js.map +1 -1
- package/dist/lib/agent-result.d.ts +8 -0
- package/dist/lib/agent-result.d.ts.map +1 -0
- package/dist/lib/agent-result.js +2 -0
- package/dist/lib/agent-result.js.map +1 -0
- package/dist/lib/config.d.ts +21 -0
- package/dist/lib/config.d.ts.map +1 -1
- package/dist/lib/config.js.map +1 -1
- package/dist/lib/output-paths.d.ts +0 -1
- package/dist/lib/output-paths.d.ts.map +1 -1
- package/dist/lib/output-paths.js +0 -1
- package/dist/lib/output-paths.js.map +1 -1
- package/dist/lib/project-setup.d.ts +10 -0
- package/dist/lib/project-setup.d.ts.map +1 -0
- package/dist/lib/project-setup.js +25 -0
- package/dist/lib/project-setup.js.map +1 -0
- package/dist/lib/review-artifact-store.d.ts +16 -0
- package/dist/lib/review-artifact-store.d.ts.map +1 -0
- package/dist/lib/review-artifact-store.js +84 -0
- package/dist/lib/review-artifact-store.js.map +1 -0
- package/dist/lib/review-artifact.d.ts.map +1 -1
- package/dist/lib/review-artifact.js +1 -0
- package/dist/lib/review-artifact.js.map +1 -1
- package/dist/lib/review-core.d.ts +1 -0
- package/dist/lib/review-core.d.ts.map +1 -1
- package/dist/lib/review-core.js +11 -14
- package/dist/lib/review-core.js.map +1 -1
- package/dist/lib/review-parser.d.ts.map +1 -1
- package/dist/lib/review-parser.js +15 -12
- package/dist/lib/review-parser.js.map +1 -1
- package/dist/lib/skills.d.ts +16 -0
- package/dist/lib/skills.d.ts.map +1 -0
- package/dist/lib/skills.js +140 -0
- package/dist/lib/skills.js.map +1 -0
- package/dist/lib/workflow/artifact-store.d.ts +71 -0
- package/dist/lib/workflow/artifact-store.d.ts.map +1 -0
- package/dist/lib/workflow/artifact-store.js +121 -0
- package/dist/lib/workflow/artifact-store.js.map +1 -0
- package/dist/lib/workflow/compiled-plan.d.ts +87 -0
- package/dist/lib/workflow/compiled-plan.d.ts.map +1 -0
- package/dist/lib/workflow/compiled-plan.js +62 -0
- package/dist/lib/workflow/compiled-plan.js.map +1 -0
- package/dist/lib/workflow/executor.d.ts +18 -0
- package/dist/lib/workflow/executor.d.ts.map +1 -0
- package/dist/lib/workflow/executor.js +2 -0
- package/dist/lib/workflow/executor.js.map +1 -0
- package/dist/lib/workflow/graph.d.ts +30 -0
- package/dist/lib/workflow/graph.d.ts.map +1 -0
- package/dist/lib/workflow/graph.js +139 -0
- package/dist/lib/workflow/graph.js.map +1 -0
- package/dist/lib/workflow/input.d.ts +4 -0
- package/dist/lib/workflow/input.d.ts.map +1 -0
- package/dist/lib/workflow/input.js +4 -0
- package/dist/lib/workflow/input.js.map +1 -0
- package/dist/lib/workflow/node-executor.d.ts +19 -0
- package/dist/lib/workflow/node-executor.d.ts.map +1 -0
- package/dist/lib/workflow/node-executor.js +2 -0
- package/dist/lib/workflow/node-executor.js.map +1 -0
- package/dist/lib/workflow/planning.d.ts +51 -0
- package/dist/lib/workflow/planning.d.ts.map +1 -0
- package/dist/lib/workflow/planning.js +814 -0
- package/dist/lib/workflow/planning.js.map +1 -0
- package/dist/lib/workflow/types.d.ts +66 -0
- package/dist/lib/workflow/types.d.ts.map +1 -0
- package/dist/lib/workflow/types.js +2 -0
- package/dist/lib/workflow/types.js.map +1 -0
- package/dist/lib/write-json-output.d.ts.map +1 -1
- package/dist/lib/write-json-output.js +3 -8
- package/dist/lib/write-json-output.js.map +1 -1
- package/dist/pi/sdk.d.ts.map +1 -1
- package/dist/pi/sdk.js +6 -2
- package/dist/pi/sdk.js.map +1 -1
- package/dist/runtime/built-in-paths.d.ts +1 -0
- package/dist/runtime/built-in-paths.d.ts.map +1 -1
- package/dist/runtime/built-in-paths.js +7 -0
- package/dist/runtime/built-in-paths.js.map +1 -1
- package/dist/temporal/activities.d.ts +26 -0
- package/dist/temporal/activities.d.ts.map +1 -0
- package/dist/temporal/activities.js +219 -0
- package/dist/temporal/activities.js.map +1 -0
- package/dist/temporal/config.d.ts +4 -0
- package/dist/temporal/config.d.ts.map +1 -0
- package/dist/temporal/config.js +36 -0
- package/dist/temporal/config.js.map +1 -0
- package/dist/temporal/executor.d.ts +7 -0
- package/dist/temporal/executor.d.ts.map +1 -0
- package/dist/temporal/executor.js +233 -0
- package/dist/temporal/executor.js.map +1 -0
- package/dist/temporal/retry-policy.d.ts +28 -0
- package/dist/temporal/retry-policy.d.ts.map +1 -0
- package/dist/temporal/retry-policy.js +56 -0
- package/dist/temporal/retry-policy.js.map +1 -0
- package/dist/temporal/types.d.ts +86 -0
- package/dist/temporal/types.d.ts.map +1 -0
- package/dist/temporal/types.js +2 -0
- package/dist/temporal/types.js.map +1 -0
- package/dist/temporal/worker.d.ts +3 -0
- package/dist/temporal/worker.d.ts.map +1 -0
- package/dist/temporal/worker.js +18 -0
- package/dist/temporal/worker.js.map +1 -0
- package/dist/temporal/workflow-id.d.ts +27 -0
- package/dist/temporal/workflow-id.d.ts.map +1 -0
- package/dist/temporal/workflow-id.js +53 -0
- package/dist/temporal/workflow-id.js.map +1 -0
- package/dist/temporal/workflows.d.ts +6 -0
- package/dist/temporal/workflows.d.ts.map +1 -0
- package/dist/temporal/workflows.js +342 -0
- package/dist/temporal/workflows.js.map +1 -0
- package/package.json +6 -1
|
@@ -96,12 +96,8 @@ Follow these steps **in order** before reporting any issues:
|
|
|
96
96
|
|
|
97
97
|
## Output Requirements
|
|
98
98
|
|
|
99
|
-
-
|
|
100
|
-
|
|
101
|
-
- `payload`: the JSON object described below
|
|
102
|
-
- After calling the tool, return **only** the JSON pointer returned by the tool
|
|
103
|
-
(e.g. `{"outputType":"review_output","outputPath":".drs/review-output.json"}`)
|
|
104
|
-
- Do **not** return raw JSON directly.
|
|
99
|
+
- Return **only** the raw JSON object described below.
|
|
100
|
+
- Do **not** call `write_json_output`.
|
|
105
101
|
- Do **not** include markdown, code fences, or extra text.
|
|
106
102
|
- Follow this exact schema:
|
|
107
103
|
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Conversational assistant for DRS review and workflow artifacts
|
|
3
|
+
color: "#2563eb"
|
|
4
|
+
hidden: false
|
|
5
|
+
tools:
|
|
6
|
+
Read: true
|
|
7
|
+
Glob: true
|
|
8
|
+
Grep: true
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
You are the conversational DRS review assistant.
|
|
12
|
+
|
|
13
|
+
Users ask questions about DRS review output, workflow output, local diffs, and specific findings. Use the supplied artifacts as the source of truth. Cite finding ids, file paths, severities, and workflow names when they are available.
|
|
14
|
+
|
|
15
|
+
## Rules
|
|
16
|
+
|
|
17
|
+
- Prefer concise, direct answers grounded in the artifact content.
|
|
18
|
+
- If the user asks why a finding matters, explain the risk and the smallest safe remediation.
|
|
19
|
+
- If the user asks whether a finding is valid, inspect relevant repository context before answering when tools are available.
|
|
20
|
+
- If the user asks for a fix, first state the intended scope and keep any changes minimal. Do not commit changes.
|
|
21
|
+
- Do not invent findings or workflow results that are not present in the supplied artifacts.
|
|
22
|
+
- If artifact context is missing, say what is missing and answer only from available repository context.
|
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
name: github-pr-fix-review-issues-stacked
|
|
2
2
|
description: Fix high-severity GitHub PR review issues and open a stacked PR
|
|
3
|
+
metadata:
|
|
4
|
+
kind: review
|
|
5
|
+
tags: [review, fix, github, pull-request]
|
|
6
|
+
review:
|
|
7
|
+
source: github-pr
|
|
8
|
+
diff: true
|
|
9
|
+
issues: true
|
|
3
10
|
inputs:
|
|
4
11
|
owner: ''
|
|
5
12
|
repo: ''
|
|
@@ -37,7 +44,6 @@ nodes:
|
|
|
37
44
|
if: '{{artifacts.stackGuard.allowed}} == true'
|
|
38
45
|
with:
|
|
39
46
|
source: change
|
|
40
|
-
artifact: persistedReviewArtifact
|
|
41
47
|
output: review
|
|
42
48
|
|
|
43
49
|
threshold:
|
|
@@ -70,7 +76,7 @@ nodes:
|
|
|
70
76
|
|
|
71
77
|
Only fix findings at or above severity {{inputs.severity}} unless a lower-severity issue is directly required by such a fix.
|
|
72
78
|
|
|
73
|
-
Review artifact path: {{artifacts.
|
|
79
|
+
Review artifact path: {{artifacts.reviewArtifact.path}}
|
|
74
80
|
|
|
75
81
|
Use the read_artifact tool with this path to get the finding manifest, then pull full details for specific findings by id. Do not assume the review JSON is in this prompt — call the tool.
|
|
76
82
|
|
|
@@ -121,7 +127,7 @@ nodes:
|
|
|
121
127
|
|
|
122
128
|
Threshold: {{inputs.severity}}, minimum issues: {{inputs.minIssues}}
|
|
123
129
|
|
|
124
|
-
Review artifact: {{artifacts.
|
|
130
|
+
Review artifact: {{artifacts.reviewArtifact.path}}
|
|
125
131
|
|
|
126
132
|
<!-- drs-stack-source: github:{{inputs.owner}}/{{inputs.repo}}#{{inputs.pr}} -->
|
|
127
133
|
<!-- drs-stack-kind: fix -->
|
|
@@ -138,7 +144,7 @@ nodes:
|
|
|
138
144
|
repo: '{{inputs.repo}}'
|
|
139
145
|
pr: '{{inputs.pr}}'
|
|
140
146
|
source: change
|
|
141
|
-
reviewArtifact:
|
|
147
|
+
reviewArtifact: reviewArtifact
|
|
142
148
|
severity: '{{inputs.severity}}'
|
|
143
149
|
stackedPrUrl: '{{artifacts.changeRequest.url}}'
|
|
144
150
|
marker: drs-fix-status
|
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
name: github-pr-review
|
|
2
2
|
description: Review a GitHub pull request, optionally posting a description, DRS comments, a visual HTML explainer, and a stacked fix PR
|
|
3
|
+
metadata:
|
|
4
|
+
kind: review
|
|
5
|
+
tags: [review, github, pull-request]
|
|
6
|
+
review:
|
|
7
|
+
source: github-pr
|
|
8
|
+
diff: true
|
|
9
|
+
issues: true
|
|
3
10
|
inputs:
|
|
4
11
|
owner:
|
|
5
12
|
type: string
|
|
@@ -88,7 +95,6 @@ nodes:
|
|
|
88
95
|
- change
|
|
89
96
|
with:
|
|
90
97
|
source: change
|
|
91
|
-
artifact: persistedReviewArtifact
|
|
92
98
|
output: review
|
|
93
99
|
|
|
94
100
|
visual:
|
|
@@ -166,7 +172,7 @@ nodes:
|
|
|
166
172
|
|
|
167
173
|
Only fix findings at or above severity {{inputs.fixSeverity}} unless a lower-severity issue is directly required by such a fix.
|
|
168
174
|
|
|
169
|
-
Review artifact path: {{artifacts.
|
|
175
|
+
Review artifact path: {{artifacts.reviewArtifact.path}}
|
|
170
176
|
|
|
171
177
|
Use the read_artifact tool with this path to get the finding manifest, then pull full details for specific findings by id. Do not assume the review JSON is in this prompt — call the tool.
|
|
172
178
|
|
|
@@ -213,7 +219,7 @@ nodes:
|
|
|
213
219
|
if: inputs.fixMode == internal
|
|
214
220
|
with:
|
|
215
221
|
source: verificationChange
|
|
216
|
-
reviewArtifact:
|
|
222
|
+
reviewArtifact: reviewArtifact
|
|
217
223
|
severity: '{{inputs.fixSeverity}}'
|
|
218
224
|
output: reReview
|
|
219
225
|
|
|
@@ -224,12 +230,12 @@ nodes:
|
|
|
224
230
|
- fix-change
|
|
225
231
|
if: inputs.fixMode == internal
|
|
226
232
|
with:
|
|
227
|
-
artifact:
|
|
233
|
+
artifact: reviewArtifact
|
|
228
234
|
review: reReview
|
|
229
235
|
fixChange: fixChange
|
|
230
236
|
severity: '{{inputs.fixSeverity}}'
|
|
231
237
|
minIssues: '1'
|
|
232
|
-
output:
|
|
238
|
+
output: reviewArtifact
|
|
233
239
|
|
|
234
240
|
fix-loop:
|
|
235
241
|
control: loop
|
|
@@ -252,7 +258,7 @@ nodes:
|
|
|
252
258
|
repo: '{{inputs.repo}}'
|
|
253
259
|
pr: '{{inputs.pr}}'
|
|
254
260
|
source: change
|
|
255
|
-
reviewArtifact:
|
|
261
|
+
reviewArtifact: reviewArtifact
|
|
256
262
|
fixReview: reReview
|
|
257
263
|
fixChange: fixChange
|
|
258
264
|
severity: '{{inputs.fixSeverity}}'
|
|
@@ -320,7 +326,7 @@ nodes:
|
|
|
320
326
|
Automated DRS fix stacked on PR #{{inputs.pr}} from the main github-pr-review workflow.
|
|
321
327
|
|
|
322
328
|
Threshold: {{inputs.fixSeverity}}, minimum issues: {{inputs.fixMinIssues}}
|
|
323
|
-
Review artifact: {{artifacts.
|
|
329
|
+
Review artifact: {{artifacts.reviewArtifact.path}}
|
|
324
330
|
|
|
325
331
|
<!-- drs-stack-source: github:{{inputs.owner}}/{{inputs.repo}}#{{inputs.pr}} -->
|
|
326
332
|
<!-- drs-stack-kind: fix -->
|
|
@@ -354,7 +360,7 @@ nodes:
|
|
|
354
360
|
repo: '{{inputs.repo}}'
|
|
355
361
|
pr: '{{inputs.pr}}'
|
|
356
362
|
source: change
|
|
357
|
-
reviewArtifact:
|
|
363
|
+
reviewArtifact: reviewArtifact
|
|
358
364
|
severity: '{{inputs.fixSeverity}}'
|
|
359
365
|
stackedPrUrl: '{{artifacts.changeRequest.url}}'
|
|
360
366
|
marker: drs-fix-status
|
|
@@ -17,10 +17,31 @@ nodes:
|
|
|
17
17
|
pr: '{{inputs.pr}}'
|
|
18
18
|
output: change
|
|
19
19
|
|
|
20
|
-
|
|
20
|
+
review-artifact:
|
|
21
|
+
action: artifact-exists
|
|
22
|
+
needs:
|
|
23
|
+
- change
|
|
24
|
+
with:
|
|
25
|
+
kind: review
|
|
26
|
+
source: change
|
|
27
|
+
output: reviewArtifactStatus
|
|
28
|
+
|
|
29
|
+
load-review-artifact:
|
|
30
|
+
action: load-artifact
|
|
31
|
+
needs:
|
|
32
|
+
- review-artifact
|
|
33
|
+
if: artifacts.reviewArtifactStatus.exists == true
|
|
34
|
+
with:
|
|
35
|
+
kind: review
|
|
36
|
+
source: change
|
|
37
|
+
output: reviewArtifact
|
|
38
|
+
|
|
39
|
+
visual-with-review:
|
|
21
40
|
agent: visual/pr-explainer
|
|
22
41
|
needs:
|
|
23
42
|
- change
|
|
43
|
+
- load-review-artifact
|
|
44
|
+
if: artifacts.reviewArtifactStatus.exists == true
|
|
24
45
|
input: |
|
|
25
46
|
Generate a visual PR explainer HTML artifact.
|
|
26
47
|
|
|
@@ -31,5 +52,29 @@ nodes:
|
|
|
31
52
|
|
|
32
53
|
DRS change-source context:
|
|
33
54
|
{{artifacts.change}}
|
|
55
|
+
|
|
56
|
+
Current DRS review artifact path: {{artifacts.reviewArtifact.path}}
|
|
57
|
+
|
|
58
|
+
Use the read_artifact tool with this path to include confirmed DRS findings in a clearly labeled section. Do not assume the review JSON is in this prompt.
|
|
59
|
+
writes: '{{inputs.outputPath}}'
|
|
60
|
+
output: visualExplainer
|
|
61
|
+
|
|
62
|
+
visual:
|
|
63
|
+
agent: visual/pr-explainer
|
|
64
|
+
needs:
|
|
65
|
+
- review-artifact
|
|
66
|
+
if: artifacts.reviewArtifactStatus.exists == false
|
|
67
|
+
input: |
|
|
68
|
+
Generate a visual PR explainer HTML artifact.
|
|
69
|
+
|
|
70
|
+
Output path: {{inputs.outputPath}}
|
|
71
|
+
Slide mode: {{inputs.slides}}
|
|
72
|
+
|
|
73
|
+
Use the supplied DRS change-source context. If important file diffs are omitted or summarized, use git_diff for those files before explaining them.
|
|
74
|
+
|
|
75
|
+
DRS change-source context:
|
|
76
|
+
{{artifacts.change}}
|
|
77
|
+
|
|
78
|
+
No current DRS review artifact exists for this PR. Label the artifact as a PR explainer with no DRS findings included.
|
|
34
79
|
writes: '{{inputs.outputPath}}'
|
|
35
80
|
output: visualExplainer
|
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
name: gitlab-mr-fix-review-issues-stacked
|
|
2
2
|
description: Fix high-severity GitLab MR review issues and open a stacked MR
|
|
3
|
+
metadata:
|
|
4
|
+
kind: review
|
|
5
|
+
tags: [review, fix, gitlab, merge-request]
|
|
6
|
+
review:
|
|
7
|
+
source: gitlab-mr
|
|
8
|
+
diff: true
|
|
9
|
+
issues: true
|
|
3
10
|
inputs:
|
|
4
11
|
project: ''
|
|
5
12
|
mr: ''
|
|
@@ -35,7 +42,6 @@ nodes:
|
|
|
35
42
|
if: '{{artifacts.stackGuard.allowed}} == true'
|
|
36
43
|
with:
|
|
37
44
|
source: change
|
|
38
|
-
artifact: persistedReviewArtifact
|
|
39
45
|
output: review
|
|
40
46
|
|
|
41
47
|
threshold:
|
|
@@ -68,7 +74,7 @@ nodes:
|
|
|
68
74
|
|
|
69
75
|
Only fix findings at or above severity {{inputs.severity}} unless a lower-severity issue is directly required by such a fix.
|
|
70
76
|
|
|
71
|
-
Review artifact path: {{artifacts.
|
|
77
|
+
Review artifact path: {{artifacts.reviewArtifact.path}}
|
|
72
78
|
|
|
73
79
|
Use the read_artifact tool with this path to get the finding manifest, then pull full details for specific findings by id. Do not assume the review JSON is in this prompt — call the tool.
|
|
74
80
|
|
|
@@ -118,7 +124,7 @@ nodes:
|
|
|
118
124
|
|
|
119
125
|
Threshold: {{inputs.severity}}, minimum issues: {{inputs.minIssues}}
|
|
120
126
|
|
|
121
|
-
Review artifact: {{artifacts.
|
|
127
|
+
Review artifact: {{artifacts.reviewArtifact.path}}
|
|
122
128
|
|
|
123
129
|
<!-- drs-stack-source: gitlab:{{inputs.project}}!{{inputs.mr}} -->
|
|
124
130
|
<!-- drs-stack-kind: fix -->
|
|
@@ -134,7 +140,7 @@ nodes:
|
|
|
134
140
|
project: '{{inputs.project}}'
|
|
135
141
|
mr: '{{inputs.mr}}'
|
|
136
142
|
source: change
|
|
137
|
-
reviewArtifact:
|
|
143
|
+
reviewArtifact: reviewArtifact
|
|
138
144
|
severity: '{{inputs.severity}}'
|
|
139
145
|
stackedPrUrl: '{{artifacts.changeRequest.url}}'
|
|
140
146
|
marker: drs-fix-status
|
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
name: gitlab-mr-review
|
|
2
2
|
description: Review a GitLab merge request, optionally posting a description, DRS comments, Code Quality, and a visual HTML explainer
|
|
3
|
+
metadata:
|
|
4
|
+
kind: review
|
|
5
|
+
tags: [review, gitlab, merge-request]
|
|
6
|
+
review:
|
|
7
|
+
source: gitlab-mr
|
|
8
|
+
diff: true
|
|
9
|
+
issues: true
|
|
3
10
|
inputs:
|
|
4
11
|
project:
|
|
5
12
|
type: string
|
|
@@ -82,7 +89,6 @@ nodes:
|
|
|
82
89
|
- change
|
|
83
90
|
with:
|
|
84
91
|
source: change
|
|
85
|
-
artifact: persistedReviewArtifact
|
|
86
92
|
output: review
|
|
87
93
|
|
|
88
94
|
visual:
|
|
@@ -170,7 +176,7 @@ nodes:
|
|
|
170
176
|
|
|
171
177
|
Only fix findings at or above severity {{inputs.fixSeverity}} unless a lower-severity issue is directly required by such a fix.
|
|
172
178
|
|
|
173
|
-
Review artifact path: {{artifacts.
|
|
179
|
+
Review artifact path: {{artifacts.reviewArtifact.path}}
|
|
174
180
|
|
|
175
181
|
Use the read_artifact tool with this path to get the finding manifest, then pull full details for specific findings by id. Do not assume the review JSON is in this prompt — call the tool.
|
|
176
182
|
|
|
@@ -217,7 +223,7 @@ nodes:
|
|
|
217
223
|
if: inputs.fixMode == internal
|
|
218
224
|
with:
|
|
219
225
|
source: verificationChange
|
|
220
|
-
reviewArtifact:
|
|
226
|
+
reviewArtifact: reviewArtifact
|
|
221
227
|
severity: '{{inputs.fixSeverity}}'
|
|
222
228
|
output: reReview
|
|
223
229
|
|
|
@@ -228,12 +234,12 @@ nodes:
|
|
|
228
234
|
- fix-change
|
|
229
235
|
if: inputs.fixMode == internal
|
|
230
236
|
with:
|
|
231
|
-
artifact:
|
|
237
|
+
artifact: reviewArtifact
|
|
232
238
|
review: reReview
|
|
233
239
|
fixChange: fixChange
|
|
234
240
|
severity: '{{inputs.fixSeverity}}'
|
|
235
241
|
minIssues: '1'
|
|
236
|
-
output:
|
|
242
|
+
output: reviewArtifact
|
|
237
243
|
|
|
238
244
|
fix-loop:
|
|
239
245
|
control: loop
|
|
@@ -255,7 +261,7 @@ nodes:
|
|
|
255
261
|
project: '{{inputs.project}}'
|
|
256
262
|
mr: '{{inputs.mr}}'
|
|
257
263
|
source: change
|
|
258
|
-
reviewArtifact:
|
|
264
|
+
reviewArtifact: reviewArtifact
|
|
259
265
|
fixReview: reReview
|
|
260
266
|
fixChange: fixChange
|
|
261
267
|
severity: '{{inputs.fixSeverity}}'
|
|
@@ -322,7 +328,7 @@ nodes:
|
|
|
322
328
|
Automated DRS fix stacked on MR !{{inputs.mr}} from the main gitlab-mr-review workflow.
|
|
323
329
|
|
|
324
330
|
Threshold: {{inputs.fixSeverity}}, minimum issues: {{inputs.fixMinIssues}}
|
|
325
|
-
Review artifact: {{artifacts.
|
|
331
|
+
Review artifact: {{artifacts.reviewArtifact.path}}
|
|
326
332
|
|
|
327
333
|
<!-- drs-stack-source: gitlab:{{inputs.project}}!{{inputs.mr}} -->
|
|
328
334
|
<!-- drs-stack-kind: fix -->
|
|
@@ -354,7 +360,7 @@ nodes:
|
|
|
354
360
|
project: '{{inputs.project}}'
|
|
355
361
|
mr: '{{inputs.mr}}'
|
|
356
362
|
source: change
|
|
357
|
-
reviewArtifact:
|
|
363
|
+
reviewArtifact: reviewArtifact
|
|
358
364
|
severity: '{{inputs.fixSeverity}}'
|
|
359
365
|
stackedPrUrl: '{{artifacts.changeRequest.url}}'
|
|
360
366
|
marker: drs-fix-status
|
|
@@ -15,10 +15,31 @@ nodes:
|
|
|
15
15
|
mr: '{{inputs.mr}}'
|
|
16
16
|
output: change
|
|
17
17
|
|
|
18
|
-
|
|
18
|
+
review-artifact:
|
|
19
|
+
action: artifact-exists
|
|
20
|
+
needs:
|
|
21
|
+
- change
|
|
22
|
+
with:
|
|
23
|
+
kind: review
|
|
24
|
+
source: change
|
|
25
|
+
output: reviewArtifactStatus
|
|
26
|
+
|
|
27
|
+
load-review-artifact:
|
|
28
|
+
action: load-artifact
|
|
29
|
+
needs:
|
|
30
|
+
- review-artifact
|
|
31
|
+
if: artifacts.reviewArtifactStatus.exists == true
|
|
32
|
+
with:
|
|
33
|
+
kind: review
|
|
34
|
+
source: change
|
|
35
|
+
output: reviewArtifact
|
|
36
|
+
|
|
37
|
+
visual-with-review:
|
|
19
38
|
agent: visual/pr-explainer
|
|
20
39
|
needs:
|
|
21
40
|
- change
|
|
41
|
+
- load-review-artifact
|
|
42
|
+
if: artifacts.reviewArtifactStatus.exists == true
|
|
22
43
|
input: |
|
|
23
44
|
Generate a visual MR explainer HTML artifact.
|
|
24
45
|
|
|
@@ -29,5 +50,29 @@ nodes:
|
|
|
29
50
|
|
|
30
51
|
DRS change-source context:
|
|
31
52
|
{{artifacts.change}}
|
|
53
|
+
|
|
54
|
+
Current DRS review artifact path: {{artifacts.reviewArtifact.path}}
|
|
55
|
+
|
|
56
|
+
Use the read_artifact tool with this path to include confirmed DRS findings in a clearly labeled section. Do not assume the review JSON is in this prompt.
|
|
57
|
+
writes: '{{inputs.outputPath}}'
|
|
58
|
+
output: visualExplainer
|
|
59
|
+
|
|
60
|
+
visual:
|
|
61
|
+
agent: visual/pr-explainer
|
|
62
|
+
needs:
|
|
63
|
+
- review-artifact
|
|
64
|
+
if: artifacts.reviewArtifactStatus.exists == false
|
|
65
|
+
input: |
|
|
66
|
+
Generate a visual MR explainer HTML artifact.
|
|
67
|
+
|
|
68
|
+
Output path: {{inputs.outputPath}}
|
|
69
|
+
Slide mode: {{inputs.slides}}
|
|
70
|
+
|
|
71
|
+
Use the supplied DRS change-source context. If important file diffs are omitted or summarized, use git_diff for those files before explaining them.
|
|
72
|
+
|
|
73
|
+
DRS change-source context:
|
|
74
|
+
{{artifacts.change}}
|
|
75
|
+
|
|
76
|
+
No current DRS review artifact exists for this MR. Label the artifact as an MR explainer with no DRS findings included.
|
|
32
77
|
writes: '{{inputs.outputPath}}'
|
|
33
78
|
output: visualExplainer
|
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
name: local-fix-review-issues
|
|
2
2
|
description: Fix actionable issues from a saved local DRS review artifact with verification loop
|
|
3
|
+
metadata:
|
|
4
|
+
kind: review
|
|
5
|
+
tags: [review, fix, local]
|
|
6
|
+
review:
|
|
7
|
+
source: local
|
|
8
|
+
diff: true
|
|
9
|
+
issues: true
|
|
3
10
|
inputs:
|
|
4
11
|
review:
|
|
5
12
|
type: string
|
|
@@ -14,7 +21,7 @@ inputs:
|
|
|
14
21
|
fixMaxIterations:
|
|
15
22
|
type: number
|
|
16
23
|
default: 3
|
|
17
|
-
output:
|
|
24
|
+
output: reviewArtifact
|
|
18
25
|
nodes:
|
|
19
26
|
change:
|
|
20
27
|
action: change-source
|
|
@@ -31,7 +38,7 @@ nodes:
|
|
|
31
38
|
kind: review
|
|
32
39
|
source: change
|
|
33
40
|
id: '{{inputs.review}}'
|
|
34
|
-
output:
|
|
41
|
+
output: reviewArtifact
|
|
35
42
|
|
|
36
43
|
fix-issues:
|
|
37
44
|
agent: task/review-issue-fixer
|
|
@@ -42,7 +49,7 @@ nodes:
|
|
|
42
49
|
|
|
43
50
|
Only fix findings at or above severity {{inputs.fixSeverity}} unless a lower-severity issue is directly required by such a fix.
|
|
44
51
|
|
|
45
|
-
Review artifact path: {{artifacts.
|
|
52
|
+
Review artifact path: {{artifacts.reviewArtifact.path}}
|
|
46
53
|
|
|
47
54
|
Use the read_artifact tool with this path to get the finding manifest, then pull full details for specific findings by id. Do not assume the review JSON is in this prompt — call the tool.
|
|
48
55
|
|
|
@@ -77,7 +84,7 @@ nodes:
|
|
|
77
84
|
- verification-change
|
|
78
85
|
with:
|
|
79
86
|
source: verificationChange
|
|
80
|
-
reviewArtifact:
|
|
87
|
+
reviewArtifact: reviewArtifact
|
|
81
88
|
severity: '{{inputs.fixSeverity}}'
|
|
82
89
|
output: reReview
|
|
83
90
|
|
|
@@ -88,12 +95,12 @@ nodes:
|
|
|
88
95
|
- load-review-artifact
|
|
89
96
|
- final-change
|
|
90
97
|
with:
|
|
91
|
-
artifact:
|
|
98
|
+
artifact: reviewArtifact
|
|
92
99
|
review: reReview
|
|
93
100
|
fixChange: finalChange
|
|
94
101
|
severity: '{{inputs.fixSeverity}}'
|
|
95
102
|
minIssues: '1'
|
|
96
|
-
output:
|
|
103
|
+
output: reviewArtifact
|
|
97
104
|
|
|
98
105
|
fix-loop:
|
|
99
106
|
control: loop
|
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
name: local-review
|
|
2
2
|
description: Review local git diff
|
|
3
|
+
metadata:
|
|
4
|
+
kind: review
|
|
5
|
+
tags: [review, local]
|
|
6
|
+
review:
|
|
7
|
+
source: local
|
|
8
|
+
diff: true
|
|
9
|
+
issues: true
|
|
3
10
|
inputs:
|
|
4
11
|
staged:
|
|
5
12
|
type: boolean
|
|
@@ -20,5 +27,4 @@ nodes:
|
|
|
20
27
|
- change
|
|
21
28
|
with:
|
|
22
29
|
source: change
|
|
23
|
-
artifact: persistedReviewArtifact
|
|
24
30
|
output: review
|
|
@@ -13,10 +13,31 @@ nodes:
|
|
|
13
13
|
staged: '{{inputs.staged}}'
|
|
14
14
|
output: change
|
|
15
15
|
|
|
16
|
-
|
|
16
|
+
review-artifact:
|
|
17
|
+
action: artifact-exists
|
|
18
|
+
needs:
|
|
19
|
+
- change
|
|
20
|
+
with:
|
|
21
|
+
kind: review
|
|
22
|
+
source: change
|
|
23
|
+
output: reviewArtifactStatus
|
|
24
|
+
|
|
25
|
+
load-review-artifact:
|
|
26
|
+
action: load-artifact
|
|
27
|
+
needs:
|
|
28
|
+
- review-artifact
|
|
29
|
+
if: artifacts.reviewArtifactStatus.exists == true
|
|
30
|
+
with:
|
|
31
|
+
kind: review
|
|
32
|
+
source: change
|
|
33
|
+
output: reviewArtifact
|
|
34
|
+
|
|
35
|
+
visual-with-review:
|
|
17
36
|
agent: visual/pr-explainer
|
|
18
37
|
needs:
|
|
19
38
|
- change
|
|
39
|
+
- load-review-artifact
|
|
40
|
+
if: artifacts.reviewArtifactStatus.exists == true
|
|
20
41
|
input: |
|
|
21
42
|
Generate a visual local-diff explainer HTML artifact.
|
|
22
43
|
|
|
@@ -27,5 +48,29 @@ nodes:
|
|
|
27
48
|
|
|
28
49
|
DRS change-source context:
|
|
29
50
|
{{artifacts.change}}
|
|
51
|
+
|
|
52
|
+
Current DRS review artifact path: {{artifacts.reviewArtifact.path}}
|
|
53
|
+
|
|
54
|
+
Use the read_artifact tool with this path to include confirmed DRS findings in a clearly labeled section. Do not assume the review JSON is in this prompt.
|
|
55
|
+
writes: '{{inputs.outputPath}}'
|
|
56
|
+
output: visualExplainer
|
|
57
|
+
|
|
58
|
+
visual:
|
|
59
|
+
agent: visual/pr-explainer
|
|
60
|
+
needs:
|
|
61
|
+
- review-artifact
|
|
62
|
+
if: artifacts.reviewArtifactStatus.exists == false
|
|
63
|
+
input: |
|
|
64
|
+
Generate a visual local-diff explainer HTML artifact.
|
|
65
|
+
|
|
66
|
+
Output path: {{inputs.outputPath}}
|
|
67
|
+
Slide mode: {{inputs.slides}}
|
|
68
|
+
|
|
69
|
+
Use the supplied DRS change-source context. If important file diffs are omitted or summarized, use git_diff for those files before explaining them.
|
|
70
|
+
|
|
71
|
+
DRS change-source context:
|
|
72
|
+
{{artifacts.change}}
|
|
73
|
+
|
|
74
|
+
No current DRS review artifact exists for this diff. Label the artifact as a diff explainer with no DRS findings included.
|
|
30
75
|
writes: '{{inputs.outputPath}}'
|
|
31
76
|
output: visualExplainer
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
name: temporal-control-smoke
|
|
2
|
+
description: Smoke test Temporal control-flow execution with safe local write actions
|
|
3
|
+
inputs:
|
|
4
|
+
mode:
|
|
5
|
+
type: enum
|
|
6
|
+
values:
|
|
7
|
+
- loop
|
|
8
|
+
- pass
|
|
9
|
+
- end
|
|
10
|
+
default: loop
|
|
11
|
+
description: 'Control route to exercise: loop, passThrough, or end'
|
|
12
|
+
output: final
|
|
13
|
+
nodes:
|
|
14
|
+
start:
|
|
15
|
+
action: write
|
|
16
|
+
input: '{{inputs.mode}}'
|
|
17
|
+
writes: .drs/artifacts/temporal-smoke/start.txt
|
|
18
|
+
output: mode
|
|
19
|
+
|
|
20
|
+
route:
|
|
21
|
+
control: switch
|
|
22
|
+
needs:
|
|
23
|
+
- start
|
|
24
|
+
value: '{{artifacts.mode}}'
|
|
25
|
+
cases:
|
|
26
|
+
loop: loop-body
|
|
27
|
+
end: stop
|
|
28
|
+
default: pass
|
|
29
|
+
|
|
30
|
+
loop-body:
|
|
31
|
+
action: write
|
|
32
|
+
needs:
|
|
33
|
+
- route
|
|
34
|
+
input: 'loop body for {{artifacts.mode}}'
|
|
35
|
+
writes: .drs/artifacts/temporal-smoke/loop-body.txt
|
|
36
|
+
output: loopBody
|
|
37
|
+
|
|
38
|
+
again:
|
|
39
|
+
control: loop
|
|
40
|
+
needs:
|
|
41
|
+
- loop-body
|
|
42
|
+
if: 'true'
|
|
43
|
+
target: loop-body
|
|
44
|
+
exit: done
|
|
45
|
+
maxIterations: 2
|
|
46
|
+
onMaxIterations: exit
|
|
47
|
+
|
|
48
|
+
pass:
|
|
49
|
+
control: passThrough
|
|
50
|
+
needs:
|
|
51
|
+
- route
|
|
52
|
+
target: done
|
|
53
|
+
|
|
54
|
+
stop:
|
|
55
|
+
control: end
|
|
56
|
+
needs:
|
|
57
|
+
- route
|
|
58
|
+
|
|
59
|
+
done:
|
|
60
|
+
action: write
|
|
61
|
+
input: 'temporal control smoke complete via {{inputs.mode}}'
|
|
62
|
+
writes: .drs/artifacts/temporal-smoke/done.txt
|
|
63
|
+
output: final
|
package/README.md
CHANGED
|
@@ -519,6 +519,45 @@ workflow:
|
|
|
519
519
|
|
|
520
520
|
See [docs/WORKFLOWS.md](docs/WORKFLOWS.md) for the full workflow configuration reference.
|
|
521
521
|
|
|
522
|
+
### Temporal Execution (Experimental)
|
|
523
|
+
|
|
524
|
+
DRS can dispatch workflows through Temporal. The workflow YAML remains the source of truth; DRS compiles it to a JSON plan, runs deterministic scheduling in a generic Temporal workflow, and executes workflow nodes as Temporal activities.
|
|
525
|
+
|
|
526
|
+
Configure Temporal in `.drs/drs.config.yaml` when the defaults do not match your environment:
|
|
527
|
+
|
|
528
|
+
```yaml
|
|
529
|
+
temporal:
|
|
530
|
+
address: localhost:7233
|
|
531
|
+
namespace: default
|
|
532
|
+
taskQueue: drs-workflows
|
|
533
|
+
workflowIdPrefix: drs
|
|
534
|
+
```
|
|
535
|
+
|
|
536
|
+
Start a worker in the repository where node activities should execute:
|
|
537
|
+
|
|
538
|
+
```bash
|
|
539
|
+
drs temporal worker
|
|
540
|
+
```
|
|
541
|
+
|
|
542
|
+
Run a supported workflow through Temporal:
|
|
543
|
+
|
|
544
|
+
```bash
|
|
545
|
+
drs workflow run local-review --executor temporal
|
|
546
|
+
drs workflow run github-pr-show-changes --executor temporal --input owner=octocat --input repo=hello-world --input pr=456
|
|
547
|
+
drs workflow run local-review --executor temporal --no-wait
|
|
548
|
+
drs workflow run local-review --executor temporal --trace
|
|
549
|
+
```
|
|
550
|
+
|
|
551
|
+
For a safe local smoke test that does not require model or platform credentials, run the packaged control-flow workflow:
|
|
552
|
+
|
|
553
|
+
```bash
|
|
554
|
+
drs workflow run temporal-control-smoke --executor temporal --input mode=loop
|
|
555
|
+
drs workflow run temporal-control-smoke --executor temporal --input mode=pass
|
|
556
|
+
drs workflow run temporal-control-smoke --executor temporal --input mode=end
|
|
557
|
+
```
|
|
558
|
+
|
|
559
|
+
Temporal mode is experimental. It supports DAG workflows and DRS control-flow nodes (`loop`, `switch`, `passThrough`, `end`), structured logs, workflow queries, cancellation state, trace artifacts, and side-effect retry safeguards. See [docs/TEMPORAL.md](docs/TEMPORAL.md) for worker deployment, Temporal UI troubleshooting, and opt-in smoke coverage. See [TEMPORAL_EXECUTION_PLAN.md](TEMPORAL_EXECUTION_PLAN.md) for the rollout plan.
|
|
560
|
+
|
|
522
561
|
### Configure Review Behavior
|
|
523
562
|
|
|
524
563
|
Edit `.drs/drs.config.yaml`:
|