feat(tests): let managers escalate and directly resolve disputed tests
Aegis CI / lint-and-test (push) Has been cancelled
Snyk Security Scan / Python vulnerabilities (backend) (push) Has been cancelled
Snyk Security Scan / npm vulnerabilities (frontend) (push) Has been cancelled
Snyk Security Scan / Docker image vulnerabilities (backend) (push) Has been cancelled
Aegis CI / lint-and-test (push) Has been cancelled
Snyk Security Scan / Python vulnerabilities (backend) (push) Has been cancelled
Snyk Security Scan / npm vulnerabilities (frontend) (push) Has been cancelled
Snyk Security Scan / Docker image vulnerabilities (backend) (push) Has been cancelled
Request Discussion only ever nudged the peer lead, and the one-time
manager notification when a dispute starts had no real follow-up
action attached to it — a manager could be told a dispute existed but
had no way to actually do anything about it. Adds:
- POST /tests/{id}/escalate-to-manager — either lead can explicitly
ask managers to step in, distinct from the passive initial notice.
- POST /tests/{id}/manager-resolve-dispute — a manager decides the
final outcome (validated/rejected) directly, bypassing both leads'
votes entirely, reusing the same dual-validation event dispatch so
Jira/notifications behave like any other resolution.
Both leads are notified of the manager's final call, win or lose.
This commit is contained in:
@@ -319,6 +319,26 @@ export async function resolveDispute(testId: string, payload: ResolveDisputePayl
|
||||
return data;
|
||||
}
|
||||
|
||||
/** Either lead on a disputed test asks a manager to step in and decide. */
|
||||
export async function escalateToManager(testId: string): Promise<{ status: string; message: string }> {
|
||||
const { data } = await client.post(`/tests/${testId}/escalate-to-manager`);
|
||||
return data;
|
||||
}
|
||||
|
||||
export interface ManagerResolveDisputePayload {
|
||||
outcome: "validated" | "rejected";
|
||||
notes?: string;
|
||||
}
|
||||
|
||||
/** A manager decides the final outcome of a disputed test directly. */
|
||||
export async function managerResolveDispute(
|
||||
testId: string,
|
||||
payload: ManagerResolveDisputePayload,
|
||||
): Promise<Test> {
|
||||
const { data } = await client.post<Test>(`/tests/${testId}/manager-resolve-dispute`, payload);
|
||||
return data;
|
||||
}
|
||||
|
||||
// ── Reopen ─────────────────────────────────────────────────────────
|
||||
|
||||
/** Reopen a rejected test — moves back to draft. */
|
||||
|
||||
Reference in New Issue
Block a user