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 self-review: make the apply-capable predicate alias-aware on both sides
[._.]/ Adam Eivy8e2e9329a8b4
diff --git a/server/lib/dispatchLabels.js b/server/lib/dispatchLabels.jsindex 2ea77389e7..5e4d29b2a1 100644--- a/server/lib/dispatchLabels.js+++ b/server/lib/dispatchLabels.js@@ -532,6 +532,13 @@ export function jiraIssueLabels({ model, effort, goodFirstIssue, helpWanted, pla].filter(Boolean);}+/** The fixed label tables, in precedence order, as `[colors, descriptions]` pairs. */+const LABEL_TABLES = Object.freeze([+ [DISPATCH_LABEL_COLORS, DISPATCH_LABEL_DESCRIPTIONS],+ [CONTRIBUTOR_LABEL_COLORS, CONTRIBUTOR_LABEL_DESCRIPTIONS],+ [WORKFLOW_LABEL_COLORS, WORKFLOW_LABEL_DESCRIPTIONS],+]);+/*** `{ name, color, description }` for a forge dispatch, contributor, or workflow* label, or null.@@ -541,12 +548,6 @@ export function jiraIssueLabels({ model, effort, goodFirstIssue, helpWanted, pla* for `cli` — which is what makes `formatLabelCreateCommand` create the label* the issue will actually be filed with.*/-const LABEL_TABLES = Object.freeze([- [DISPATCH_LABEL_COLORS, DISPATCH_LABEL_DESCRIPTIONS],- [CONTRIBUTOR_LABEL_COLORS, CONTRIBUTOR_LABEL_DESCRIPTIONS],- [WORKFLOW_LABEL_COLORS, WORKFLOW_LABEL_DESCRIPTIONS],-]);-export function dispatchLabelSpec(name, { cli = 'gh' } = {}) {if (typeof name !== 'string') return null;const canonical = forgeLabelName(name);diff --git a/server/lib/reviewerConfig.js b/server/lib/reviewerConfig.jsindex 593cbd5c67..f4511c1ce4 100644--- a/server/lib/reviewerConfig.js+++ b/server/lib/reviewerConfig.js@@ -71,7 +71,14 @@ export const DEFAULT_REVIEWERS = [];// (LOCAL_LLM_REVIEWERS, MODEL_CAPABLE_CLI_REVIEWERS, …): slashdo granting a// second reviewer the editing pass is then one row, not an edit at every gate.export const APPLY_CAPABLE_REVIEWERS = Object.freeze(['codex']);-export const isApplyCapableReviewer = (slug) => APPLY_CAPABLE_REVIEWERS.includes(slug);+// Aliases resolve first, matching the client mirror — a predicate that accepted+// `codex` but not a future alias of it would silently drop the flag for a user+// who typed the alias, and the two sides would disagree about the same reviewer.+export const isApplyCapableReviewer = (slug) => {+ if (typeof slug !== 'string') return false;+ const lower = slug.trim().toLowerCase();+ return APPLY_CAPABLE_REVIEWERS.includes(REVIEWER_ALIASES[lower] || lower);+};// Reviewers that resolve to a local-LLM backend (rather than a CLI or GitHub// bot). Used by the code-review endpoint, settings panel, and prompt builder// to gate model-id resolution.@@ -1263,14 +1270,13 @@ export function buildReviewersCsv(reviewers, usernames = [], optionalReviewers =* Usernames are appended as `@user` tokens after the keyed reviewers.* - `--review-stop-on-*` only when the effective list is 2+ (stop-mode is* meaningless for one).- * - `--reviewer-applies` only when an `APPLY_CAPABLE_REVIEWERS` slug (`codex`) is in- * the emitted list. slashdo's loop- * forces every OTHER local reviewer (`claude`/`agy`/`grok`/`pi`/`cursor`/- * `opencode`) back to review-only — codex is the one reviewer with a verified- * write-isolated profile — and the flag is a no-op on `copilot`, `@login`- * (cloud, read-only) and `ollama` (non-agentic). Emitting it for a list with no- * codex therefore promises an editing pass slashdo will not run; it is dropped- * instead, so the rendered command says what will actually happen.+ * - `--reviewer-applies` only when an `APPLY_CAPABLE_REVIEWERS` slug (`codex`) is+ * in the emitted list. slashdo's loop forces every OTHER local reviewer+ * (`claude`/`agy`/`grok`/`pi`/`cursor`/`opencode`) back to review-only — codex+ * is the one with a verified write-isolated profile — and the flag is a no-op on+ * `copilot`/`@login` (cloud, read-only) and `ollama` (non-agentic). Emitting it+ * for a list with no codex would promise an editing pass slashdo will not run,+ * so it is dropped and the rendered command says what will actually happen.* - Reviewers in `optionalReviewers` get slashdo's `~opt` non-blocking suffix on* their emitted token, so an inconclusive verdict from them doesn't gate the* merge. Reviewers with a `reviewerMaxRounds` cap get `~max=<n>` after it,diff --git a/server/lib/reviewerConfig.test.js b/server/lib/reviewerConfig.test.jsindex 058dca8cf2..6b3edfb5a6 100644--- a/server/lib/reviewerConfig.test.js+++ b/server/lib/reviewerConfig.test.js@@ -454,9 +454,14 @@ describe('client mirror of the reviewer vocabulary', () => {it('matches the server apply-capable roster', async () => {const client = await import('../../client/src/lib/reviewerPins.js');expect([...client.APPLY_CAPABLE_REVIEWERS].sort()).toEqual([...APPLY_CAPABLE_REVIEWERS].sort());- for (const slug of REVIEWER_VALUES) {- expect(client.isApplyCapableReviewer(slug), slug).toBe(isApplyCapableReviewer(slug));+ // Aliases and casing included: REVIEWER_VALUES alone is all-canonical, so it+ // would pass even if one side resolved aliases and the other did not.+ const probes = [...REVIEWER_VALUES, ...Object.keys(REVIEWER_ALIASES), 'CODEX', ' codex ', '', null];+ for (const slug of probes) {+ expect(client.isApplyCapableReviewer(slug), String(slug)).toBe(isApplyCapableReviewer(slug));}+ expect(isApplyCapableReviewer('CODEX')).toBe(true);+ expect(isApplyCapableReviewer('antigravity')).toBe(false);// Every apply-capable slug is a reviewer the picker can actually offer.for (const slug of APPLY_CAPABLE_REVIEWERS) expect(REVIEWER_VALUES).toContain(slug);});diff --git a/server/lib/workTracker.js b/server/lib/workTracker.jsindex daa34a1ad3..2b3ec942e3 100644--- a/server/lib/workTracker.js+++ b/server/lib/workTracker.js@@ -295,10 +295,10 @@ export function formatTrackerInstructions(tracker, options = {}) {const jiraDispatchLabelWording = issueLabelContract? `plus the required equivalent dispatch-hint labels ${issueLabelContract.jiraFlags}:`: 'plus equivalent dispatch-hint labels when justified:';- // Rendered from the shared slot list rather than a literal, so a new label- // axis reaches this copy-pasteable example without re-patching it here.- // Rendered twice from one contract: GitLab spells every prefixed label with- // its scoped `::` separator, so the glab block cannot reuse the gh line.+ // Rendered from the shared slot list rather than a literal, so a new label axis+ // reaches this copy-pasteable example without re-patching it here — and rendered+ // twice from the one contract, because GitLab spells every prefixed label with+ // its scoped `::` separator and so cannot reuse the gh line.const requiredForgeFlags = issueLabelContract?.forgeFlags || '--label model:<tier> --label effort:<level>';const forgeLabelFlags = formatOptionalIssueLabelFlags(requiredForgeFlags);const forgeLabelFlagsGlab = formatOptionalIssueLabelFlags(requiredForgeFlags, { cli: 'glab' });diff --git a/server/services/branchReconcile.js b/server/services/branchReconcile.jsindex 2ac59a6b4e..c824497f39 100644--- a/server/services/branchReconcile.js+++ b/server/services/branchReconcile.js@@ -1506,8 +1506,9 @@ async function dispatchHintLineForBranch(branchName, repoPath) {const hint = await getIssueDispatchHint(issueNumber, { cwd: repoPath }).catch(() => ({ status: 'unavailable', model: null, effort: null }));if (hint.status !== 'known' || (!hint.model && !hint.effort)) return '';// Rendered from the shared vocabulary rather than hand-spelled, so this line- // cannot drift from the labels a filer writes (and picks up the forge separator- // for free the day getIssueDispatchHint grows a glab arm).+ // cannot drift from the tiers/levels a filer writes. Canonical GitHub spelling:+ // getIssueDispatchHint is gh-only, and this is prose for a coordinator prompt,+ // not a label being applied to a forge.const parts = forgeDispatchLabels({ model: hint.model, effort: hint.effort });return `- Recommended dispatch (issue #${issueNumber}'s labels): ${parts.join(', ')} — run this branch's work at that capability/effort.`;}