Preserve watchdog proof classification on repeats

This commit is contained in:
Dotta committed 2026-06-24 22:19:55 +00:00
1 parent d6d7a1e7aa
commit 5e754f07f7
2 files changed
+5 -2

No files matched your search

@@ -421,6 +421,8 @@ describeEmbeddedPostgres("task watchdog scheduler", () => {
.from(issueWatchdogProofOutcomes)
.where(eq(issueWatchdogProofOutcomes.watchdogId, watchdog!.id));
expect(outcomes).toHaveLength(1);
expect(outcomes[0]?.resultClassification).toBe("stopped");
expect(outcomes[0]?.redactedDetails).toEqual(expect.objectContaining({ classification: "stopped" }));
await db
.update(issues)
+3 -2
View File
@@ -1381,6 +1381,7 @@ export function taskWatchdogService(db: Db, deps: TaskWatchdogServiceDeps = {})
if (!outcome) return { watchdog, outcome: null, suppressesCurrentProof: false };
const method = `watchdog_issue_status:${watchdogIssue.status}`;
const resultClassification = classification.state === "already_reviewed" ? "stopped" : classification.state;
await recordWatchdogProofOutcome({
watchdog,
watchdogIssue,
@@ -1388,7 +1389,7 @@ export function taskWatchdogService(db: Db, deps: TaskWatchdogServiceDeps = {})
method,
stopFingerprint,
proofObligationFingerprint,
resultClassification: classification.state,
resultClassification,
redactedDetails: {
version: 1,
target: {
@@ -1396,7 +1397,7 @@ export function taskWatchdogService(db: Db, deps: TaskWatchdogServiceDeps = {})
watchdogIssueId: watchdogIssue.id,
},
method,
classification: classification.state,
classification: resultClassification,
watchdogIssueStatus: watchdogIssue.status,
hasUnresolvedBlocker,
hasPendingReviewPath,