Skip to content

Self-hosted, Self-Improving, Federated Everything App — dev management, agent orchestration, persistent mind, digital twin, second brain, and creative pipeline from a single dashboard over Tailscale to port the user into the OS

address review (codex r3): drop the coordinator fossil verdict in the duration rebuild too

[._.]/ Adam Eivy28df032e904e
diff --git a/server/services/taskLearning/metrics.js b/server/services/taskLearning/metrics.js
index 3e3487929b..023e3e07c2 100644
--- a/server/services/taskLearning/metrics.js
+++ b/server/services/taskLearning/metrics.js
@@ -29,6 +29,7 @@ import {
} from './store.js';
import { deriveFailureSignalAvoidance, isNonRoutableLearnedTier } from './routing.js';
import { recordCorrelationSample } from './correlationQuality.js';
+import { isNonCommittingCoordinatorTask } from '../taskTypeHooks.js';
// Cap on retained per-category signature samples — bounds file growth the same
// way `recentUnknownErrors` does, while keeping enough recent context to spot
@@ -878,21 +879,26 @@ export async function recalculateDurationStats() {
agentCount++;
const duration = meta.result?.duration || 0;
+ const archivedTask = {
+ description: meta.metadata?.taskDescription,
+ metadata: meta.metadata,
+ taskType: meta.metadata?.taskType
+ };
// Validation-authoritative outcome (issue #2344), consistent with the live
// recordTaskCompletion path: an archived clean-exit run that missed its
// declared criterion is NOT a success (excluded from success-only ETAs),
// and a commit-found run is a success even on a non-zero exit. Falls back to
// the raw exit-code success for records that predate validationPassed.
- const vp = meta.result?.validationPassed;
+ // A gh/git coordinator's persisted validationPassed is a pre-fix FOSSIL (#2696) —
+ // it never makes a [task-<id>] commit — so drop it here exactly as the backfill
+ // sanitizer and finalize do, or its successful runs would be wrongly excluded and
+ // its success-only ETA underestimated.
+ const vp = isNonCommittingCoordinatorTask(archivedTask) ? null : meta.result?.validationPassed;
const outcomeSuccess = typeof vp === 'boolean' ? vp : !!meta.result?.success;
if (!outcomeSuccess || duration <= 0) continue;
successCount++;
- const taskType = extractTaskType({
- description: meta.metadata?.taskDescription,
- metadata: meta.metadata,
- taskType: meta.metadata?.taskType
- });
+ const taskType = extractTaskType(archivedTask);
if (data.byTaskType[taskType]) {
data.byTaskType[taskType].successDurationMs += duration;