⚡ Project management that doesn't become the project. Boards, Gantt charts, and GitHub integration. Self-host it or use Kaneo Cloud.
TypeScript honoissue-managementissue-trackerjira-alternativekanbanlinear-alternativemcpproject-managementreactself-hostedtypescript
fix(integrations): retire uncertain intents after queued corrections
Tinb1857c6446ef
diff --git a/apps/api/src/plugins/github/services/deferred-issue-edits.ts b/apps/api/src/plugins/github/services/deferred-issue-edits.tsindex 7af1c65e4..881ad14dc 100644--- a/apps/api/src/plugins/github/services/deferred-issue-edits.ts+++ b/apps/api/src/plugins/github/services/deferred-issue-edits.ts@@ -247,6 +247,7 @@ export async function replayDeferredIssueEdits() {repairs.push({field,value: local,+ intentId: uncertain?.intentId,providerValue: values[field],});continue;diff --git a/tests/api-integration/deferred-issue-edits.test.ts b/tests/api-integration/deferred-issue-edits.test.tsindex 04603b234..9ce634ec9 100644--- a/tests/api-integration/deferred-issue-edits.test.ts+++ b/tests/api-integration/deferred-issue-edits.test.ts@@ -1169,3 +1169,44 @@ it("preserves a newer correction queued while its worker reads the provider", asexpect(m.write).toHaveBeenCalledTimes(2);expect((await metadata(link.id)).deferredIssueEdit).toBeUndefined();});++it.each(["github", "gitea"])(+ "retires an uncertain intent after queued %s correction so future genuine edits apply",+ async (provider) => {+ const { task, integration, link } = await seed(provider);+ await db+ .update(schema.externalLinkTable)+ .set({+ metadata: JSON.stringify({+ lastSync: {+ title: outboundStamp(undefined, "A", undefined, {+ intentId: "old-unknown",+ pending: false,+ uncertain: true,+ }),+ },+ }),+ })+ .where(eq(schema.externalLinkTable.id, link.id));+ await deferTaskSync(link, integration, ["title"]);+ await replayDeferredIssueEdits();+ expect(m.write).toHaveBeenCalledWith(+ expect.objectContaining({ title: "B" }),+ );+ expect((await metadata(link.id)).deferredIssueEdit).toBeUndefined();+ m.read.mockResolvedValue({+ title: "A",+ body: "remote",+ state: "open",+ updated_at: "2026-09-30T00:00:05Z",+ });+ await deliverField(+ provider,+ "title",+ "A",+ "2026-09-30T00:00:05Z",+ integration.id,+ );+ expect((await current(task.id))?.title).toBe("A");+ },+);