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
fix: keep quota-burn steps saved as release-check runnable, never wait on reconcile
[._.]/ Adam Eivyfbf594948ea9
diff --git a/server/lib/quotaBurnTaskRef.js b/server/lib/quotaBurnTaskRef.jsindex 8ac5bd1215..c1fcade571 100644--- a/server/lib/quotaBurnTaskRef.js+++ b/server/lib/quotaBurnTaskRef.js@@ -34,6 +34,7 @@*/import { isPlainObject, POLLUTING_KEYS } from './objects.js';+import { currentTaskTypeName } from './scheduledTaskTypes.js';import { requiresInstallWideTarget, requiresManagedAppTarget } from './taskTargetScope.js';import { trimTo } from './textUtils.js';@@ -100,7 +101,9 @@ const nullable = (value, max) => trimTo(value, max) || null;export function normalizeQuotaBurnTaskRef(raw) {if (!isPlainObject(raw)) return null;if (raw.kind === QUOTA_BURN_TASK_REF_KIND.BUILTIN) {- const taskType = trimTo(raw.taskType, MAX_REF_FIELD);+ // A step saved before a task rename (TASK_TYPE_RENAMES) resolves to the+ // current name, or it would read as an unknown task and never run again.+ const taskType = currentTaskTypeName(trimTo(raw.taskType, MAX_REF_FIELD));if (!taskType) return null;return { kind: QUOTA_BURN_TASK_REF_KIND.BUILTIN, taskType, appId: nullable(raw.appId, MAX_REF_FIELD) };}diff --git a/server/lib/quotaBurnTaskRef.test.js b/server/lib/quotaBurnTaskRef.test.jsindex 283b0fa31b..25dd96f521 100644--- a/server/lib/quotaBurnTaskRef.test.js+++ b/server/lib/quotaBurnTaskRef.test.js@@ -21,6 +21,11 @@ describe('normalizeQuotaBurnTaskRef', () => {expect(normalizeQuotaBurnTaskRef({ kind: 'custom', jobId: ' ' })).toBeNull();});+ it('resolves a step saved under a renamed task type to its current name', () => {+ expect(normalizeQuotaBurnTaskRef({ kind: 'builtin', taskType: 'release-check', appId: 'app-1' }))+ .toEqual({ kind: QUOTA_BURN_TASK_REF_KIND.BUILTIN, taskType: 'do-release', appId: 'app-1' });+ });+it('keeps a custom reference free of an app scope the job itself owns', () => {expect(normalizeQuotaBurnTaskRef({ kind: 'custom', jobId: 'job-7', appId: 'app-1' })).toEqual({ kind: QUOTA_BURN_TASK_REF_KIND.CUSTOM, jobId: 'job-7' });diff --git a/server/services/taskPromptDefaults.test.js b/server/services/taskPromptDefaults.test.jsindex 790708a0f2..1ef9483624 100644--- a/server/services/taskPromptDefaults.test.js+++ b/server/services/taskPromptDefaults.test.js@@ -680,6 +680,7 @@ describe('taskPromptDefaults integrity snapshot', () => {expect(current).toContain('/api/cos/agents?active=1');// Scoped to the app being released, never the install's other repos.expect(current).toContain('"taskType":"branch-reconcile","appId":"{appId}"');+ expect(current).toContain('Do not wait for the triggered agent');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 stoppeddiff --git a/server/services/taskPromptDefaults/integrity.snapshot.json b/server/services/taskPromptDefaults/integrity.snapshot.jsonindex d158115bb2..282e09e81e 100644--- a/server/services/taskPromptDefaults/integrity.snapshot.json+++ b/server/services/taskPromptDefaults/integrity.snapshot.json@@ -23,7 +23,7 @@"data-integrity": "5fcc4f5044101e89da5bbf4890c11a1c","data-safety": "eb97988dfc16d4c655f1834acc91d665","dependency-updates": "2d94021c979a86a349e125f5c15665d8",- "do-release": "774a3f8872513b11843694791206bcd0",+ "do-release": "11fa68d845f80053e56f58211623e8d1","do-replan": "35660eb7b43e4259a6a9253ed288a1db","documentation": "a30e3bfba8cd13369ccaf806a3534a79","error-handling": "137b371f38398042c0a2c7e2279c92ce",diff --git a/server/services/taskPromptDefaults/prompts.js b/server/services/taskPromptDefaults/prompts.jsindex ccf407e6ca..a30e401db4 100644--- a/server/services/taskPromptDefaults/prompts.js+++ b/server/services/taskPromptDefaults/prompts.js@@ -3433,7 +3433,7 @@ 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","appId":"{appId}"}' ${PORTOS_API_URL}/api/cos/schedule/trigger\` (drop the \`appId\` field when it is empty — that targets PortOS itself; never point it at a different app than this release), 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.+- **Lingering local branches and worktrees**: reconcile them yourself (or through a sub-agent): delete branches already merged, ship coherent unmerged work as a PR, and report anything ambiguous. When this install has the PortOS \`branch-reconcile\` task, also trigger it so its drain keeps working the backlog after this run: \`curl -s -X POST -H "Authorization: Bearer \${PORTOS_API_TOKEN:-}" -H 'Content-Type: application/json' -d '{"taskType":"branch-reconcile","appId":"{appId}"}' ${PORTOS_API_URL}/api/cos/schedule/trigger\` (drop the \`appId\` field when it is empty — that targets PortOS itself; never point it at a different app than this release). Do not wait for the triggered agent: it may need the agent slot this run holds.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.