Q205: sprint records never tied to task progress are removed

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
ZacharyZhang-NYandClaude Opus 5.5 committed 2026-10-09 11:27:44 -04:00
1 parent 8861aa4c30
commit 10283f87e5
14 files changed
+16 -82

No files matched your search

@@ -26,8 +26,6 @@ export const collaborationContracts = {
}) satisfies z.ZodType<C.UpdateKnowledgeEntryInput>,
deleteKnowledgeEntry: z.strictObject({ orgId: id, entryId: id, deletedByEmployeeId: id }) satisfies z.ZodType<C.DeleteKnowledgeEntryInput>,
listKnowledgeRevisions: z.strictObject({ orgId: id, entryId: id }) satisfies z.ZodType<C.ListKnowledgeRevisionsInput>,
createSprint: z.strictObject({ orgId: id, name: z.string(), goal: z.string(), startDate: z.string(), endDate: z.string() }) satisfies z.ZodType<C.CreateSprintInput>,
deleteSprint: z.strictObject({ orgId: id, sprintId: id }) satisfies z.ZodType<C.DeleteSprintInput>,
createChatSpace: z.strictObject({
orgId: id, spaceType: z.enum(["company", "division", "department", "project", "pod", "ad_hoc", "direct"]), name: z.string(), topic: z.string(),
visibility: z.enum(["workspace", "restricted"]), retentionPolicy: z.enum(["standard_365d", "restricted_365d"]).optional(),
-4
View File
@@ -23,7 +23,6 @@ import { OperationsService } from "../services/operations-service";
import { TaskExecutionService } from "../services/task-execution-service";
import { DocumentService } from "../services/document-service";
import { KnowledgeService } from "../services/knowledge-service";
import { SprintService } from "../services/sprint-service";
import { ComposioConnectionService } from "../services/composio/composio-connection-service";
import { ConnectorGrantsService } from "../services/composio/connector-grants";
import { approvalDrifts } from "../services/approval-drift";
@@ -90,7 +89,6 @@ export function registerIpcHandlers(deps: IpcDeps): void {
const operations = new OperationsService(deps.connection.db);
const documents = new DocumentService(deps.connection.db);
const knowledge = new KnowledgeService(deps.connection.db);
const sprintService = new SprintService(deps.connection.db);
const onboarding = new OnboardingService({
db: deps.connection.db,
saveProviderCredential: (input) => providers.saveCredential(input),
@@ -238,8 +236,6 @@ export function registerIpcHandlers(deps: IpcDeps): void {
revision: r.revision, topic: r.topic, category: r.category, content: r.content, importance: r.importance,
changedByType: r.changed_by_type, changedById: r.changed_by_id, reason: r.reason, createdAt: r.created_at,
}))));
handle("createSprint", (input) => mutate(() => sprintService.create(input)));
handle("deleteSprint", (input) => mutate(() => sprintService.delete(input)));
handle("createApproval", (input) => mutate(() => approvals.create(input)));
handle("decideApproval", (input) => mutate(() => approvals.decide(input)));
handle("syncEmployeeIdentity", (input) => mutate(() => identityAccess.syncEmployeeIdentity(input)));
@@ -0,0 +1,5 @@
// Sprints were saved but never tracked against tasks; the records are removed rather than kept as a promise.
export const dropSprintsSchema = `
drop index if exists idx_sprints_org;
drop table if exists sprints;
`;
+2
View File
@@ -108,6 +108,7 @@ import { viewStateSchema } from "./migrations/106-view-state";
import { searchPendingSchema } from "./migrations/107-search-pending";
import { dropAutomationRulesSchema } from "./migrations/108-drop-automation-rules";
import { dropMeetingsSchema } from "./migrations/109-drop-meetings";
import { dropSprintsSchema } from "./migrations/110-drop-sprints";
interface Migration {
version: number;
@@ -225,6 +226,7 @@ const MIGRATIONS: Migration[] = [
{ version: 107, name: "search_pending", sql: searchPendingSchema },
{ version: 108, name: "drop_automation_rules", sql: dropAutomationRulesSchema },
{ version: 109, name: "drop_meetings", sql: dropMeetingsSchema },
{ version: 110, name: "drop_sprints", sql: dropSprintsSchema },
];
const SCHEMA_VERSION = MIGRATIONS[MIGRATIONS.length - 1].version;
-1
View File
@@ -151,7 +151,6 @@ export class SnapshotService {
auditEvents: recentInOrg<AppSnapshot["auditEvents"][number]>(this.db, "audit_events", "created_at desc", 200, activeOrgId),
documents: list(this.db, "documents", "updated_at desc"),
knowledgeEntries: list(this.db, "knowledge_entries", "updated_at desc"),
sprints: list(this.db, "sprints", "start_date desc"),
connectorAccounts: list(this.db, "connector_accounts", "toolkit_slug asc"),
connectorGrants: list(this.db, "agent_connector_grants", "toolkit_slug asc, created_at asc"),
};
-36
View File
@@ -1,36 +0,0 @@
import type { DatabaseSync } from "node:sqlite";
import type { CreateSprintInput, DeleteSprintInput } from "../../shared/commands";
import { createId } from "../../shared/ids";
import { AuditService } from "./audit-service";
export class SprintService {
private readonly audit: AuditService;
constructor(private readonly db: DatabaseSync) {
this.audit = new AuditService(db);
}
create(input: CreateSprintInput): string {
const id = createId("spr");
const now = new Date().toISOString();
this.db.prepare(`
insert into sprints(id, org_id, name, goal, status, start_date, end_date, velocity_points, completed_points, retrospective, created_at, updated_at)
values (?, ?, ?, ?, ?, ?, ?, 0, 0, ?, ?, ?)
`).run(id, input.orgId, input.name.trim(), input.goal.trim(), "planned", input.startDate, input.endDate, "", now, now);
this.audit.record({
orgId: input.orgId,
entityType: "sprint",
entityId: id,
actorType: "system",
actorId: null,
action: "created",
payload: { name: input.name.trim() },
});
return id;
}
delete(input: DeleteSprintInput): void {
const result = this.db.prepare("delete from sprints where id = ? and org_id = ?").run(input.sprintId, input.orgId);
if (result.changes === 0) throw new Error("Sprint was not found.");
}
}