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

@@ -430,7 +430,7 @@ export const AgentTool = buildTool({
// Resolve effective isolation mode (explicit param overrides agent def)
const effectiveIsolation = isolation ?? selectedAgent.isolation;
// Remote isolation: delegate to CCR. Gated ant-only — the guard enables
// Remote isolation: delegate to CCR. Gated internal-only — the guard enables
// dead code elimination of the entire block for external builds.
if ("external" === 'ant' && effectiveIsolation === 'remote') {
const eligibility = await checkRemoteAgentEligibility();

View File

@@ -323,7 +323,7 @@ export function renderToolResultMessage(data: Output, progressMessagesForMessage
theme: ThemeName;
isTranscriptMode?: boolean;
}): React.ReactNode {
// Remote-launched agents (ant-only) use a private output type not in the
// Remote-launched agents (internal-only) use a private output type not in the
// public schema. Narrow via the internal discriminant.
const internal = data as Output | RemoteLaunchedOutput;
if (internal.status === 'remote_launched') {

View File

@@ -123,7 +123,7 @@ export type BaseAgentDefinition = {
background?: boolean // Always run as background task when spawned
initialPrompt?: string // Prepended to the first user turn (slash commands work)
memory?: AgentMemoryScope // Persistent memory scope
isolation?: 'worktree' | 'remote' // Run in an isolated git worktree, or remotely in CCR (ant-only)
isolation?: 'worktree' | 'remote' // Run in an isolated git worktree, or remotely in CCR (internal-only)
pendingSnapshotUpdate?: { snapshotTimestamp: string }
/** Omit CLAUDE.md hierarchy from the agent's userContext. Read-only agents
* (Explore, Plan) don't need commit/PR/lint guidelines — the main agent has
@@ -604,7 +604,7 @@ export function parseAgentFromMarkdown(
}
}
// Parse isolation mode. 'remote' is ant-only; external builds reject it at parse time.
// Parse isolation mode. 'remote' is internal-only; external builds reject it at parse time.
type IsolationMode = 'worktree' | 'remote'
const VALID_ISOLATION_MODES: readonly IsolationMode[] =
process.env.USER_TYPE === 'ant' ? ['worktree', 'remote'] : ['worktree']

View File

@@ -371,7 +371,7 @@ export async function* runAgent({
registerPerfettoAgent(agentId, agentDefinition.agentType, parentId)
}
// Log API calls path for subagents (ant-only)
// Log API calls path for subagents (internal-only)
if (process.env.USER_TYPE === 'ant') {
logForDebugging(
`[Subagent ${agentDefinition.agentType}] API calls: ${getDisplayPath(getDumpPromptsPath(agentId))}`,

View File

@@ -1136,7 +1136,7 @@ const COMMAND_ALLOWLIST: Record<string, CommandConfig> = {
...DOCKER_READ_ONLY_COMMANDS,
}
// gh commands are ant-only since they make network requests, which goes against
// gh commands are internal-only since they make network requests, which goes against
// the read-only validation principle of no network access
const ANT_ONLY_COMMAND_ALLOWLIST: Record<string, CommandConfig> = {
// All gh read-only commands from shared validation map

View File

@@ -371,7 +371,7 @@ export const SkillTool: Tool<InputSchema, Output, Progress> = buildTool({
? trimmed.substring(1)
: trimmed
// Remote canonical skill handling (ant-only experimental). Intercept
// Remote canonical skill handling (internal-only experimental). Intercept
// `_canonical_<slug>` names before local command lookup since remote
// skills are not in the local command registry.
if (
@@ -485,7 +485,7 @@ export const SkillTool: Tool<InputSchema, Output, Progress> = buildTool({
}
}
// Remote canonical skills are ant-only experimental — auto-grant.
// Remote canonical skills are internal-only experimental — auto-grant.
// Placed AFTER the deny loop so a user-configured Skill(_canonical_:*)
// deny rule is honored (same pattern as safe-properties auto-allow below).
// The skill content itself is canonical/curated, not user-authored.
@@ -597,7 +597,7 @@ export const SkillTool: Tool<InputSchema, Output, Progress> = buildTool({
// Remove leading slash if present (for compatibility)
const commandName = trimmed.startsWith('/') ? trimmed.substring(1) : trimmed
// Remote canonical skill execution (ant-only experimental). Intercepts
// Remote canonical skill execution (internal-only experimental). Intercepts
// `_canonical_<slug>` before local command lookup — loads SKILL.md from
// AKI/GCS (with local cache), injects content directly as a user message.
// Remote skills are declarative markdown so no slash-command expansion