[repository-quality] Repository Quality Improvement Report — Deprecated API Alias Proliferation & Zombie Callsite Cleanup (2026-07-08) #44304
Closed
Replies: 2 comments
-
|
Smoke club grunt. Latest talk tapped. Test mark here. Warning Firewall blocked 6 domainsThe following domains were blocked by the firewall during workflow execution:
network:
allowed:
- defaults
- "accounts.google.com"
- "android.clients.google.com"
- "clients2.google.com"
- "contentautofill.googleapis.com"
- "safebrowsingohttpgateway.googleapis.com"
- "www.google.com"See Network Configuration for more information.
|
Beta Was this translation helpful? Give feedback.
0 replies
-
|
This discussion was automatically closed because it expired on 2026-07-09T13:29:59.290Z.
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
🎯 Repository Quality Improvement Report - Deprecated API Alias Proliferation & Zombie Callsite Cleanup
Analysis Date: 2026-07-08
Focus Area: Deprecated API Alias Proliferation & Zombie Callsite Cleanup
Strategy Type: Custom
Custom Area: Yes — This repo has accumulated multiple deprecated-but-still-called API aliases (Gemini→Antigravity rename, RequiredSubcommand→RequiredSubcommands field migration, inline-agents feature flag always-true guards) alongside a zombie no-op validator with unused parameters and a stale TODO comment that misleads readers about an already-implemented function. These represent technical debt patterns not captured by standard categories.
Executive Summary
An analysis of the
pkg/workflowpackage reveals four distinct classes of stale code that impose ongoing maintenance cost and mislead readers. The Gemini→Antigravity engine rename is 80% complete at the type level (DefaultAntigravityAPITarget,GetAntigravityAPITargetadded) but three production callsites still invoke the deprecatedGetGeminiAPITargetwrapper, and two test files exercise the deprecated surface. TheRequiredSubcommandfield onPackageExtractorwas deprecated in favour ofRequiredSubcommandsbutpip.goandnpm.gostill set the singular field, preventing the slice-based path from being exercised.The
validateImportedStepsNoAgenticSecretsfunction is explicitly documented as a no-op since custom engine support was removed, yet it is still called with two meaningful parameters (engineConfig,engineSetting) that it discards entirely—creating a misleading call site. Finally, a// TODO: Job implementation is pending; buildEvalsJob currently returns nilcomment incompiler_jobs.go:216is factually incorrect:evals_job.gocontains a 106-line fully-implementedbuildEvalsJobthat returnsnilonly whenHasEvals()is false—the correct, expected behaviour.Cleaning up these four issues removes ~120 lines of dead code, eliminates 3 deprecated function calls, migrates 3 struct field usages to the canonical form, and restores comment accuracy—all with zero functional change.
Full Analysis Report
Focus Area: Deprecated API Alias Proliferation & Zombie Callsite Cleanup
Current State Assessment
Metrics Collected:
GetGeminiAPITargetproduction callsitesGetGeminiAPITargetRequiredSubcommand(deprecated field) callsites outsidepackage_extraction.gopip.go×2,npm.go×1)validateImportedStepsNoAgenticSecrets— no-op with unused params, still calledTODO: Job implementation is pendingcomment for fully-implemented functioncompiler_jobs.go:216)isFeatureEnabled("inline-agents")guards that always evaluatetruecompiler_activation_job_builder.go×2,compiler_yaml_main_job.go×2)Findings
Strengths
DefaultAntigravityAPITargetandGetAntigravityAPITargetalready exist as the canonical replacements—migration is straightforward alias substitution.RequiredSubcommandsprecedence logic already correctly handles the migration:getRequiredSubcommands()checks the slice first, then falls back to the singular field.features-inline-agents-removalcodemod exists and is registered infix_codemods.go:99—the codemod path is available for users, but the compiler-side guard code itself was never removed.Areas for Improvement
GetGeminiAPITargetdeprecated alias called inawf_config.go:516,522anddomains.go:993— callers should useGetAntigravityAPITargetdirectly.validateImportedStepsNoAgenticSecretsis a no-op zombie: defined inimported_steps_validation.go:41, called atcompiler_orchestrator_engine.go:439. The call and the function body should be removed, along with the log line at438.pip.go:50,72andnpm.go:37setRequiredSubcommand(deprecated); should migrate toRequiredSubcommands: []string{"install"}andRequiredSubcommands: nilrespectively.compiler_jobs.go:216TODO comment is factually wrong —buildEvalsJobis fully implemented; the comment should be replaced with accurate documentation.isFeatureEnabled(constants.FeatureFlag("inline-agents"), ...)guards incompiler_activation_job_builder.goandcompiler_yaml_main_job.goalways returntrue; the conditions should be simplified to unconditional calls.Detailed Analysis
1. Gemini→Antigravity alias callsites (
awf_config.go,domains.go)engine_api_targets.godocuments both deprecated symbols:DefaultGeminiAPITarget(line 212):// Deprecated: Use DefaultAntigravityAPITarget.GetGeminiAPITarget(line 242):// Deprecated: Use GetAntigravityAPITarget for new Antigravity engine workflows.Despite this,
awf_config.go:516,522anddomains.go:993still callGetGeminiAPITarget. The function itself is a thin wrapper that delegates toGetAntigravityAPITarget, so replacing the three call sites is a purely mechanical name-swap with no logic change. Three test functions inawf_helpers_test.go(lines 1786, 1855, 1857) also exercise the deprecated symbol and should be renamed/retargeted.2. Zombie
validateImportedStepsNoAgenticSecrets(imported_steps_validation.go,compiler_orchestrator_engine.go)The "backwards compatibility" rationale is unfounded for an internal unexported-receiver method. No external package can call it. The function and its single callsite at
compiler_orchestrator_engine.go:439(plus the log line at 438) can be deleted entirely. The unusedengineConfigandengineSettingvariables passed to the call are still assigned at lines 20–21 of the surrounding context struct, but they are used by other functions — so only the dead callsite needs to be deleted, not the variables.3. Stale TODO comment (
compiler_jobs.go:216)evals_job.gois a 106-line fully-implemented function that builds a complete job YAML struct with steps, permissions, conditions, and dependencies. It returnsnil, nilonly whendata.Evals.HasEvals()isfalse—which is the correct early-exit pattern used by every other job builder. The comment should be replaced with an accurate description of the conditional skip behaviour.4.
RequiredSubcommand(deprecated field) still set inpip.goandnpm.gopackage_extraction.go:158marks the field as// Deprecated: Use RequiredSubcommands for multiple subcommand support.The fallback logic at line 285 means current behaviour is preserved, but the deprecated field is never needed once callers use the slice form.pip.gosetsRequiredSubcommand: "install"andRequiredSubcommand: ""(lines 50, 72);npm.gosetsRequiredSubcommand: ""(line 37). All three can be migrated toRequiredSubcommands: []string{"install"}or omitting the field entirely.5. Always-true
inline-agentsguardsfeatures.go:26short-circuitsinline-agentsto always returntrue. As a result, the four guards incompiler_activation_job_builder.go:970,976andcompiler_yaml_main_job.go:585,590are dead conditions. The|| len(data.Skills) > 0clauses at lines 976 and 590 are also pure overhead since the left side always wins. Simplifying these to unconditional calls removes the misleading dead condition and makes the code self-documenting.🤖 Tasks for Copilot Agent
NOTE TO PLANNER AGENT: Split the following tasks into individual work items.
Improvement Tasks
Task 1: Migrate deprecated
GetGeminiAPITargetcallsites toGetAntigravityAPITargetPriority: High
Estimated Effort: Small
Focus Area: Deprecated API Alias Proliferation
Description: Replace all production callsites of the deprecated
GetGeminiAPITargetfunction withGetAntigravityAPITarget(the canonical replacement documented inengine_api_targets.go). Update the corresponding test functions inawf_helpers_test.goto targetGetAntigravityAPITargetand rename the test functions to reflect the new name. The deprecatedGetGeminiAPITargetfunction itself andDefaultGeminiAPITargetconstant can then be removed fromengine_api_targets.go.Acceptance Criteria:
awf_config.go:516,522—GetGeminiAPITargetreplaced withGetAntigravityAPITargetdomains.go:993—GetGeminiAPITargetreplaced withGetAntigravityAPITargetawf_helpers_test.go—TestGetGeminiAPITarget,TestAWFGeminiAPITargetFlags,TestGeminiEngineIncludesGeminiAPITargetretargeted toGetAntigravityAPITargetand renamedengine_api_targets.go—GetGeminiAPITargetfunction andDefaultGeminiAPITargetconstant removed (or retain constant with a single//nolint:unusedonly if external package compatibility requires it)make fmtpasses;go build ./...passes; existing tests passCode Region:
pkg/workflow/awf_config.go,pkg/workflow/domains.go,pkg/workflow/engine_api_targets.go,pkg/workflow/awf_helpers_test.goTask 2: Delete the zombie
validateImportedStepsNoAgenticSecretsfunction and its callsitePriority: High
Estimated Effort: Small
Focus Area: Zombie Callsite Cleanup
Description:
validateImportedStepsNoAgenticSecretsis explicitly documented as a no-op since custom engine support was removed. As an unexported receiver method it has no external callers. Delete the function body fromimported_steps_validation.go, remove its callsite and the preceding log line fromcompiler_orchestrator_engine.go, and remove any associated test coverage if present.Acceptance Criteria:
imported_steps_validation.go—validateImportedStepsNoAgenticSecretsfunction (lines ~38–45) removedcompiler_orchestrator_engine.go— callsite at line 439 and theorchestratorEngineLog.Printf("Validating imported steps...")line at 438 removedvalidateImportedStepsNoAgenticSecretsremain in the codebasego build ./...passes; existing tests passCode Region:
pkg/workflow/imported_steps_validation.go,pkg/workflow/compiler_orchestrator_engine.goThis is an unexported receiver method — "backwards compatibility" does not apply.
Delete the function from
imported_steps_validation.go.In
pkg/workflow/compiler_orchestrator_engine.go, remove the callsite at approximately line 439:Verify there are no remaining references with
grep -r validateImportedStepsNoAgenticSecrets .. Runmake fmtand verifygo build ./...and tests pass.Task 4: Fix stale TODO comment in
compiler_jobs.goand simplify always-trueinline-agentsguardsPriority: Medium
Estimated Effort: Small
Focus Area: Dead Comment & Dead Condition Cleanup
Description: Two comment-level accuracy issues reduce code clarity. First,
compiler_jobs.go:216contains// TODO: Job implementation is pending; buildEvalsJob currently returns nil (no-op)which is factually incorrect —buildEvalsJobis fully implemented inevals_job.go. Second, fourisFeatureEnabled(constants.FeatureFlag("inline-agents"), ...)guards incompiler_activation_job_builder.goandcompiler_yaml_main_job.goalways evaluate totruebecausefeatures.gohardcodes the short-circuit, making theifconditions dead code.Acceptance Criteria:
compiler_jobs.go:216— TODO comment replaced with an accurate description of the conditional skip (e.g.,// Returns nil when no evals are declared in the workflow frontmatter.)compiler_activation_job_builder.go:970—if isFeatureEnabled(constants.FeatureFlag("inline-agents"), ctx.data)replaced with unconditional call togenerateRestoreInlineSubAgentsStep(or equivalent)compiler_activation_job_builder.go:976—if isFeatureEnabled(...) || len(ctx.data.Skills) > 0simplified (inline-agents condition always true; simplify or remove)compiler_yaml_main_job.go:585— same inline-agents guard simplifiedcompiler_yaml_main_job.go:590— same inline-agents guard simplifiedmake fmtpassesCode Region:
pkg/workflow/compiler_jobs.go,pkg/workflow/compiler_activation_job_builder.go,pkg/workflow/compiler_yaml_main_job.go// TODO: Job implementation is pending; buildEvalsJob currently returns nil (no-op).
Issue 2 — Always-true inline-agents guards:
pkg/workflow/features.gohardcodesinline-agentsto always returntrue(line 26). As a result, fourif isFeatureEnabled(constants.FeatureFlag("inline-agents"), ...)guards incompiler_activation_job_builder.go(lines ~970, 976) andcompiler_yaml_main_job.go(lines ~585, 590) are dead conditions. Simplify each guard:ifwrapper; call the guarded function unconditionally.isFeatureEnabled(...) || len(...Skills) > 0always has a true left side; simplify to unconditional call.Run
make fmtand verify all tests pass.Beta Was this translation helpful? Give feedback.
All reactions