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: dependency-updates task triages open Dependabot PRs before bumping anything itself
[._.]/ Adam Eivy40a411028379
diff --git a/.changelog/NEXT.md b/.changelog/NEXT.mdindex ba5e2941cd..33e0f0ba0f 100644--- a/.changelog/NEXT.md+++ b/.changelog/NEXT.md@@ -60,6 +60,8 @@## Chief of Staff- **"Try again shortly" no longer hides a forge CLI that will never work again on its own.** Running a perpetual task like claim-issue when its `gh` probe fails always toasted "couldn't complete the check just now (a transient forge/network issue) — try again shortly", which is only true for a momentary blip. A `gh` that isn't installed, isn't authenticated, or is blocked outbound by a local firewall fails identically on every future tick, so the advice sent you in a loop with nothing naming the actual fault — the firewall case is the worst of the three, since a denied `connect()` surfaces as "bad file descriptor" and reads like a local bug rather than a network block. The work detector already knew which CLI it ran and how the call failed, but a transient skip deliberately doesn't park, so that verdict had nowhere to go and was dropped at a debug log. It now travels the same route the park reason already does, and when the failing CLI is `gh` the toast reports its health with the remedy ("allow the gh binary to reach api.github.com", "run `gh auth login`", "install the GitHub CLI"). Attribution comes from the CLI that actually failed rather than the task-type name — `claim-work` picks its forge internally, and branch-reconcile and quota-burn go transient over git and provider faults with no forge involved, so a name-based guess would have told a GitLab or Ollama user to install the GitHub CLI. A blip where `gh` itself is fine still gets the original wording.+- **The weekly dependency-updates task now clears out open Dependabot PRs before bumping anything itself.** The prompt went straight to `npm audit` / `npm outdated`, so on a repo where Dependabot had already opened five PRs the agent re-did that work by hand — duplicate bumps that conflicted with the bot branches, and a growing pile of stale bot PRs nobody ever closed or merged. It now runs a triage phase first: list the automated PRs (Dependabot or Renovate, GitHub or GitLab), gather the evidence for each one — version jump, release notes checked against what this repo actually calls, CI logs for a failure, whether the diff is manifest-and-lockfile-only — and take a single verdict. A clean patch/minor gets merged; a stuck-but-wanted PR gets fixed (ask the bot to rebase a conflict, or push the smallest adapting change for a genuine breakage) and then merged; a superseded one is closed with a reason; a major that needs a real migration is left open with a comment and recorded in the repo's tracker. Only then does it look for updates the bots missed, skipping any package whose bump a bot PR already owns. Existing installs on the previous default upgrade automatically.+- **Run-history row actions and screenshot-remove buttons are now visible when you tab to them.** The view-logs, resume and delete buttons on a run-history row — and the remove-screenshot buttons on the task form and the resume-agent dialog — were revealed only on mouse hover. On a tablet, which has no hover state, they were undiscoverable; for anyone navigating by keyboard they could be focused but never seen, so you could tab onto a delete button with nothing on screen telling you so. They now appear on keyboard focus as well as hover.## Messagesdiff --git a/server/services/taskPromptDefaults.test.js b/server/services/taskPromptDefaults.test.jsindex b8a154bcfc..5e6e040efd 100644--- a/server/services/taskPromptDefaults.test.js+++ b/server/services/taskPromptDefaults.test.js@@ -114,6 +114,28 @@ describe('taskPromptDefaults integrity snapshot', () => {expect(preDecide).not.toBe(current);});+ // dependency-updates v3: open Dependabot/Renovate PRs are triaged BEFORE the agent+ // bumps anything itself. v2 went straight to `npm outdated`, so a run against a repo+ // with open bot PRs re-did their work by hand — duplicate bumps, lockfile conflicts+ // against the bot branches, and a pile of stale bot PRs nobody closed.+ it('dependency-updates v3 triages bot PRs before updating, preserving the v2 default', () => {+ const current = DEFAULT_TASK_PROMPTS['dependency-updates'];+ expect(current).toContain('dependabot[bot]');+ expect(current).toContain('renovate[bot]');+ expect(current).toContain('FIX-THEN-MERGE');+ // Phase 2 must not re-bump a package a bot PR already owns.+ expect(current).toContain('that PR owns the bump');+ expect(PROMPT_VERSIONS['dependency-updates']).toBe(3);++ const previous = PREVIOUS_DEFAULT_PROMPTS['dependency-updates'];+ const v2 = previous[previous.length - 1];+ // The outgoing v2 default knew nothing about bot PRs and is preserved verbatim so+ // installs holding it are recognized and upgraded.+ expect(v2).not.toContain('dependabot');+ expect(v2).toContain('Only update one major version bump at a time');+ expect(v2).not.toBe(current);+ });+// NOTE: PROMPT_VERSIONS keys are SCHEDULE keys, not always prompt keys —// code-reviewer-a/b version a pipeline whose stages use the// code-reviewer-review / code-reviewer-implement prompt bodies — so there isdiff --git a/server/services/taskPromptDefaults/integrity.snapshot.json b/server/services/taskPromptDefaults/integrity.snapshot.jsonindex 9d5109beba..e6bc8bf162 100644--- a/server/services/taskPromptDefaults/integrity.snapshot.json+++ b/server/services/taskPromptDefaults/integrity.snapshot.json@@ -6,7 +6,7 @@"performance": "672bd3958b12afb0f382bcebb6dc3b33","accessibility": "372916803f32b82da38a5b2130a54baf","console-errors": "2b6ed595287f0742bed9ecba6788afe6",- "dependency-updates": "3f461b1c111ba45b7fa5016883cfa54d",+ "dependency-updates": "326988a4fb0ea3fa8391717a0176c049","documentation": "74aa8433896647e7815f9d6d9e4a56c8","ui-bugs": "def9ad96bd74ab397233f234d79a1974","mobile-responsive": "16d8e7f63a673a2de48994c0ac08ef3d",@@ -53,7 +53,7 @@"test-coverage": 2,"performance": 2,"accessibility": 2,- "dependency-updates": 2,+ "dependency-updates": 3,"documentation": 4,"ui-bugs": 2,"mobile-responsive": 2,@@ -130,7 +130,8 @@"b07cfe1e367411036ef1d4cc4b6e9d2e"],"dependency-updates": [- "640a7c4214e6bdba2bbd5b9061d9d425"+ "640a7c4214e6bdba2bbd5b9061d9d425",+ "3f461b1c111ba45b7fa5016883cfa54d"],"documentation": ["074ea22140f8f6a02c7e40a6bc7b0614",diff --git a/server/services/taskPromptDefaults/previousDefaults.js b/server/services/taskPromptDefaults/previousDefaults.jsindex 4a1b5d94f1..7b2f6a0b61 100644--- a/server/services/taskPromptDefaults/previousDefaults.js+++ b/server/services/taskPromptDefaults/previousDefaults.js@@ -4197,6 +4197,34 @@ Check PortOS dependencies for updates and security vulnerabilities:- Verify the app starts correctly7. Commit with clear changelog of what was updated and why`,+ // v2 default — genericized {appName}/{repoPath} body, but no awareness of open+ // Dependabot/Renovate PRs (v3 triages those first).+ `[Improvement: {appName}] Dependency Updates++Check {appName} dependencies for updates and security vulnerabilities:++Repository: {repoPath}++1. Run npm audit (or equivalent package manager)+2. Check for outdated packages+3. Review CRITICAL and HIGH severity vulnerabilities+4. For each vulnerability:+ - Assess actual risk+ - Check if update available+ - Test updates don't break functionality++5. Update dependencies carefully:+ - Patch versions first (safest)+ - Then minor versions+ - Major versions need careful review++6. After updating:+ - Run tests+ - Verify the app starts correctly++7. Commit with clear changelog++IMPORTANT: Only update one major version bump at a time.`,],'documentation': [// prior default (pre-genericization / intermediate)diff --git a/server/services/taskPromptDefaults/prompts.js b/server/services/taskPromptDefaults/prompts.jsindex 568729afe2..a23ac08c78 100644--- a/server/services/taskPromptDefaults/prompts.js+++ b/server/services/taskPromptDefaults/prompts.js@@ -151,8 +151,64 @@ Check {appName} dependencies for updates and security vulnerabilities:Repository: {repoPath}+Open automated dependency PRs come FIRST. A Dependabot/Renovate PR is a bump already+proposed and already isolated to one package — redoing it yourself conflicts with the bot+branch and leaves a stale PR behind. Finish Phase 1 before you touch a manifest.++## Phase 1 — Land or resolve open automated dependency PRs++1. List the open PRs. If the repo has no GitHub/GitLab remote, or \`gh\`/\`glab\` is+ unavailable or unauthenticated, say so and skip straight to Phase 2:+ \`gh pr list --state open --limit 50 --json number,title,headRefName,author,mergeable,mergeStateStatus\`+ (GitLab: \`glab mr list --state opened\`.)+ An automated dependency PR is one authored by \`dependabot[bot]\`, \`app/dependabot\`,+ \`renovate[bot]\`, or whose head branch starts with \`dependabot/\` or \`renovate/\`.++2. For EACH one, gather evidence before deciding:+ - The version jump: patch, minor, or major (\`gh pr view <n>\`)+ - For a major (or a minor from a package that breaks on minors): read the release+ notes in the PR body, then grep this codebase for the APIs that changed. A breaking+ change the repo never calls is not a blocker.+ - CI status: \`gh pr checks <n>\`. For a failure, read the actual log+ (\`gh run view <run-id> --log-failed\`) and identify the root cause — a real+ incompatibility, a flaky test, or an unrelated pre-existing failure on the+ default branch (check that before blaming the bump).+ - Mergeability: \`CONFLICTING\` almost always means lockfile/manifest drift from+ another dependency PR that already merged.+ - Diff sanity: the diff should be manifest + lockfile only. Source-file edits, a new+ postinstall/prepare script, or a changed registry URL in a bot PR is a red flag —+ do not merge it; comment what you found and leave it open.++3. Then take exactly ONE verdict per PR:+ - MERGE — patch/minor, CI green, not conflicting, diff is clean, nothing in the+ release notes affects how this repo uses the package. Merge it, matching the repo's+ documented merge method (\`gh pr merge <n> --merge\` unless the repo says otherwise).+ - FIX-THEN-MERGE — the bump is wanted but the PR is stuck. Fix it:+ * Conflicts only: ask the bot to redo it first — comment \`@dependabot rebase\`+ (Renovate: tick the PR's rebase checkbox), move on, and re-check at the end of+ the phase. If the bot doesn't respond, resolve it yourself: \`gh pr checkout <n>\`,+ rebase onto the default branch, regenerate the lockfile with the package manager+ (\`npm install\` — never hand-edit a lockfile), run the tests, push.+ * Build/test failure caused by the new version (renamed export, changed default,+ dropped Node/engine support): make the SMALLEST adapting code change on the PR+ branch, run the tests, push. Keep it scoped to the breakage — never bundle+ unrelated work onto a bot branch, and never force-push over the bot's history.+ * Merge once it is green.+ - CLOSE — the PR is superseded (a newer bot PR bumps the same package further) or+ targets a dependency this repo no longer uses. Close it with a comment saying why.+ - LEAVE — a major upgrade that needs a real migration, or a bump to something+ security- or billing-critical that warrants a human call. Comment on the PR with+ what you found and what the migration would take, and record it in the repo's work+ tracker (a PLAN.md item or an issue, whichever the repo uses). Do not merge it.++4. Re-check anything you asked the bot to rebase, then merge or leave it accordingly.+ Summarize each PR and its verdict at the end of the phase.++## Phase 2 — Everything the bots did not cover+1. Run npm audit (or equivalent package manager)-2. Check for outdated packages+2. Check for outdated packages — skip any package that still has an open bot PR from+ Phase 1; that PR owns the bump.3. Review CRITICAL and HIGH severity vulnerabilities4. For each vulnerability:- Assess actual riskdiff --git a/server/services/taskPromptDefaults/versions.js b/server/services/taskPromptDefaults/versions.jsindex e9b8bd0088..1cfaff499b 100644--- a/server/services/taskPromptDefaults/versions.js+++ b/server/services/taskPromptDefaults/versions.js@@ -31,7 +31,7 @@ export const PROMPT_VERSIONS = {'test-coverage': 2, // v2: generic {appName} body (older default hardcoded "PortOS")'performance': 2, // v2: generic {appName} body (older default hardcoded "PortOS")'accessibility': 2, // v2: generic {appName} + the app UI (older default hardcoded "PortOS" + http://localhost:5555)- 'dependency-updates': 2, // v2: generic {appName} body (older default hardcoded "PortOS")+ 'dependency-updates': 3, // v3: Phase 1 triages open Dependabot/Renovate PRs first (evidence → MERGE / FIX-THEN-MERGE / CLOSE / LEAVE, including conflict + CI-failure repair on the bot branch) before Phase 2 updates anything the bots didn't cover — an agent that bumped packages itself was duplicating and conflicting with open bot PRs. v2: generic {appName} body (older default hardcoded "PortOS")'documentation': 4, // v4: generic {appName} body (v1 hardcoded "PortOS"; v2/v3 retired DONE.md wording)'ui-bugs': 2, // v2: generic {appName} + the app UI (older default hardcoded "PortOS" + http://localhost:5555)'mobile-responsive': 2, // v2: generic {appName} app-UI body (older default hardcoded "PortOS" + http://localhost:5555)diff --git a/server/services/taskSchedule.js b/server/services/taskSchedule.jsindex 4d9f51e2b5..c2e72d8f08 100644--- a/server/services/taskSchedule.js+++ b/server/services/taskSchedule.js@@ -1880,7 +1880,7 @@ export const TASK_TYPE_DESCRIPTIONS = {'branch-cleanup': 'Clean up merged branches','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': "Heal zombie issues: open + in-progress but their PR already merged with no live claim — close + file a scoped follow-up when work remains, or release the claim so the queue re-picks it",- 'dependency-updates': 'Update dependencies',+ 'dependency-updates': 'Land or resolve open Dependabot/Renovate PRs, then update the dependencies they missed','release-check': 'Check for release readiness','error-handling': 'Improve error handling','typing': 'Improve TypeScript types',