Skip to content

chore: remove unused OPTIMIZATION_OBJECTIVE constant - #14160

Merged
detail-app[bot] merged 1 commit into
mainfrom
detail/dead-code/chore-remove-unused-optimization-objective-constan-73f90b
Sep 9, 2026
Merged

detail-app[bot] merged 1 commit into
mainfrom
detail/dead-code/chore-remove-unused-optimization-objective-constan-73f90b

Conversation

@detail-app

@detail-app detail-app Bot commented Sep 6, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Removed the unused OPTIMIZATION_OBJECTIVE string constant from server/polar/organization_review/eval/optimize.py.

What

Deletes the OPTIMIZATION_OBJECTIVE module-level string literal (15 lines) from the GEPA optimization adapter module.

Why

The constant had no consumers anywhere in the codebase. It was not passed to gepa.optimize() (verified by reading the call site), not referenced inside the module, not used by the eval_organization_reviews optimize CLI subcommand, and not imported by any other file. All other symbols in optimize.py (run_optimization, ReviewAdapter, _score, _VERDICT_MAP, weights, dataset helpers) are transitively live, wired up via the CLI in server/scripts/eval_organization_reviews.py.

How

Verified via repo-wide grep that OPTIMIZATION_OBJECTIVE has a single match — its own definition. Confirmed ReviewAdapter.evaluate/make_reflective_dataset/propose_new_texts are required by the gepa framework (called directly on every iteration). After removal, py_compile, module import, ruff check, and ruff format --check all pass.

History

Checklist

  • This PR addresses a single concern (one bug fix, one feature, one refactor)
  • The diff is reasonably sized and easy to review
  • New functionality is covered by tests
  • Linting and type checking pass (uv run task lint && uv run task lint_types)
  • No unrelated changes or drive-by fixes are included

Dead Code PRs can be configured here.

Review in cubic

@vercel

vercel Bot commented Sep 6, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
orbit Ready Ready Preview Sep 6, 2026 2:11pm UTC
polar-test Ready Ready Preview Sep 6, 2026 2:11pm UTC

Request Review

@detail-app
detail-app Bot enabled auto-merge September 6, 2026 14:07
@github-actions

github-actions Bot commented Sep 6, 2026

Copy link
Copy Markdown
Contributor

OpenAPI Changes

No changes detected in the OpenAPI schema.

@detail-app
detail-app Bot added this pull request to the merge queue Sep 9, 2026
Merged via the queue into main with commit 5c14f4e Sep 9, 2026
30 of 44 checks passed
@detail-app
detail-app Bot deleted the detail/dead-code/chore-remove-unused-optimization-objective-constan-73f90b branch September 9, 2026 08:46

This branch was successfully deployed

2 active deployments
Preview – polar-test — b5013866 Deployed Sep 6, 2026 by vercel[bot]
Preview – orbit — b5013866 Deployed Sep 6, 2026 by vercel[bot]
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.

2 participants