Skip to content

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

address review (self): fix stale reviewerCliBinary JSDoc and comment adjacency

[._.]/ Adam Eivy555b06b11a3d
diff --git a/server/lib/antigravity.js b/server/lib/antigravity.js
index 075b9f79dd..b168c8bcec 100644
--- a/server/lib/antigravity.js
+++ b/server/lib/antigravity.js
@@ -5,6 +5,10 @@ export const ANTIGRAVITY_TUI_ID = 'antigravity-tui';
export const LEGACY_GEMINI_CLI_ID = 'gemini-cli';
export const LEGACY_GEMINI_TUI_ID = 'gemini-tui';
export const ANTIGRAVITY_CONFIGURED_DEFAULT = 'antigravity-configured-default';
+// The shipped executable. Exported because the reviewer vocabulary needs to map
+// its `antigravity` slug to a real command (cosValidation's
+// REVIEWER_CLI_BINARIES) — retyping the string there is how a rename drifts.
+export const ANTIGRAVITY_COMMAND = 'agy';
// Match by normalized binary basename (like isGrokCommand/isOpencodeCommand) so
// a path- or `.exe`-configured provider (`/opt/homebrew/bin/agy`, `agy.exe`) is
@@ -12,11 +16,6 @@ export const ANTIGRAVITY_CONFIGURED_DEFAULT = 'antigravity-configured-default';
// through to stdin delivery for a path-configured agy — losing the prompt AND
// leaving the trailing `--print` marker dangling (buildCliArgs adds it by
// provider id, which DOES survive a path command).
-// The shipped executable. Exported because the reviewer vocabulary needs to map
-// its `antigravity` slug to a real command (cosValidation's
-// REVIEWER_CLI_BINARIES) — retyping the string there is how a rename drifts.
-export const ANTIGRAVITY_COMMAND = 'agy';
-
export function isAntigravityCommand(command) {
const base = commandBasename(command);
return base === ANTIGRAVITY_COMMAND || base === 'antigravity';
diff --git a/server/lib/cosValidation.js b/server/lib/cosValidation.js
index 265950a5b6..68c23bc8f0 100644
--- a/server/lib/cosValidation.js
+++ b/server/lib/cosValidation.js
@@ -89,12 +89,13 @@ export function isCliReviewer(reviewer) {
* The PATH executable for a CLI reviewer slug, or `null` when the reviewer is
* not a spawnable CLI. Accepts the `gemini` alias.
*
- * Unmapped-but-spawnable is deliberately NOT possible to express: a new CLI
- * reviewer added to REVIEWER_VALUES without a REVIEWER_CLI_BINARIES entry
- * returns null here, so callers that derive "is a CLI" from the broader
- * copilot/local-LLM exclusion (see agentPromptBuilder) still treat it as a CLI
- * and fall back to naming the slug — the pre-existing behavior — rather than
- * silently dropping it from the review loop.
+ * A null here means "no binary is mapped", NOT "not a CLI" — use isCliReviewer
+ * for that question. The two can disagree for exactly one reviewer: a new CLI
+ * reviewer added to REVIEWER_VALUES before its REVIEWER_CLI_BINARIES entry.
+ * That reviewer still drives the loop (isCliReviewer says yes) and its prompt
+ * falls back to naming the slug — the pre-existing behavior — rather than being
+ * silently dropped. cosValidation.test.js pins the map's coverage so the window
+ * closes at review time.
*
* @param {string} reviewer - reviewer slug (`antigravity`, `gemini`, `codex`, …)
* @returns {string|null}