fix routine annotation ci coverage

Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
DottaandPaperclip committed 2026-06-17 14:37:24 +00:00
1 parent 5794bc90f7
commit 37e8851f67
2 files changed
+52

No files matched your search

+12
View File
@@ -10,6 +10,11 @@ import {
companies,
companyMemberships,
createDb,
documentAnnotationAnchorSnapshots,
documentAnnotationComments,
documentAnnotationThreads,
documentRevisions,
documents,
executionWorkspaces,
heartbeatRunEvents,
heartbeatRuns,
@@ -18,6 +23,7 @@ import {
principalPermissionGrants,
projectWorkspaces,
projects,
routineDocuments,
routineRuns,
routines,
routineTriggers,
@@ -96,6 +102,9 @@ describeEmbeddedPostgres("routine routes end-to-end", () => {
afterEach(async () => {
await db.delete(activityLog);
await db.delete(documentAnnotationAnchorSnapshots);
await db.delete(documentAnnotationComments);
await db.delete(documentAnnotationThreads);
await db.delete(routineRuns);
await db.delete(routineTriggers);
await db.delete(heartbeatRunEvents);
@@ -106,7 +115,10 @@ describeEmbeddedPostgres("routine routes end-to-end", () => {
await db.delete(projectWorkspaces);
await db.delete(principalPermissionGrants);
await db.delete(companyMemberships);
await db.delete(routineDocuments);
await db.delete(routines);
await db.delete(documentRevisions);
await db.delete(documents);
await db.delete(projects);
await db.delete(agents);
await db.delete(companies);
+40
View File
@@ -611,6 +611,8 @@ const CREATED_OPERATIONS = new Set([
"POST /api/companies/{companyId}/labels",
"POST /api/issues/{id}/documents/{key}/annotations",
"POST /api/issues/{id}/documents/{key}/annotations/{threadId}/comments",
"POST /api/routines/{id}/description/annotations",
"POST /api/routines/{id}/description/annotations/{threadId}/comments",
"POST /api/issues/{id}/work-products",
"POST /api/issues/{id}/low-trust/promotions",
"POST /api/issues/{id}/approvals",
@@ -4396,6 +4398,44 @@ registerCurrentRoute({
body: updateDocumentAnnotationThreadSchema,
});
for (const route of [
["get", "/api/routines/{id}/description/annotations", "List routine description annotation threads"],
["get", "/api/routines/{id}/description/annotations/{threadId}", "Get a routine description annotation thread"],
] as const) {
registerCurrentRoute({
method: route[0],
path: route[1],
tags: ["routines"],
summary: route[2],
});
}
registerCurrentRoute({
method: "post",
path: "/api/routines/{id}/description/annotations",
tags: ["routines"],
summary: "Create a routine description annotation thread",
body: createDocumentAnnotationThreadSchema,
responses: { 201: r.ok(), 400: r.badRequest, 401: r.unauthorized, 404: r.notFound },
});
registerCurrentRoute({
method: "post",
path: "/api/routines/{id}/description/annotations/{threadId}/comments",
tags: ["routines"],
summary: "Add a routine description annotation comment",
body: createDocumentAnnotationCommentSchema,
responses: { 201: r.ok(), 400: r.badRequest, 401: r.unauthorized, 404: r.notFound },
});
registerCurrentRoute({
method: "patch",
path: "/api/routines/{id}/description/annotations/{threadId}",
tags: ["routines"],
summary: "Update a routine description annotation thread",
body: updateDocumentAnnotationThreadSchema,
});
registerCurrentRoute({
method: "get",
path: "/api/issues/{id}/recovery-actions",