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
address review (codex): namespace the bot-PR worktree per app, and gate the Phase 2 overlap check on forge access
[._.]/ Adam Eivyec0f5349ab46
diff --git a/server/services/taskPromptDefaults.test.js b/server/services/taskPromptDefaults.test.jsindex 6337ebcc57..f34101d476 100644--- a/server/services/taskPromptDefaults.test.js+++ b/server/services/taskPromptDefaults.test.js@@ -130,7 +130,8 @@ describe('taskPromptDefaults integrity snapshot', () => {// The task runs in the app's LIVE checkout (no useWorktree default), so repairing a// bot branch has to happen in a throwaway worktree — a bare `gh pr checkout` there// hijacks whatever branch the user is on.- expect(current).toContain('{worktreesRoot}/dep-pr-<n>');+ // …namespaced per app, since {worktreesRoot} is shared across every managed app.+ expect(current).toContain('{worktreesRoot}/dep-{appName}-pr-<n>');expect(current).toContain('THROWAWAY WORKTREE');// Rebasing the bot branch rewrites its commits, so the push needs a lease, not a ban.expect(current).toContain('--force-with-lease');diff --git a/server/services/taskPromptDefaults/integrity.snapshot.json b/server/services/taskPromptDefaults/integrity.snapshot.jsonindex a6bbc7d654..517d455960 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": "e262d9ef29eba3690efa15f705d4a6f9",+ "dependency-updates": "7ed05444e2602f4895bdd1e5e0edcaa8","documentation": "74aa8433896647e7815f9d6d9e4a56c8","ui-bugs": "def9ad96bd74ab397233f234d79a1974","mobile-responsive": "16d8e7f63a673a2de48994c0ac08ef3d",diff --git a/server/services/taskPromptDefaults/prompts.js b/server/services/taskPromptDefaults/prompts.jsindex 0f8eb0805e..9f21635f8f 100644--- a/server/services/taskPromptDefaults/prompts.js+++ b/server/services/taskPromptDefaults/prompts.js@@ -205,16 +205,19 @@ repo (a globally-configured \`gh\` will silently target an unrelated GitHub repoit out in {repoPath} — this task usually runs in the app's live checkout, so a\`gh pr checkout\` there hijacks whatever branch the user is on and fails outrighton their uncommitted work. The bot branch normally exists only on the remote, so- name the remote ref explicitly and let \`-b\` create the local branch:+ name the remote ref explicitly and let \`-b\` create the local branch. Call the+ worktree \`dep-{appName}-pr-<n>\` (lowercase the app name and collapse anything+ non-alphanumeric to \`-\`) — {worktreesRoot} is shared by every app this install+ manages, so a bare \`dep-pr-<n>\` collides with another app's PR of the same number:\`git -C {repoPath} fetch origin <headRefName>\`- \`git -C {repoPath} worktree add -b dep-pr-<n> {worktreesRoot}/dep-pr-<n> origin/<headRefName>\`- Do the work in \`{worktreesRoot}/dep-pr-<n>\`: rebase onto the default branch if- it was conflicting, regenerate the lockfile with the package manager- (\`npm install\` — never hand-edit a lockfile), run the tests, then push back to- the PR's own branch: \`git push origin HEAD:<headRefName>\`. Remove the worktree- and its local branch when you're done with that PR- (\`git -C {repoPath} worktree remove {worktreesRoot}/dep-pr-<n>\` then- \`git -C {repoPath} branch -D dep-pr-<n>\`).+ \`git -C {repoPath} worktree add -b dep-{appName}-pr-<n> {worktreesRoot}/dep-{appName}-pr-<n> origin/<headRefName>\`+ Do the work in that worktree: rebase onto the default branch if it was conflicting,+ regenerate the lockfile with the package manager (\`npm install\` — never hand-edit+ a lockfile), run the tests, then push back to the PR's own branch:+ \`git push origin HEAD:<headRefName>\`. Remove the worktree and its local branch+ when you're done with that PR+ (\`git -C {repoPath} worktree remove {worktreesRoot}/dep-{appName}-pr-<n>\` then+ \`git -C {repoPath} branch -D dep-{appName}-pr-<n>\`).* Pushing a rebase rewrites the bot's commits, so a plain push is rejected — add\`--force-with-lease=<headRefName>:origin/<headRefName>\`, which refuses if the botpushed again while you worked, so you never clobber a newer version of its branch.@@ -234,10 +237,13 @@ repo (a globally-configured \`gh\` will silently target an unrelated GitHub repo1. Run npm audit (or equivalent package manager)2. Check for outdated packages — skip any package that still has an open bot PR; that PR- owns the bump. Phase 1's list is the first filter, but confirm per package before you- bump one it didn't mention (\`gh pr list --state open --search "<package> in:title"\` /+ owns the bump. Phase 1's list is the first filter, and when Phase 1 had forge access,+ confirm per package before you bump one it didn't mention+ (\`gh pr list --state open --search "<package> in:title"\` /\`glab mr list --state opened --search "<package>"\`), so a PR that fell outside the- listing can't still get double-bumped here.+ listing can't still get double-bumped here. If Phase 1 was skipped for lack of a+ working \`gh\`/\`glab\`, skip this confirmation too — there is nothing to query — and+ say in your summary that bot-PR overlap could not be checked.3. Review CRITICAL and HIGH severity vulnerabilities4. For each vulnerability:- Assess actual risk