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
JavaScript ai-agentsdashboarddeveloper-toolsdigital-twinquantified-selfsecond-brainself-hostedtailscale
feat: rename release-check to do-release and make it ship the release
[._.]/ Adam Eivya9c7b9ba8b6d
diff --git a/client/src/components/apps/AppQualityScheduleForm.test.jsx b/client/src/components/apps/AppQualityScheduleForm.test.jsxindex 9a8e73661b..d49eee6d62 100644--- a/client/src/components/apps/AppQualityScheduleForm.test.jsx+++ b/client/src/components/apps/AppQualityScheduleForm.test.jsx@@ -26,7 +26,7 @@ const response = (overrides = {}) => ({scanned: 120,complete: true,claimTaskTypes: ['claim-work', 'claim-issue', 'plan-task'],- busySources: [{ taskType: 'release-check', cron: '30 3 * * *', origin: 'app' }],+ busySources: [{ taskType: 'do-release', cron: '30 3 * * *', origin: 'app' }],plan: {checksPerDay: 1,slots: [{ taskType: 'security', label: 'Security', day: 1, hour: 9, fileIssues: true, cron: '0 9 * * 1' }],diff --git a/client/src/components/cos/constants.js b/client/src/components/cos/constants.jsindex c11ca2cc99..2adc2a32c7 100644--- a/client/src/components/cos/constants.js+++ b/client/src/components/cos/constants.js@@ -428,6 +428,17 @@ export const BRANCHES_PER_AGENT_OPTIONS = [1, 2, 3, 4, 5, 6].map((value) => ({description: `Give each branch-reconcile coordinator up to ${value} prioritized branch${value === 1 ? '' : 'es'} per run`}));+// do-release options (taskMetadata booleans, each ON unless explicitly false).+// Fields mirror RELEASE_OPTION_KEYS in server/lib/cosValidation.js — the+// server drops any key outside that list.+export const RELEASE_OPTIONS_TASK_TYPES = new Set(['do-release']);+export const RELEASE_OPTIONS = [+ { field: 'finishInFlight', label: 'Finish in-flight work', description: 'Merge or close open PRs and reconcile lingering branches that no running agent owns before releasing' },+ { field: 'mergeDependencyUpdates', label: 'Merge dependency updates', description: 'Merge open Dependabot/Renovate PRs, fixing any that break the build' },+ { field: 'resolveBlockers', label: 'Resolve blockers', description: 'Fix failing tests, red CI, and blocking bugs (delegating to a sub-agent) instead of stopping to report them' },+ { field: 'autoDecide', label: 'Make decisions', description: 'Make routine design and preference decisions and list them for your review, instead of stopping to ask' },+];+// Returns the Tailwind className string for an agent option toggle button.// effective: whether the option is on (global + override resolved)// hasOverride: whether there's an explicit per-app override setdiff --git a/client/src/components/cos/tabs/ScheduleTab.test.jsx b/client/src/components/cos/tabs/ScheduleTab.test.jsxindex cf63d22b2b..d6e96309de 100644--- a/client/src/components/cos/tabs/ScheduleTab.test.jsx+++ b/client/src/components/cos/tabs/ScheduleTab.test.jsx@@ -65,7 +65,7 @@ describe('mergeUpdatedTaskInterval', () => {};const schedule = {tasks: {- 'release-check': {+ 'do-release': {type: 'cron',cronExpression: '0 3 * * 0-6',status: { shouldRun: false, nextRunAt: '2026-09-22T10:00:00.000Z' },@@ -73,10 +73,10 @@ describe('mergeUpdatedTaskInterval', () => {},};- expect(mergeUpdatedTaskInterval(schedule, 'release-check', {+ expect(mergeUpdatedTaskInterval(schedule, 'do-release', {type: 'cron',cronExpression: status.cronExpression,- }, status).tasks['release-check'].status).toEqual(status);+ }, status).tasks['do-release'].status).toEqual(status);});});diff --git a/client/src/components/cos/tabs/WorkflowTab.appSchedules.test.jsx b/client/src/components/cos/tabs/WorkflowTab.appSchedules.test.jsxindex 7645ead6e6..a860fa9f9d 100644--- a/client/src/components/cos/tabs/WorkflowTab.appSchedules.test.jsx+++ b/client/src/components/cos/tabs/WorkflowTab.appSchedules.test.jsx@@ -30,9 +30,9 @@ const graph = ({ appSchedules, occurrences }) => ({windows: [],},nodes: [{- id: 'task:release-check',+ id: 'task:do-release',kind: 'task',- label: 'release-check',+ label: 'do-release',enabled: true,schedule: { type: 'on-demand' },totalAppCount: 2,@@ -46,8 +46,8 @@ const graph = ({ appSchedules, occurrences }) => ({const APP_SCHEDULED = graph({appSchedules: [{ appId: 'acme', appName: 'Acme', cronExpression: '0 7 * * *', nextRunAt: new Date(NOW.getTime() + 7 * HOUR).toISOString() }],occurrences: [{- id: 'task:release-check:launch:1',- nodeId: 'task:release-check',+ id: 'task:do-release:launch:1',+ nodeId: 'task:do-release',at: new Date(NOW.getTime() + 7 * HOUR).toISOString(),kind: 'launch',apps: ['acme'],@@ -60,7 +60,7 @@ const render_ = async (data) => {render(<MemoryRouter><WorkflowTab apps={[]} providers={[]} /></MemoryRouter>);});// The label appears on the track AND on its 'Scheduled order' chip.- await screen.findAllByText('release-check');+ await screen.findAllByText('do-release');};beforeEach(() => vi.clearAllMocks());diff --git a/client/src/components/cos/tabs/schedule/GlobalConfigControls.jsx b/client/src/components/cos/tabs/schedule/GlobalConfigControls.jsxindex 2386992859..6dbd56186b 100644--- a/client/src/components/cos/tabs/schedule/GlobalConfigControls.jsx+++ b/client/src/components/cos/tabs/schedule/GlobalConfigControls.jsx@@ -2,7 +2,7 @@ import { useState, useEffect, useMemo } from 'react';import useFieldDraft from '../../../../hooks/useFieldDraft';import { RotateCcw, AlertCircle } from 'lucide-react';import CronInput from '../../../CronInput';-import { AGENT_OPTIONS, BRANCHES_PER_AGENT_DEFAULT, BRANCHES_PER_AGENT_OPTIONS, BRANCHES_PER_AGENT_TASK_TYPES, DEFAULT_REVIEW_STOP_MODE, REVIEWER_OVERRIDE_KEYS as REVIEW_CONFIG_KEYS, IMPLICIT_PR_COMPLETION, PR_AUTHOR_FILTER_OPTIONS, PR_COMPLETION_OPTIONS, pinnedPrCompletion, prCompletionOption, ISSUE_AUTHOR_FILTER_OPTIONS, ISSUE_AUTHOR_FILTER_TASK_TYPES, SWARM_COUNT_OPTIONS, SWARM_TASK_TYPES } from '../../constants';+import { AGENT_OPTIONS, BRANCHES_PER_AGENT_DEFAULT, BRANCHES_PER_AGENT_OPTIONS, BRANCHES_PER_AGENT_TASK_TYPES, DEFAULT_REVIEW_STOP_MODE, REVIEWER_OVERRIDE_KEYS as REVIEW_CONFIG_KEYS, IMPLICIT_PR_COMPLETION, PR_AUTHOR_FILTER_OPTIONS, PR_COMPLETION_OPTIONS, pinnedPrCompletion, prCompletionOption, RELEASE_OPTIONS, RELEASE_OPTIONS_TASK_TYPES, ISSUE_AUTHOR_FILTER_OPTIONS, ISSUE_AUTHOR_FILTER_TASK_TYPES, SWARM_COUNT_OPTIONS, SWARM_TASK_TYPES } from '../../constants';import ReviewerPicker from '../../ReviewerPicker';import Banner from '../../../ui/Banner';import InfoTooltip from '../../../ui/InfoTooltip';@@ -175,6 +175,16 @@ export default function GlobalConfigControls({ taskType, config, onUpdate, onTrisetUpdating(false);};+ // Release options are ON unless explicitly false, so the toggle writes an+ // explicit boolean either way.+ const handleReleaseOptionToggle = async (field) => {+ setUpdating(true);+ await onUpdate(taskType, {+ taskMetadata: { ...(config.taskMetadata || {}), [field]: config.taskMetadata?.[field] === false }+ });+ setUpdating(false);+ };+const handleBranchesPerAgentChange = async (value) => {setUpdating(true);await onUpdate(taskType, {@@ -589,6 +599,34 @@ export default function GlobalConfigControls({ taskType, config, onUpdate, onTri</div>)}+ {RELEASE_OPTIONS_TASK_TYPES.has(taskType) && (+ <div>+ <span className="text-sm text-gray-400 block mb-2">Release Options</span>+ <div className="space-y-2">+ {RELEASE_OPTIONS.map(({ field, label, description }) => {+ const enabled = config.taskMetadata?.[field] !== false;+ return (+ <button+ key={field}+ type="button"+ disabled={updating}+ aria-pressed={enabled}+ aria-label={`${enabled ? 'Disable' : 'Enable'} ${label.toLowerCase()}`}+ className={`w-full flex items-center justify-between gap-3 min-h-[44px] rounded px-2 -mx-2 text-left ${updating ? 'opacity-60 cursor-not-allowed' : 'cursor-pointer hover:bg-port-card/30 active:bg-port-card/50'}`}+ onClick={() => handleReleaseOptionToggle(field)}+ >+ <div className="min-w-0 flex-1">+ <span className="text-sm text-white">{label}</span>+ <p className="text-xs text-gray-500">{description}</p>+ </div>+ <ToggleSwitch enabled={enabled} disabled={updating} decorative />+ </button>+ );+ })}+ </div>+ </div>+ )}+<PromptEditorconfig={config}promptValue={promptValue}diff --git a/client/src/components/cos/tabs/schedule/GlobalConfigControls.test.jsx b/client/src/components/cos/tabs/schedule/GlobalConfigControls.test.jsxindex a7271f5b2a..7ff71efa86 100644--- a/client/src/components/cos/tabs/schedule/GlobalConfigControls.test.jsx+++ b/client/src/components/cos/tabs/schedule/GlobalConfigControls.test.jsx@@ -242,25 +242,47 @@ describe('GlobalConfigControls — issue exclude labels', () => {describe('GlobalConfigControls — require approval', () => {it('toggles requireApproval on the task metadata', () => {- const onUpdate = renderControls({ taskType: 'release-check', taskMetadata: { useWorktree: false, openPR: false } });+ const onUpdate = renderControls({ taskType: 'do-release', taskMetadata: { useWorktree: false, openPR: false } });fireEvent.click(screen.getByRole('button', { name: /Require approval/i }));- expect(onUpdate).toHaveBeenCalledWith('release-check', {+ expect(onUpdate).toHaveBeenCalledWith('do-release', {taskMetadata: { useWorktree: false, openPR: false, requireApproval: true },});});it('turns requireApproval off when it is already on', () => {const onUpdate = renderControls({- taskType: 'release-check',+ taskType: 'do-release',taskMetadata: { requireApproval: true },});fireEvent.click(screen.getByRole('button', { name: /Require approval/i }));- expect(onUpdate).toHaveBeenCalledWith('release-check', {+ expect(onUpdate).toHaveBeenCalledWith('do-release', {taskMetadata: { requireApproval: false },});});});+describe('GlobalConfigControls — release options', () => {+ it('is hidden for other tasks', () => {+ renderControls();+ expect(screen.queryByText('Release Options')).not.toBeInTheDocument();+ });++ it('shows options ON by default and writes an explicit false when turned off', () => {+ const onUpdate = renderControls({ taskType: 'do-release', taskMetadata: { slashdoCommand: 'release', resolveBlockers: false } });+ expect(screen.getByRole('button', { name: 'Disable merge dependency updates' })).toHaveAttribute('aria-pressed', 'true');+ fireEvent.click(screen.getByRole('button', { name: 'Disable merge dependency updates' }));+ expect(onUpdate).toHaveBeenCalledWith('do-release', {+ taskMetadata: { slashdoCommand: 'release', resolveBlockers: false, mergeDependencyUpdates: false },+ });+ });++ it('turns an explicitly disabled option back on', () => {+ const onUpdate = renderControls({ taskType: 'do-release', taskMetadata: { resolveBlockers: false } });+ fireEvent.click(screen.getByRole('button', { name: 'Enable resolve blockers' }));+ expect(onUpdate).toHaveBeenCalledWith('do-release', { taskMetadata: { resolveBlockers: true } });+ });+});+describe('GlobalConfigControls — file issues only', () => {it('is hidden for non-audit tasks', () => {renderControls();diff --git a/scripts/lib/renameScheduledTaskType.js b/scripts/lib/renameScheduledTaskType.jsnew file mode 100644index 0000000000..62a66fc3a5--- /dev/null+++ b/scripts/lib/renameScheduledTaskType.js@@ -0,0 +1,195 @@+/**+ * Rename a scheduled task type in an install's persisted CoS state while+ * preserving schedules, app overrides, pending runs, execution history, and+ * run-order dependencies.+ *+ * Task configs are operator-owned records, so when both keys are present the+ * retired key's config is merged UNDER the current one (current wins) and only+ * then removed. Idempotent; it never dispatches work. Shared by the rename+ * migrations (408 react-lifecycle → ui-lifecycle, 417 release-check → do-release).+ */++import { readFile } from 'fs/promises';+import { join } from 'path';+import { atomicWrite } from '../../server/lib/fileCore.js';++const SCHEDULE_PATH = join('data', 'cos', 'task-schedule.json');+const APPS_PATH = join('data', 'apps.json');++const isObject = (value) => Boolean(value) && typeof value === 'object' && !Array.isArray(value);+const hasOwn = (value, key) => Object.prototype.hasOwnProperty.call(value, key);++async function readJson(rootDir, relPath) {+ const fullPath = join(rootDir, relPath);+ const raw = await readFile(fullPath, 'utf-8').catch((err) => {+ if (err.code === 'ENOENT') return null;+ throw err;+ });+ if (raw == null) return null;+ try {+ return { fullPath, value: JSON.parse(raw) };+ } catch (err) {+ throw new Error(`${relPath} is not valid JSON (${err.message}) — repair it and re-run migrations`);+ }+}++const writeJson = (fullPath, value) => atomicWrite(fullPath, `${JSON.stringify(value, null, 2)}\n`);++function mergeConfig(legacy, current, renameTaskType) {+ const oldConfig = isObject(legacy) ? legacy : {};+ const newConfig = isObject(current) ? current : {};+ const merged = { ...oldConfig, ...newConfig };+ if (hasOwn(newConfig, 'taskMetadata') && newConfig.taskMetadata === null) {+ merged.taskMetadata = null;+ } else if (isObject(oldConfig.taskMetadata) || isObject(newConfig.taskMetadata)) {+ merged.taskMetadata = {+ ...(isObject(oldConfig.taskMetadata) ? oldConfig.taskMetadata : {}),+ ...(isObject(newConfig.taskMetadata) ? newConfig.taskMetadata : {}),+ };+ }+ if (Array.isArray(oldConfig.runAfter) || Array.isArray(newConfig.runAfter)) {+ merged.runAfter = [...new Set([+ ...(Array.isArray(oldConfig.runAfter) ? oldConfig.runAfter : []),+ ...(Array.isArray(newConfig.runAfter) ? newConfig.runAfter : []),+ ].map(renameTaskType))];+ }+ return merged;+}++function newerTimestamp(left, right) {+ if (!left) return right || left;+ if (!right) return left;+ const leftTime = Date.parse(left);+ const rightTime = Date.parse(right);+ if (Number.isFinite(leftTime) && Number.isFinite(rightTime)) return rightTime > leftTime ? right : left;+ if (Number.isFinite(rightTime)) return right;+ if (Number.isFinite(leftTime)) return left;+ return right;+}++function mergeExecutionRecord(legacy, current) {+ const oldRecord = isObject(legacy) ? legacy : {};+ const newRecord = isObject(current) ? current : {};+ const merged = { ...oldRecord, ...newRecord };+ if (Number.isFinite(oldRecord.count) || Number.isFinite(newRecord.count)) {+ merged.count = (Number.isFinite(oldRecord.count) ? oldRecord.count : 0)+ + (Number.isFinite(newRecord.count) ? newRecord.count : 0);+ }+ if (oldRecord.lastRun || newRecord.lastRun) {+ merged.lastRun = newerTimestamp(oldRecord.lastRun, newRecord.lastRun);+ }++ if (isObject(oldRecord.perApp) || isObject(newRecord.perApp)) {+ merged.perApp = { ...(isObject(oldRecord.perApp) ? oldRecord.perApp : {}) };+ for (const [appId, record] of Object.entries(isObject(newRecord.perApp) ? newRecord.perApp : {})) {+ merged.perApp[appId] = mergeExecutionRecord(merged.perApp[appId], record);+ }+ }+ return merged;+}++// Rename + dedupe a task-type list; null when nothing changed.+function renameList(list, renameTaskType) {+ const renamed = [...new Set(list.map(renameTaskType))];+ const unchanged = renamed.length === list.length && renamed.every((taskType, index) => taskType === list[index]);+ return unchanged ? null : renamed;+}++function migrateSchedule(schedule, { from, to, renameTaskType }) {+ const fromExecution = `task:${from}`;+ const toExecution = `task:${to}`;+ if (!isObject(schedule)) return { changed: false, pendingRequests: 0 };+ let changed = false;+ let pendingRequests = 0;++ if (isObject(schedule.tasks)) {+ if (hasOwn(schedule.tasks, from)) {+ schedule.tasks[to] = mergeConfig(schedule.tasks[from], schedule.tasks[to], renameTaskType);+ delete schedule.tasks[from];+ changed = true;+ }+ for (const config of Object.values(schedule.tasks)) {+ if (!isObject(config) || !Array.isArray(config.runAfter)) continue;+ const renamed = renameList(config.runAfter, renameTaskType);+ if (renamed) {+ config.runAfter = renamed;+ changed = true;+ }+ }+ }++ if (isObject(schedule.executions) && hasOwn(schedule.executions, fromExecution)) {+ schedule.executions[toExecution] = mergeExecutionRecord(+ schedule.executions[fromExecution],+ schedule.executions[toExecution],+ );+ delete schedule.executions[fromExecution];+ changed = true;+ }++ if (Array.isArray(schedule.onDemandRequests)) {+ for (const request of schedule.onDemandRequests) {+ if (request?.taskType !== from) continue;+ request.taskType = to;+ pendingRequests += 1;+ changed = true;+ }+ }++ return { changed, pendingRequests };+}++function migrateApp(app, { from, to, renameTaskType }) {+ if (!isObject(app)) return false;+ let changed = false;++ if (isObject(app.taskTypeOverrides) && hasOwn(app.taskTypeOverrides, from)) {+ app.taskTypeOverrides[to] = mergeConfig(+ app.taskTypeOverrides[from],+ app.taskTypeOverrides[to],+ renameTaskType,+ );+ delete app.taskTypeOverrides[from];+ changed = true;+ }++ if (Array.isArray(app.disabledTaskTypes)) {+ const renamed = renameList(app.disabledTaskTypes, renameTaskType);+ if (renamed) {+ app.disabledTaskTypes = renamed;+ changed = true;+ }+ }++ return changed;+}++export async function renameScheduledTaskType({ rootDir, from, to }) {+ const names = {+ from,+ to,+ renameTaskType: (taskType) => (taskType === from ? to : taskType),+ };+ let schedules = 0;+ let pendingRequests = 0;+ const storedSchedule = await readJson(rootDir, SCHEDULE_PATH);+ if (storedSchedule) {+ const result = migrateSchedule(storedSchedule.value, names);+ if (result.changed) {+ await writeJson(storedSchedule.fullPath, storedSchedule.value);+ schedules = 1;+ pendingRequests = result.pendingRequests;+ }+ }++ const storedApps = await readJson(rootDir, APPS_PATH);+ let migratedApps = 0;+ if (isObject(storedApps?.value?.apps)) {+ for (const app of Object.values(storedApps.value.apps)) {+ if (migrateApp(app, names)) migratedApps += 1;+ }+ if (migratedApps) await writeJson(storedApps.fullPath, storedApps.value);+ }++ return { schedules, pendingRequests, migratedApps };+}diff --git a/scripts/migrations/281-reconcile-missing-releases-prompt.js b/scripts/migrations/281-reconcile-missing-releases-prompt.jsindex e16de12042..3fed2e2c30 100644--- a/scripts/migrations/281-reconcile-missing-releases-prompt.js+++ b/scripts/migrations/281-reconcile-missing-releases-prompt.js@@ -41,12 +41,12 @@ export default {const task = schedule.tasks['release-check'];const currentVersion = task.promptVersion || 1;- if (!task.promptCustomized && currentVersion < PROMPT_VERSIONS['release-check']) {- task.prompt = DEFAULT_TASK_PROMPTS['release-check'];- task.promptVersion = PROMPT_VERSIONS['release-check'];+ if (!task.promptCustomized && currentVersion < PROMPT_VERSIONS['do-release']) {+ task.prompt = DEFAULT_TASK_PROMPTS['do-release'];+ task.promptVersion = PROMPT_VERSIONS['do-release'];await writeJson(fullPath, schedule);updatedCount += 1;- console.log(`📝 ${relPath}: upgraded release-check prompt v${currentVersion} → v${PROMPT_VERSIONS['release-check']}`);+ console.log(`📝 ${relPath}: upgraded release-check prompt v${currentVersion} → v${PROMPT_VERSIONS['do-release']}`);}}return { updated: updatedCount };diff --git a/scripts/migrations/281-reconcile-missing-releases-prompt.test.js b/scripts/migrations/281-reconcile-missing-releases-prompt.test.jsindex 9c0751598a..aa49e4582e 100644--- a/scripts/migrations/281-reconcile-missing-releases-prompt.test.js+++ b/scripts/migrations/281-reconcile-missing-releases-prompt.test.js@@ -42,9 +42,9 @@ describe('migration 281 — upgrade release-check task prompt to v9', () => {const result = await migration.up({ rootDir });expect(result.updated).toBe(1);const updated = readJson(schedulePath);- expect(updated.tasks['release-check'].promptVersion).toBe(PROMPT_VERSIONS['release-check']);+ expect(updated.tasks['release-check'].promptVersion).toBe(PROMPT_VERSIONS['do-release']);expect(updated.tasks['release-check'].promptVersion).toBeGreaterThanOrEqual(9);- expect(updated.tasks['release-check'].prompt).toBe(DEFAULT_TASK_PROMPTS['release-check']);+ expect(updated.tasks['release-check'].prompt).toBe(DEFAULT_TASK_PROMPTS['do-release']);});it('leaves a user-customized release-check prompt untouched', async () => {diff --git a/scripts/migrations/293-agents-md-prompt-rename.js b/scripts/migrations/293-agents-md-prompt-rename.jsindex 4ce9c3ec3d..31e2bb3027 100644--- a/scripts/migrations/293-agents-md-prompt-rename.js+++ b/scripts/migrations/293-agents-md-prompt-rename.js@@ -12,6 +12,7 @@import { readFile, writeFile } from 'fs/promises';import { join } from 'path';import { DEFAULT_TASK_PROMPTS, PROMPT_VERSIONS } from '../../server/services/taskPromptDefaults.js';+import { currentTaskTypeName } from '../../server/lib/scheduledTaskTypes.js';const SCHEDULE_PATHS = [join('data', 'cos', 'task-schedule.json'),@@ -53,13 +54,15 @@ export default {for (const key of TASK_KEYS) {const task = schedule.tasks[key];if (!task) continue;+ // release-check was renamed do-release; migration 417 moves the task later.+ const promptKey = currentTaskTypeName(key);const currentVersion = task.promptVersion || 1;- if (task.promptCustomized || currentVersion >= PROMPT_VERSIONS[key]) continue;- task.prompt = DEFAULT_TASK_PROMPTS[key];- task.promptVersion = PROMPT_VERSIONS[key];+ if (task.promptCustomized || currentVersion >= PROMPT_VERSIONS[promptKey]) continue;+ task.prompt = DEFAULT_TASK_PROMPTS[promptKey];+ task.promptVersion = PROMPT_VERSIONS[promptKey];dirty = true;updatedCount += 1;- console.log(`📝 ${relPath}: upgraded ${key} prompt v${currentVersion} → v${PROMPT_VERSIONS[key]}`);+ console.log(`📝 ${relPath}: upgraded ${key} prompt v${currentVersion} → v${PROMPT_VERSIONS[promptKey]}`);}if (dirty) await writeFile(fullPath, `${JSON.stringify(schedule, null, 2)}\n`);}diff --git a/scripts/migrations/293-agents-md-prompt-rename.test.js b/scripts/migrations/293-agents-md-prompt-rename.test.jsindex 2215cab2cb..df84756178 100644--- a/scripts/migrations/293-agents-md-prompt-rename.test.js+++ b/scripts/migrations/293-agents-md-prompt-rename.test.js@@ -29,7 +29,7 @@ describe('migration 293 — AGENTS.md prompt rename', () => {writeJson(schedulePath, {tasks: {'claim-issue': { prompt: outgoing('claim-issue'), promptVersion: PROMPT_VERSIONS['claim-issue'] - 1 },- 'release-check': { prompt: outgoing('release-check'), promptVersion: PROMPT_VERSIONS['release-check'] - 1 },+ 'release-check': { prompt: outgoing('do-release'), promptVersion: PROMPT_VERSIONS['do-release'] - 1 },'stash-cleanup': { prompt: outgoing('stash-cleanup'), promptVersion: 1 },},});@@ -38,9 +38,10 @@ describe('migration 293 — AGENTS.md prompt rename', () => {const tasks = readJson(schedulePath).tasks;expect(result.updated).toBe(3);- for (const key of ['claim-issue', 'release-check', 'stash-cleanup']) {- expect(tasks[key].prompt).toBe(DEFAULT_TASK_PROMPTS[key]);- expect(tasks[key].promptVersion).toBe(PROMPT_VERSIONS[key]);+ // release-check is stored under its old key until migration 417 renames it.+ for (const [key, promptKey] of [['claim-issue', 'claim-issue'], ['release-check', 'do-release'], ['stash-cleanup', 'stash-cleanup']]) {+ expect(tasks[key].prompt).toBe(DEFAULT_TASK_PROMPTS[promptKey]);+ expect(tasks[key].promptVersion).toBe(PROMPT_VERSIONS[promptKey]);expect(tasks[key].prompt).toContain('AGENTS.md');}});diff --git a/scripts/migrations/297-release-check-slashdo-review-prompt.js b/scripts/migrations/297-release-check-slashdo-review-prompt.jsindex c958a339c1..35bf9dde2e 100644--- a/scripts/migrations/297-release-check-slashdo-review-prompt.js+++ b/scripts/migrations/297-release-check-slashdo-review-prompt.js@@ -40,13 +40,13 @@ export default {if (!task) continue;const currentVersion = task.promptVersion || 1;- if (task.promptCustomized || currentVersion >= PROMPT_VERSIONS['release-check']) continue;+ if (task.promptCustomized || currentVersion >= PROMPT_VERSIONS['do-release']) continue;- task.prompt = DEFAULT_TASK_PROMPTS['release-check'];- task.promptVersion = PROMPT_VERSIONS['release-check'];+ task.prompt = DEFAULT_TASK_PROMPTS['do-release'];+ task.promptVersion = PROMPT_VERSIONS['do-release'];await writeFile(fullPath, `${JSON.stringify(schedule, null, 2)}\n`);updatedCount += 1;- console.log(`📝 ${relPath}: upgraded release-check prompt v${currentVersion} → v${PROMPT_VERSIONS['release-check']}`);+ console.log(`📝 ${relPath}: upgraded release-check prompt v${currentVersion} → v${PROMPT_VERSIONS['do-release']}`);}return { updated: updatedCount };},diff --git a/scripts/migrations/297-release-check-slashdo-review-prompt.test.js b/scripts/migrations/297-release-check-slashdo-review-prompt.test.jsindex 47531fb3a7..a2d3f1d270 100644--- a/scripts/migrations/297-release-check-slashdo-review-prompt.test.js+++ b/scripts/migrations/297-release-check-slashdo-review-prompt.test.js@@ -40,16 +40,16 @@ describe('migration 297 — upgrade release-check task prompt to the slashdo-bacexpect(result.updated).toBe(2);expect(readJson(cosPath).tasks['release-check']).toEqual({- promptVersion: PROMPT_VERSIONS['release-check'],+ promptVersion: PROMPT_VERSIONS['do-release'],promptCustomized: false,- prompt: DEFAULT_TASK_PROMPTS['release-check'],+ prompt: DEFAULT_TASK_PROMPTS['do-release'],});expect(readJson(cosPath).tasks.custom).toEqual({promptVersion: 10,promptCustomized: true,prompt: 'keep this',});- expect(readJson(legacyPath).tasks['release-check'].prompt).toBe(DEFAULT_TASK_PROMPTS['release-check']);+ expect(readJson(legacyPath).tasks['release-check'].prompt).toBe(DEFAULT_TASK_PROMPTS['do-release']);});it('does not create a schedule when neither location exists', async () => {diff --git a/scripts/migrations/308-release-check-advisory-review-prompt.js b/scripts/migrations/308-release-check-advisory-review-prompt.jsindex ed3558e9cd..eb17c128af 100644--- a/scripts/migrations/308-release-check-advisory-review-prompt.js+++ b/scripts/migrations/308-release-check-advisory-review-prompt.js@@ -39,13 +39,13 @@ export default {if (!task) continue;const currentVersion = task.promptVersion || 1;- if (task.promptCustomized || currentVersion >= PROMPT_VERSIONS['release-check']) continue;+ if (task.promptCustomized || currentVersion >= PROMPT_VERSIONS['do-release']) continue;- task.prompt = DEFAULT_TASK_PROMPTS['release-check'];- task.promptVersion = PROMPT_VERSIONS['release-check'];+ task.prompt = DEFAULT_TASK_PROMPTS['do-release'];+ task.promptVersion = PROMPT_VERSIONS['do-release'];await writeFile(fullPath, `${JSON.stringify(schedule, null, 2)}\n`);updatedCount += 1;- console.log(`📝 ${relPath}: upgraded release-check prompt v${currentVersion} → v${PROMPT_VERSIONS['release-check']}`);+ console.log(`📝 ${relPath}: upgraded release-check prompt v${currentVersion} → v${PROMPT_VERSIONS['do-release']}`);}return { updated: updatedCount };},diff --git a/scripts/migrations/308-release-check-advisory-review-prompt.test.js b/scripts/migrations/308-release-check-advisory-review-prompt.test.jsindex e89ee9588c..98ed75c965 100644--- a/scripts/migrations/308-release-check-advisory-review-prompt.test.js+++ b/scripts/migrations/308-release-check-advisory-review-prompt.test.js@@ -42,23 +42,23 @@ describe('migration 308 — make release-check review advisory', () => {expect(result.updated).toBe(2);expect(readJson(cosPath).tasks['release-check']).toEqual({- promptVersion: PROMPT_VERSIONS['release-check'],+ promptVersion: PROMPT_VERSIONS['do-release'],promptCustomized: false,- prompt: DEFAULT_TASK_PROMPTS['release-check'],+ prompt: DEFAULT_TASK_PROMPTS['do-release'],});expect(readJson(cosPath).tasks.custom).toEqual({promptVersion: 11,promptCustomized: true,prompt: 'keep this',});- expect(readJson(legacyPath).tasks['release-check'].prompt).toBe(DEFAULT_TASK_PROMPTS['release-check']);+ expect(readJson(legacyPath).tasks['release-check'].prompt).toBe(DEFAULT_TASK_PROMPTS['do-release']);});it('does not rewrite a current or customized prompt', async () => {const path = join(rootDir, 'data', 'cos', 'task-schedule.json');writeJson(path, {tasks: {- current: { promptVersion: PROMPT_VERSIONS['release-check'], promptCustomized: false, prompt: DEFAULT_TASK_PROMPTS['release-check'] },+ current: { promptVersion: PROMPT_VERSIONS['do-release'], promptCustomized: false, prompt: DEFAULT_TASK_PROMPTS['do-release'] },custom: { promptVersion: 11, promptCustomized: true, prompt: 'custom release policy' },},});diff --git a/scripts/migrations/332-release-check-fix-blockers-prompt.js b/scripts/migrations/332-release-check-fix-blockers-prompt.jsindex fbf2bcebe5..c7e5194a98 100644--- a/scripts/migrations/332-release-check-fix-blockers-prompt.js+++ b/scripts/migrations/332-release-check-fix-blockers-prompt.js@@ -39,13 +39,13 @@ export default {if (!task) continue;const currentVersion = task.promptVersion || 1;- if (task.promptCustomized || currentVersion >= PROMPT_VERSIONS['release-check']) continue;+ if (task.promptCustomized || currentVersion >= PROMPT_VERSIONS['do-release']) continue;- task.prompt = DEFAULT_TASK_PROMPTS['release-check'];- task.promptVersion = PROMPT_VERSIONS['release-check'];+ task.prompt = DEFAULT_TASK_PROMPTS['do-release'];+ task.promptVersion = PROMPT_VERSIONS['do-release'];await writeFile(fullPath, `${JSON.stringify(schedule, null, 2)}\n`);updatedCount += 1;- console.log(`📝 ${relPath}: upgraded release-check prompt v${currentVersion} → v${PROMPT_VERSIONS['release-check']}`);+ console.log(`📝 ${relPath}: upgraded release-check prompt v${currentVersion} → v${PROMPT_VERSIONS['do-release']}`);}return { updated: updatedCount };},diff --git a/scripts/migrations/332-release-check-fix-blockers-prompt.test.js b/scripts/migrations/332-release-check-fix-blockers-prompt.test.jsindex af07d96d65..c782d27cad 100644--- a/scripts/migrations/332-release-check-fix-blockers-prompt.test.js+++ b/scripts/migrations/332-release-check-fix-blockers-prompt.test.js@@ -42,16 +42,16 @@ describe('migration 332 — make release-check fix release blockers', () => {expect(result.updated).toBe(2);expect(readJson(cosPath).tasks['release-check']).toEqual({- promptVersion: PROMPT_VERSIONS['release-check'],+ promptVersion: PROMPT_VERSIONS['do-release'],promptCustomized: false,- prompt: DEFAULT_TASK_PROMPTS['release-check'],+ prompt: DEFAULT_TASK_PROMPTS['do-release'],});expect(readJson(cosPath).tasks.custom).toEqual({promptVersion: 12,promptCustomized: true,prompt: 'keep this',});- expect(readJson(legacyPath).tasks['release-check'].prompt).toBe(DEFAULT_TASK_PROMPTS['release-check']);+ expect(readJson(legacyPath).tasks['release-check'].prompt).toBe(DEFAULT_TASK_PROMPTS['do-release']);});// Both guards are keyed on the 'release-check' task itself, so the mocks must be@@ -63,9 +63,9 @@ describe('migration 332 — make release-check fix release blockers', () => {writeJson(cosPath, {tasks: {'release-check': {- promptVersion: PROMPT_VERSIONS['release-check'],+ promptVersion: PROMPT_VERSIONS['do-release'],promptCustomized: false,- prompt: DEFAULT_TASK_PROMPTS['release-check'],+ prompt: DEFAULT_TASK_PROMPTS['do-release'],},},});@@ -79,7 +79,7 @@ describe('migration 332 — make release-check fix release blockers', () => {const result = await migration.up({ rootDir });expect(result.updated).toBe(0);- expect(readJson(cosPath).tasks['release-check'].prompt).toBe(DEFAULT_TASK_PROMPTS['release-check']);+ expect(readJson(cosPath).tasks['release-check'].prompt).toBe(DEFAULT_TASK_PROMPTS['do-release']);expect(readJson(legacyPath).tasks['release-check']).toEqual({promptVersion: 12,promptCustomized: true,diff --git a/scripts/migrations/408-rename-ui-lifecycle-task.js b/scripts/migrations/408-rename-ui-lifecycle-task.jsindex 1df21d623c..d576d1b32d 100644--- a/scripts/migrations/408-rename-ui-lifecycle-task.js+++ b/scripts/migrations/408-rename-ui-lifecycle-task.js@@ -3,186 +3,12 @@* app overrides, pending runs, execution history, and run-order dependencies.** The task used to be stored as `react-lifecycle`; all newly written task IDs- * use `ui-lifecycle`. These values are operator-owned schedule records, so the- * rename merges into the new key when both are present and only then removes- * the retired key. The migration is idempotent and does not dispatch work.+ * use `ui-lifecycle`. See scripts/lib/renameScheduledTaskType.js for the merge+ * rules. The migration is idempotent and does not dispatch work.*/-import { readFile } from 'fs/promises';-import { join } from 'path';-import { atomicWrite } from '../../server/lib/fileCore.js';--const SCHEDULE_PATH = join('data', 'cos', 'task-schedule.json');-const APPS_PATH = join('data', 'apps.json');-const LEGACY_TASK = 'react-lifecycle';-const CURRENT_TASK = 'ui-lifecycle';-const LEGACY_EXECUTION = `task:${LEGACY_TASK}`;-const CURRENT_EXECUTION = `task:${CURRENT_TASK}`;--const isObject = (value) => Boolean(value) && typeof value === 'object' && !Array.isArray(value);-const hasOwn = (value, key) => Object.prototype.hasOwnProperty.call(value, key);-const renameTaskType = (taskType) => taskType === LEGACY_TASK ? CURRENT_TASK : taskType;--async function readJson(rootDir, relPath) {- const fullPath = join(rootDir, relPath);- const raw = await readFile(fullPath, 'utf-8').catch((err) => {- if (err.code === 'ENOENT') return null;- throw err;- });- if (raw == null) return null;- try {- return { fullPath, value: JSON.parse(raw) };- } catch (err) {- throw new Error(`${relPath} is not valid JSON (${err.message}) — repair it and re-run migrations`);- }-}--const writeJson = (fullPath, value) => atomicWrite(fullPath, `${JSON.stringify(value, null, 2)}\n`);--function mergeConfig(legacy, current) {- const oldConfig = isObject(legacy) ? legacy : {};- const newConfig = isObject(current) ? current : {};- const merged = { ...oldConfig, ...newConfig };- if (hasOwn(newConfig, 'taskMetadata') && newConfig.taskMetadata === null) {- merged.taskMetadata = null;- } else if (isObject(oldConfig.taskMetadata) || isObject(newConfig.taskMetadata)) {- merged.taskMetadata = {- ...(isObject(oldConfig.taskMetadata) ? oldConfig.taskMetadata : {}),- ...(isObject(newConfig.taskMetadata) ? newConfig.taskMetadata : {}),- };- }- if (Array.isArray(oldConfig.runAfter) || Array.isArray(newConfig.runAfter)) {- merged.runAfter = [...new Set([- ...(Array.isArray(oldConfig.runAfter) ? oldConfig.runAfter : []),- ...(Array.isArray(newConfig.runAfter) ? newConfig.runAfter : []),- ].map(renameTaskType))];- }- return merged;-}--function newerTimestamp(left, right) {- if (!left) return right || left;- if (!right) return left;- const leftTime = Date.parse(left);- const rightTime = Date.parse(right);- if (Number.isFinite(leftTime) && Number.isFinite(rightTime)) return rightTime > leftTime ? right : left;- if (Number.isFinite(rightTime)) return right;- if (Number.isFinite(leftTime)) return left;- return right;-}--function mergeExecutionRecord(legacy, current) {- const oldRecord = isObject(legacy) ? legacy : {};- const newRecord = isObject(current) ? current : {};- const merged = { ...oldRecord, ...newRecord };- if (Number.isFinite(oldRecord.count) || Number.isFinite(newRecord.count)) {- merged.count = (Number.isFinite(oldRecord.count) ? oldRecord.count : 0)- + (Number.isFinite(newRecord.count) ? newRecord.count : 0);- }- if (oldRecord.lastRun || newRecord.lastRun) {- merged.lastRun = newerTimestamp(oldRecord.lastRun, newRecord.lastRun);- }-- if (isObject(oldRecord.perApp) || isObject(newRecord.perApp)) {- merged.perApp = { ...(isObject(oldRecord.perApp) ? oldRecord.perApp : {}) };- for (const [appId, record] of Object.entries(isObject(newRecord.perApp) ? newRecord.perApp : {})) {- merged.perApp[appId] = mergeExecutionRecord(merged.perApp[appId], record);- }- }- return merged;-}--function migrateSchedule(schedule) {- if (!isObject(schedule)) return { changed: false, pendingRequests: 0 };- let changed = false;- let pendingRequests = 0;-- if (isObject(schedule.tasks)) {- if (hasOwn(schedule.tasks, LEGACY_TASK)) {- schedule.tasks[CURRENT_TASK] = mergeConfig(schedule.tasks[LEGACY_TASK], schedule.tasks[CURRENT_TASK]);- delete schedule.tasks[LEGACY_TASK];- changed = true;- }- for (const config of Object.values(schedule.tasks)) {- if (!isObject(config) || !Array.isArray(config.runAfter)) continue;- const renamed = [...new Set(config.runAfter.map(renameTaskType))];- if (renamed.some((taskType, index) => taskType !== config.runAfter[index])- || renamed.length !== config.runAfter.length) {- config.runAfter = renamed;- changed = true;- }- }- }-- if (isObject(schedule.executions) && hasOwn(schedule.executions, LEGACY_EXECUTION)) {- schedule.executions[CURRENT_EXECUTION] = mergeExecutionRecord(- schedule.executions[LEGACY_EXECUTION],- schedule.executions[CURRENT_EXECUTION],- );- delete schedule.executions[LEGACY_EXECUTION];- changed = true;- }-- if (Array.isArray(schedule.onDemandRequests)) {- for (const request of schedule.onDemandRequests) {- if (request?.taskType !== LEGACY_TASK) continue;- request.taskType = CURRENT_TASK;- pendingRequests += 1;- changed = true;- }- }-- return { changed, pendingRequests };-}--function migrateApp(app) {- if (!isObject(app)) return false;- let changed = false;-- if (isObject(app.taskTypeOverrides) && hasOwn(app.taskTypeOverrides, LEGACY_TASK)) {- app.taskTypeOverrides[CURRENT_TASK] = mergeConfig(- app.taskTypeOverrides[LEGACY_TASK],- app.taskTypeOverrides[CURRENT_TASK],- );- delete app.taskTypeOverrides[LEGACY_TASK];- changed = true;- }-- if (Array.isArray(app.disabledTaskTypes)) {- const renamed = [...new Set(app.disabledTaskTypes.map(renameTaskType))];- if (renamed.some((taskType, index) => taskType !== app.disabledTaskTypes[index])- || renamed.length !== app.disabledTaskTypes.length) {- app.disabledTaskTypes = renamed;- changed = true;- }- }-- return changed;-}+import { renameScheduledTaskType } from '../lib/renameScheduledTaskType.js';export default {- async up({ rootDir }) {- let schedules = 0;- let pendingRequests = 0;- const storedSchedule = await readJson(rootDir, SCHEDULE_PATH);- if (storedSchedule) {- const result = migrateSchedule(storedSchedule.value);- if (result.changed) {- await writeJson(storedSchedule.fullPath, storedSchedule.value);- schedules = 1;- pendingRequests = result.pendingRequests;- }- }-- const storedApps = await readJson(rootDir, APPS_PATH);- let migratedApps = 0;- if (isObject(storedApps?.value?.apps)) {- for (const app of Object.values(storedApps.value.apps)) {- if (migrateApp(app)) migratedApps += 1;- }- if (migratedApps) await writeJson(storedApps.fullPath, storedApps.value);- }-- return { schedules, pendingRequests, migratedApps };- },+ up: ({ rootDir }) => renameScheduledTaskType({ rootDir, from: 'react-lifecycle', to: 'ui-lifecycle' }),};diff --git a/scripts/migrations/417-rename-do-release-task.js b/scripts/migrations/417-rename-do-release-task.jsnew file mode 100644index 0000000000..37cd53a3e2--- /dev/null+++ b/scripts/migrations/417-rename-do-release-task.js@@ -0,0 +1,18 @@+/**+ * Rename the scheduled `release-check` task to `do-release` while preserving+ * schedules, app overrides (including the operator's release options), pending+ * runs, execution history, and run-order dependencies.+ *+ * The old name described a readiness check; the task's job is to ship the+ * release. An uncustomized stored prompt keeps auto-upgrading after the move+ * because the integrity snapshot carries release-check's retired hashes under+ * `do-release` (TASK_TYPE_RENAMES in server/lib/scheduledTaskTypes.js).+ * See scripts/lib/renameScheduledTaskType.js for the merge rules. Idempotent;+ * it never dispatches work.+ */++import { renameScheduledTaskType } from '../lib/renameScheduledTaskType.js';++export default {+ up: ({ rootDir }) => renameScheduledTaskType({ rootDir, from: 'release-check', to: 'do-release' }),+};diff --git a/scripts/migrations/417-rename-do-release-task.test.js b/scripts/migrations/417-rename-do-release-task.test.jsnew file mode 100644index 0000000000..52a8f577eb--- /dev/null+++ b/scripts/migrations/417-rename-do-release-task.test.js@@ -0,0 +1,57 @@+import { describe, it, expect, beforeEach, afterEach } from 'vitest';+import { mkdtempSync, mkdirSync, readFileSync, rmSync, writeFileSync } from 'fs';+import { tmpdir } from 'os';+import { join } from 'path';++import migration from './417-rename-do-release-task.js';++const writeJson = (path, value) => writeFileSync(path, `${JSON.stringify(value, null, 2)}\n`);+const readJson = (path) => JSON.parse(readFileSync(path, 'utf8'));++// The merge rules are covered by migration 408's suite (same shared helper);+// this pins the release-check → do-release wiring and that the operator's+// customized prompt and release options travel with the task.+describe('migration 417 — rename release-check to do-release', () => {+ let rootDir;+ let schedulePath;+ let appsPath;++ beforeEach(() => {+ rootDir = mkdtempSync(join(tmpdir(), 'migration-417-'));+ mkdirSync(join(rootDir, 'data', 'cos'), { recursive: true });+ schedulePath = join(rootDir, 'data', 'cos', 'task-schedule.json');+ appsPath = join(rootDir, 'data', 'apps.json');+ });++ afterEach(() => rmSync(rootDir, { recursive: true, force: true }));++ it('moves the schedule, history, pending run, and app override to do-release', async () => {+ writeJson(schedulePath, {+ tasks: {+ 'release-check': { type: 'cron', cron: '0 9 * * 1', prompt: 'custom release prompt', promptCustomized: true, taskMetadata: { requireApproval: true } },+ 'claim-issue': { runAfter: ['release-check'] },+ },+ executions: { 'task:release-check': { count: 4, lastRun: '2026-09-20T00:00:00.000Z' } },+ onDemandRequests: [{ id: 'pending-1', taskType: 'release-check' }],+ });+ writeJson(appsPath, {+ apps: { 'app-a': { taskTypeOverrides: { 'release-check': { enabled: true, taskMetadata: { mergeDependencyUpdates: false } } } } },+ });++ expect(await migration.up({ rootDir })).toEqual({ schedules: 1, pendingRequests: 1, migratedApps: 1 });++ const schedule = readJson(schedulePath);+ expect(schedule.tasks).not.toHaveProperty('release-check');+ expect(schedule.tasks['do-release']).toEqual({+ type: 'cron', cron: '0 9 * * 1', prompt: 'custom release prompt', promptCustomized: true, taskMetadata: { requireApproval: true },+ });+ expect(schedule.tasks['claim-issue'].runAfter).toEqual(['do-release']);+ expect(schedule.executions).toEqual({ 'task:do-release': { count: 4, lastRun: '2026-09-20T00:00:00.000Z' } });+ expect(schedule.onDemandRequests[0].taskType).toBe('do-release');+ expect(readJson(appsPath).apps['app-a'].taskTypeOverrides).toEqual({+ 'do-release': { enabled: true, taskMetadata: { mergeDependencyUpdates: false } },+ });++ expect(await migration.up({ rootDir })).toEqual({ schedules: 0, pendingRequests: 0, migratedApps: 0 });+ });+});diff --git a/server/lib/cosValidation.js b/server/lib/cosValidation.jsindex ff0c81f1cb..3b78b49115 100644--- a/server/lib/cosValidation.js+++ b/server/lib/cosValidation.js@@ -904,6 +904,14 @@ export const MAX_TOTAL_SPAWNS = 5;// drifting would silently drop a toggle at the app-override boundary.export const REPO_SYNC_ACTION_KEYS = ['syncPush', 'syncPull', 'switchDefault', 'cleanupMerged', 'dropStashes', 'reapRemotes'];+// do-release's per-app / per-schedule options, each ON unless explicitly `false`:+// finish in-flight work no live agent owns, merge dependency-bot PRs, fix+// release blockers (delegating to a sub-agent rather than stopping), and make+// routine design/preference decisions for later operator review. One list read+// by the sanitizer allowlist, the schedule defaults, and the {releaseOptions}+// prompt block, so a toggle cannot be dropped at one boundary.+export const RELEASE_OPTION_KEYS = ['finishInFlight', 'mergeDependencyUpdates', 'resolveBlockers', 'autoDecide'];+const ALLOWED_TASK_METADATA_KEYS = [...PIPELINE_BEHAVIOR_FLAGS, 'readOnly', 'claimFlow','cleanupMerged', 'openPr', 'resolveConflicts', 'autoMerge', 'finishAbandoned', 'autoClose',@@ -916,6 +924,7 @@ const ALLOWED_TASK_METADATA_KEYS = [// independent settings. Turning it off on branch-reconcile does NOT turn it off// here; each task type carries its own value....REPO_SYNC_ACTION_KEYS,+ ...RELEASE_OPTION_KEYS,// repo-sync's per-app opt-OUT. The sweep is install-wide by design, so it// needs a key of its own rather than reading the per-app `enabled` flag next// to it: createApp SEEDS `{ enabled: false }` for every task type, so@@ -1400,7 +1409,7 @@ export const runEventReconcileSchema = z.object({//// `taskTypes` is bounded by the audit catalog rather than by// SELF_IMPROVEMENT_TASK_TYPES: the planner lays out AUDITS, and a request-// naming `release-check` would otherwise have its cadence rewritten by a form+// naming `do-release` would otherwise have its cadence rewritten by a form// that never showed it. `fileIssuesByType` is keyed the same way and read only// for the types actually scheduled.export const qualitySchedulePlanSchema = z.object({diff --git a/server/lib/scheduledTaskTypes.js b/server/lib/scheduledTaskTypes.jsindex 7be95814d4..81a7fc279b 100644--- a/server/lib/scheduledTaskTypes.js+++ b/server/lib/scheduledTaskTypes.js@@ -2,13 +2,20 @@import { PRIVATE_SECURITY_TASK_TYPE } from './privateSecurityPolicy.js';import { PROGRAMMATIC_SCHEDULED_TASK_TYPES } from './taskTargetScope.js';+// Retired scheduled task names → their current names. Each rename ships a+// migration that moves persisted schedule state (408, 417); this map covers+// what a migration cannot reach — queued/archived tasks carrying the old name+// and the prompt-integrity history that follows the renamed key.+export const TASK_TYPE_RENAMES = Object.freeze({ 'react-lifecycle': 'ui-lifecycle', 'release-check': 'do-release' });+export const currentTaskTypeName = (taskType) => TASK_TYPE_RENAMES[taskType] || taskType;+export const SELF_IMPROVEMENT_TASK_TYPES = [PRIVATE_SECURITY_TASK_TYPE,'model-comparison-refresh','security', 'code-quality', 'test-coverage', 'performance','accessibility', 'branch-reconcile', 'issue-reconcile', 'console-errors', 'dependency-updates', 'documentation','ui-bugs', 'mobile-responsive', 'feature-ideas', 'plan-task', 'claim-issue', 'claim-work', 'error-handling',- 'typing', 'release-check', 'pr-reviewer', 'code-reviewer-a', 'code-reviewer-b',+ 'typing', 'do-release', 'pr-reviewer', 'code-reviewer-a', 'code-reviewer-b','jira-sprint-manager', 'jira-status-report', 'do-replan',// Polls the app's GitHub repo for pull requests newly opened against the// default branch and dispatches an agent (running the configurablediff --git a/server/routes/apps/taskTypes.test.js b/server/routes/apps/taskTypes.test.jsindex 5725cb658d..602902e316 100644--- a/server/routes/apps/taskTypes.test.js+++ b/server/routes/apps/taskTypes.test.js@@ -541,7 +541,7 @@ describe('Apps Task-Type Routes', () => {it('refuses a task type that is not an audit, so a form cannot rewrite the release cadence', async () => {const response = await request(app).post('/api/apps/app-001/quality-schedule/apply')- .send({ taskTypes: ['release-check'] });+ .send({ taskTypes: ['do-release'] });expect(response.status).toBe(400);expect(applyQualitySchedulePlan).not.toHaveBeenCalled();});diff --git a/server/routes/cosScheduleRoutes.test.js b/server/routes/cosScheduleRoutes.test.jsindex 49c9a8e44e..53710d9396 100644--- a/server/routes/cosScheduleRoutes.test.js+++ b/server/routes/cosScheduleRoutes.test.js@@ -191,12 +191,12 @@ describe('CoS Schedule Routes', () => {taskSchedule.shouldRunTask.mockResolvedValue(status);const response = await request(app)- .put('/api/cos/schedule/task/release-check')+ .put('/api/cos/schedule/task/do-release').send({ type: 'cron', cronExpression: status.cronExpression });expect(response.status).toBe(200);expect(response.body.status).toEqual(status);- expect(taskSchedule.shouldRunTask).toHaveBeenCalledWith('release-check');+ expect(taskSchedule.shouldRunTask).toHaveBeenCalledWith('do-release');});it('should return 400 for invalid enabled type', async () => {diff --git a/server/services/agentFinalization.goalFidelity.test.js b/server/services/agentFinalization.goalFidelity.test.jsindex 0e2a28fbf4..3b1a792ac5 100644--- a/server/services/agentFinalization.goalFidelity.test.js+++ b/server/services/agentFinalization.goalFidelity.test.js@@ -394,7 +394,7 @@ describe('finalizeAgent — goal-fidelity gate', () => {});it.each([- { analysisType: 'release-check' },+ { analysisType: 'do-release' },{ prRemediationFollowUp: true },{ noCodeOutput: true },{ creativeDirector: { projectId: 'example-project' } },diff --git a/server/services/agentPromptBuilder.test.js b/server/services/agentPromptBuilder.test.jsindex 701b11a838..b56ff6d66d 100644--- a/server/services/agentPromptBuilder.test.js+++ b/server/services/agentPromptBuilder.test.js@@ -3632,7 +3632,7 @@ describe('buildAgentPrompt — slashdo-backed tasks', () => {it('recovers the bundled release for an older queued task whose command was stripped', async () => {vi.mocked(loadSlashdoFile).mockResolvedValue('# Release\n\nCanonical release procedure.');const prompt = await buildAgentPrompt(- makeTask({ metadata: { analysisType: 'release-check', openPR: false } }),+ makeTask({ metadata: { analysisType: 'do-release', openPR: false } }),{}, '/r', null, isTruthyMeta, { providerType: 'tui', providerId: 'codex-tui', providerCommand: 'codex' });expect(prompt).toContain('Canonical release procedure.');expect(prompt).toContain('Release Workflow Handoff');diff --git a/server/services/appQualitySchedule.test.js b/server/services/appQualitySchedule.test.jsindex 5044094180..8605f19593 100644--- a/server/services/appQualitySchedule.test.js+++ b/server/services/appQualitySchedule.test.js@@ -177,13 +177,13 @@ describe('collectBusyOccupancies', () => {it('collects the global cadence and the perpetual recheck of types enabled here', async () => {loadSchedule.mockResolvedValue({tasks: {- 'release-check': { type: 'cron', enabled: true, cronExpression: '30 3 * * *' },+ 'do-release': { type: 'cron', enabled: true, cronExpression: '30 3 * * *' },'branch-reconcile': { type: 'on-demand', enabled: true, perpetual: true, recheckCron: '0 3 * * *' },'pr-reviewer': { type: 'cron', enabled: true, cronExpression: '0 8 * * *' },},});getAppTaskTypeOverrides.mockResolvedValue({- 'release-check': { enabled: true },+ 'do-release': { enabled: true },'branch-reconcile': { enabled: true },// Enabled for the install but not for this app — its window is somebody// else's problem, so it must not cost this app an hour.@@ -194,8 +194,8 @@ describe('collectBusyOccupancies', () => {});it('lets a per-app cadence REPLACE the global one, the way the scheduler reads it', async () => {- loadSchedule.mockResolvedValue({ tasks: { 'release-check': { type: 'cron', enabled: true, cronExpression: '30 3 * * *' } } });- getAppTaskTypeOverrides.mockResolvedValue({ 'release-check': { enabled: true, interval: '0 20 * * 1' } });+ loadSchedule.mockResolvedValue({ tasks: { 'do-release': { type: 'cron', enabled: true, cronExpression: '30 3 * * *' } } });+ getAppTaskTypeOverrides.mockResolvedValue({ 'do-release': { enabled: true, interval: '0 20 * * 1' } });const sources = await collectBusyOccupancies({ id: 'a' });// Blocking 03:00 as well would cost the plan four hours a day that this app// never runs anything in.@@ -204,8 +204,8 @@ describe('collectBusyOccupancies', () => {});it('decodes a retired named cadence rather than reading it as no cadence', async () => {- loadSchedule.mockResolvedValue({ tasks: { 'release-check': { type: 'cron', enabled: true, cronExpression: '30 3 * * *' } } });- getAppTaskTypeOverrides.mockResolvedValue({ 'release-check': { enabled: true, interval: 'weekly' } });+ loadSchedule.mockResolvedValue({ tasks: { 'do-release': { type: 'cron', enabled: true, cronExpression: '30 3 * * *' } } });+ getAppTaskTypeOverrides.mockResolvedValue({ 'do-release': { enabled: true, interval: 'weekly' } });const sources = await collectBusyOccupancies({ id: 'a' });// An override written by an older install still occupies its hour; treating// it as unparseable would schedule an audit straight over the release.@@ -222,8 +222,8 @@ describe('collectBusyOccupancies', () => {describe('buildQualitySchedulePlan', () => {it('plans only the applicable checks and works around the app release window', async () => {- loadSchedule.mockResolvedValue({ tasks: { 'release-check': { type: 'cron', enabled: true, cronExpression: '30 3 * * *' } } });- getAppTaskTypeOverrides.mockResolvedValue({ 'release-check': { enabled: true } });+ loadSchedule.mockResolvedValue({ tasks: { 'do-release': { type: 'cron', enabled: true, cronExpression: '30 3 * * *' } } });+ getAppTaskTypeOverrides.mockResolvedValue({ 'do-release': { enabled: true } });const app = appWith(NODE_SERVICE);const built = await buildQualitySchedulePlan(app);expect(built.plan.slots.map(slot => slot.taskType)).not.toContain('accessibility');@@ -231,7 +231,7 @@ describe('buildQualitySchedulePlan', () => {for (const slot of built.plan.slots) expect([2, 3, 4, 5]).not.toContain(slot.hour);// The service owns the whole endpoint payload, so the route adds nothing.expect(built).toMatchObject({ appId: app.id, appName: app.name, claimTaskTypes: expect.arrayContaining(['claim-work']) });- expect(built.busySources).toEqual([{ taskType: 'release-check', cron: '30 3 * * *', origin: 'global' }]);+ expect(built.busySources).toEqual([{ taskType: 'do-release', cron: '30 3 * * *', origin: 'global' }]);});it('plans exactly the checks the caller named, applicable or not', async () => {diff --git a/server/services/cosJobScheduler.test.js b/server/services/cosJobScheduler.test.jsindex 1f1f166564..97961f785a 100644--- a/server/services/cosJobScheduler.test.js+++ b/server/services/cosJobScheduler.test.js@@ -305,7 +305,7 @@ it('wakes at a future app deadline even while the task is ready for another app'vi.useFakeTimers();vi.setSystemTime(new Date('2026-01-01T16:00:00Z'));try {- getUpcomingTasks.mockResolvedValue([{ taskType: 'release-check', status: 'ready', eligibleIn: 0,+ getUpcomingTasks.mockResolvedValue([{ taskType: 'do-release', status: 'ready', eligibleIn: 0,nextScheduledAt: Date.now() + 300000 }]);await scheduleNextImprovementCheck();expect(scheduleEvent).toHaveBeenLastCalledWith(expect.objectContaining({diff --git a/server/services/cosTaskGenerator.js b/server/services/cosTaskGenerator.jsindex 51d8f5809a..8f0ff6d0c7 100644--- a/server/services/cosTaskGenerator.js+++ b/server/services/cosTaskGenerator.js@@ -92,6 +92,7 @@ import { appendTaskDataInputs, resolveTaskDataInputs } from './taskDataInputs.jsimport { ensurePrReviewerPipeline, runPrReviewerSecurityPreflight, scopeDescriptionToPullRequest } from './prReviewerPipeline.js';import {applyPerpetualDrainCap,+ applyReleaseOptions,buildImprovementTaskDescription,buildPlanConstraintBlock,resolveBranchReconcileBlock,@@ -1719,7 +1720,7 @@ async function resolveConfidenceApproval(state, taskTypeKey, logLabel, metadata* APPROVAL tasks).** `metadata.requireApproval` is the escape hatch: a type the user marked- * "always ask" (e.g. release-check when they want to review the merge)+ * "always ask" (e.g. do-release when they want to review the merge)* keeps the hold even on Run Now.*/export function applyOnDemandConsent(task) {@@ -1820,6 +1821,7 @@ export async function generateSelfImprovementTaskForType(taskType, state) {// user-action-review: render the delivery posture the operator chose// (fileIssues on = tracker issues, off = queued CoS tasks).description = applyUserActionDeliveryMode(description, taskType, metadata);+ description = applyReleaseOptions(description, taskType, metadata);description = await applyUserActionDetectorSection(description, taskType);const repoSync = await resolveRepoSyncBlock(null, taskType, metadata);@@ -1836,7 +1838,7 @@ export async function generateSelfImprovementTaskForType(taskType, state) {stampApprovalReason(metadata, approval);// Self-improvement tasks do not pass through the managed-app prompt renderer,- // but release-check still names the install's configured reviewers explicitly.+ // but do-release still names the install's configured reviewers explicitly.// Resolve that token here so the global/on-demand path gets the same reviewer// contract and local-review procedure as an app-scoped release task.if (description.includes('{reviewers}')) {@@ -2955,7 +2957,7 @@ export async function prepareManagedAppImprovementTask(taskType, app, state, {? `${modeContractFor(fileIssues)}\n\n${auditQualityInstructions(taskType)}`: '';const baseDescription = await buildImprovementTaskDescription({- promptTemplate: applyAuditModeWrapper(promptTemplate, modeInstructions),+ promptTemplate: applyAuditModeWrapper(applyReleaseOptions(promptTemplate, promptTaskType, metadata), modeInstructions),app, promptTaskType, metadata,blocks: {referenceData: referenceDataBlock,diff --git a/server/services/cosTaskGenerator.test.js b/server/services/cosTaskGenerator.test.jsindex 957775cdcf..82e2f2d1ba 100644--- a/server/services/cosTaskGenerator.test.js+++ b/server/services/cosTaskGenerator.test.js@@ -329,7 +329,7 @@ describe('applyOnDemandConsent', () => {approvalRequired: true,autoApproved: false,approvalReason: 'safety-kind:publish',- metadata: { analysisType: 'release-check', approvalReason: 'safety-kind:publish' }+ metadata: { analysisType: 'do-release', approvalReason: 'safety-kind:publish' }};expect(applyOnDemandConsent(task)).toBe(task);expect(task).toMatchObject({ approvalRequired: false, autoApproved: true });@@ -342,7 +342,7 @@ describe('applyOnDemandConsent', () => {approvalRequired: true,autoApproved: false,approvalReason: 'config:requireApproval',- metadata: { analysisType: 'release-check', requireApproval: true }+ metadata: { analysisType: 'do-release', requireApproval: true }};applyOnDemandConsent(task);expect(task).toMatchObject({@@ -362,7 +362,7 @@ describe('isConfiguredApprovalRequired', () => {it('is true only for an explicit requireApproval: true', () => {expect(isConfiguredApprovalRequired({ requireApproval: true })).toBe(true);expect(isConfiguredApprovalRequired({ requireApproval: false })).toBe(false);- expect(isConfiguredApprovalRequired({ analysisType: 'release-check' })).toBe(false);+ expect(isConfiguredApprovalRequired({ analysisType: 'do-release' })).toBe(false);expect(isConfiguredApprovalRequired(undefined)).toBe(false);});diff --git a/server/services/cosTaskPreStepBlocks.js b/server/services/cosTaskPreStepBlocks.jsindex 33fbc0f3df..e1ff510c2a 100644--- a/server/services/cosTaskPreStepBlocks.js+++ b/server/services/cosTaskPreStepBlocks.js@@ -24,7 +24,7 @@* them to static imports.*/-import { resolveClaimReviewerConfig, reviewerConfigMetadata, SWARM_COUNT_MIN, ISSUE_AUTHOR_FILTERS } from '../lib/validation.js';+import { resolveClaimReviewerConfig, reviewerConfigMetadata, SWARM_COUNT_MIN, ISSUE_AUTHOR_FILTERS, RELEASE_OPTION_KEYS } from '../lib/validation.js';import { emitLog } from './cosEvents.js';import { getActiveApps } from './apps.js';import { getCodeReviewDefaults } from './codeReview.js';@@ -174,6 +174,41 @@ export function resolveIssueExcludeLabelsBlock(extraLabels = []) {return all.map((l) => `\`${l}\``).join(', ');}+// One line per RELEASE_OPTION_KEYS entry: what ON asks of the agent, and what+// OFF forbids. Keyed by the same list the sanitizer allowlists, so an option+// cannot be settable yet silently absent from the prompt.+const RELEASE_OPTION_LINES = {+ finishInFlight: ['Finish in-flight work', 'Step 1 runs: finish open PRs and lingering branches no live agent owns before releasing.', 'Step 1 is skipped: do not merge, close, or rebase other open PRs or branches.'],+ mergeDependencyUpdates: ['Merge dependency updates', 'Step 2 runs: merge open dependency-bot PRs, fixing any that break the build.', 'Step 2 is skipped: leave dependency-bot PRs untouched.'],+ resolveBlockers: ['Resolve blockers', 'Step 4 runs: fix failing tests, red CI, and blocking bugs yourself or through a sub-agent.', 'Step 4 is skipped: report each blocker with its evidence and stop without fixing it.'],+ autoDecide: ['Make decisions', 'Make routine design and preference decisions yourself and list them for operator review.', 'Stop at the first design or preference decision and report the question.'],+};++/**+ * Resolve the do-release `{releaseOptions}` block from the task's merged+ * (global → per-app) metadata. Each option is ON unless explicitly `false`.+ */+function resolveReleaseOptionsBlock(metadata = {}) {+ return RELEASE_OPTION_KEYS.map((key) => {+ const [label, on, off] = RELEASE_OPTION_LINES[key];+ const enabled = metadata?.[key] !== false;+ return `- **${label}: ${enabled ? 'ON' : 'OFF'}** — ${enabled ? on : off}`;+ }).join('\n');+}++/**+ * Render the operator's release options into a do-release prompt. A customized+ * stored prompt that dropped `{releaseOptions}` still gets the block PREPENDED,+ * so turning an option off is never a silent no-op on that install.+ */+export function applyReleaseOptions(promptTemplate, taskType, metadata) {+ const prompt = typeof promptTemplate === 'string' ? promptTemplate : '';+ if (taskType !== 'do-release') return prompt;+ const block = resolveReleaseOptionsBlock(metadata);+ if (prompt.includes('{releaseOptions}')) return prompt.replace(/\{releaseOptions\}/g, () => block);+ return `## Release options for this run\n\n${block}\n\n---\n\n${prompt}`;+}+// Per-forge nouns/commands for the swarm directive. The orchestration shape is// forge-agnostic (partition → fan-out → serialized merge); only the PR/MR noun// and the merge command differ between GitHub (`gh`) and GitLab (`glab`).diff --git a/server/services/cosTaskPreStepBlocks.test.js b/server/services/cosTaskPreStepBlocks.test.jsindex a1dc244c9d..5b9f9d0151 100644--- a/server/services/cosTaskPreStepBlocks.test.js+++ b/server/services/cosTaskPreStepBlocks.test.js@@ -16,6 +16,7 @@ import { dirname, join } from 'path';import {applyPerpetualDrainCap,+ applyReleaseOptions,resolveIssueAuthorFilterBlock,resolveIssueExcludeLabelsBlock,resolveReconcileDrainGate,@@ -378,3 +379,27 @@ describe('applyPerpetualDrainCap', () => {expect(await applyPerpetualDrainCap(app, 'branch-reconcile', cronDrain, ts)).toEqual({ skip: true });});});++describe('applyReleaseOptions — the do-release {releaseOptions} block', () => {+ it('renders every option ON by default and OFF only for an explicit false', () => {+ const out = applyReleaseOptions('Options:\n{releaseOptions}\nEnd', 'do-release', { mergeDependencyUpdates: false, autoDecide: 'false' });+ expect(out).toContain('**Finish in-flight work: ON**');+ expect(out).toContain('**Merge dependency updates: OFF** — Step 2 is skipped');+ expect(out).toContain('**Resolve blockers: ON**');+ // Only a real boolean false disables — the sanitizer drops non-booleans.+ expect(out).toContain('**Make decisions: ON**');+ expect(out).not.toContain('{releaseOptions}');+ expect(out.startsWith('Options:')).toBe(true);+ });++ it('prepends the block to a customized prompt that dropped the token', () => {+ const out = applyReleaseOptions('my custom release prompt', 'do-release', { resolveBlockers: false });+ expect(out.startsWith('## Release options for this run')).toBe(true);+ expect(out).toContain('**Resolve blockers: OFF**');+ expect(out.endsWith('my custom release prompt')).toBe(true);+ });++ it('leaves every other task type untouched', () => {+ expect(applyReleaseOptions('{releaseOptions}', 'branch-reconcile', {})).toBe('{releaseOptions}');+ });+});diff --git a/server/services/promptSections/slashdo.js b/server/services/promptSections/slashdo.jsindex 5c15078176..f0d38f942b 100644--- a/server/services/promptSections/slashdo.js+++ b/server/services/promptSections/slashdo.js@@ -4,6 +4,7 @@import { loadSlashdoFile, loadSlashdoBundle, writeResolvedSlashdoBody } from '../../lib/slashdoLoader.js';import { resolveSlashdoInvocation, buildSlashdoSection, unreachableReviewerIncludes, parseExplicitReviewWith, SLASHDO_REVIEWER_INCLUDE_NAMES, SLASHDO_INLINE_BUDGET_CHARS } from '../../lib/slashdoInvocation.js';+import { currentTaskTypeName } from '../../lib/scheduledTaskTypes.js';import { DEFAULT_REVIEWER, resolveReviewerConfig, buildReviewerEffortNote, buildReviewersCsv } from '../../lib/validation.js';/**@@ -153,9 +154,10 @@ export async function applySlashdoInvocation(task, {providerId = null, providerCommand = null, leanMode = false, hasFileTools = false,defaultReviewers = null, codeReviewDefaults = null,} = {}) {- // Older queued release checks lost this key in metadata sanitization.+ // Older queued release tasks lost this key in metadata sanitization; tasks+ // queued before the release-check → do-release rename still carry the old type.const taskType = task.metadata?.analysisType || task.metadata?.taskAnalysisType;- const command = task.metadata?.slashdoCommand || (taskType === 'release-check' ? 'release' : null);+ const command = task.metadata?.slashdoCommand || (currentTaskTypeName(taskType) === 'do-release' ? 'release' : null);const resolved = resolveSlashdoInvocation({command,args: task.metadata?.slashdoArgs || '',diff --git a/server/services/taskLearning/safetyKind.js b/server/services/taskLearning/safetyKind.jsindex 205f68a990..b071ce9b94 100644--- a/server/services/taskLearning/safetyKind.js+++ b/server/services/taskLearning/safetyKind.js@@ -19,6 +19,8 @@* Pure, deterministic (same input → same output), and side-effect free.*/+import { currentTaskTypeName } from '../../lib/scheduledTaskTypes.js';+/** Reversible internal work — retains today's confidence success-rate gate. */export const REVERSIBLE_SAFETY_KIND = 'reversible';@@ -40,11 +42,12 @@ const OUTWARD_KIND_SET = new Set(OUTWARD_SAFETY_KINDS);* a false negative would auto-approve genuinely outward work (the dangerous one* this feature exists to prevent).*- * Bare `\brelease\b` is intentionally NOT a publish signal. It matches- * `release-check` (a readiness coordinator the user clicks Run on) and- * `pre-release` (a check, not a ship). Shipping names still match via- * `\bpublish\b` (`publish-release`) or the explicit `cut/create/ship/do-release`- * forms below.+ * Bare `\brelease\b` is intentionally NOT a publish signal. It matched the old+ * `release-check` coordinator and `pre-release` (a check, not a ship). Shipping+ * names still match via `\bpublish\b` (`publish-release`) or the explicit+ * `cut/create/ship/do-release` forms below — except the scheduled `do-release`+ * task itself (under either name): the operator configured it, and its+ * Run Now or cadence is the consent, exactly as it was under its old name.*/const KIND_SIGNATURES = [{ kind: 'federation', re: /federat|peer[-\s]?sync|sync[-\s]?peer|fan[-\s]?out[-\s]?record/ },@@ -53,13 +56,17 @@ const KIND_SIGNATURES = [{ kind: 'content', re: /social[-\s]?media|newsletter|\bblog\b|generate[-\s]?content/ }];+const isScheduledReleaseTaskType = (key) => typeof key === 'string'+ && currentTaskTypeName(key.replace(/^(self|app)-improve:/, '')) === 'do-release';+const normalizeKind = (k) => (typeof k === 'string' ? k.trim().toLowerCase() : '');/*** Classify a task's safety kind from its task-type key and metadata.** Priority order: explicit `metadata.safetyKind` / `metadata.outwardFacing`- * override → boolean capability hints → keyword signatures → reversible default.+ * override → boolean capability hints → the scheduled release task → keyword+ * signatures → reversible default.** @param {{ taskTypeKey?: string, metadata?: object }} [input]* @returns {{ kind: string, outwardFacing: boolean, reason: string }}@@ -94,7 +101,13 @@ export function classifySafetyKind({ taskTypeKey = '', metadata = {} } = {}) {return { kind: 'external-pr', outwardFacing: true, reason: 'metadata capability: external PR' };}- // 3) Keyword signatures over the task-type key + free-form description hints.+ // 3) The operator-configured scheduled release coordinator keeps the+ // confidence gate — its prompt title would otherwise match `do-release`.+ if ([taskTypeKey, meta.analysisType, meta.selfImprovementType].some(isScheduledReleaseTaskType)) {+ return { kind: REVERSIBLE_SAFETY_KIND, outwardFacing: false, reason: 'operator-configured scheduled release task' };+ }++ // 4) Keyword signatures over the task-type key + free-form description hints.const haystack = [taskTypeKey, meta.analysisType, meta.selfImprovementType, meta.taskDescription].filter((s) => typeof s === 'string' && s).join(' ')@@ -107,7 +120,7 @@ export function classifySafetyKind({ taskTypeKey = '', metadata = {} } = {}) {}}- // 4) Default — reversible internal work; keeps the success-rate gate.+ // 5) Default — reversible internal work; keeps the success-rate gate.return { kind: REVERSIBLE_SAFETY_KIND, outwardFacing: false, reason: 'no outward signal — reversible internal work' };}diff --git a/server/services/taskLearning/safetyKind.test.js b/server/services/taskLearning/safetyKind.test.jsindex 4f518c4958..2ef881dfea 100644--- a/server/services/taskLearning/safetyKind.test.js+++ b/server/services/taskLearning/safetyKind.test.js@@ -59,17 +59,23 @@ describe('classifySafetyKind (#2440)', () => {expect(classifySafetyKind({ taskTypeKey: 'open-upstream-pr' }).kind).toBe('external-pr');expect(classifySafetyKind({ taskTypeKey: 'publish-release' }).kind).toBe('publish');expect(classifySafetyKind({ taskTypeKey: 'cut-release' }).kind).toBe('publish');+ // Only the scheduled do-release task type is carved out — the wording still counts.+ expect(classifySafetyKind({ metadata: { taskDescription: 'Do release of the mobile build' } }).kind).toBe('publish');expect(classifySafetyKind({ metadata: { taskDescription: 'Deploy the site to production' } }).kind).toBe('publish');expect(classifySafetyKind({ metadata: { taskDescription: 'Draft a social-media post' } }).kind).toBe('content');});- it('does not treat release-check (or pre-release) as a publish action', () => {+ it('does not treat the scheduled do-release task (or pre-release) as a publish action', () => {// `\brelease\b` used to match `release-check` and force every Run Now into- // awaiting-approve. The type is a readiness coordinator, not a ship.+ // awaiting-approve. Renamed do-release, the operator-configured task keeps+ // the confidence gate — even though its prompt title reads "Do Release".for (const input of [{ taskTypeKey: 'app-improve:release-check' },{ taskTypeKey: 'self-improve:release-check' },{ metadata: { analysisType: 'release-check' } },+ { taskTypeKey: 'self-improve:do-release', metadata: { taskDescription: '[Improvement: PortOS] Do Release' } },+ { taskTypeKey: 'app-improve:do-release' },+ { metadata: { analysisType: 'do-release' } },{ taskTypeKey: 'pre-release-audit' }]) {const out = classifySafetyKind(input);diff --git a/server/services/taskPromptDefaults.test.js b/server/services/taskPromptDefaults.test.jsindex 5b61da296f..1b9050fe97 100644--- a/server/services/taskPromptDefaults.test.js+++ b/server/services/taskPromptDefaults.test.js@@ -59,6 +59,15 @@ describe('taskPromptDefaults integrity snapshot', () => {expect(SNAPSHOT.PREVIOUS_DEFAULT_PROMPTS).not.toHaveProperty('react-lifecycle');});+ it('keeps the release prompt history under the renamed do-release key', () => {+ // The outgoing release-check v14 default must stay recognizable as shipped,+ // or migration 417 would move an uncustomized prompt that never upgrades.+ expect(SNAPSHOT.PREVIOUS_DEFAULT_PROMPTS['do-release']).toContain('cd936b9a4fb76273b36ec54c3ed6d5ba');+ expect(SNAPSHOT.DEFAULT_TASK_PROMPTS).not.toHaveProperty('release-check');+ expect(SNAPSHOT.PROMPT_VERSIONS).not.toHaveProperty('release-check');+ expect(SNAPSHOT.PREVIOUS_DEFAULT_PROMPTS).not.toHaveProperty('release-check');+ });+it('reference-watch leaves tracker IDs and filing mechanics to the shared tracker block', () => {const current = DEFAULT_TASK_PROMPTS['reference-watch'];@@ -642,50 +651,47 @@ describe('taskPromptDefaults integrity snapshot', () => {expect(phase3).not.toContain('If ANY of these are true, release the claim and re-pick');});- // release-check READS the changelog rather than writing it, so its fix is the- // mirror image: an unreleased set that lives in uncollected fragments must not- // read as "not enough work accumulated for a release".- it('release-check v14 names releases from their biggest user-visible wins', () => {- const current = DEFAULT_TASK_PROMPTS['release-check'];- expect(PROMPT_VERSIONS['release-check']).toBeGreaterThanOrEqual(14);- expect(current).toContain('Reconcile Missing Releases');+ // do-release (formerly release-check) READS the changelog rather than writing+ // it: an unreleased set that lives in uncollected fragments must not read as+ // "not enough work accumulated for a release".+ it('do-release v15 ships the release instead of stopping at a filed blocker', () => {+ const current = DEFAULT_TASK_PROMPTS['do-release'];+ expect(PROMPT_VERSIONS['do-release']).toBeGreaterThanOrEqual(15);+ expect(current).toContain('Reconcile missing releases');expect(current).toContain('Unpublished release detected');expect(current).toContain('--latest=false');expect(current).toContain('one or two biggest user-visible wins');expect(current).toContain('# Release vX.Y.Z - <Fun Name>');expect(current).toContain('GitHub Actions workflow extracts this heading');expect(current).toContain('per-branch fragments');- expect(current).toContain('assembled');- // release-check is a generic {appName} prompt — it runs against managed apps,- // which have no `npm run changelog:preview`. It must send the agent to the- // repo's own documented command, never name a PortOS script to run.+ // A generic {appName} prompt — managed apps have no `npm run changelog:preview`.expect(current).not.toContain('changelog:preview');expect(current).toContain('Do NOT guess a command name');- expect(current).toContain('database-backed test suite');expect(current).toContain('test-database provisioning/setup command');expect(current).toContain('never substitute a production database');expect(current).toContain('{reviewers}');expect(current).toContain('/do:release');- expect(current).toContain('Code review is optional');expect(current).toContain('Only CI is the review/merge gate');expect(current).toContain('inconclusive review must never stop the release');- // v13: a red suite or red CI is work this run must FIX. A pre-existing- // failure on the source branch is what ended a v12 run with the release- // untouched, so the halt-on-test-failure sentence must be gone and the- // repair loop present — including the guard against forcing green by- // deleting/skipping/loosening a test.- expect(current).toContain('Fix what blocks the release');- expect(current).toContain('already existed on the source branch before this run started');+ // The operator's toggles are rendered at dispatch.+ expect(current).toContain('{releaseOptions}');+ // v15: in-flight work and dependency PRs land first, respecting live owners.+ expect(current).toContain('Finish in-flight work first');+ expect(current).toContain('/api/cos/agents?active=1');+ expect(current).toContain('"taskType":"branch-reconcile"');+ expect(current).toContain('Merge dependency updates');+ // v15: a blocker that outlasts the fix loop goes to a sub-agent; filing an+ // issue and leaving the release PR open is no longer an exit (v14 stopped+ // at its 10-commit bound with the release PR open).+ expect(current).toContain('Delegate instead of giving up');+ expect(current).toContain('Filing an issue and leaving the release PR open is NOT a resolution');+ expect(current).not.toContain('Bound the loop');+ expect(current).toContain('Local-only flake');+ expect(current).toContain('Decisions for operator review');expect(current).toContain('are NOT fixes');expect(current).toContain('--log-failed');- expect(current).toContain('Bound the loop');- expect(current).toContain('Environmental blocker');- expect(current).not.toContain('its required tests/build checks fail, or CI fails, stop and report');- expect(current).not.toContain('If the reviewer list is empty or unavailable, stop');- expect(current).not.toContain('If it cannot run or a configured reviewer is unavailable or inconclusive, stop');expect(current).not.toMatch(/copilot/i);expect(current).not.toContain('reviewThreads');- expect(current).not.toContain('copilot-pull-request-reviewer');});// The PortOS custom catalog-refresh job still sources this versioned prompt:diff --git a/server/services/taskPromptDefaults/integrity.snapshot.json b/server/services/taskPromptDefaults/integrity.snapshot.jsonindex a52e4c83cc..a0d52c824f 100644--- a/server/services/taskPromptDefaults/integrity.snapshot.json+++ b/server/services/taskPromptDefaults/integrity.snapshot.json@@ -23,6 +23,7 @@"data-integrity": "5fcc4f5044101e89da5bbf4890c11a1c","data-safety": "eb97988dfc16d4c655f1834acc91d665","dependency-updates": "2d94021c979a86a349e125f5c15665d8",+ "do-release": "18db3caa14eda4892ad23cfdc6db83e2","do-replan": "35660eb7b43e4259a6a9253ed288a1db","documentation": "a30e3bfba8cd13369ccaf806a3534a79","error-handling": "137b371f38398042c0a2c7e2279c92ce",@@ -48,7 +49,6 @@"privacy": "ecf3c57c064e3c4ab662d70252c686fb","reference-watch": "57221102b6245d40852ac258fbf9ebbf","refresh-local-llm-catalog": "9741ca6a8419fcdea2743e3b64781a8b",- "release-check": "cd936b9a4fb76273b36ec54c3ed6d5ba","reliability": "2a99be77b8f34653f4b926db0a773ea5","repo-sync": "0a648d35d43b023b758226b9c709c8ea","security": "4bd26243a5792a39040da0b49321ca27",@@ -84,6 +84,7 @@"data-integrity": 1,"data-safety": 2,"dependency-updates": 7,+ "do-release": 15,"do-replan": 2,"documentation": 7,"error-handling": 3,@@ -105,7 +106,6 @@"privacy": 1,"reference-watch": 4,"refresh-local-llm-catalog": 4,- "release-check": 14,"reliability": 1,"repo-sync": 1,"security": 4,@@ -261,6 +261,22 @@"f34cfa7e495d2bd6d3ac3c80b44447e8","44de787b45e037fbce281efc87706873"],+ "do-release": [+ "655180dfbab22e11fab79072ac49c9d6",+ "d567ce8c4033687d5a9177439e00d0a6",+ "133c221608545a26f328dead099a4d0a",+ "609167c41331e6bbfc6d5f5edc452d4c",+ "9c7508598ee772d1cee8f609f9ed7372",+ "8436a47b5b1c9b2a342795e5634552da",+ "746f11daaf721eae9e16845858ef55ee",+ "08c928e6f79f83535e40b6988ff6eae3",+ "afa9039cfbff21d77d601dc74eb5b81f",+ "2d2a6700c23b73bf738c2aa915e37277",+ "64be10f6ac7bcf74d4fc257089fc179b",+ "644e5f2f6df1daf06f3792a81ba7a51a",+ "5a82eec9f86ad05185ed77a42dbfd9d4",+ "cd936b9a4fb76273b36ec54c3ed6d5ba"+ ],"do-replan": ["59a57f1bb445138c30ab4fa23630c6f8"],@@ -360,21 +376,6 @@"a9dce67bb9f0837ba904f3412b03637f","ca7324a0f2251a66b46ea534940c9da8"],- "release-check": [- "655180dfbab22e11fab79072ac49c9d6",- "d567ce8c4033687d5a9177439e00d0a6",- "133c221608545a26f328dead099a4d0a",- "609167c41331e6bbfc6d5f5edc452d4c",- "9c7508598ee772d1cee8f609f9ed7372",- "8436a47b5b1c9b2a342795e5634552da",- "746f11daaf721eae9e16845858ef55ee",- "08c928e6f79f83535e40b6988ff6eae3",- "afa9039cfbff21d77d601dc74eb5b81f",- "2d2a6700c23b73bf738c2aa915e37277",- "64be10f6ac7bcf74d4fc257089fc179b",- "644e5f2f6df1daf06f3792a81ba7a51a",- "5a82eec9f86ad05185ed77a42dbfd9d4"- ],"security": ["b199739b21a8c45ed3778b2339ebf55f","d0f54c1fbe62d067b1a23ee0a9f3528c",diff --git a/server/services/taskPromptDefaults/integrityHash.js b/server/services/taskPromptDefaults/integrityHash.jsindex 414ea41f2f..e8a41148fa 100644--- a/server/services/taskPromptDefaults/integrityHash.js+++ b/server/services/taskPromptDefaults/integrityHash.js@@ -23,6 +23,7 @@ import { createRequire } from 'module';import { dirname, join } from 'path';import { fileURLToPath } from 'url';import { PORTOS_API_URL } from '../../lib/portosUrls.js';+import { TASK_TYPE_RENAMES } from '../../lib/scheduledTaskTypes.js';export const PROMPT_INTEGRITY_SNAPSHOT_PATH = join(dirname(fileURLToPath(import.meta.url)), 'integrity.snapshot.json');@@ -57,10 +58,9 @@ const API_URL_PLACEHOLDER = '{{PORTOS_API_URL}}';// (issue #3359).const LEGACY_API_ORIGIN = 'http://localhost:5555';-// Prompt history follows a scheduled task when its public task key is renamed.-// The old key remains here only so installs carrying its persisted prompt body-// can still recognize that body as shipped after the task config is migrated.-const PROMPT_KEY_RENAMES = Object.freeze({ 'react-lifecycle': 'ui-lifecycle' });+// Prompt history follows a scheduled task when its public task key is renamed+// (TASK_TYPE_RENAMES), so installs carrying the old persisted prompt body still+// recognize it as shipped after the task config is migrated.// Longest first: the two origins can overlap — `PORTOS_API_URL=http://localhost`// (port 80) is a prefix of the legacy literal, and replacing it first would turn@@ -125,7 +125,7 @@ export const advancePromptIntegritySnapshot = (committed, defaults) => {const retired = [];const drift = [];- for (const [oldKey, newKey] of Object.entries(PROMPT_KEY_RENAMES)) {+ for (const [oldKey, newKey] of Object.entries(TASK_TYPE_RENAMES)) {const moved = [...(history[oldKey] || [])];const oldCurrent = committed.DEFAULT_TASK_PROMPTS[oldKey];if (oldCurrent && oldCurrent !== next.DEFAULT_TASK_PROMPTS[newKey]) moved.push(oldCurrent);diff --git a/server/services/taskPromptDefaults/prompts.js b/server/services/taskPromptDefaults/prompts.jsindex a0b0e2133b..6af263aa61 100644--- a/server/services/taskPromptDefaults/prompts.js+++ b/server/services/taskPromptDefaults/prompts.js@@ -3377,15 +3377,28 @@ For each finding, give \`file:LINE\`, the value whose shape is unproven, themistake the current typing permits, and the narrowing you propose. In implementmode, run the project's type check and tests before committing.`,- 'release-check': `[Improvement: {appName}] Release Check+ 'do-release': `[Improvement: {appName}] Do ReleaseRepository: {repoPath}-This scheduled task is a thin coordinator for {appName}'s release. The bundled slashdo \`release\` workflow is the single source of truth for release mechanics. Do not duplicate its branch, version, changelog, readiness, test/build, PR, review, CI, merge, tag, or report steps here.+Your job is to SHIP a release of {appName}: a merged release PR, a version tag, and a published GitHub Release. Readiness checks are a means to that end, not the deliverable. Do whatever it takes to get there — finish in-flight work, merge pending dependency updates, fix red CI, fix blocking bugs, and make the routine decisions the release needs.-## Step 0: Reconcile Missing Releases+A run ends without a published release for only two reasons:-Before evaluating unreleased work, determine \`<OWNER>\`, \`<REPO>\`, and \`<TARGET_BRANCH>\` from the repository's AGENTS.md (or CLAUDE.md) and release documentation. If the project does not document a release flow, use the repository's default branch. Extract the GitHub project identity with:+1. **Not enough to release** — fewer than two substantive user-visible changes since the last release (the canonical workflow's readiness rule below).+2. **A blocker that genuinely needs a human** — a missing or expired credential, a required service you cannot reach, a paid or legal commitment, a destructive action on data you cannot restore, or two operator instructions that contradict each other. Name the exact human action needed.++A failing test, a red CI job, a bug you discovered, an open PR, a lingering branch, a design choice, or a preference question is NOT a reason to stop. Filing an issue and leaving the release PR open is NOT a resolution — fix it yourself or hand it to a sub-agent, then continue.++## Release options for this run++These are the operator's settings for this scheduled task. Follow them exactly; a disabled option means skip that step and do not do its work by other means.++{releaseOptions}++## Step 0: Reconcile missing releases++Determine \`<OWNER>\`, \`<REPO>\`, and \`<TARGET_BRANCH>\` from the repository's AGENTS.md (or CLAUDE.md) and release documentation. If the project does not document a release flow, use the repository's default branch. Extract the GitHub project identity with:\`\`\`bashcd {repoPath} && gh repo view --json owner,name --jq '"OWNER=" + .owner.login + " REPO=" + .name'\`\`\`@@ -3404,7 +3417,48 @@ Check for existing release tags that lack a corresponding GitHub Release:- Publish it with \`gh release create "vX.Y.Z"\`, using \`--notes-file\` or \`--body-file\`; pass \`--latest=false\` when a newer release exists, and \`--latest\` only for the newest version.4. Report missing releases reconciled before continuing.-## Release naming and notes+## Step 1: Finish in-flight work first++Skip this step when the options above say finishing in-flight work is off.++A release should carry the work that is already nearly done. Before cutting it, survey what is in flight:++- Open PRs against \`<TARGET_BRANCH>\`: \`gh pr list --repo <OWNER>/<REPO> --base <TARGET_BRANCH> --state open --json number,title,headRefName,author,isDraft,mergeable,updatedAt\`.+- Local branches and worktrees that are not merged: \`git -C {repoPath} branch --no-merged <TARGET_BRANCH>\` and \`git -C {repoPath} worktree list\`.+- An older release PR this task left open on an earlier run (for example, a \`release/*\` branch or a PR into the release branch). Resume it rather than starting over.++**Leave work alone when someone is actively on it.** Before touching a PR or branch, check for a live owner: running agents from \`curl -s -H "Authorization: Bearer \${PORTOS_API_TOKEN:-}" ${PORTOS_API_URL}/api/cos/agents?active=1\` (match on branch name, worktree path, or PR number), an \`in-progress\` claim on the linked issue with a commit or comment in the last two hours, or a branch commit in the last two hours. Actively owned work is not yours: release without it, and name it in the report.++Everything else is yours to finish, one item at a time:+- **Ready PRs** (green CI, no unresolved review): merge them with the repository's merge method.+- **Red or conflicted PRs**: rebase onto \`<TARGET_BRANCH>\`, fix the failure or conflict (keeping both sides' intent), push, wait for CI, then merge.+- **Stale or superseded PRs** whose change already landed on \`<TARGET_BRANCH>\`: close them with a comment naming the commit that superseded them.+- **Lingering local branches and worktrees**: when this install has the PortOS \`branch-reconcile\` task, trigger it and wait for its agent to finish before continuing: \`curl -s -X POST -H "Authorization: Bearer \${PORTOS_API_TOKEN:-}" -H 'Content-Type: application/json' -d '{"taskType":"branch-reconcile"}' ${PORTOS_API_URL}/api/cos/schedule/trigger\`, then watch \`${PORTOS_API_URL}/api/cos/agents?active=1\`. If that is unavailable, do the same work yourself: delete branches already merged, ship coherent unmerged work as a PR, and report anything ambiguous.++Bound this step to the work that can land now. A large in-flight feature that is far from done does not hold the release — note it in the report and move on.++## Step 2: Merge dependency updates++Skip this step when the options above say merging dependency updates is off.++List open dependency-bot PRs (Dependabot, Renovate, or equivalent): \`gh pr list --repo <OWNER>/<REPO> --state open --search "author:app/dependabot" --json number,title,headRefName,mergeable\` (repeat for \`author:app/renovate\`). For each, oldest first:+- Read the update's release notes for breaking changes that affect this codebase.+- Green CI and no breaking change that affects the codebase: merge it.+- Red CI: check out the branch, fix what the new version broke, push the fix onto the PR branch, wait for CI, then merge. Never pin back or drop a security update to dodge a fix.+- Conflicted or out of date: ask the bot to rebase (\`@dependabot rebase\`), or rebase it yourself, then merge once green.+- Superseded by a newer bump of the same package: close it.++Merge them one at a time and let CI settle between merges, since lockfile changes collide.++## Step 3: Run the canonical release workflow++The bundled slashdo \`release\` workflow is the single source of truth for release mechanics. Do not duplicate its branch, version, changelog, readiness, test/build, PR, review, CI, merge, tag, or report steps here.++The PortOS Code Review Defaults rendered into \`{reviewers}\` are advisory for this run. Use exactly that reviewer list and no other when review is available. The task builder attaches the same list to the bundled slashdo invocation; do not invoke a bare workflow that falls back to saved slashdo defaults. Code review is optional: run configured reviewers when available and address valid findings, but an empty, unavailable, timed-out, malformed, no-verdict, or otherwise inconclusive review must never stop the release.++Run the bundled \`/do:release\` workflow (or its equivalent \`release\` skill) in autonomous mode with no \`--interactive\` flag. It owns release readiness, version/changelog finalization, tests/build, optional code review, PR creation, CI, merge, tagging, and the final report. Only CI is the review/merge gate; required release tests/build checks still must pass — and a failing test or red CI run is work for Step 4, not a reason to end the run.++### Release naming and notesWhen the canonical release workflow compiles the notes for a new release, the agent in charge of the release MUST choose the release name. Read the complete release range and identify the one or two biggest user-visible wins — especially performance, reliability, accessibility, or bandwidth improvements — then choose a short, memorable, fun name that is accurate to those wins (for example, \`Performant Dragon\`). The name is a theme, not a new product claim: do not invent benefits, use private data, repeat implementation jargon, or settle for a generic label such as \`Update\`.@@ -3416,32 +3470,37 @@ Use the ASCII \` - \` separator, keep the name on one line, and keep the same naThe canonical workflow owns readiness and should count both the current changelog and any uncollected per-branch fragments (for example, \`.changelog/next/\`) across the assembled notes. If the changelog README documents a preview/collect command, use only that documented command — Do NOT guess a command name. If fewer than two substantive entries remain, stop without creating a release PR.-If the release docs identify a separate database-backed test suite, the canonical workflow must first use the documented test-database provisioning/setup command and then run that suite against an isolated test database. The workflow must never substitute a production database; if the isolated setup cannot reach its documented service, report the environmental blocker and stop.--## Step 1: Run the canonical release workflow--The PortOS Code Review Defaults rendered into \`{reviewers}\` are advisory for this run. Use exactly that reviewer list and no other when review is available. The task builder attaches the same list to the bundled slashdo invocation; do not invoke a bare workflow that falls back to saved slashdo defaults. Code review is optional: run configured reviewers when available and address valid findings, but an empty, unavailable, timed-out, malformed, no-verdict, or otherwise inconclusive review must never stop the release.--Run the bundled \`/do:release\` workflow (or its equivalent \`release\` skill) exactly once, in autonomous mode with no \`--interactive\` flag. It owns release readiness, version/changelog finalization, tests/build, optional code review, PR creation, CI, merge, tagging, and the final report. Only CI is the review/merge gate; required release tests/build checks still must pass — but a failing test or a red CI run is work for you to do in Step 2, not a reason to end the run. Stop and report only if the workflow itself cannot run at all; never stop or leave the release open because code review is unavailable or inconclusive.+If the release docs identify a separate database-backed test suite, the canonical workflow must first use the documented test-database provisioning/setup command and then run that suite against an isolated test database. The workflow must never substitute a production database; if the isolated setup cannot reach its documented service, that is an environmental blocker — report the command and its error and stop.-## Step 2: Fix what blocks the release — do not just report it+## Step 4: Fix what blocks the release-A failing test suite or a red CI run does NOT end this run. Unblocking the release is part of the task, including when the failure already existed on the source branch before this run started and nothing you did caused it. "The release was halted because tests failed" is not an acceptable outcome while the failure is fixable.+Skip the fixing described here when the options above say resolving blockers is off; in that case report each blocker with its evidence and stop.-Work each blocking failure through this loop until the required suite and CI are green, or until you hit the bound below:+A failing test suite, a red CI run, or a bug you discover while releasing does NOT end this run — including a failure that already existed on \`<TARGET_BRANCH>\` before this run started. Work each blocker through this loop:1. **Reproduce and localize.** Re-run only the failing file or test to confirm it fails on its own, repeating it a few times when the failure looks timing-dependent. Read the failing assertion and the code it exercises before changing anything.2. **Classify it.**- - **Real regression** — the test is right and the product code is wrong. Fix the product code.+ - **Real regression or bug** — the test is right and the product code is wrong. Fix the product code.- **Bad test** — it races the code under test, depends on wall-clock time or ordering, leaks state between cases, asserts an implementation detail that legitimately changed, or carries a stale fixture. Fix the test.- - **Environmental blocker** — a service the suite needs is unreachable, a credential is missing, or a required tool is absent. That is not fixable from here: report exactly what failed (the command and its error) and stop.-3. **Fix the root cause.** Deleting a test, skipping or narrowing it, loosening an assertion until it passes, or inflating a timeout to paper over a race are NOT fixes — never do them to force a green. If the correct fix is genuinely out of reach for this run, say precisely why and stop instead of disabling coverage.+ - **Local-only flake** — it fails only in a full local run, passes in isolation and repeated runs, and passes in CI. It does not block the release once required CI is green: file an issue with the reproduction evidence and continue.+ - **Environmental blocker** — a service the suite needs is unreachable, a credential is missing, or a required tool is absent. That needs a human: report the command and its error and stop.+3. **Fix the root cause.** Deleting a test, skipping or narrowing it, loosening an assertion until it passes, or inflating a timeout to paper over a race are NOT fixes — never do them to force a green.4. **Verify.** Re-run the failing test, then the full suite the release requires, and confirm nothing else broke.-5. **Commit and push** each fix as its own commit on the source branch, with a subject stating what was broken and why the change fixes it (release notes are derived from commit subjects). Then resume the release workflow.+5. **Commit and push** each fix as its own commit with a subject stating what was broken and why the change fixes it (release notes are derived from commit subjects). Then resume the release workflow.++Apply the same loop to a red CI run on the release PR, driving it from the failing job's logs (for example \`gh pr checks <PR_NUM>\` to find the run, then \`gh run view <RUN_ID> --log-failed\`). A CI failure that does not reproduce locally is still yours to diagnose — look for platform differences (OS, runtime version, installed dependencies) and for state the local run has that CI does not.++**Delegate instead of giving up.** If a blocker survives three distinct fix attempts, or it is too large to fix alongside running the release, hand it to a sub-agent (your Agent/Task tool) with a self-contained brief: the failing command, the error, what you already tried, the branch to push to, and the verification to run. Wait for it, review what it did, and resume. If you have no sub-agent tool, queue the work as a PortOS task (\`POST ${PORTOS_API_URL}/api/cos/tasks\` with the same bearer header), wait for it to finish, then continue. Stop only when a fresh sub-agent has also failed on the same blocker; report exactly what was tried.-Apply the same loop to a red CI run on the release PR, driving it from the failing job's logs (for example \`gh pr checks <PR_NUM>\` to find the run, then \`gh run view <RUN_ID> --log-failed\`). Push the fix to the PR's branch, wait for the re-run, and merge once CI is green. A CI failure that does not reproduce locally is still yours to diagnose — look for platform differences (OS, runtime version, installed dependencies) and for state the local run has that CI does not.+## Decisions++When the options above allow you to make decisions, make every design, naming, wording, or preference decision the release needs yourself: pick the option that best fits the repository's existing conventions, apply it, and list it under **Decisions for operator review** in the release PR body and in your final report so the operator can revisit it later. Do not stop to ask. When they do not, stop at the first such decision and report the question with the options you considered.++Never decide on the operator's behalf anything that needs a human (see the two stop reasons at the top): spending money, legal terms, credentials, messages to other people, or destroying data you cannot restore.++## Report-**Bound the loop.** Stop and report if the same failure survives three distinct fix attempts, or once you have made ten fix commits in this run without reaching green. A failure that resists that much needs a human, not more grinding.+End with: the release version, name, PR, and GitHub Release URL (or the stop reason and the exact human action needed); the in-flight PRs and branches you merged, closed, or left for an active owner; the dependency updates merged or closed; each blocker you fixed and how; any issues filed; and the **Decisions for operator review** list.The release workflow is attached to this task by metadata so every provider receives the same bundled body and reviewer pin. Do not reimplement any of its phases in this scheduled prompt.`,diff --git a/server/services/taskPromptDefaults/versions.js b/server/services/taskPromptDefaults/versions.jsindex dbf78c3fe1..c82d9fe269 100644--- a/server/services/taskPromptDefaults/versions.js+++ b/server/services/taskPromptDefaults/versions.js@@ -76,7 +76,7 @@ export const PROMPT_VERSIONS = {'better-test-quality': 1, // v1: vacuous/weak/redundant existing tests, proven with a mutation probe. Distinct from test-coverage, which owns the gaps.'stash-cleanup': 2, // v2: the STALE/ABANDONED heuristic names `AGENTS.md` (or `CLAUDE.md`) as the policy file to check before assuming a stash contradicts current architecture (#4852). v1: triage git stash list — supersession check against main, drop superseded/stale entries, leave real unlanded work in place. Net-new type (no retired-hash history needed).'repo-sync': 1, // v1: verify + finish the deterministic install-wide origin-sync sweep (services/repoSync.js) — resolve mid-flight merges/rebases, decide what to do with uncommitted work, land or report unpushed branches, triage the stashes it could not prove redundant. Net-new type (no retired-hash history needed).- 'release-check': 14, // v14: the release agent names each release from its one or two biggest user-visible wins and writes the exact first heading the GitHub workflow promotes to the release title. v13: a failing test suite or red CI is work the run must FIX (reproduce, classify regression vs. bad test vs. environmental blocker, fix the root cause, verify, commit, resume) instead of a reason to halt the release — a pre-existing failure on main stopped v12 short with the release untouched; skipping/deleting/loosening a test to force green is explicitly not a fix, and the loop is bounded (3 attempts per failure, 10 fix commits per run). v12: code review is advisory and only CI gates release progress; v11: delegate release mechanics to bundled slashdo release and pin PortOS-configured reviewers. v10: the release-documentation search names the `AGENTS.md` (or `CLAUDE.md`) context instead of CLAUDE.md alone (#4852). v9: Step 1 reconciles missing GitHub Releases against git release tags (publishing any missing tag with .changelog/vX.Y.Z.md as body and --latest=false when a newer version exists) BEFORE evaluating if enough unreleased work has accumulated; v8: database-backed release tests are provisioned and run using the repo's documented isolated test database before the release PR gate; v7: Step 1 also reads the UNCOLLECTED changelog fragments (the fragment dir, plus whatever preview command that repo documents — release-check is a generic {appName} prompt, so it never names a PortOS script to run) and counts substantive entries across the assembled notes — reading only the staged `.changelog/NEXT.md` under-counts a release whose entries are still per-branch fragments, so a ready release reported as "not enough work". v6: generic {appName} body (older defaults hardcoded "PortOS")+ 'do-release': 15, // v15: renamed from `release-check` — the goal is a SHIPPED release, not a readiness check. The run first finishes in-flight work no live agent owns (open PRs, lingering branches via branch-reconcile), merges dependency-bot PRs, then releases; a blocker that survives three attempts goes to a sub-agent or a queued PortOS task instead of ending the run (v14 stopped at its 10-commit bound with the release PR open), local-only flakes no longer block a green-CI release, and routine design/preference decisions are made and listed for operator review. The operator's `{releaseOptions}` toggles (finishInFlight / mergeDependencyUpdates / resolveBlockers / autoDecide) gate each step. v14: the release agent names each release from its one or two biggest user-visible wins and writes the exact first heading the GitHub workflow promotes to the release title. v13: a failing test suite or red CI is work the run must FIX (reproduce, classify regression vs. bad test vs. environmental blocker, fix the root cause, verify, commit, resume) instead of a reason to halt the release — a pre-existing failure on main stopped v12 short with the release untouched; skipping/deleting/loosening a test to force green is explicitly not a fix, and the loop is bounded (3 attempts per failure, 10 fix commits per run). v12: code review is advisory and only CI gates release progress; v11: delegate release mechanics to bundled slashdo release and pin PortOS-configured reviewers. v10: the release-documentation search names the `AGENTS.md` (or `CLAUDE.md`) context instead of CLAUDE.md alone (#4852). v9: Step 1 reconciles missing GitHub Releases against git release tags (publishing any missing tag with .changelog/vX.Y.Z.md as body and --latest=false when a newer version exists) BEFORE evaluating if enough unreleased work has accumulated; v8: database-backed release tests are provisioned and run using the repo's documented isolated test database before the release PR gate; v7: Step 1 also reads the UNCOLLECTED changelog fragments (the fragment dir, plus whatever preview command that repo documents — release-check is a generic {appName} prompt, so it never names a PortOS script to run) and counts substantive entries across the assembled notes — reading only the staged `.changelog/NEXT.md` under-counts a release whose entries are still per-branch fragments, so a ready release reported as "not enough work". v6: generic {appName} body (older defaults hardcoded "PortOS")// A SCHEDULE task type absent from this map is silently exempt from// auto-upgrade forever: taskScheduleStore's upgrade block is gated ondiff --git a/server/services/taskSchedule.test.js b/server/services/taskSchedule.test.jsindex 2e6bfc4508..42376b9a20 100644--- a/server/services/taskSchedule.test.js+++ b/server/services/taskSchedule.test.js@@ -627,7 +627,7 @@ describe('taskSchedule', () => {it('versions the basic self-improvement tasks so deployed installs can auto-upgrade', () => {for (const t of ['security', 'code-quality', 'test-coverage', 'performance', 'accessibility',- 'dependency-updates', 'documentation', 'ui-bugs', 'mobile-responsive', 'release-check']) {+ 'dependency-updates', 'documentation', 'ui-bugs', 'mobile-responsive', 'do-release']) {expect(PROMPT_VERSIONS[t], `PROMPT_VERSIONS['${t}']`).toBeGreaterThanOrEqual(2)}})@@ -1351,20 +1351,20 @@ describe('taskSchedule', () => {getAppTaskTypeInterval.mockResolvedValue(null)const lastRun = '2026-09-08T05:01:00Z'const schedule = {- tasks: { 'release-check': { type: 'cron', enabled: true, cronExpression: '30 4 * * *', runAfter: [] } },- executions: { 'task:release-check': { perApp: { 'app-1': { lastRun, count: 1 } } } }+ tasks: { 'do-release': { type: 'cron', enabled: true, cronExpression: '30 4 * * *', runAfter: [] } },+ executions: { 'task:do-release': { perApp: { 'app-1': { lastRun, count: 1 } } } }}mockSchedule(schedule)- expect(await shouldRunTask('release-check', 'app-1')).toMatchObject({+ expect(await shouldRunTask('do-release', 'app-1')).toMatchObject({shouldRun: false, reason: 'cron-cooldown', nextRunAt: '2026-09-09T11:30:00.000Z'})vi.setSystemTime(new Date('2026-09-09T11:30:20Z'))- expect(await shouldRunTask('release-check', 'app-1')).toMatchObject({ shouldRun: true, reason: 'cron-due' })+ expect(await shouldRunTask('do-release', 'app-1')).toMatchObject({ shouldRun: true, reason: 'cron-due' })- schedule.executions['task:release-check'].perApp['app-1'].lastRun = '2026-09-09T11:30:20Z'+ schedule.executions['task:do-release'].perApp['app-1'].lastRun = '2026-09-09T11:30:20Z'mockSchedule(schedule)- expect(await shouldRunTask('release-check', 'app-1')).toMatchObject({+ expect(await shouldRunTask('do-release', 'app-1')).toMatchObject({shouldRun: false, nextRunAt: '2026-09-10T11:30:00.000Z'})})@@ -1376,9 +1376,9 @@ describe('taskSchedule', () => {parseCronToNextRun.mockImplementation(actual.parseCronToNextRun)getAppTaskTypeInterval.mockResolvedValue('30 4 * * *')mockSchedule({- tasks: { 'release-check': { type: 'cron', enabled: true, cronExpression: '0 8 * * *', createdAt: '2026-09-01T00:00:00Z', runAfter: [] } }+ tasks: { 'do-release': { type: 'cron', enabled: true, cronExpression: '0 8 * * *', createdAt: '2026-09-01T00:00:00Z', runAfter: [] } }})- expect(await shouldRunTask('release-check', 'app-1')).toMatchObject({+ expect(await shouldRunTask('do-release', 'app-1')).toMatchObject({shouldRun: false, nextRunAt: '2026-09-10T11:30:00.000Z'})getAppTaskTypeInterval.mockResolvedValue(null)@@ -1594,8 +1594,8 @@ describe('taskSchedule', () => {expect(prompt).toContain('does NOT touch PLAN.md')})- it('release-check delegates to slashdo release and requires a named release heading', async () => {- const prompt = await getTaskPrompt('release-check')+ it('do-release delegates to slashdo release and requires a named release heading', async () => {+ const prompt = await getTaskPrompt('do-release')expect(prompt).toContain('/do:release')expect(prompt).toContain('{reviewers}')expect(prompt).toContain('# Release vX.Y.Z - <Fun Name>')@@ -1635,7 +1635,7 @@ describe('taskSchedule', () => {// Locked, so a per-app override can't re-attach what the defaults cleared.// worktreeChangesExpected is managed too — see MANAGED_AGENT_OPTIONS.const managed = ['useWorktree', 'openPR', 'worktreeChangesExpected']- if (taskType === 'release-check') {+ if (taskType === 'do-release') {managed.push('slashdoCommand')expect(meta.slashdoCommand).toBe('release')}@@ -1661,7 +1661,7 @@ describe('taskSchedule', () => {expect(meta.useWorktree).toBe(false)expect(meta.openPR).toBe(false)expect(meta.worktreeChangesExpected).toBe(false)- if (taskType === 'release-check') expect(meta.slashdoCommand).toBe('release')+ if (taskType === 'do-release') expect(meta.slashdoCommand).toBe('release')if (taskType === 'branch-reconcile') expect(meta.branchesPerAgent).toBe(3)})@@ -2703,12 +2703,12 @@ describe('taskSchedule', () => {for (const app of apps) {getAppTaskTypeInterval.mockResolvedValueOnce(cron(app.id))getAppTaskTypeOverrides.mockResolvedValueOnce({- 'release-check': { enabled: true, interval: cron(app.id) }+ 'do-release': { enabled: true, interval: cron(app.id) }})}- mockSchedule({ tasks: { 'release-check': { type: 'on-demand', enabled: true, runAfter: [] } } })+ mockSchedule({ tasks: { 'do-release': { type: 'on-demand', enabled: true, runAfter: [] } } })const upcoming = await getUpcomingTasks(50)- expect(upcoming.find(t => t.taskType === 'release-check')).toMatchObject({+ expect(upcoming.find(t => t.taskType === 'do-release')).toMatchObject({status: 'ready', nextScheduledAt: new Date('2026-01-01T16:05:00Z').getTime()})})@@ -2724,13 +2724,13 @@ describe('taskSchedule', () => {isTaskTypeEnabledForApp.mockResolvedValueOnce(true)getAppTaskTypeInterval.mockResolvedValueOnce('15 9 * * *')getAppTaskTypeOverrides.mockResolvedValueOnce({- 'release-check': { enabled: true, interval: '15 9 * * *' }+ 'do-release': { enabled: true, interval: '15 9 * * *' }})mockSchedule({- tasks: { 'release-check': { type: 'on-demand', enabled: true, runAfter: [] } }+ tasks: { 'do-release': { type: 'on-demand', enabled: true, runAfter: [] } }})const upcoming = await getUpcomingTasks(50)- const release = upcoming.find(t => t.taskType === 'release-check')+ const release = upcoming.find(t => t.taskType === 'do-release')expect(release).toMatchObject({status: 'scheduled',@@ -2748,24 +2748,24 @@ describe('taskSchedule', () => {describe('getUpcomingTasks — propagates input failures instead of swallowing them (#7527)', () => {it('propagates a rejected active-apps read instead of treating it as no apps', async () => {getActiveApps.mockRejectedValueOnce(new Error('app inventory unavailable'))- mockSchedule({ tasks: { 'release-check': { type: 'on-demand', enabled: true, runAfter: [] } } })+ mockSchedule({ tasks: { 'do-release': { type: 'on-demand', enabled: true, runAfter: [] } } })await expect(getUpcomingTasks(50)).rejects.toThrow('app inventory unavailable')})it('propagates a rejected app-override read instead of treating it as no overrides', async () => {getActiveApps.mockResolvedValueOnce([{ id: 'app-1', name: 'Acme' }])getAppTaskTypeOverrides.mockRejectedValueOnce(new Error('app overrides unavailable'))- mockSchedule({ tasks: { 'release-check': { type: 'on-demand', enabled: true, runAfter: [] } } })+ mockSchedule({ tasks: { 'do-release': { type: 'on-demand', enabled: true, runAfter: [] } } })await expect(getUpcomingTasks(50)).rejects.toThrow('app overrides unavailable')})it('propagates a rejected per-app readiness read instead of treating the app as not-ready', async () => {getActiveApps.mockResolvedValueOnce([{ id: 'app-1', name: 'Acme' }])getAppTaskTypeOverrides.mockResolvedValueOnce({- 'release-check': { enabled: true, interval: '15 9 * * *' }+ 'do-release': { enabled: true, interval: '15 9 * * *' }})isTaskTypeEnabledForApp.mockRejectedValueOnce(new Error('app readiness unavailable'))- mockSchedule({ tasks: { 'release-check': { type: 'on-demand', enabled: true, runAfter: [] } } })+ mockSchedule({ tasks: { 'do-release': { type: 'on-demand', enabled: true, runAfter: [] } } })await expect(getUpcomingTasks(50)).rejects.toThrow('app readiness unavailable')})})@@ -2799,11 +2799,11 @@ describe('taskSchedule', () => {getActiveApps.mockResolvedValue([{ id: 'app-1', name: 'Acme' }])isTaskTypeEnabledForApp.mockResolvedValue(true)getAppTaskTypeInterval.mockResolvedValue('15 9 * * *')- getAppTaskTypeOverrides.mockResolvedValue({ 'release-check': { enabled: true, interval: '15 9 * * *' } })- mockSchedule({ tasks: { 'release-check': { type: 'on-demand', enabled: true, runAfter: [] } } })+ getAppTaskTypeOverrides.mockResolvedValue({ 'do-release': { enabled: true, interval: '15 9 * * *' } })+ mockSchedule({ tasks: { 'do-release': { type: 'on-demand', enabled: true, runAfter: [] } } })const status = await getScheduleStatus()- expect(status.tasks['release-check'].appSchedules).toEqual([{+ expect(status.tasks['do-release'].appSchedules).toEqual([{appId: 'app-1',appName: 'Acme',cronExpression: '15 9 * * *',@@ -2819,10 +2819,10 @@ describe('taskSchedule', () => {getActiveApps.mockResolvedValue([{ id: 'app-1', name: 'Acme' }])isTaskTypeEnabledForApp.mockResolvedValue(true)getAppTaskTypeInterval.mockResolvedValue(null)- getAppTaskTypeOverrides.mockResolvedValue({ 'release-check': { enabled: true } })- mockSchedule({ tasks: { 'release-check': { type: 'cron', cronExpression: '15 9 * * *', enabled: true, runAfter: [] } } })+ getAppTaskTypeOverrides.mockResolvedValue({ 'do-release': { enabled: true } })+ mockSchedule({ tasks: { 'do-release': { type: 'cron', cronExpression: '15 9 * * *', enabled: true, runAfter: [] } } })- expect((await getScheduleStatus()).tasks['release-check'].appSchedules).toEqual([])+ expect((await getScheduleStatus()).tasks['do-release'].appSchedules).toEqual([])})// An app restating the task's own expression adds no schedule the global@@ -2833,10 +2833,10 @@ describe('taskSchedule', () => {getActiveApps.mockResolvedValue([{ id: 'app-1', name: 'Acme' }])isTaskTypeEnabledForApp.mockResolvedValue(true)getAppTaskTypeInterval.mockResolvedValue('15 9 * * *')- getAppTaskTypeOverrides.mockResolvedValue({ 'release-check': { enabled: true, interval: '15 9 * * *' } })- mockSchedule({ tasks: { 'release-check': { type: 'cron', cronExpression: '15 9 * * *', enabled: true, runAfter: [] } } })+ getAppTaskTypeOverrides.mockResolvedValue({ 'do-release': { enabled: true, interval: '15 9 * * *' } })+ mockSchedule({ tasks: { 'do-release': { type: 'cron', cronExpression: '15 9 * * *', enabled: true, runAfter: [] } } })- expect((await getScheduleStatus()).tasks['release-check'].appSchedules).toEqual([])+ expect((await getScheduleStatus()).tasks['do-release'].appSchedules).toEqual([])})it('omits an app that is disabled for the task', async () => {@@ -2844,10 +2844,10 @@ describe('taskSchedule', () => {getActiveApps.mockResolvedValue([{ id: 'app-1', name: 'Acme' }])isTaskTypeEnabledForApp.mockResolvedValue(false)getAppTaskTypeInterval.mockResolvedValue('15 9 * * *')- getAppTaskTypeOverrides.mockResolvedValue({ 'release-check': { enabled: false, interval: '15 9 * * *' } })- mockSchedule({ tasks: { 'release-check': { type: 'on-demand', enabled: true, runAfter: [] } } })+ getAppTaskTypeOverrides.mockResolvedValue({ 'do-release': { enabled: false, interval: '15 9 * * *' } })+ mockSchedule({ tasks: { 'do-release': { type: 'on-demand', enabled: true, runAfter: [] } } })- expect((await getScheduleStatus()).tasks['release-check'].appSchedules).toEqual([])+ expect((await getScheduleStatus()).tasks['do-release'].appSchedules).toEqual([])})})diff --git a/server/services/taskScheduleRegistry.js b/server/services/taskScheduleRegistry.jsindex 0eea140335..38636a4b70 100644--- a/server/services/taskScheduleRegistry.js+++ b/server/services/taskScheduleRegistry.js@@ -6,7 +6,7 @@ import { PRIVATE_SECURITY_TASK_TYPE, PRIVATE_SECURITY_DELIVERY } from '../lib/pr* so app configuration can consume task definitions without forming a cycle.*/-import { BRANCHES_PER_AGENT_MAX, BRANCHES_PER_AGENT_MIN, DEFAULT_REPO_SYNC_VERIFY_MODE } from '../lib/cosValidation.js';+import { BRANCHES_PER_AGENT_MAX, BRANCHES_PER_AGENT_MIN, DEFAULT_REPO_SYNC_VERIFY_MODE, RELEASE_OPTION_KEYS } from '../lib/cosValidation.js';import { isAuditTaskType, defaultFileIssuesFor } from '../lib/auditCatalog.js';import { MODEL_ABUSE_GUARD_ID } from '../lib/modelAbuseGuard.js';import {@@ -31,7 +31,7 @@ export { SELF_IMPROVEMENT_TASK_TYPES };// Shared taskMetadata posture for the NON-COMMITTING COORDINATOR types// (NON_COMMITTING_COORDINATOR_TASK_TYPES in taskTypeHooks.js — branch-reconcile /-// issue-reconcile / branch-cleanup / jira-status-report / release-check). Each delivers its work+// issue-reconcile / branch-cleanup / jira-status-report / do-release). Each delivers its work// as a SIDE EFFECT in the app's live checkout — a deleted branch, a merged PR, a// relabeled issue, a posted report — and by design produces no commit of its own.// Two code-shipping criteria therefore have to be switched off or every SUCCESSFUL@@ -51,10 +51,17 @@ export { SELF_IMPROVEMENT_TASK_TYPES };// A guard test in taskSchedule.test.js asserts every member of that set carries// this posture, so a new coordinator type can't be added to one list only.const NON_COMMITTING_COORDINATOR_METADATA = { useWorktree: false, openPR: false, worktreeChangesExpected: false };-// Release-check delegates its release lifecycle to the bundled slashdo workflow.+// do-release delegates its release lifecycle to the bundled slashdo workflow.// Keep the command in managed metadata so a customized prompt or app override-// cannot silently fall back to a second, drifting release implementation.-const RELEASE_CHECK_METADATA = { ...NON_COMMITTING_COORDINATOR_METADATA, slashdoCommand: 'release' };+// cannot silently fall back to a second, drifting release implementation. The+// release options (RELEASE_OPTION_KEYS — finish in-flight work, merge dependency+// updates, resolve blockers, make routine decisions) are seeded ON and stay+// operator-editable, globally and per app; each is ON unless explicitly false.+const DO_RELEASE_METADATA = {+ ...NON_COMMITTING_COORDINATOR_METADATA,+ slashdoCommand: 'release',+ ...Object.fromEntries(RELEASE_OPTION_KEYS.map((key) => [key, true])),+};// Migration 274 removes branch-cleanup from new schedules, but a partially// upgraded install may still load its stored task before the migration runs.// Keep its safety posture available without making it a newly-shipped task.@@ -288,11 +295,12 @@ const TASK_INTERVAL_DEFAULTS = {'claim-work': { type: INTERVAL_TYPES.ON_DEMAND, enabled: true, providerId: null, model: null, prompt: null, taskMetadata: { useWorktree: false, openPR: false, claimFlow: true, simplify: true, issueAuthorFilter: 'self', issueExcludeLabels: [] } },'error-handling': { type: INTERVAL_TYPES.ON_DEMAND, enabled: true, providerId: null, model: null, prompt: null, taskMetadata: { fileIssues: false } },'typing': { type: INTERVAL_TYPES.ON_DEMAND, enabled: true, providerId: null, model: null, prompt: null, taskMetadata: { fileIssues: false } },- // Release-check inspects and mutates release state (for example, the main →- // release PR) rather than producing source commits. It must run from the app's+ // do-release ships the release: it finishes in-flight PRs, merges dependency+ // updates, and drives the main → release PR rather than producing source+ // commits of its own. It must run from the app's// live main checkout so its branch/ref checks describe the real release flow;// a CoS worktree hides that checkout and creates an irrelevant task branch.- 'release-check': { type: INTERVAL_TYPES.ON_DEMAND, enabled: true, providerId: null, model: null, prompt: null, taskMetadata: { ...RELEASE_CHECK_METADATA } },+ 'do-release': { type: INTERVAL_TYPES.ON_DEMAND, enabled: true, providerId: null, model: null, prompt: null, taskMetadata: { ...DO_RELEASE_METADATA } },// stash-cleanup triages `git stash list` and drops what's superseded/stale,// leaving real unlanded work in place for the user to recover by hand. It// runs in the app's live checkout (never a CoS worktree — a stash is a@@ -480,7 +488,7 @@ export const MANAGED_AGENT_OPTIONS = {// claim-work delegates to one of the above prompt bodies, each of which// creates its own worktree + PR — so the same lock applies to the router.'claim-work': ['useWorktree', 'openPR', 'claimFlow'],- 'release-check': ['useWorktree', 'openPR', 'worktreeChangesExpected', 'slashdoCommand']+ 'do-release': ['useWorktree', 'openPR', 'worktreeChangesExpected', 'slashdoCommand']};// Strip managed-agent fields from a per-app override map before merging on top@@ -559,7 +567,7 @@ export const TASK_TYPE_DESCRIPTIONS = {'branch-reconcile': "Finish this machine's in-flight local branches: clean up merged ones, open PRs, resolve conflicts, drive review, auto-merge when green",'issue-reconcile': "Remediate trusted operator and collaborator issues: heal zombies (open + in-progress but their PR already merged with no live claim — close + file a scoped follow-up or release the claim) and auto-unblock: remove the `blocked` label once every issue named in its `Blocked by #N` line has closed",'dependency-updates': 'Land or resolve open Dependabot/Renovate PRs, then update the dependencies they missed',- 'release-check': 'Check for release readiness',+ 'do-release': 'Ship a release: finish in-flight work, merge dependency updates, fix blockers, then run the release workflow','error-handling': 'Failure-path audit — file issues or implement fixes','typing': 'TypeScript types — file issues or implement fixes','pr-reviewer': 'Watch external contributor PRs: screen content, gate eligibility, and validate review actions',diff --git a/server/services/taskTypeHooks.js b/server/services/taskTypeHooks.jsindex f3abf8eed7..4af6abed6a 100644--- a/server/services/taskTypeHooks.js+++ b/server/services/taskTypeHooks.js@@ -167,8 +167,11 @@ export function resolveTaskHookType(task) {* buckets these already poisoned on existing installs.*/export const NON_COMMITTING_COORDINATOR_TASK_TYPES = new Set([- 'branch-reconcile', 'issue-reconcile', 'branch-cleanup', 'jira-status-report', 'release-check',+ 'branch-reconcile', 'issue-reconcile', 'branch-cleanup', 'jira-status-report', 'do-release','stash-cleanup', 'repo-sync', 'pr-reviewer', 'model-comparison-refresh',+ // Pre-rename name of do-release (migration 417): queued and archived tasks+ // still carry it, and their buckets must keep the coordinator exemption.+ 'release-check',]);/**diff --git a/server/services/workflow.js b/server/services/workflow.jsindex 8c85a8891c..e1a2c8b35d 100644--- a/server/services/workflow.js+++ b/server/services/workflow.js@@ -90,8 +90,8 @@ export const WORKFLOW_STAGES = [{id: 'report',label: 'Report',- description: 'Externalize status — JIRA tickets, daily briefing, release readiness — once the build cycle has settled.',- taskTypes: ['jira-sprint-manager', 'jira-status-report', 'release-check'],+ description: 'Externalize status — JIRA tickets, daily briefing, releases — once the build cycle has settled.',+ taskTypes: ['jira-sprint-manager', 'jira-status-report', 'do-release'],jobIds: ['job-daily-briefing', 'job-datadog-error-monitor']},{