Skip to content

drop 5 dead focused_context.go helpers, a self-contained unwired chain plus one orphan - #380

Merged
gerardrecinto merged 1 commit into
masterfrom
kill-dead-focused-context-helpers
Sep 19, 2026
Merged

gerardrecinto merged 1 commit into
masterfrom
kill-dead-focused-context-helpers

Conversation

@gerardrecinto

Copy link
Copy Markdown
Collaborator

Last of tonight's U1000 pile in ai/agent.

isOnlyLayer1: standalone predicate, no live caller anywhere. Checked isCrossDomain's call sites (the live sibling right next to it) for anything similar that should be wired to it instead, nothing does.

trimManualSection, extractManualSection, buildCompactStoresToolContext, trimStoresManualForCombinedContext: these four only call each other in a chain, none reachable from anything outside the cluster. Grepped for 'CombinedContext' or 'StoresManual' anywhere else in the codebase, zero hits - this whole chain was built and never wired to a real caller.

Build+vet+gofmt+test clean. This closes out the U1000 sweep across ai/agent from tonight's staticcheck pass - remaining known item is the copilottools.space.go Space CRUD tool family, already flagged in earlier PRs as needing explicit sign-off since it's feature-sized, not a quick cleanup.

…n plus one orphan

isOnlyLayer1: standalone predicate, no live caller, checked isCrossDomain's
call sites for anything similar, nothing wires this one in.

trimManualSection, extractManualSection, buildCompactStoresToolContext,
trimStoresManualForCombinedContext: only call each other, none reachable
from outside the cluster. Grepped for any 'CombinedContext' or
'StoresManual' naming anywhere else in the codebase, zero hits - this
whole chain was built and never wired to anything.
@github-actions

Copy link
Copy Markdown

Gemini PR Review

This diff primarily consists of the removal of several functions (isOnlyLayer1, trimManualSection, extractManualSection, buildCompactStoresToolContext, trimStoresManualForCombinedContext).

  • Code quality and readability

    • Removing unused or deprecated functions simplifies the codebase, improving overall readability and reducing maintenance overhead.
    • It's a positive change if these functions are no longer required.
  • Potential bugs and correctness issues

    • The main correctness concern for a pure deletion is ensuring that the removed functions are indeed no longer used by any other part of the codebase. Assuming a build system and usage analysis have confirmed this (e.g., through compiler errors or IDE warnings), then the change is correct. If they were still used, this would lead to compilation failures.

@gerardrecinto
gerardrecinto merged commit da58709 into master Sep 19, 2026
21 checks passed
@gerardrecinto
gerardrecinto deleted the kill-dead-focused-context-helpers branch September 19, 2026 23:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant