{"record":{"id":"83051f89ba0a075c","repo":"coleam00/Archon","slug":"warning-warning","errorCode":null,"errorMessage":"  Warning: ${warning}","messagePattern":"  Warning: (.+?)","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"packages/cli/src/commands/isolation.ts","lineNumber":419,"sourceCode":"        console.error(`  Blocked: ${branch}`);\n        for (const blocker of blockers) {\n          console.error(`    ✗ ${blocker}`);\n        }\n        console.error('  Use --force to override.');\n        failed++;\n        continue;\n      }\n    }\n\n    try {\n      const result: RemoveEnvironmentResult = await removeEnvironment(env.id, {\n        force: options.force,\n        deleteRemoteBranch: options.deleteRemote ?? true,\n      });\n\n      // Surface warnings from partial cleanup\n      for (const warning of result.warnings) {\n        console.warn(`  Warning: ${warning}`);\n      }\n\n      if (result.skippedReason) {\n        console.error(`  Blocked: ${branch} — ${result.skippedReason}`);\n        if (result.skippedReason === 'has uncommitted changes') {\n          console.error('    Use --force to override.');\n        }\n        failed++;\n      } else if (!result.worktreeRemoved) {\n        const parts: string[] = [];\n        if (result.branchDeleted) parts.push('branch deleted');\n        parts.push('DB updated');\n        console.error(\n          `  Partial: ${branch} — worktree was not removed from disk (${parts.join(', ')})`\n        );\n        for (const warning of result.warnings) {\n          console.error(`    ⚠ ${warning}`);\n        }","sourceCodeStart":401,"sourceCodeEnd":437,"githubUrl":"https://github.com/coleam00/Archon/blob/0773b9745896ef0612e709c80845a0f7db315b19/packages/cli/src/commands/isolation.ts#L401-L437","documentation":"The generic warning printer in `isolationCompleteCommand` (packages/cli/src/commands/isolation.ts:419) that surfaces non-fatal cleanup warnings collected in `result.warnings` after worktree/branch teardown. The completion succeeded (possibly partially), and each warning string describes a step that could not be fully cleaned up, e.g. remote branch deletion failure.","triggerScenarios":"Calling `archon isolation complete <branch>` where the underlying complete result contains warnings — typically when `deleteRemoteBranch` is true but the remote branch delete fails, or a partial cleanup step errors without blocking the result.","commonSituations":"Remote branch already deleted on the GitHub side but still present locally; missing/failed `gh` auth for remote operations; branch protection or permissions blocking remote deletion.","solutions":["Read the specific warning text printed — it names the cleanup step that partially failed.","If the remote branch delete failed, delete it manually: `git push origin --delete <branch>`.","Re-run `archon isolation complete <branch>` after fixing the cause; it should now report no warnings.","If the warning is benign (already-deleted remote branch), no action is needed."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"// Pre-check remote branch existence so the warning is expected\ngit ls-remote --heads origin <branch>","typeGuard":null,"tryCatchPattern":"const result = await completeBranch({ branch, deleteRemoteBranch: true });\nfor (const w of result.warnings) {\n  console.error(`cleanup warning: ${w}`); // decide per-warning whether it blocks your workflow\n}","preventionTips":["Ensure `gh` is authenticated before completions that delete remote branches.","Delete local and remote branches through one tool to avoid drift.","Treat result.warnings as non-empty meaning 'verify cleanup manually'."],"tags":["cli","git","cleanup","partial-failure"],"backgroundTag":"incomplete-cleanup-warning","analyzedSha":"0773b9745896ef0612e709c80845a0f7db315b19","analyzedAt":"2026-09-01T02:28:07.064Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T05:18:18.240Z"}