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
Claims can iterate with a GitHub/GitLab reviewer alone
Claude45b34463eebf
diff --git a/client/src/components/apps/ClaimReviewerSource.jsx b/client/src/components/apps/ClaimReviewerSource.jsxindex 0ebe1096cd..8d8c4361fc 100644--- a/client/src/components/apps/ClaimReviewerSource.jsx+++ b/client/src/components/apps/ClaimReviewerSource.jsx@@ -2,7 +2,7 @@ import { Link } from 'react-router';import { getNavPageForPath } from '../../../../server/lib/navManifest.js';/**- * Where a claim's reviewer list came from, in one sentence.+ * Where a claim's reviewer list came from, as one compact link.** Shared by the two manual claim surfaces because they were already drifting on* the answer: a claim resolves the claim-work task metadata FIRST and only falls@@ -19,20 +19,19 @@ import { getNavPageForPath } from '../../../../server/lib/navManifest.js';* them — naming it here would send the user to a screen with no such control.*/export default function ClaimReviewerSource({ source }) {- const codeReviewersPage = getNavPageForPath('/models/code-reviewers')?.breadcrumb || 'its management page';- if (source === 'task-override') {- return (- <>- {' — from the '}<strong className="text-port-warning">claim-work</strong>{' reviewer override in '}- <Link to="/cos/schedule" className="text-port-accent hover:underline">Chief of Staff → Schedule</Link>- {`, not ${codeReviewersPage}. Clear it there to follow the install default again.`}- </>- );- }+ const override = source === 'task-override';return (<>- {' — from '}- <Link to="/models/code-reviewers" className="text-port-accent hover:underline">{codeReviewersPage}</Link>.+ {' · '}+ <Link+ to={override ? '/cos/schedule' : '/models/code-reviewers'}+ title={override+ ? `Set by the claim-work reviewer override in Chief of Staff → Schedule, not ${getNavPageForPath('/models/code-reviewers')?.breadcrumb || 'Code Reviewers'}.`+ : undefined}+ className={`hover:underline ${override ? 'text-port-warning' : 'text-port-accent'}`}+ >+ {override ? 'claim-work override' : 'defaults'}+ </Link></>);}diff --git a/client/src/components/apps/SlashDoRunDrawer.test.jsx b/client/src/components/apps/SlashDoRunDrawer.test.jsxindex 5c3e4878b1..efb4122b85 100644--- a/client/src/components/apps/SlashDoRunDrawer.test.jsx+++ b/client/src/components/apps/SlashDoRunDrawer.test.jsx@@ -139,7 +139,7 @@ describe('SlashDoRunDrawer', () => {it('does not blame a claim-work override when the reviewers came from the install defaults', async () => {renderDrawer();- await waitFor(() => expect(screen.getByText('Reviewers (in order):')).toBeInTheDocument());+ await waitFor(() => expect(screen.getByText('AI reviewers')).toBeInTheDocument());expect(screen.queryByText(/claim-work/)).not.toBeInTheDocument();});@@ -147,7 +147,7 @@ describe('SlashDoRunDrawer', () => {const onQueued = vi.fn();renderDrawer({ onQueued });- await waitFor(() => expect(screen.getByText('Reviewers (in order):')).toBeInTheDocument());+ await waitFor(() => expect(screen.getByText('AI reviewers')).toBeInTheDocument());await userEvent.click(screen.getByRole('button', { name: /Remove Copilot/ }));await userEvent.click(screen.getByRole('button', { name: /Queue \/do:next/ }));@@ -159,11 +159,9 @@ describe('SlashDoRunDrawer', () => {it('hides the stop-mode and reviewer-applies controls the claim flow cannot honor', async () => {renderDrawer();- await waitFor(() => expect(screen.getByText('Reviewers (in order):')).toBeInTheDocument());+ await waitFor(() => expect(screen.getByText('AI reviewers')).toBeInTheDocument());// Add a second, non-Copilot reviewer — the two flags render at 2+ / non-copilot.- await userEvent.click(screen.getByText('Standalone / legacy backend'));- await userEvent.selectOptions(screen.getByLabelText('Legacy backend'), 'claude');- await userEvent.click(screen.getByText('Add legacy reviewer'));+ await userEvent.selectOptions(screen.getByLabelText('AI reviewers'), 'claude');expect(screen.queryByText('Stop mode:')).not.toBeInTheDocument();expect(screen.queryByText(/Reviewer applies fixes/)).not.toBeInTheDocument();@@ -177,8 +175,8 @@ describe('SlashDoRunDrawer', () => {renderDrawer({ command: 'better', label: '/do:better' });await waitFor(() => expect(screen.getByText('Task settings')).toBeInTheDocument());- expect(screen.queryByText('Reviewers (in order):')).not.toBeInTheDocument();- expect(screen.queryByText('GitHub reviewers (gate merge):')).not.toBeInTheDocument();+ expect(screen.queryByText('AI reviewers')).not.toBeInTheDocument();+ expect(screen.queryByText('People & bots (GitHub/GitLab)')).not.toBeInTheDocument();});it('never sends reviewer fields for a non-next command', async () => {@@ -273,10 +271,10 @@ describe('SlashDoRunDrawer', () => {const onQueued = vi.fn();renderDrawer({ onQueued });- await waitFor(() => expect(screen.getByText('Reviewers (in order):')).toBeInTheDocument());+ await waitFor(() => expect(screen.getByText('AI reviewers')).toBeInTheDocument());await userEvent.selectOptions(screen.getByLabelText('After opening PR'), 'merge-on-green');- expect(screen.queryByText('Reviewers (in order):')).not.toBeInTheDocument();+ expect(screen.queryByText('AI reviewers')).not.toBeInTheDocument();await userEvent.click(screen.getByRole('button', { name: /Queue \/do:next/ }));await waitFor(() => expect(onQueued).toHaveBeenCalled());@@ -302,6 +300,6 @@ describe('SlashDoRunDrawer', () => {renderDrawer();await waitFor(() => expect(screen.getByLabelText('After opening PR')).toHaveValue('merge-on-green'));- expect(screen.queryByText('Reviewers (in order):')).not.toBeInTheDocument();+ expect(screen.queryByText('AI reviewers')).not.toBeInTheDocument();});});diff --git a/client/src/components/apps/tabs/IssuesTab.jsx b/client/src/components/apps/tabs/IssuesTab.jsxindex 2a2b4c7260..7b741d6715 100644--- a/client/src/components/apps/tabs/IssuesTab.jsx+++ b/client/src/components/apps/tabs/IssuesTab.jsx@@ -2,7 +2,7 @@ import { useState, useEffect, useCallback, useMemo, useId, useRef } from 'react'import { Link } from 'react-router';import {AlertTriangle, Bot, ChevronDown, ChevronRight, CircleDot, ClipboardCheck,- ExternalLink, GitPullRequest, MessageSquare, RefreshCw, Rocket, Search, Tag, User+ ExternalLink, MessageSquare, RefreshCw, Rocket, Search, Tag, User} from 'lucide-react';import BrailleSpinner from '../../BrailleSpinner';import Banner from '../../ui/Banner';@@ -41,6 +41,7 @@ function ClaimReviewOverride({ defaults, overrides, onChange, modelOptions }) {}const FORGE_LABEL = { github: 'GitHub', gitlab: 'GitLab' };+const RUN_FIELD_LABEL = 'block text-[10px] uppercase tracking-wide text-gray-500';const RUN_STATUS_RANK = { queuing: 0, queued: 1, active: 2, completed: 3, blocked: 3 };// Compact, content-width row buttons (right-aligned, wrap on narrow rows); touch@@ -304,9 +305,12 @@ export default function IssuesTab({ appId, appName }) {}, [claimReviewers?.prCompletion, prCompletionTouched]);const [reviewOverrides, setReviewOverrides] = useState({});const reviewerModelOptions = useReviewerModelOptions();+ // A claim needs someone it can wait on: a non-Copilot AI reviewer or a+ // GitHub/GitLab user. Copilot alone has no CLI for the claim agent to run.const invalidReviewOverride = prCompletion === 'review-then-merge'&& Array.isArray(reviewOverrides.reviewers)- && !reviewOverrides.reviewers.some(reviewer => reviewer !== 'copilot');+ && !reviewOverrides.reviewers.some(reviewer => reviewer !== 'copilot')+ && !(reviewOverrides.usernames ?? claimReviewers?.usernames ?? []).length;const [showReviewOverride, setShowReviewOverride] = useState(false);const [showSettings, setShowSettings] = useState(false);const runSettingsId = useId();@@ -557,14 +561,12 @@ export default function IssuesTab({ appId, appName }) {: claimReviewers.csv;const pickedProvider = picker.providers?.find(p => p.id === picker.selectedProviderId);const runSettingsSummary = [- `Run with: ${[- pickedProvider?.name || picker.selectedProviderId || 'Auto (default)',- picker.selectedModel || pickedProvider?.defaultModel || 'default model',- picker.effort || pickedProvider?.effort || 'default effort',- ].join(' · ')}`,- `After PR: ${prCompletionOption(prCompletion)?.label ?? prCompletion}`,- reviewerCsv ? `Reviewers: ${reviewerCsv}` : null,- overrideContext.trim() ? 'extra context set' : null,+ pickedProvider?.name || picker.selectedProviderId || 'Auto',+ picker.selectedModel || pickedProvider?.defaultModel || null,+ picker.effort || pickedProvider?.effort || null,+ prCompletionOption(prCompletion)?.label ?? prCompletion,+ reviewerCsv,+ overrideContext.trim() ? '+ context' : null,].filter(Boolean).join(' · ');return (@@ -716,101 +718,72 @@ export default function IssuesTab({ appId, appName }) {</div>{settingsOpen && (<div id={runSettingsId} className="space-y-3">- <div className="flex flex-col sm:flex-row sm:items-center gap-2">- <span className="flex items-center gap-1.5 text-xs text-gray-500 uppercase tracking-wide shrink-0">- <Bot size={14} /> Run with- </span>- <div className="flex-1">- <ProviderModelSelector- {...picker.selectorProps}- compact- />- </div>+ <div className="space-y-1">+ <span className={RUN_FIELD_LABEL}>Agent</span>+ <ProviderModelSelector+ {...picker.selectorProps}+ compact+ /></div>- <div className="flex flex-col sm:flex-row sm:items-center gap-2">- <label htmlFor={prCompletionId} className="flex items-center gap-1.5 text-xs text-gray-500 uppercase tracking-wide shrink-0">- <GitPullRequest size={14} /> After opening PR- </label>- <div className="flex-1 flex flex-wrap items-center gap-2">- <select- id={prCompletionId}- aria-label="After opening PR"- value={prCompletion}- onChange={e => { setPrCompletion(e.target.value); setPrCompletionTouched(true); }}- className="px-2.5 py-1.5 bg-port-bg border border-port-border rounded-lg text-xs text-white focus:border-port-accent focus:outline-hidden"- >- {PR_COMPLETION_OPTIONS.map(opt => (- <option key={opt.value} value={opt.value}>{opt.label}</option>- ))}- </select>- <span className="text-xs text-gray-500">- {prCompletionOption(prCompletion)?.description}- </span>- </div>+ <div className="space-y-1">+ <label htmlFor={prCompletionId} className={RUN_FIELD_LABEL}>After PR</label>+ <select+ id={prCompletionId}+ value={prCompletion}+ title={prCompletionOption(prCompletion)?.description}+ onChange={e => { setPrCompletion(e.target.value); setPrCompletionTouched(true); }}+ className="w-full sm:w-auto min-h-9 px-2.5 bg-port-bg border border-port-border rounded-lg text-xs text-white focus:border-port-accent focus:outline-hidden"+ >+ {PR_COMPLETION_OPTIONS.map(opt => (+ <option key={opt.value} value={opt.value}>{opt.label}</option>+ ))}+ </select></div>- {claimReviewers && prCompletion === 'review-then-merge' && !invalidReviewOverride && (- <div className="flex flex-col sm:flex-row sm:items-center gap-2">- <span className="flex items-center gap-1.5 text-xs text-gray-500 uppercase tracking-wide shrink-0">- <ClipboardCheck size={14} /> Reviewed by- </span>- <p className="flex-1 text-xs text-gray-400">- {Object.keys(reviewOverrides).length ? (- <>- <code className="text-gray-300">{[- ...(reviewOverrides.reviewers ?? claimReviewers.reviewers),- ...(reviewOverrides.usernames ?? claimReviewers.usernames ?? []).map(username => `@${username}`),- ].join(', ')}</code>- {' — run override; expand below for model, effort, and round limits.'}- </>- ) : (- <>- <code className="text-gray-300">{claimReviewers.csv}</code>- <ClaimReviewerSource source={claimReviewers.source} />- </>- )}- </p>- </div>- )}{claimReviewers && prCompletion === 'review-then-merge' && (- <div className="space-y-2">- <button- type="button"- aria-expanded={showReviewOverride}- onClick={() => setShowReviewOverride(value => !value)}- className="text-sm text-port-accent hover:underline"- >- Code-review override{Object.keys(reviewOverrides).length > 0 ? ' (active)' : ''}- </button>+ <div className="space-y-1">+ <div className="flex items-center gap-2">+ <span className={RUN_FIELD_LABEL}>Reviewers</span>+ <span className="flex-1" />+ {Object.keys(reviewOverrides).length > 0 && (+ <button type="button" aria-label="Use configured reviewers" onClick={() => setReviewOverrides({})} className="text-xs text-port-accent hover:underline min-h-7">+ Reset+ </button>+ )}+ <button+ type="button"+ aria-expanded={showReviewOverride}+ aria-label={showReviewOverride ? 'Done editing reviewers' : 'Edit reviewers'}+ onClick={() => setShowReviewOverride(value => !value)}+ className="text-xs text-port-accent hover:underline min-h-7"+ >+ {showReviewOverride ? 'Done' : 'Edit'}+ </button>+ </div>+ {!showReviewOverride && (+ <p className="text-xs text-gray-300 break-words">+ {reviewerCsv ? <span>{reviewerCsv}</span> : <span className="text-gray-500">None</span>}+ {!Object.keys(reviewOverrides).length && <ClaimReviewerSource source={claimReviewers.source} />}+ </p>+ )}{invalidReviewOverride && (- <p className="text-xs text-port-warning" role="alert">Claims require at least one non-Copilot reviewer. Add one or use configured reviewers.</p>+ <p className="text-xs text-port-warning" role="alert">Add an AI reviewer or a GitHub/GitLab user.</p>)}{showReviewOverride && (- <>- <ClaimReviewOverride defaults={claimReviewers} overrides={reviewOverrides} onChange={setReviewOverrides} modelOptions={reviewerModelOptions} />- <p className="text-xs text-gray-500">Applies to Claims launched below. Replan only reviews the issue plan.</p>- <button type="button" onClick={() => setReviewOverrides({})} className="text-xs text-port-accent hover:underline">- Use configured reviewers- </button>- </>+ <ClaimReviewOverride defaults={claimReviewers} overrides={reviewOverrides} onChange={setReviewOverrides} modelOptions={reviewerModelOptions} />)}</div>)}<div className="space-y-1">- <label htmlFor={overrideContextId} className="block text-xs text-gray-400">- Extra context <span className="text-gray-600">(optional)</span>- </label>+ <label htmlFor={overrideContextId} className={RUN_FIELD_LABEL}>Extra context</label><textareaid={overrideContextId}value={overrideContext}onChange={e => setOverrideContext(e.target.value)}maxLength={4000}rows={2}- placeholder="Add guidance for the run you launch below, such as a preferred implementation focus…"+ placeholder="Optional guidance for Claim and Replan"className="w-full px-3 py-2 bg-port-bg border border-port-border rounded-lg text-white text-sm placeholder:text-gray-600 focus:border-port-accent focus:outline-hidden resize-y"/>- <p className="text-xs text-gray-600">- Applies to every Claim and Replan you launch below — appended to that run's instructions; blank leaves its prompt unchanged.- </p></div></div>)}diff --git a/client/src/components/apps/tabs/IssuesTab.test.jsx b/client/src/components/apps/tabs/IssuesTab.test.jsxindex 2ec3030470..e4064f3610 100644--- a/client/src/components/apps/tabs/IssuesTab.test.jsx+++ b/client/src/components/apps/tabs/IssuesTab.test.jsx@@ -331,8 +331,7 @@ describe('IssuesTab', () => {await renderTab({ open: true });expect(await screen.findByText('codex,claude')).toBeInTheDocument();- expect(screen.getByText(/claim-work/)).toBeInTheDocument();- expect(screen.getByRole('link', { name: /Chief of Staff/ })).toHaveAttribute('href', '/cos/schedule');+ expect(screen.getByRole('link', { name: 'claim-work override' })).toHaveAttribute('href', '/cos/schedule');});it('points at the Code Reviewers panel when no override is in play', async () => {@@ -340,7 +339,7 @@ describe('IssuesTab', () => {expect(await screen.findByText('antigravity')).toBeInTheDocument();expect(screen.queryByText(/claim-work/)).not.toBeInTheDocument();- expect(screen.getByRole('link', { name: /Code Reviewers/ })).toHaveAttribute('href', '/models/code-reviewers');+ expect(screen.getByRole('link', { name: 'defaults' })).toHaveAttribute('href', '/models/code-reviewers');});it('says nothing about reviewers when the lookup failed, rather than implying none are configured', async () => {@@ -351,7 +350,7 @@ describe('IssuesTab', () => {await renderTab();expect(await screen.findByText('Crash on save')).toBeInTheDocument();- expect(screen.queryByText('Reviewed by')).not.toBeInTheDocument();+ expect(screen.queryByText('Reviewers')).not.toBeInTheDocument();});it('shows and submits the configured default without touching the override controls', async () => {@@ -407,7 +406,7 @@ describe('IssuesTab', () => {it('sends a reviewer effort override without pinning untouched defaults', async () => {await renderTab({ open: true });- fireEvent.click(await screen.findByRole('button', { name: 'Code-review override' }));+ fireEvent.click(await screen.findByRole('button', { name: 'Edit reviewers' }));fireEvent.change(await screen.findByLabelText('Reasoning effort for Antigravity'), { target: { value: 'high' } });fireEvent.click(screen.getByRole('button', { name: /Claim/ }));await waitFor(() => expect(api.createSlashdoTask).toHaveBeenCalled());@@ -420,24 +419,37 @@ describe('IssuesTab', () => {it('blocks an empty claim review chain, leaves replans alone, and restores inheritance', async () => {await renderTab({ open: true });- fireEvent.click(await screen.findByRole('button', { name: 'Code-review override' }));+ fireEvent.click(await screen.findByRole('button', { name: 'Edit reviewers' }));fireEvent.click(await screen.findByRole('button', { name: /Remove Antigravity/i }));expect(screen.getByRole('button', { name: /Claim/ })).toBeDisabled();- expect(screen.getByRole('alert')).toHaveTextContent('Claims require at least one non-Copilot reviewer');+ expect(screen.getByRole('alert')).toHaveTextContent('Add an AI reviewer or a GitHub/GitLab user');fireEvent.click(screen.getByRole('button', { name: /Replan/ }));await waitFor(() => expect(api.createSlashdoTask).toHaveBeenCalled());expect(api.createSlashdoTask.mock.calls[0][2]).not.toHaveProperty('reviewers');fireEvent.click(screen.getByRole('button', { name: 'Use configured reviewers' }));- expect(screen.getByText('Reviewed by')).toBeInTheDocument();+ expect(screen.queryByRole('alert')).not.toBeInTheDocument();expect(screen.getByRole('button', { name: /Remove Antigravity/i })).toBeInTheDocument();expect(screen.getByRole('button', { name: /Claim/ })).toBeEnabled();});+ it('lets a claim iterate with only a GitHub/GitLab reviewer', async () => {+ await renderTab({ open: true });+ fireEvent.click(await screen.findByRole('button', { name: 'Edit reviewers' }));+ fireEvent.click(await screen.findByRole('button', { name: /Remove Antigravity/i }));+ expect(screen.getByRole('button', { name: /Claim/ })).toBeDisabled();+ fireEvent.change(screen.getByLabelText('Add a GitHub/GitLab reviewer username'), { target: { value: '@reviewer-one' } });+ fireEvent.click(screen.getByRole('button', { name: 'Add reviewer username' }));+ expect(screen.queryByRole('alert')).not.toBeInTheDocument();+ fireEvent.click(screen.getByRole('button', { name: /Claim/ }));+ await waitFor(() => expect(api.createSlashdoTask).toHaveBeenCalled());+ expect(api.createSlashdoTask.mock.calls[0][2]).toMatchObject({ reviewers: [], usernames: ['reviewer-one'] });+ });+it('collapses run settings into a truthful summary that Change expands', async () => {await renderTab();const summary = screen.getByTestId('run-settings-summary');- expect(summary).toHaveTextContent(/^Run with: Auto \(default\) · default model · default effort · After PR: .+ · Reviewers: antigravity$/);+ expect(summary).toHaveTextContent(/^Auto · .+ · antigravity$/);expect(screen.queryByLabelText('Provider')).not.toBeInTheDocument();const change = screen.getByRole('button', { name: 'Change' });expect(change).toHaveAttribute('aria-expanded', 'false');@@ -446,25 +458,25 @@ describe('IssuesTab', () => {await act(async () => {});expect(screen.getByRole('button', { name: 'Hide' })).toHaveAttribute('aria-expanded', 'true');fireEvent.change(screen.getByLabelText(/Extra context/), { target: { value: 'Keep it small.' } });- expect(summary).toHaveTextContent(/· extra context set$/);+ expect(summary).toHaveTextContent(/· \+ context$/);});it('keeps an invalid review override visible by forcing the settings open', async () => {await renderTab({ open: true });- fireEvent.click(await screen.findByRole('button', { name: 'Code-review override' }));+ fireEvent.click(await screen.findByRole('button', { name: 'Edit reviewers' }));fireEvent.click(await screen.findByRole('button', { name: /Remove Antigravity/i }));- expect(screen.getByRole('alert')).toHaveTextContent('Claims require at least one non-Copilot reviewer');+ expect(screen.getByRole('alert')).toHaveTextContent('Add an AI reviewer or a GitHub/GitLab user');expect(screen.queryByRole('button', { name: 'Hide' })).not.toBeInTheDocument();});it('opens the settings automatically once a code-review override is active', async () => {await renderTab({ open: true });- fireEvent.click(await screen.findByRole('button', { name: 'Code-review override' }));+ fireEvent.click(await screen.findByRole('button', { name: 'Edit reviewers' }));fireEvent.change(await screen.findByLabelText('Reasoning effort for Antigravity'), { target: { value: 'high' } });expect(screen.queryByRole('button', { name: 'Hide' })).not.toBeInTheDocument();- expect(screen.getByRole('button', { name: 'Code-review override (active)' })).toBeInTheDocument();+ expect(screen.getByRole('button', { name: 'Use configured reviewers' })).toBeInTheDocument();});it('shows a failed issues load above the run settings', async () => {@@ -478,10 +490,10 @@ describe('IssuesTab', () => {it('clears review overrides when switching apps', async () => {const view = await renderTab({ open: true });- fireEvent.click(await screen.findByRole('button', { name: 'Code-review override' }));+ fireEvent.click(await screen.findByRole('button', { name: 'Edit reviewers' }));fireEvent.change(await screen.findByLabelText('Reasoning effort for Antigravity'), { target: { value: 'high' } });view.rerender(<MemoryRouter><IssuesTab appId="app-2" appName="Other" /></MemoryRouter>);- await screen.findByRole('button', { name: 'Code-review override' });+ await screen.findByRole('button', { name: 'Edit reviewers' });fireEvent.click(screen.getByRole('button', { name: /Claim/ }));await waitFor(() => expect(api.createSlashdoTask).toHaveBeenCalled());expect(api.createSlashdoTask.mock.calls[0][1]).toBe('app-2');@@ -1017,13 +1029,13 @@ describe('IssuesTab replan', () => {it('allows selecting merge-on-green, hides reviewer controls, and sends prCompletion', async () => {await renderTab({ open: true });- expect(await screen.findByText('Reviewed by')).toBeInTheDocument();- expect(screen.getByRole('button', { name: 'Code-review override' })).toBeInTheDocument();+ expect(await screen.findByText('Reviewers')).toBeInTheDocument();+ expect(screen.getByRole('button', { name: 'Edit reviewers' })).toBeInTheDocument();- fireEvent.change(screen.getByLabelText('After opening PR'), { target: { value: 'merge-on-green' } });+ fireEvent.change(screen.getByLabelText('After PR'), { target: { value: 'merge-on-green' } });- expect(screen.queryByText('Reviewed by')).not.toBeInTheDocument();- expect(screen.queryByRole('button', { name: 'Code-review override' })).not.toBeInTheDocument();+ expect(screen.queryByText('Reviewers')).not.toBeInTheDocument();+ expect(screen.queryByRole('button', { name: 'Edit reviewers' })).not.toBeInTheDocument();fireEvent.click(screen.getByRole('button', { name: /Claim/ }));@@ -1036,11 +1048,11 @@ describe('IssuesTab replan', () => {it('unblocks claim when switching to merge-on-green even after removing all reviewers', async () => {await renderTab({ open: true });- fireEvent.click(await screen.findByRole('button', { name: 'Code-review override' }));+ fireEvent.click(await screen.findByRole('button', { name: 'Edit reviewers' }));fireEvent.click(await screen.findByRole('button', { name: /Remove Antigravity/i }));expect(screen.getByRole('button', { name: /Claim/ })).toBeDisabled();- fireEvent.change(screen.getByLabelText('After opening PR'), { target: { value: 'merge-on-green' } });+ fireEvent.change(screen.getByLabelText('After PR'), { target: { value: 'merge-on-green' } });expect(screen.getByRole('button', { name: /Claim/ })).toBeEnabled();fireEvent.click(screen.getByRole('button', { name: /Claim/ }));diff --git a/client/src/components/apps/tabs/PullRequestsTab.test.jsx b/client/src/components/apps/tabs/PullRequestsTab.test.jsxindex ce079e26a4..e69a1951fc 100644--- a/client/src/components/apps/tabs/PullRequestsTab.test.jsx+++ b/client/src/components/apps/tabs/PullRequestsTab.test.jsx@@ -647,9 +647,7 @@ describe('PullRequestsTab', () => {fireEvent.click(await screen.findByRole('button', { name: /^Remove codex$/i }));expect(screen.getByRole('button', { name: /Reviewer override \(active\)/ })).toBeInTheDocument();- fireEvent.click(screen.getByText('Standalone / legacy backend'));- fireEvent.change(screen.getByLabelText('Legacy backend'), { target: { value: 'codex' } });- fireEvent.click(screen.getByText('Add legacy reviewer'));+ fireEvent.change(screen.getByLabelText('AI reviewers'), { target: { value: 'codex' } });expect(screen.getByRole('button', { name: /^Reviewer override$/ })).toBeInTheDocument();fireEvent.click(screen.getByRole('button', { name: 'Resolve & merge' }));diff --git a/client/src/components/cos/ReviewerGroupsEditor.jsx b/client/src/components/cos/ReviewerGroupsEditor.jsxindex 63429617e8..b4f132ba0f 100644--- a/client/src/components/cos/ReviewerGroupsEditor.jsx+++ b/client/src/components/cos/ReviewerGroupsEditor.jsx@@ -182,7 +182,7 @@ export default function ReviewerGroupsEditor({ groups, onGroupsChange, reviewerHonChange(pruneRemoved(next));}}>Remove tier</button></div>- <ReviewerPicker {...pickerProps} reviewers={group.reviewers} onChange={value => updateTier(group, value)} disabled={disabled} showUsernames={false} showRunFlags={false} showIntro={false}+ <ReviewerPicker {...pickerProps} reviewers={group.reviewers} onChange={value => updateTier(group, value)} disabled={disabled} showUsernames={false} showRunFlags={false}renderReviewer={(token, row) => <DraggableReviewItem key={token} id={memberId(group.id, token)}data={{ kind: 'member', groupId: group.id, token, label: `${token} in ${name}` }} disabled={disabled} handles={handles}>{memberHandle => {@@ -222,7 +222,7 @@ export default function ReviewerGroupsEditor({ groups, onGroupsChange, reviewerH<p className="text-xs text-gray-500">Empty tiers are drafts and are dropped when you save.</p></div><p role="status" className="text-xs text-gray-400">{announcement}</p>- <ReviewerPicker {...pickerProps} reviewers={allReviewers} onChange={onChange} disabled={disabled} showReviewers={false} showIntro={false} />+ <ReviewerPicker {...pickerProps} reviewers={allReviewers} onChange={onChange} disabled={disabled} showReviewers={false} /></div>);}diff --git a/client/src/components/cos/ReviewerPicker.jsx b/client/src/components/cos/ReviewerPicker.jsxindex fecf2f445e..d7bf0c9609 100644--- a/client/src/components/cos/ReviewerPicker.jsx+++ b/client/src/components/cos/ReviewerPicker.jsx@@ -15,7 +15,6 @@ import {reviewerLabel,sanitizeReviewerModelInput} from './constants';-import ProviderModelSelector from '../ProviderModelSelector';import { isToolFreeReviewer, prioritizeToolFreeReviewers } from '../../../../server/lib/reviewerConfig.js';import { effortLevelsForProvider, effectiveModelFor, isTuiProvider } from '../../utils/providers';import { isApplyCapableReviewer, isProviderReviewer, normalizeReviewerSlug } from '../../lib/reviewerPins';@@ -61,8 +60,8 @@ const HEADER_CLASS = `hidden @4xl:grid ${WIDE_TRACKS} items-center gap-x-2 px-1./*** Ordered multi-reviewer picker, rendered as one row per reviewer with the five* per-reviewer controls as columns: **Provider | Model | Effort | Optional | Max- * Iterations** (#3133). Add configured providers or standalone legacy backends,- * reorder with the arrows within each service/standalone boundary, remove with ✕. Maps to slashdo's+ * Iterations** (#3133). Add configured providers or standalone backends from one+ * menu, reorder with the arrows within each service/standalone boundary, remove with ✕. Maps to slashdo's* `--review-with a,b,c` plus the stop-mode / `--reviewer-applies` flags.** A second "GitHub reviewers" table collects arbitrary usernames (e.g.@@ -146,8 +145,8 @@ const HEADER_CLASS = `hidden @4xl:grid ${WIDE_TRACKS} items-center gap-x-2 px-1.* never clears.** Together with `modelOptions.providerDisabled`, that describes which reviewers- * can run on this machine. Configured providers use the shared provider selector;- * standalone backends live in a compact legacy selector. Missing/disabled saved+ * can run on this machine. Configured providers and standalone backends share one+ * Add menu, each option labeled with its unavailability. Missing/disabled saved* rows remain editable with actionable warnings. `showReviewers`, `showUsernames`* and `renderReviewer` let the tier editor compose these same rows and controls* without introducing fallback-group fields to task-local overrides.@@ -170,14 +169,9 @@ export default function ReviewerPicker({showRunFlags = true,showReviewers = true,showUsernames = true,- // Page-level help (Code Reviewers) explains tiers once. Compact callers such- // as a task form still get the short intro beside the controls.- showIntro = true,renderReviewer = (_token, row) => row,}) {const id = useId();- const [addProviderId, setAddProviderId] = useState('');- const [legacyReviewer, setLegacyReviewer] = useState('');const [effortNotice, setEffortNotice] = useState('');const providerRecords = modelOptions?.providers || [];// A review runs its provider headless (CLI or API), never through an@@ -209,6 +203,7 @@ export default function ReviewerPicker({const selected = Array.isArray(reviewers) ? [...new Set(reviewers.map(normalizeReviewerValue))] : [];const orderedSelected = prioritizeToolFreeReviewers(selected);const addable = REVIEWER_OPTIONS.filter(o => !selected.includes(o.value));+ const addableProviders = reviewerProviderOptions.filter(provider => provider.enabled !== false && !selected.includes(`provider:${provider.id}`));// Only codex is offered the editing pass: slashdo forces every other local// reviewer back to review-only and reverts what it wrote, so showing the toggle// for agy/grok/cursor would ask the user to grant write access for nothing.@@ -687,7 +682,7 @@ export default function ReviewerPicker({};const addUsername = () => {- const entries = usernameInput.split(/[,\n]+/).map(value => value.trim()).filter(Boolean);+ const entries = usernameInput.split(/[\s,]+/).map(value => value.trim()).filter(Boolean);const invalid = entries.filter(value => !cleanReviewUsername(value));if (!entries.length || invalid.length) {setUsernameError(invalid.length@@ -746,35 +741,34 @@ export default function ReviewerPicker({return (<div className="@container flex flex-col gap-2 w-full">{showReviewers && (- <div className="flex flex-wrap items-end gap-2 min-w-0">- <div className="w-full sm:w-80 max-w-full">- <ProviderModelSelector- dense- providers={reviewerProviderOptions}- selectedProviderId={addProviderId}- onProviderChange={setAddProviderId}- emptyProviderOption="Choose a reviewer provider"- compose={false}- highlightVision={false}- loading={modelOptions?.loaded === false}- disabled={disabled}- />- </div>- <button type="button" disabled={disabled || !addProviderId || selected.includes(`provider:${addProviderId}`)}- className="min-h-9 text-sm text-port-accent disabled:opacity-50"- onClick={() => { add(`provider:${addProviderId}`); setAddProviderId(''); }}>Add provider reviewer</button>- {showIntro && <p className="text-xs text-gray-500">Add a configured provider, then choose its model and effort on its row. Its account and transport stay attached to that identity.</p>}- {modelOptions?.providersLoaded === false && modelOptions?.loaded && <p role="alert" className="text-xs text-port-warning">Provider list unavailable. Reload this page to retry; saved reviewers and pins are preserved.</p>}+ <div className="flex flex-col gap-1 min-w-0">+ <label htmlFor={`${id}-add`} className="text-xs text-gray-500">AI reviewers</label>+ <select+ id={`${id}-add`}+ value=""+ disabled={disabled || (addableProviders.length === 0 && addable.length === 0)}+ onChange={event => add(event.target.value)}+ className="w-full sm:w-80 max-w-full min-h-9 px-2 bg-port-bg border border-port-border rounded text-xs text-gray-300 focus:border-port-accent focus:outline-none disabled:opacity-50"+ >+ <option value="">{modelOptions?.loaded === false ? 'Loading reviewers…' : '+ Add AI reviewer'}</option>+ {addableProviders.length > 0 && (+ <optgroup label="Providers">+ {addableProviders.map(provider => (+ <option key={provider.id} value={`provider:${provider.id}`}>{provider.name || provider.id}{unavailability(`provider:${provider.id}`) ? ` (${unavailability(`provider:${provider.id}`).label})` : ''}</option>+ ))}+ </optgroup>+ )}+ {addable.length > 0 && (+ <optgroup label="Local & CLI">+ {addable.map(option => <option key={option.value} value={option.value}>{option.label}{unavailability(option.value) ? ` (${unavailability(option.value).label})` : ''}</option>)}+ </optgroup>+ )}+ </select>+ {modelOptions?.providersLoaded === false && modelOptions?.loaded && <p role="alert" className="text-xs text-port-warning">Provider list unavailable. Reload to retry.</p>}</div>)}{effortNotice && <p role="status" className="text-xs text-port-warning">{effortNotice}</p>}{showReviewers && <div className="flex flex-col gap-1">- {showIntro && (- <>- <span className="text-xs text-gray-500">Reviewers (in order):</span>- <p className="text-xs text-gray-400">Configured providers and local models first, then standalone CLI / Copilot.</p>- </>- )}{selected.length > 0 && (<><div className={HEADER_CLASS} aria-hidden="true">@@ -815,7 +809,7 @@ export default function ReviewerPicker({</button></div><span className="flex items-center gap-1 min-w-0 col-span-2 @4xl:col-span-1">- <span className="text-xs text-gray-300 break-words">{labelFor(value)}<span className="block text-[10px] text-gray-500">{isProviderReviewer(value) ? value : 'Standalone / legacy'}</span></span>+ <span className="text-xs text-gray-300 break-words">{labelFor(value)}</span>{renderUnavailableBadge(value)}</span><span className={CELL_LABEL_CLASS}>Model</span>@@ -848,45 +842,16 @@ export default function ReviewerPicker({</>)}{selected.length === 0 && (- <span className="text-xs text-gray-400 italic">none — no AI reviewers in this list</span>+ <span className="text-xs text-gray-400 italic">None</span>)}</div>}- {showIntro && showUsernames && (selected.length > 0 || selectedUsernames.length > 0) && (- <details className="text-[11px] text-gray-400">- <summary className="cursor-pointer text-xs text-gray-500 hover:text-gray-300">Tip: reviewer controls</summary>- <p className="mt-1">- <span className="font-mono text-port-accent">Model</span> pins the model that reviewer runs (the shown default is used when no override is saved), and <span className="font-mono text-port-accent-2">Effort</span> pins how hard it reasons — higher is slower and pricier, and each reviewer only offers the tiers its own CLI accepts. The <span className="font-mono text-port-warning">~opt</span> badge marks a reviewer <em>non-blocking</em> — it still runs and its findings are still fixed, but an inconclusive verdict (timeout / no result) won't block the merge. A hard failure still does. <span className="font-mono text-port-accent-2">Max</span> caps that reviewer's review → fix → re-review rounds (blank = its built-in cap, <span className="font-mono">0</span> = loop until clean) — a small cap keeps a slow local model affordable.- </p>- </details>- )}-- {showReviewers && addable.length > 0 && (- <details className="text-xs text-gray-500">- <summary className="cursor-pointer min-h-9">Standalone / legacy backend</summary>- {showIntro && <p className="mb-2">Direct CLI, local runtime and Copilot identities keep their existing behavior. Prefer a configured provider to select an account and transport.</p>}- <div className="flex flex-wrap items-end gap-2">- <div className="min-w-0 flex-1 max-w-xs">- <label htmlFor={`${id}-legacy`} className="block mb-1">Legacy backend</label>- <select id={`${id}-legacy`} value={legacyReviewer} disabled={disabled}- className="w-full min-w-0 min-h-9 bg-port-bg border border-port-border rounded text-gray-300"- onChange={event => setLegacyReviewer(event.target.value)}>- <option value="">Choose a backend</option>- {addable.map(option => <option key={option.value} value={option.value}>{option.label}{unavailability(option.value) ? ` (${unavailability(option.value).label})` : ''}</option>)}- </select>- </div>- <button type="button" disabled={disabled || !legacyReviewer} className="min-h-9 text-port-accent disabled:opacity-50"- onClick={() => { add(legacyReviewer); setLegacyReviewer(''); }}>Add legacy reviewer</button>- </div>- </details>- )}-{/* GitHub reviewer usernames — arbitrary PR reviewers (bots/humans) thatgate the merge. Appended to `--review-with` as `@user` tokens. Same rowgrid as the keyed reviewers so the columns line up, minus reorder (theirorder is fixed after the keyed list) and minus a Model cell. */}{showUsernames && <div className="flex flex-col gap-1.5 pt-1 border-t border-port-border/50">- <span className="text-xs text-gray-500">GitHub/GitLab reviewers (gate merge):</span>+ <span className="text-xs text-gray-500">People & bots (GitHub/GitLab)</span>{selectedUsernames.length > 0 ? (<div className="flex flex-col gap-1.5 @4xl:gap-0.5">{selectedUsernames.map((value) => (@@ -897,10 +862,8 @@ export default function ReviewerPicker({><span className="text-port-accent font-mono text-xs col-span-2 @4xl:col-span-1">@</span><span className="text-xs text-gray-300 col-span-2 @4xl:col-span-1 truncate">{value}</span>- <span className={CELL_LABEL_CLASS}>Model</span>- <div className="min-w-0">{renderModelCell(`@${value}`)}</div>- <span className={CELL_LABEL_CLASS}>Effort</span>- <div className="min-w-0">{renderEffortCell(`@${value}`)}</div>+ <span className="hidden @4xl:block" />+ <span className="hidden @4xl:block" /><span className={CELL_LABEL_CLASS}>Optional</span><div>{renderOptToggle(`@${value}`, `@${value}`, isOptional(`@${value}`)@@ -923,34 +886,34 @@ export default function ReviewerPicker({</div>))}</div>- ) : (- <span className="text-xs text-gray-400 italic">none</span>- )}+ ) : null}<div className="flex items-center gap-1.5"><span className="text-xs text-gray-400 font-mono">@</span>- <textarea+ <inputid={`${id}-username`}- rows={2}+ type="text"+ autoCapitalize="none"+ autoCorrect="off"+ spellCheck={false}value={usernameInput}disabled={disabled || atMaxUsernames}- placeholder="alice, bob.team"+ placeholder="username"aria-label="Add a GitHub/GitLab reviewer username"onChange={(e) => { setUsernameInput(e.target.value); if (usernameError) setUsernameError(''); }}- onKeyDown={(e) => { if (e.key === 'Enter' && !e.shiftKey) { e.preventDefault(); addUsername(); } }}- className="flex-1 min-w-0 max-w-[200px] px-2 py-0.5 bg-port-bg border border-port-border rounded text-xs text-gray-300 min-h-[28px] focus:border-port-accent focus:outline-none disabled:opacity-50"+ onKeyDown={(e) => { if (e.key === 'Enter') { e.preventDefault(); addUsername(); } }}+ className="flex-1 min-w-0 max-w-[200px] px-2 py-0.5 bg-port-bg border border-port-border rounded text-xs text-gray-300 min-h-9 focus:border-port-accent focus:outline-none disabled:opacity-50"/><buttontype="button"disabled={disabled || !usernameInput.trim() || atMaxUsernames}onClick={addUsername}aria-label="Add reviewer username"- className="inline-flex items-center gap-1 px-1.5 py-0.5 bg-transparent border border-port-border rounded text-xs text-gray-400 hover:text-white hover:border-port-accent disabled:opacity-50"+ className="inline-flex items-center gap-1 px-2 min-h-9 bg-transparent border border-port-border rounded text-xs text-gray-400 hover:text-white hover:border-port-accent disabled:opacity-50"><Plus size={11} />Add</button></div>- <p className="text-xs text-gray-400">Separate names with commas or newlines (Shift+Enter). Enter adds the list; an invalid name or a full roster leaves the whole draft for correction.</p>{usernameError && <span role="alert" className="text-xs text-port-error">{usernameError}</span>}</div>}diff --git a/client/src/components/cos/ReviewerPicker.test.jsx b/client/src/components/cos/ReviewerPicker.test.jsxindex 03b9e73d6d..2539ee657f 100644--- a/client/src/components/cos/ReviewerPicker.test.jsx+++ b/client/src/components/cos/ReviewerPicker.test.jsx@@ -52,8 +52,7 @@ describe('ReviewerPicker', () => {return <ReviewerPicker {...config} modelOptions={{ providers }} onChange={value => { onChange(value); setConfig(value); }} />;}render(<Form />);- fireEvent.change(screen.getByLabelText('Provider'), { target: { value: 'codex-tui' } });- fireEvent.click(screen.getByRole('button', { name: 'Add provider reviewer' }));+ fireEvent.change(screen.getByLabelText('AI reviewers'), { target: { value: 'provider:codex-tui' } });fireEvent.change(screen.getByLabelText('Reasoning effort for Codex TUI'), { target: { value: 'ultra' } });const effort = screen.getByLabelText('Reasoning effort for Codex TUI');expect(effort).toHaveValue('ultra');@@ -70,7 +69,6 @@ describe('ReviewerPicker', () => {expect(screen.getByText('2.')).toBeInTheDocument();expect(screen.getByText('3.')).toBeInTheDocument();// The not-yet-selected reviewer (claude) shows in the Add row.- fireEvent.click(screen.getByText('Standalone / legacy backend'));expect(screen.getByRole('option', { name: 'Claude' })).toBeInTheDocument();});@@ -92,10 +90,8 @@ describe('ReviewerPicker', () => {expect(screen.queryByText('not installed')).not.toBeInTheDocument();});- it('flags an unselected reviewer once the Add row reveals it', async () => {- const user = userEvent.setup();+ it('flags an unselected reviewer in the Add menu', () => {render(<ReviewerPicker reviewers={['copilot']} installed={{ antigravity: false }} onChange={() => {}} />);- await user.click(screen.getByText('Standalone / legacy backend'));expect(screen.getByRole('option', { name: /Antigravity/ })).toHaveTextContent('not installed');});});@@ -205,7 +201,6 @@ describe('ReviewerPicker', () => {onChange={() => {}}/>);- fireEvent.click(screen.getByText('Standalone / legacy backend'));expect(screen.getByRole('option', { name: /Antigravity/ })).toHaveTextContent('not installed');expect(screen.getByRole('option', { name: /Kimi/ })).toHaveTextContent('disabled');expect(screen.getByRole('option', { name: /Codex/ })).toHaveTextContent('Codex');@@ -222,11 +217,9 @@ describe('ReviewerPicker', () => {onChange={onChange}/>);- await user.click(screen.getByText('Standalone / legacy backend'));expect(screen.getByRole('option', { name: /Kimi/ })).toHaveTextContent('disabled');expect(screen.getByRole('option', { name: /Antigravity/ })).toHaveTextContent('not installed');- await user.selectOptions(screen.getByLabelText('Legacy backend'), 'kimi');- await user.click(screen.getByRole('button', { name: 'Add legacy reviewer' }));+ await user.selectOptions(screen.getByLabelText('AI reviewers'), 'kimi');expect(onChange).toHaveBeenCalledWith(expect.objectContaining({ reviewers: ['copilot', 'kimi'] }));});@@ -239,7 +232,6 @@ describe('ReviewerPicker', () => {it('offers the whole roster when neither signal was fetched', () => {render(<ReviewerPicker reviewers={['copilot']} onChange={() => {}} />);- fireEvent.click(screen.getByText('Standalone / legacy backend'));expect(screen.queryByRole('option', { name: /unavailable/ })).not.toBeInTheDocument();expect(screen.getByRole('option', { name: /Kimi/ })).toBeInTheDocument();});@@ -247,16 +239,7 @@ describe('ReviewerPicker', () => {it('shows the empty-state hint when no reviewers are selected', () => {render(<ReviewerPicker reviewers={[]} onChange={() => {}} />);- expect(screen.getByText(/none — no AI reviewers in this list/)).toBeInTheDocument();- });-- it('keeps the short provider intro unless the page explains tiers itself', () => {- const { unmount } = render(<ReviewerPicker reviewers={[]} onChange={() => {}} />);- expect(screen.getByText(/Add a configured provider/)).toBeInTheDocument();- unmount();- render(<ReviewerPicker reviewers={['codex']} onChange={() => {}} showIntro={false} />);- expect(screen.queryByText(/Add a configured provider/)).not.toBeInTheDocument();- expect(screen.queryByText(/Tool-free first/)).not.toBeInTheDocument();+ expect(screen.getByText('None')).toBeInTheDocument();});it('de-dupes a malformed list with duplicates (order-preserving)', () => {@@ -279,9 +262,7 @@ describe('ReviewerPicker', () => {const onChange = vi.fn();const user = userEvent.setup();render(<ReviewerPicker reviewers={['copilot']} onChange={onChange} />);- await user.click(screen.getByText('Standalone / legacy backend'));- await user.selectOptions(screen.getByLabelText('Legacy backend'), 'codex');- await user.click(screen.getByRole('button', { name: 'Add legacy reviewer' }));+ await user.selectOptions(screen.getByLabelText('AI reviewers'), 'codex');expect(onChange).toHaveBeenCalledWith(expect.objectContaining({ reviewers: ['copilot', 'codex'] }));});@@ -351,10 +332,10 @@ describe('ReviewerPicker', () => {render(<ReviewerPicker reviewers={['copilot']} onChange={onChange} />);// Same pin: a partially-typed `bad` is a *valid* username, so an Enter that// beat the last keystrokes would emit and make this assertion lie.- await typeSettled(user, screen.getByLabelText('Add a GitHub/GitLab reviewer username'), 'bad token!');+ await typeSettled(user, screen.getByLabelText('Add a GitHub/GitLab reviewer username'), 'bad-token!');await user.keyboard('{Enter}');expect(onChange).not.toHaveBeenCalled();- expect(screen.getByRole('alert')).toHaveTextContent('Invalid reviewer names: bad token!');+ expect(screen.getByRole('alert')).toHaveTextContent('Invalid reviewer names: bad-token!');});it('renders existing username pills and removes one', async () => {@@ -366,18 +347,18 @@ describe('ReviewerPicker', () => {expect(onChange).toHaveBeenCalledWith(expect.objectContaining({ usernames: ['other-bot'] }));});- it('adds comma/newline forge usernames as one validated, deduplicated batch', () => {+ it('adds comma/space separated forge usernames as one validated, deduplicated batch', () => {const onChange = vi.fn();render(<ReviewerPicker usernames={['Alice']} onChange={onChange} />);const input = screen.getByLabelText('Add a GitHub/GitLab reviewer username');- fireEvent.change(input, { target: { value: '@alice, bob.team\ncarol_dev' } });+ fireEvent.change(input, { target: { value: '@alice, bob.team carol_dev' } });fireEvent.click(screen.getByLabelText('Add reviewer username'));expect(onChange.mock.lastCall[0].usernames).toEqual(['Alice', 'bob.team', 'carol_dev']);onChange.mockClear();- fireEvent.change(input, { target: { value: 'valid-user, not valid!' } });+ fireEvent.change(input, { target: { value: 'valid-user, not-valid!' } });fireEvent.click(screen.getByLabelText('Add reviewer username'));- expect(screen.getByRole('alert')).toHaveTextContent('Invalid reviewer names: not valid!');- expect(input).toHaveValue('valid-user, not valid!');+ expect(screen.getByRole('alert')).toHaveTextContent('Invalid reviewer names: not-valid!');+ expect(input).toHaveValue('valid-user, not-valid!');expect(onChange).not.toHaveBeenCalled();fireEvent.change(input, { target: { value: Array.from({ length: 20 }, (_, index) => `reviewer-${index}`).join(',') } });fireEvent.click(screen.getByLabelText('Add reviewer username'));@@ -842,18 +823,6 @@ describe('ReviewerPicker', () => {});});- describe('help disclosure', () => {- it('keeps the reviewer tip collapsed until opened', async () => {- const user = userEvent.setup();- render(<ReviewerPicker reviewers={['codex']} onChange={() => {}} />);- const summary = screen.getByText('Tip: reviewer controls');- const details = summary.closest('details');- expect(details).not.toHaveAttribute('open');- await user.click(summary);- expect(details).toHaveAttribute('open');- });- });-describe('defaults-aware emit (#6208)', () => {const DEFAULTS = {reviewers: ['copilot'],diff --git a/client/src/components/cos/TaskAddForm.test.jsx b/client/src/components/cos/TaskAddForm.test.jsxindex 660f7a9bab..01504f0192 100644--- a/client/src/components/cos/TaskAddForm.test.jsx+++ b/client/src/components/cos/TaskAddForm.test.jsx@@ -249,7 +249,7 @@ describe('TaskAddForm responsive layout', () => {/>);- await waitFor(() => expect(screen.getByText('Reviewers (in order):')).toBeInTheDocument());+ await waitFor(() => expect(screen.getByText('AI reviewers')).toBeInTheDocument());const options = screen.getByRole('form', { name: 'Add new task' }).querySelector('div.grid');expect(options).toHaveClass('grid-cols-1');@@ -373,7 +373,7 @@ describe('TaskAddForm responsive layout', () => {api.addCosTask.mockResolvedValue({ success: true });render(<TaskAddForm providers={[]} apps={[app]} defaultApp="example-app" onTaskAdded={vi.fn()} />);- await waitFor(() => expect(screen.getByText('Reviewers (in order):')).toBeInTheDocument());+ await waitFor(() => expect(screen.getByText('AI reviewers')).toBeInTheDocument());await user.type(screen.getByPlaceholderText('Task description *'), 'Fix the bug');await user.click(screen.getByRole('button', { name: /^Add$/ }));@@ -391,7 +391,7 @@ describe('TaskAddForm responsive layout', () => {api.addCosTask.mockResolvedValue({ success: true });render(<TaskAddForm providers={[]} apps={[app]} defaultApp="example-app" onTaskAdded={vi.fn()} />);- await waitFor(() => expect(screen.getByText('Reviewers (in order):')).toBeInTheDocument());+ await waitFor(() => expect(screen.getByText('AI reviewers')).toBeInTheDocument());const stopModeSelect = await screen.findByLabelText('Stop mode:');await user.selectOptions(stopModeSelect, 'on-clean');diff --git a/client/src/components/settings/CodeReviewersTab.test.jsx b/client/src/components/settings/CodeReviewersTab.test.jsxindex 39c7a06adc..fef67d7c54 100644--- a/client/src/components/settings/CodeReviewersTab.test.jsx+++ b/client/src/components/settings/CodeReviewersTab.test.jsx@@ -51,10 +51,9 @@ describe('CodeReviewersTab', () => {api.getCodeReviewDefaults.mockResolvedValue({ reviewers: ['copilot'], codexModel: 'legacy-model', claudeEffort: 'medium' });api.updateSettings.mockResolvedValue({});const view = renderTab(<CodeReviewersTab />);- const provider = await screen.findByLabelText('Provider');+ const provider = await screen.findByLabelText('AI reviewers');expect(screen.queryByRole('option', { name: 'Disabled API' })).not.toBeInTheDocument();- fireEvent.change(provider, { target: { value: 'example-gpu' } });- fireEvent.click(screen.getByRole('button', { name: 'Add provider reviewer' }));+ fireEvent.change(provider, { target: { value: 'provider:example-gpu' } });fireEvent.change(screen.getByLabelText('Model for Example GPU'), { target: { value: 'coder-b' } });fireEvent.change(screen.getByLabelText('Reasoning effort for Example GPU'), { target: { value: 'high' } });fireEvent.click(screen.getByRole('button', { name: 'Save defaults' }));@@ -105,11 +104,9 @@ describe('CodeReviewersTab', () => {expect(api.updateSettings).not.toHaveBeenCalled();expect(screen.queryByLabelText('Fallback reviewer groups')).not.toBeInTheDocument();const fallback = screen.getByRole('region', { name: 'Fallback 1' });- fireEvent.change(within(fallback).getByLabelText('Provider'), { target: { value: 'example-gpu' } });- fireEvent.click(within(fallback).getByText('Add provider reviewer'));+ fireEvent.change(within(fallback).getByLabelText('AI reviewers'), { target: { value: 'provider:example-gpu' } });expect(screen.getAllByLabelText('Model for Example GPU')).toHaveLength(2);- fireEvent.change(within(fallback).getByLabelText('Provider'), { target: { value: 'example-gpu' } });- expect(within(fallback).getByText('Add provider reviewer')).toBeDisabled();+ expect(within(within(fallback).getByLabelText('AI reviewers')).queryByRole('option', { name: 'Example GPU' })).not.toBeInTheDocument();fireEvent.change(within(fallback).getByLabelText('Reasoning effort for Example GPU'), { target: { value: 'low' } });expect(within(primary).getByLabelText('Reasoning effort for Example GPU')).toHaveValue('low');fireEvent.click(within(primary).getByLabelText('Remove Example GPU'));diff --git a/server/lib/cosValidation.js b/server/lib/cosValidation.jsindex 48349bae34..d44408ab99 100644--- a/server/lib/cosValidation.js+++ b/server/lib/cosValidation.js@@ -1261,7 +1261,10 @@ export function sanitizeTaskMetadata(raw) {const normalized = REVIEWER_ALIASES[r] || r;if (isReviewer(normalized) && !seen.has(normalized)) { seen.add(normalized); list.push(normalized); }}- if (list.length) { clean.reviewers = list; hasKeys = true; }+ // Explicitly empty survives only beside forge reviewers: that is the+ // username-only roster (`usernameOnlyRoster`), not "inherit the defaults".+ const usernameOnly = !list.length && Array.isArray(raw.usernames) && normalizeReviewUsernames(raw.usernames).length > 0;+ if (list.length || usernameOnly) { clean.reviewers = list; hasKeys = true; }}// `usernames` is the arbitrary GitHub reviewer-username list — normalize to// shell-safe, deduped, capped tokens (strips `@`, drops bogus entries). Unlikediff --git a/server/lib/reviewerConfig.js b/server/lib/reviewerConfig.jsindex 255e336bb2..6f4f41ad8d 100644--- a/server/lib/reviewerConfig.js+++ b/server/lib/reviewerConfig.js@@ -61,6 +61,15 @@ export const isToolFreeReviewer = (value) => LOCAL_LLM_REVIEWERS.includes(value)*/export const REVIEW_UNAVAILABLE_REPORTING_NOTE = 'Report the pending review in your run summary — do NOT post a PR/MR comment saying the review was unavailable or inconclusive.';+/**+ * How a claim run waits on a forge reviewer (`@login`). That reviewer is often a+ * person, so a few minutes of polling is not a wait: the run would give up long+ * before they look. Each poll is bounded below an agent shell's command limit,+ * and the four-hour round budget keeps an absent reviewer from holding the agent+ * slot forever. Shared by every claim prompt's PR/MR-side review step.+ */+export const FORGE_REVIEWER_WAIT_NOTE = 'An `@<login>` is often a person, not a bot: after requesting the review, wait for it with blocking polls of at most 9 minutes each (check once a minute inside, counting only a review that login submitted on the current head commit), and keep repeating them for up to 4 hours per round. Do not end the run, skip the reviewer, or treat it as clean while that wait runs. Each review is a round: fix every comment, push, reply to and resolve its threads, then re-request their review. Only their approval of the current head satisfies them; changes requested or comments start the next round. No review after 4 hours is unsatisfied, not clean.';+/*** What an agent does when EVERY configured reviewer returned a config fault:* distinguish it from clean in the run summary, so the operator sees "no@@ -888,10 +897,13 @@ const CLAIM_REVIEWER_FALLBACK = ['codex'];* actually invoke: `copilot` is a forge-side PR reviewer with no CLI, so a claim* agent told to "review with copilot" has nothing to run and stalls (#2507).* An empty result falls back to `codex` rather than to `DEFAULT_REVIEWERS`- * (which is `copilot`, the very thing being removed).+ * (which is `copilot`, the very thing being removed) — unless `usernames` names+ * forge reviewers, which the run requests and waits on itself.*/-export function claimSafeReviewers(reviewers) {+export function claimSafeReviewers(reviewers, usernames = []) {const kept = (Array.isArray(reviewers) ? reviewers : []).filter((reviewer) => reviewer !== 'copilot');+ // A forge reviewer the run requests and waits on is a reviewer it can invoke.+ if (!kept.length && normalizeReviewUsernames(usernames).length) return [];return kept.length ? kept : [...CLAIM_REVIEWER_FALLBACK];}@@ -932,7 +944,7 @@ export function resolveClaimReviewerConfig(metadata, codeReviewDefaults, default};}const config = resolveReviewerConfig(metadata, codeReviewDefaults, defaultReviewers);- const reviewers = claimSafeReviewers(config.reviewers);+ const reviewers = claimSafeReviewers(config.reviewers, config.usernames);return {...config,reviewers,@@ -1353,6 +1365,18 @@ export function normalizeReviewers(meta, fallback = DEFAULT_REVIEWERS) {return fallbackList.length ? [...fallbackList] : [...DEFAULT_REVIEWERS];}+/**+ * True when the winning layer explicitly lists NO keyed (AI/CLI) reviewers and+ * forge reviewers (`@login`) remain: the user chose "review by these people or+ * bots only", which must not fall back to the install default chain.+ */+function usernameOnlyRoster(metadata, codeReviewDefaults) {+ if (!resolveReviewUsernames(metadata?.usernames, codeReviewDefaults?.usernames).length) return false;+ if (!Array.isArray(metadata?.reviewers) && typeof metadata?.reviewer === 'string' && metadata.reviewer) return false;+ const explicitEmpty = (layer) => Array.isArray(layer?.reviewers) && layer.reviewers.length === 0;+ return Array.isArray(metadata?.reviewers) ? explicitEmpty(metadata) : explicitEmpty(codeReviewDefaults);+}+/*** Resolve an explicit task reviewer list as its preferred tier, followed by* the system Code Review Defaults tiers. This lets scheduled task overrides@@ -1366,6 +1390,7 @@ export function resolveReviewerGroup(metadata, codeReviewDefaults, defaultReview? raw.reviewers: (typeof raw.reviewer === 'string' && raw.reviewer ? [raw.reviewer] : []);const taskGroup = normalizeReviewerList(source);+ if (usernameOnlyRoster(raw, codeReviewDefaults)) return [];if (!taskGroup.length) {return prioritizeToolFreeReviewers(normalize(metadata, defaultReviewers));}@@ -1411,7 +1436,7 @@ export function resolveKeyedReviewers(reviewers, hasUsernames) {/*** Build the comma-separated reviewer token list used to fill the `{reviewers}`* placeholder in claim/plan prompts: keyed reviewers (falling back to the- * configured default when empty) followed by `@user` tokens for the reviewer usernames.+ * configured default when empty, unless usernames make it a username-only roster) followed by `@user` tokens for the reviewer usernames.* Reviewers in `optionalReviewers` get slashdo's `~opt` non-blocking suffix, and* reviewers carrying a `reviewerMaxRounds` cap get `~max=<n>` after it. A* reviewer with a `reviewerModels` pin gets slashdo's `[<model>]` selector@@ -1420,8 +1445,8 @@ export function resolveKeyedReviewers(reviewers, hasUsernames) {* The flag-string variant is `buildReviewWithArgs`.*/export function buildReviewersCsv(reviewers, usernames = [], optionalReviewers = [], reviewerMaxRounds = {}, reviewerModels = {}, reviewerEfforts = {}) {- const keyed = Array.isArray(reviewers) && reviewers.length ? reviewers : [...DEFAULT_REVIEWERS];const users = normalizeReviewUsernames(usernames);+ const keyed = Array.isArray(reviewers) && reviewers.length ? reviewers : (users.length ? [] : [...DEFAULT_REVIEWERS]);const optSet = optionalReviewerSet(optionalReviewers);const maxLookup = reviewerMaxRoundsLookup(reviewerMaxRounds);const modelLookup = reviewerModelLookup(reviewerModels);diff --git a/server/lib/reviewerConfig.test.js b/server/lib/reviewerConfig.test.jsindex eea9bb7107..6c4780ca9f 100644--- a/server/lib/reviewerConfig.test.js+++ b/server/lib/reviewerConfig.test.js@@ -724,6 +724,18 @@ describe('claim reviewer round-trip (prompt CSV ↔ persisted metadata)', () =>expect(claimSafeReviewers(undefined)).toEqual(['codex']);});+ it('keeps a forge-reviewer-only claim roster through persistence instead of falling back to an AI reviewer', () => {+ const defaults = { reviewers: ['claude'], usernames: [] };+ const persisted = reviewerConfigMetadata({ reviewers: [], usernames: ['@reviewer-one'] });+ expect(persisted).toEqual({ reviewers: [], usernames: ['reviewer-one'] });+ const config = resolveClaimReviewerConfig(persisted, defaults, defaults.reviewers);+ expect(config.reviewers).toEqual([]);+ expect(config.csv).toBe('@reviewer-one');+ // An empty list with no forge reviewer still means "inherit", never "no review".+ expect(reviewerConfigMetadata({ reviewers: [], usernames: [] })).toEqual({ usernames: [] });+ expect(resolveClaimReviewerConfig({ reviewers: [] }, defaults, defaults.reviewers).reviewers).toEqual(['claude']);+ });+it('stably prioritizes tool-free local reviewers ahead of tool-enabled reviewers', () => {expect(prioritizeToolFreeReviewers(['codex', 'ollama', 'copilot', 'lmstudio', 'claude'])).toEqual(['ollama', 'lmstudio', 'codex', 'copilot', 'claude']);diff --git a/server/routes/apps/pullRequests.js b/server/routes/apps/pullRequests.jsindex 3a3b335ad1..d24d011061 100644--- a/server/routes/apps/pullRequests.js+++ b/server/routes/apps/pullRequests.js@@ -261,7 +261,7 @@ router.post('/:id/pull-requests/:number/resolve', loadApp, asyncHandler(async (rnormalize: normalizeReviewers,isTruthyMeta,});- const reviewers = claimSafeReviewers(reviewOptions.reviewers);+ const reviewers = claimSafeReviewers(reviewOptions.reviewers, reviewOptions.usernames);const optionalReviewers = (reviewOptions.optionalReviewers || []).filter(reviewer => reviewer !== 'copilot');const appLabel = String(app.name || app.id).replace(/\s+/g, ' ').trim();diff --git a/server/services/developmentWatchdog.js b/server/services/developmentWatchdog.jsindex 7142ac17e0..54a3da6ca2 100644--- a/server/services/developmentWatchdog.js+++ b/server/services/developmentWatchdog.js@@ -279,7 +279,7 @@ async function dispatch(app, decision) {const { resolveReviewLoopOptions } = await import('./codeReview.js');const { claimSafeReviewers } = await import('../lib/reviewerConfig.js');const options = await resolveReviewLoopOptions({});- const reviewers = claimSafeReviewers(options.reviewers);+ const reviewers = claimSafeReviewers(options.reviewers, options.usernames);const { spawnReviewLoopFollowUp } = await import('./agentWorktreeCleanup.js');const task = await spawnReviewLoopFollowUp({ originalAgentId: null,originalTask: { id: `watchdog-${randomUUID()}`, description: `Resolve PR #${item.number}`, metadata: { app: app.id } },diff --git a/server/services/taskPromptDefaults/integrity.snapshot.json b/server/services/taskPromptDefaults/integrity.snapshot.jsonindex e6aaa61498..16697d4081 100644--- a/server/services/taskPromptDefaults/integrity.snapshot.json+++ b/server/services/taskPromptDefaults/integrity.snapshot.json@@ -12,9 +12,9 @@"better-test-quality": "8e305f986e9c9066da5db2aee76fc024","branch-cleanup": "60f132e83570a7a4559a7adf7af1b883","branch-reconcile": "234e23b6c8adc108b5a0cabeafcb8dfd",- "claim-issue": "cc5fb5015f536be6f3f2a9681bf5f21a",- "claim-issue-gitlab": "db6f46db14094581b13646ca281cc8d6",- "claim-issue-jira": "e27862793495692fd4c4fe0dad1eb745",+ "claim-issue": "c9174e5e70203258bf5bf59256b0b158",+ "claim-issue-gitlab": "610e9a535ecc828754807f68009b6fd4",+ "claim-issue-jira": "b793412731c754db0b88b4d84d7e454f","code-quality": "175fab48fc713b71b4f0574b7cc5fe0b","code-reviewer-implement": "f8cb11be6796874018d0a4d776c8931d","code-reviewer-review": "10037a8a366f5c98482d2de11cdb127a",@@ -42,7 +42,7 @@"performance": "4f8ddada54d7c6f31b7fb35aeb0f29db","plan-feature": "7f859397ff16889ffc0cf5a8ba6bddab","plan-task": "b718701c2d4ed2b4900225fc58857208",- "plan-task-claim": "c1dd9d62bffc7eb6d2ce58f191d987bf",+ "plan-task-claim": "07f6252f00905f9c6e4134a3d3587310","pr-reviewer": "de9c295018df7c403a722a9ac2e780af","pr-reviewer-eligibility": "a5652f7bcb7e2e50b1cfb9a54a6fabe0","pr-reviewer-review": "511b26a376439cc6cb268a736897fefd",@@ -77,9 +77,9 @@"better-structural-drift": 2,"better-test-quality": 2,"branch-reconcile": 10,- "claim-issue": 45,- "claim-issue-gitlab": 39,- "claim-issue-jira": 26,+ "claim-issue": 46,+ "claim-issue-gitlab": 40,+ "claim-issue-jira": 27,"code-quality": 6,"code-reviewer-a": 1,"code-reviewer-b": 1,@@ -225,7 +225,8 @@"cea12f4209a3f20ebe1a5ad8cc7b38b5","2ca300b6dc35b8e73bc2d0908e87168e","2b5bbc559ecec8eafc7c01372540de15",- "c1fa7553e3cd7599d6375555d7e6c1b8"+ "c1fa7553e3cd7599d6375555d7e6c1b8",+ "cc5fb5015f536be6f3f2a9681bf5f21a"],"claim-issue-gitlab": ["fae92c45c89c65455930b4b06a1b88c4",@@ -265,7 +266,8 @@"d7fd606dceeedb0053d0b84088a2fb8a","251e7d56a8d8585469dfb8174c4d3e1f","29f025187d20a8583292bb53bb974c06",- "6fb2a5771c3407143c402f292740e163"+ "6fb2a5771c3407143c402f292740e163",+ "db6f46db14094581b13646ca281cc8d6"],"claim-issue-jira": ["496638ec099de9d57686a61a015a3c03",@@ -292,7 +294,8 @@"c83dc6504a61bc35a6bfdd147a7ac338","6bdf175a604f9c712a22b2b31dd6cf7a","d0df766dd9ef326c8578efe2953af13e",- "ac0b995b92d115a683ef324c3ab22cf1"+ "ac0b995b92d115a683ef324c3ab22cf1",+ "e27862793495692fd4c4fe0dad1eb745"],"code-quality": ["62752723eba7a39aa94e010911923cc8",diff --git a/server/services/taskPromptDefaults/prompts.js b/server/services/taskPromptDefaults/prompts.jsindex fd2c4eeb46..1f02db1af8 100644--- a/server/services/taskPromptDefaults/prompts.js+++ b/server/services/taskPromptDefaults/prompts.js@@ -26,7 +26,7 @@ import {// The PR-decision envelope is owned by the module that normalizes and renders// it, so stage 3 and the issue-watcher reasoning pass cannot drift apart.import { PR_REVIEW_DECISION_CONTRACT } from '../../lib/prReviewReport.js';-import { REVIEW_UNAVAILABLE_REPORTING_NOTE, ZERO_REVIEWER_COVERAGE_NOTE } from '../../lib/reviewerConfig.js';+import { FORGE_REVIEWER_WAIT_NOTE, REVIEW_UNAVAILABLE_REPORTING_NOTE, ZERO_REVIEWER_COVERAGE_NOTE } from '../../lib/reviewerConfig.js';// One pre-claim contract for all supported issue trackers.const ISSUE_REVALIDATION_GUIDANCE = `**Current need and project alignment — before any claim, contributor assignment, or epic decomposition:**@@ -3076,7 +3076,7 @@ The configured reviewers for this task, in order, are \`{reviewers}\`. Split the3. Push the branch: \`git push -u origin claim/<slug>\`, then confirm \`git log --oneline @{u}..HEAD\` is empty so every review fix from step 2 is in the PR's diff.4. Open the PR with \`gh pr create\` — title MUST encode the slug: \`<type>([<slug>]): <description>\`. Body should summarize what shipped + test plan.4a. Read the review status back — shell variables do not survive between calls, so run \`REVIEW_STATUS_FILE="$(git rev-parse --git-path portos-review-status)"\` and source it. If \`REVIEW_STATUS=review-blocked\` from a required reviewer, preserve the claim branch, leave the PR open, and stop before the PR-side review, CI, or merge steps. ${REVIEW_UNAVAILABLE_REPORTING_NOTE} If all configured reviewers were optional (~opt), REVIEW_STATUS must not block the merge.-5. **Satisfy the PR-SIDE reviewers and CI before merging.** Request each \`@<login>\` (\`gh pr edit <num> --add-reviewer <login>\`, drop the \`@\`), poll every 5–15s, and address the findings — push fixes, capped at 3 rounds each; their approval gates the merge. Wait out any auto-requested review bot the same way, then let required CI finish (\`gh pr checks <num> --required --watch --fail-fast\` — REQUIRED checks only, so an optional job can't stall the merge). If a reviewer stays unsatisfied or a required check stays red, comment on the PR naming the failure, remove only the worktree, and leave the branch and PR for reconciliation.+5. **Satisfy the PR-SIDE reviewers and CI before merging.** Request each \`@<login>\` (\`gh pr edit <num> --add-reviewer <login>\`, drop the \`@\`) and address the findings — push fixes, capped at 3 rounds each; their approval gates the merge. ${FORGE_REVIEWER_WAIT_NOTE} Wait out any auto-requested review bot the same way, then let required CI finish (\`gh pr checks <num> --required --watch --fail-fast\` — REQUIRED checks only, so an optional job can't stall the merge). If a reviewer stays unsatisfied or a required check stays red, comment on the PR naming the failure, remove only the worktree, and leave the branch and PR for reconciliation.6. **Merge immediately via \`gh pr merge\`** — NEVER a local merge and NEVER \`--auto\`. Select merge, squash or rebase only from verified allowed repository methods. An unreadable state or unconfirmed mutation stops this phase; no write is retried with another method:\`\`\`bash@@ -3331,7 +3331,7 @@ Every local reviewer's fixes are already committed, so the PR opens against fini1. Push the branch: \`git push -u origin "claim/issue-\${NUM}"\`. Then confirm \`git log --oneline @{u}..HEAD\` is empty — if it isn't, a Phase 5 review fix never left the machine and the PR would be opened against a stale diff; push again before continuing.2. Open the PR with \`gh pr create\`. Summarize what shipped + a short test plan. **Choose the issue trailer deliberately:** if this PR FULLY satisfies the issue's scope, the body MUST contain \`Closes #\${NUM}\` so the merge auto-closes it. If you deliberately shipped only PART of the issue (a valuable slice, with real scope still remaining), use \`Refs #\${NUM}\` instead (NOT \`Closes\`) and add a \`## Remaining\` section listing what's left — Phase 7 reconciles the issue so it is never stranded.2a. Read the Phase 5 status back — shell variables do not survive between calls, so run REVIEW_STATUS_FILE="$(git rev-parse --git-path portos-review-status)" and source it. If REVIEW_STATUS=review-blocked from a required reviewer, preserve the claim markers and branch, leave the PR open, and stop before the PR-side review, CI, or merge steps. ${REVIEW_UNAVAILABLE_REPORTING_NOTE} If all configured reviewers were optional (~opt), REVIEW_STATUS must not block the merge.-3. **Satisfy the PR-SIDE reviewers.** For each \`@<login>\` from the Phase 5 split, request the review now (\`gh pr edit <pr-number> --add-reviewer <login>\`, drop the \`@\`), poll every 5–15s for it, and address the findings — push fixes, capped at 3 rounds per reviewer. Their approval gates the merge. If the repo auto-requests a review bot when the PR opens, wait that round out and address it the same way. With no \`@<login>\` configured and no bot review appearing, this step is a no-op.+3. **Satisfy the PR-SIDE reviewers.** For each \`@<login>\` from the Phase 5 split, request the review now (\`gh pr edit <pr-number> --add-reviewer <login>\`, drop the \`@\`) and address the findings — push fixes, capped at 3 rounds per reviewer. Their approval gates the merge. ${FORGE_REVIEWER_WAIT_NOTE} If the repo auto-requests a review bot when the PR opens, wait that round out and address it the same way. With no \`@<login>\` configured and no bot review appearing, this step is a no-op.**Review-stuck cleanup** (a PR-side reviewer still unsatisfied after 3 rounds): post one summarizing PR comment (\`gh pr comment\`), preserve the exact worktree and local branch. Leave the open PR, the assignee, and the \`in-progress\` label in place so the human picks up cold. Do NOT run Phase 7.4. **Let required CI finish and go green** — \`gh pr checks <pr-number> --required --watch --fail-fast\` (scope the wait to REQUIRED checks so an optional job can't stall a merge branch protection would allow). A red required check is not merge-eligible: fix it and re-push (same 3-round cap), or, if it stays red, stop exactly as the review-stuck cleanup above does.@@ -3513,7 +3513,7 @@ Every local reviewer's fixes are already committed, so the MR opens against fini1. Push the branch: \`git push -u origin "claim/issue-\${NUM}"\`. Then confirm \`git log --oneline @{u}..HEAD\` is empty — if it isn't, a Phase 5 review fix never left the machine and the MR would be opened against a stale diff; push again before continuing.2. Open the MR with \`glab mr create --fill --source-branch "claim/issue-\${NUM}" --target-branch "\${DEFAULT_BRANCH}" --yes\`. **Choose the issue trailer deliberately:** if this MR FULLY satisfies the issue's scope, the description MUST contain \`Closes #\${NUM}\` so the merge auto-closes it; if you deliberately shipped only PART of the issue (a valuable slice with real scope remaining), use \`Refs #\${NUM}\` instead (NOT \`Closes\`) and add a \`## Remaining\` section listing what's left — Phase 7 reconciles the issue so it is never stranded. Summarize what shipped + a short test plan (pass \`--description\` if \`--fill\` didn't capture it).2a. Read the Phase 5 status back — shell variables do not survive between calls, so run REVIEW_STATUS_FILE="$(git rev-parse --git-path portos-review-status)" and source it. If REVIEW_STATUS=review-blocked from a required reviewer, preserve the claim markers and branch, leave the MR open, and stop before the MR-side review, CI, or merge steps. ${REVIEW_UNAVAILABLE_REPORTING_NOTE} If all configured reviewers were optional (~opt), REVIEW_STATUS must not block the merge.-3. **Satisfy the MR-SIDE reviewers.** For each \`@<login>\` from the Phase 5 split, request the review now (resolve \`MR_IID\` from the source branch exactly as step 5 does, then \`glab mr update "\${MR_IID}" --reviewer <login>\`, dropping the \`@\`; if glab rejects the flag, run \`glab mr update --help\` rather than guessing), poll every 5–15s, and address the findings — push fixes, capped at 3 rounds per reviewer. Their approval gates the merge. If the project auto-requests a review bot when the MR opens, wait that round out and address it the same way. With no \`@<login>\` configured and no bot review appearing, this step is a no-op.+3. **Satisfy the MR-SIDE reviewers.** For each \`@<login>\` from the Phase 5 split, request the review now (resolve \`MR_IID\` from the source branch exactly as step 5 does, then \`glab mr update "\${MR_IID}" --reviewer <login>\`, dropping the \`@\`; if glab rejects the flag, run \`glab mr update --help\` rather than guessing) and address the findings — push fixes, capped at 3 rounds per reviewer. Their approval gates the merge. ${FORGE_REVIEWER_WAIT_NOTE} If the project auto-requests a review bot when the MR opens, wait that round out and address it the same way. With no \`@<login>\` configured and no bot review appearing, this step is a no-op.**Review-stuck cleanup** (an MR-side reviewer still unsatisfied after 3 rounds): post one summarizing MR note (\`glab mr note\`), preserve the exact worktree and local branch. Leave the open MR, the assignee, and the \`in-progress\` label in place so the human picks up cold. Do NOT run Phase 7.4. **Let required CI finish and go green** — inspect the MR's pipeline (\`glab ci status\` on the branch, or \`glab mr view "\${MR_IID}"\`). A red required pipeline is not merge-eligible: fix it and re-push (same 3-round cap), or, if it stays red, stop exactly as the review-stuck cleanup above does.@@ -3705,7 +3705,7 @@ The configured reviewers for this task, in order, are \`{reviewers}\`. Split theThe local reviewers already ran in Phase 5, so only the reviewers that need an open MR/PR remain.-1. **Satisfy the PR-SIDE reviewers.** For each \`@<login>\` from the Phase 5 split, request the review on the open MR/PR (GitHub: \`gh pr edit <pr-number> --add-reviewer <login>\`, dropping the \`@\`; GitLab: \`glab mr update <MR_IID> --reviewer <login>\`), poll every 5–15s, and address the findings — push fixes, capped at 3 rounds per reviewer. Wait out any auto-requested review bot the same way. A missing reviewer, timeout, or unresolvable finding is UNSATISFIED, not clean: comment on the MR/PR naming the failure and stop. With no \`@<login>\` configured and no bot review appearing, this step is a no-op.+1. **Satisfy the PR-SIDE reviewers.** For each \`@<login>\` from the Phase 5 split, request the review on the open MR/PR (GitHub: \`gh pr edit <pr-number> --add-reviewer <login>\`, dropping the \`@\`; GitLab: \`glab mr update <MR_IID> --reviewer <login>\`) and address the findings — push fixes, capped at 3 rounds per reviewer. ${FORGE_REVIEWER_WAIT_NOTE} Wait out any auto-requested review bot the same way. A missing reviewer, timeout, or unresolvable finding is UNSATISFIED, not clean: comment on the MR/PR naming the failure and stop. With no \`@<login>\` configured and no bot review appearing, this step is a no-op.2. **Leave the MR/PR open for a human to land.** Unlike the GitHub/GitLab issue flows, this flow does NOT auto-merge — the ticket is "In Review" and a human reviews + merges. After the reviewers finish, preserve the exact worktree, local \`claim/<KEY>\` branch and open MR/PR for the intentional human handoff. Do not invoke merged retirement while it remains unmerged. **Do NOT \`git merge\`, \`gh pr merge\`, \`glab mr merge\`, or \`git pull\`** — landing the change and moving the ticket to Done is the human's call.## Phase 7 — Reportdiff --git a/server/services/taskPromptDefaults/versions.js b/server/services/taskPromptDefaults/versions.jsindex 9caa806c30..15ea590b83 100644--- a/server/services/taskPromptDefaults/versions.js+++ b/server/services/taskPromptDefaults/versions.js@@ -114,10 +114,11 @@ export const PROMPT_VERSIONS = {// Guard each merge attempt and stop on uncertain readback (#12273).// Epic decomposition reads only the owner's own comments, never the public// thread, resolving the account itself so a pinned epic still finds them.-PROMPT_VERSIONS['claim-issue'] = 45;-PROMPT_VERSIONS['claim-issue-gitlab'] = 39;+// A forge reviewer (`@login`) may be a person: wait up to 4 hours per round and iterate with them.+PROMPT_VERSIONS['claim-issue'] = 46;+PROMPT_VERSIONS['claim-issue-gitlab'] = 40;// Accepted review findings require resolution regardless of severity.-PROMPT_VERSIONS['claim-issue-jira'] = 26; // v25: API calls target {portosApiUrl}, expanded at spawn to the loopback origin (#12405).+PROMPT_VERSIONS['claim-issue-jira'] = 27; // v25: API calls target {portosApiUrl}, expanded at spawn to the loopback origin (#12405).// Audit anchor for reference-watch's read/write coupling.// The reference-watch schedule default (`taskMetadata.readOnly` in DEFAULT_TASK_INTERVALS)