Reduce internal-only labeling noise in source comments (#355)

This pass rewrites comment-only ANT-ONLY markers to neutral internal-only
language across the source tree without changing runtime strings, flags,
commands, or protocol identifiers. The goal is to lower obvious internal
prose leakage while keeping the diff mechanically safe and easy to review.

Constraint: Phase B is limited to comments/prose only; runtime strings and user-facing labels remain deferred
Rejected: Broad search-and-replace across strings and command descriptions | too risky for a prose-only pass
Confidence: high
Scope-risk: narrow
Reversibility: clean
Directive: Remaining ANT-ONLY hits are mostly runtime/user-facing strings and should be handled separately from comment cleanup
Tested: bun run build
Tested: bun run smoke
Tested: bun run verify:privacy
Tested: bun run test:provider
Tested: bun run test:provider-recommendation
Not-tested: Full repo typecheck (upstream baseline remains noisy)

Co-authored-by: anandh8x <test@example.com>
This commit is contained in:
Anandan
2026-04-04 23:26:14 +05:30
committed by GitHub
parent 9e84d2fddc
commit 2f162af60c
96 changed files with 160 additions and 160 deletions

View File

@@ -1,5 +1,5 @@
import { c as _c } from "react-compiler-runtime";
// biome-ignore-all assist/source/organizeImports: ANT-ONLY import markers must not be reordered
// biome-ignore-all assist/source/organizeImports: internal-only import markers must not be reordered
import * as React from 'react';
import { Box, Text, color } from '../../ink.js';
import { useTerminalSize } from '../../hooks/useTerminalSize.js';

View File

@@ -1,5 +1,5 @@
/**
* ANT-ONLY: Banner shown in the transcript that prompts users to report
* internal-only: Banner shown in the transcript that prompts users to report
* issues via /issue. Appears when friction is detected in the conversation.
*/
export function IssueFlagBanner() {

View File

@@ -293,7 +293,7 @@ function PromptInput({
// the pill returns null for implicit-and-not-reconnecting, so nav must too,
// otherwise bridge becomes an invisible selection stop.
const bridgeFooterVisible = replBridgeConnected && (replBridgeExplicit || replBridgeReconnecting);
// Tmux pill (ant-only) — visible when there's an active tungsten session
// Tmux pill (internal-only) — visible when there's an active tungsten session
const hasTungstenSession = useAppState(s => "external" === 'ant' && s.tungstenActiveSession !== undefined);
const tmuxFooterVisible = "external" === 'ant' && hasTungstenSession;
// WebBrowser pill — visible when a browser is open
@@ -2153,7 +2153,7 @@ function PromptInput({
}} onCancel={() => setShowHistoryPicker(false)} />;
}
// Show loop mode menu when requested (ant-only, eliminated from external builds)
// Show loop mode menu when requested (internal-only, eliminated from external builds)
if (modelPickerElement) {
return modelPickerElement;
}

View File

@@ -1,5 +1,5 @@
import { c as _c } from "react-compiler-runtime";
// biome-ignore-all assist/source/organizeImports: ANT-ONLY import markers must not be reordered
// biome-ignore-all assist/source/organizeImports: internal-only import markers must not be reordered
import { feature } from 'bun:bundle';
// Dead code elimination: conditional import for COORDINATOR_MODE
/* eslint-disable @typescript-eslint/no-require-imports */
@@ -364,7 +364,7 @@ function ModeIndicator({
// BackgroundTaskStatus is NOT in parts — it renders as a Box sibling so
// its click-target Box isn't nested inside the <Text wrap="truncate">
// wrapper (reconciler throws on Box-in-Text).
// Tmux pill (ant-only) — appears right after tasks in nav order
// Tmux pill (internal-only) — appears right after tasks in nav order
...("external" === 'ant' && hasTmuxSession ? [<TungstenPill key="tmux" selected={tmuxSelected} />] : []), ...(isAgentSwarmsEnabled() && hasTeams ? [<TeamStatus key="teams" teamsSelected={teamsSelected} showHint={showHint && !hasBackgroundTasks} />] : []), ...(shouldShowPrStatus ? [<PrBadge key="pr-status" number={prStatus.number!} url={prStatus.url!} reviewState={prStatus.reviewState!} />] : [])];
// Check if any in-process teammates exist (for hint text cycling)

View File

@@ -1,5 +1,5 @@
import { c as _c } from "react-compiler-runtime";
// biome-ignore-all assist/source/organizeImports: ANT-ONLY import markers must not be reordered
// biome-ignore-all assist/source/organizeImports: internal-only import markers must not be reordered
import { feature } from 'bun:bundle';
import { Box, Text, useTheme, useThemeSetting, useTerminalFocus } from '../../ink.js';
import type { KeyboardEvent } from '../../ink/events/keyboard-event.js';
@@ -342,7 +342,7 @@ export function Config({
});
}
},
// Fast mode toggle (ant-only, eliminated from external builds)
// Fast mode toggle (internal-only, eliminated from external builds)
...(isFastModeEnabled() && isFastModeAvailable() ? [{
id: 'fastMode',
label: `Fast mode (${FAST_MODE_MODEL_DISPLAY} only)`,
@@ -391,7 +391,7 @@ export function Config({
});
}
}] : []),
// Speculation toggle (ant-only)
// Speculation toggle (internal-only)
...("external" === 'ant' ? [{
id: 'speculationEnabled',
label: 'Speculative execution',

View File

@@ -1,5 +1,5 @@
import { c as _c } from "react-compiler-runtime";
// biome-ignore-all assist/source/organizeImports: ANT-ONLY import markers must not be reordered
// biome-ignore-all assist/source/organizeImports: internal-only import markers must not be reordered
import * as React from 'react';
import { Suspense, useState } from 'react';
import { useKeybinding } from '../../keybindings/useKeybinding.js';

View File

@@ -1,5 +1,5 @@
import { c as _c } from "react-compiler-runtime";
// biome-ignore-all assist/source/organizeImports: ANT-ONLY import markers must not be reordered
// biome-ignore-all assist/source/organizeImports: internal-only import markers must not be reordered
import { Box, Text } from '../ink.js';
import * as React from 'react';
import { useEffect, useMemo, useRef, useState } from 'react';
@@ -258,7 +258,7 @@ function SpinnerWithVerbInner({
const showBtwTip = tipsEnabled && elapsedSnapshot > 30_000 && !getGlobalConfig().btwUseCount;
const effectiveTip = contextTipsActive ? undefined : showClearTip && !nextTask ? 'Use /clear to start fresh when switching topics and free up context' : showBtwTip && !nextTask ? "Use /btw to ask a quick side question without interrupting Claude's current work" : spinnerTip;
// Budget text (ant-only) — shown above the tip line
// Budget text (internal-only) — shown above the tip line
let budgetText: string | null = null;
if (feature('TOKEN_BUDGET')) {
const budget = getCurrentTurnTokenBudget();

View File

@@ -379,7 +379,7 @@ function OverviewTab({
// Calculate range days based on selected date range
const rangeDays = dateRange === '7d' ? 7 : dateRange === '30d' ? 30 : stats.totalDays;
// Compute shot stats data (ant-only, gated by feature flag)
// Compute shot stats data (internal-only, gated by feature flag)
let shotStatsData: {
avgShots: string;
buckets: {
@@ -511,7 +511,7 @@ function OverviewTab({
</Box>
</Box>
{/* Speculation time saved (ant-only) */}
{/* Speculation time saved (internal-only) */}
{"external" === 'ant' && stats.totalSpeculationTimeSavedMs > 0 && <Box flexDirection="row" gap={4}>
<Box flexDirection="column" width={28}>
<Text wrap="truncate">
@@ -523,7 +523,7 @@ function OverviewTab({
</Box>
</Box>}
{/* Shot stats (ant-only) */}
{/* Shot stats (internal-only) */}
{shotStatsData && <>
<Box marginTop={1}>
<Text>Shot distribution</Text>
@@ -1150,13 +1150,13 @@ function renderOverviewToAnsi(stats: ClaudeCodeStats): string[] {
const peakHourVal = stats.peakActivityHour !== null ? `${stats.peakActivityHour}:00-${stats.peakActivityHour + 1}:00` : 'N/A';
lines.push(row('Active days', activeDaysVal, 'Peak hour', peakHourVal));
// Speculation time saved (ant-only)
// Speculation time saved (internal-only)
if ("external" === 'ant' && stats.totalSpeculationTimeSavedMs > 0) {
const label = 'Speculation saved:'.padEnd(COL1_LABEL_WIDTH);
lines.push(label + h(formatDuration(stats.totalSpeculationTimeSavedMs)));
}
// Shot stats (ant-only)
// Shot stats (internal-only)
if (feature('SHOT_STATS') && stats.shotDistribution) {
const dist = stats.shotDistribution;
const totalWithShots = Object.values(dist).reduce((s, n) => s + n, 0);

View File

@@ -1,5 +1,5 @@
import { c as _c } from "react-compiler-runtime";
// biome-ignore-all assist/source/organizeImports: ANT-ONLY import markers must not be reordered
// biome-ignore-all assist/source/organizeImports: internal-only import markers must not be reordered
import React, { useMemo } from 'react';
import { Ansi, Box, Text } from '../../ink.js';
import type { Attachment } from 'src/utils/attachments.js';

View File

@@ -1,5 +1,5 @@
import { c as _c } from "react-compiler-runtime";
// biome-ignore-all assist/source/organizeImports: ANT-ONLY import markers must not be reordered
// biome-ignore-all assist/source/organizeImports: internal-only import markers must not be reordered
import { Box, Text, type TextProps } from '../../ink.js';
import { feature } from 'bun:bundle';
import * as React from 'react';

View File

@@ -211,7 +211,7 @@ function BashPermissionRequestInner({
// Editable prefix — initialize synchronously with the best prefix we can
// extract without tree-sitter, then refine via tree-sitter for compound
// commands. The sync path matters because TREE_SITTER_BASH is gated
// ant-only: in external builds the async refinement below always resolves
// internal-only: in external builds the async refinement below always resolves
// to [] and this initial value is what the user sees.
//
// Lazy initializer: this runs regex + split on every render if left in

View File

@@ -39,7 +39,7 @@ export function powershellToolUseOptions({
}
// Note: No sandbox toggle for PowerShell - sandbox is not supported on Windows
// Note: No classifier-reviewed option for PowerShell (ANT-ONLY feature for Bash)
// Note: No classifier-reviewed option for PowerShell (internal-only feature for Bash)
// Only show "always allow" options when not restricted by allowManagedPermissionRulesOnly.
// Prefer the editable prefix input (static extractor + user edits) over the

View File

@@ -164,7 +164,7 @@ export function usePermissionRequestLogging(
}
}
// [ANT-ONLY] Log bash tool calls, so we can categorize
// [internal-only] Log bash tool calls, so we can categorize
// & burn down calls that should have been allowed
if (process.env.USER_TYPE === 'ant') {
const parsedInput = BashTool.inputSchema.safeParse(toolUseConfirm.input)

View File

@@ -103,7 +103,7 @@ type ListItem = {
status: 'running';
};
// WORKFLOW_SCRIPTS is ant-only (build_flags.yaml). Static imports would leak
// WORKFLOW_SCRIPTS is internal-only (build_flags.yaml). Static imports would leak
// ~1.3K lines into external builds. Gate with feature() + require so the
// bundler can dead-code-eliminate the branch.
/* eslint-disable @typescript-eslint/no-require-imports */