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

fix: say why a maintenance run finished when it skipped inapplicable checks

[._.]/ Adam Eivyb58bc90c3513
diff --git a/server/services/maintenanceRun.js b/server/services/maintenanceRun.js
index 5cb7a0b5d7..64f1b9ec2e 100644
--- a/server/services/maintenanceRun.js
+++ b/server/services/maintenanceRun.js
@@ -355,12 +355,19 @@ async function evaluate(id, { ignoreTaskId }) {
console.log(`🧹 Maintenance run ${id}: dispatched ${taskType} (${step.id})`);
return { dispatched: true, stepId: step.id, taskType, summary: result.summary };
}
+ // Name the skips in the reason the run view shows: a run whose only selected
+ // check did not apply would otherwise finish as a bare "complete" with no
+ // explanation of why nothing ran.
+ const skippedCount = Object.keys({ ...(run.skipped || {}), ...skippedSteps }).length;
+ const reason = skippedCount
+ ? `maintenance sequence complete — skipped ${skippedCount} ${skippedCount === 1 ? 'check that does' : 'checks that do'} not apply to this repository`
+ : 'maintenance sequence complete';
await patchRun(id, {
- completed, ...skippedPatch(run, skippedSteps), active: null, reason: 'maintenance sequence complete',
+ completed, ...skippedPatch(run, skippedSteps), active: null, reason,
status: MAINTENANCE_RUN_STATUS.COMPLETED, finishedAt: new Date().toISOString(),
});
console.log(`🧹 Maintenance run ${id} complete for ${run.appId}`);
- return { dispatched: false, completed: true, reason: 'maintenance sequence complete' };
+ return { dispatched: false, completed: true, reason };
}
/** Merge newly skipped steps into the run's `skipped` map (step id → reason), or add nothing. */
diff --git a/server/services/maintenanceRun.test.js b/server/services/maintenanceRun.test.js
index 5acb87d12a..04442ab624 100644
--- a/server/services/maintenanceRun.test.js
+++ b/server/services/maintenanceRun.test.js
@@ -80,7 +80,10 @@ describe('manual maintenance run', () => {
expect(stored.completed[run.steps[0].id]).toBeTruthy();
expect(stored.skipped).toEqual({ [run.steps[0].id]: 'no user interface found in this repository' });
await __onMaintenanceAgentCompleted(agentFor(run, 1));
- expect((await getMaintenanceRun(run.id)).status).toBe('completed');
+ expect(await getMaintenanceRun(run.id)).toMatchObject({
+ status: 'completed',
+ reason: 'maintenance sequence complete — skipped 1 check that does not apply to this repository',
+ });
});
it.each(['file-issues', 'fix'])('runs only selected quality checks in %s mode with pinned overrides', async (mode) => {