Track fixed and ignored review findings
This commit is contained in:
+38
-1
@@ -570,6 +570,27 @@ paths:
|
||||
items: { $ref: "#/components/schemas/Review" }
|
||||
"404": { $ref: "#/components/responses/Error" }
|
||||
|
||||
/api/reviews/{reviewId}/findings/{index}:
|
||||
parameters:
|
||||
- { name: reviewId, in: path, required: true, schema: { type: string } }
|
||||
- { name: index, in: path, required: true, schema: { type: integer }, description: "The finding's position in the review's findings, from 0." }
|
||||
put:
|
||||
operationId: setFindingState
|
||||
description: Records that the human addressed a finding of a done review, by sending it to the agent to fix or by ignoring it.
|
||||
requestBody:
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema: { $ref: "#/components/schemas/FindingStateUpdate" }
|
||||
responses:
|
||||
"200":
|
||||
description: The review.
|
||||
content:
|
||||
application/json:
|
||||
schema: { $ref: "#/components/schemas/Review" }
|
||||
"400": { $ref: "#/components/responses/Error" }
|
||||
"404": { $ref: "#/components/responses/Error" }
|
||||
|
||||
/api/tasks/{taskId}/snapshots/{n}/fork:
|
||||
parameters:
|
||||
- { name: taskId, in: path, required: true, schema: { type: string } }
|
||||
@@ -1147,7 +1168,7 @@ components:
|
||||
Review:
|
||||
type: object
|
||||
description: An agent session on the vendor the task's agent doesn't use, reviewing one snapshot's change.
|
||||
required: [id, task_id, snapshot_n, agent_session_id, vendor, model, state, error, created_at]
|
||||
required: [id, task_id, snapshot_n, agent_session_id, vendor, model, state, error, created_at, finding_states]
|
||||
properties:
|
||||
id: { type: string }
|
||||
task_id: { type: string }
|
||||
@@ -1164,6 +1185,22 @@ components:
|
||||
error: { type: string, description: "failed: why." }
|
||||
created_at: { type: string, format: date-time }
|
||||
finished_at: { type: string, format: date-time }
|
||||
finding_states:
|
||||
type: object
|
||||
description: "How the human addressed each finding, keyed by its index in result.findings; a finding not listed is open."
|
||||
additionalProperties: { $ref: "#/components/schemas/FindingState" }
|
||||
|
||||
FindingState:
|
||||
type: string
|
||||
enum: [fixed, ignored]
|
||||
x-enum-varnames: [FindingFixed, FindingIgnored]
|
||||
description: "fixed: sent to the task's agent to fix. ignored: dismissed, and left out of the Merge warning."
|
||||
|
||||
FindingStateUpdate:
|
||||
type: object
|
||||
required: [state]
|
||||
properties:
|
||||
state: { $ref: "#/components/schemas/FindingState" }
|
||||
|
||||
AgentSession:
|
||||
type: object
|
||||
|
||||
Reference in New Issue
Block a user