Skip to content

fix(optimization): support published GEPA package#431

Merged
drewstone merged 1 commit into
mainfrom
fix/gepa-wheel-compat
Jul 24, 2026
Merged

fix(optimization): support published GEPA package#431
drewstone merged 1 commit into
mainfrom
fix/gepa-wheel-compat

Conversation

@drewstone

Copy link
Copy Markdown
Contributor

What changed

  • run the standard GEPA engine through the published gepa[full]==0.1.4 API
  • retain the pinned official source revision for composed and source-only engines
  • normalize both upstream result shapes without implementing search locally
  • test published and source installs independently, including real two-run resume
  • release as npm and Python package version 0.126.5

Proof

  • Python source suite: passed
  • Python published-GEPA suite: 25 passed, 1 intentional source-only skip
  • TypeScript suite: 3,380 passed, 3 skipped
  • clean built agent-eval-rpc==0.126.5 wheel + published GEPA + TypeScript bridge: passed
  • lint, typecheck, examples typecheck, build, package export check, and actionlint: passed

@tangletools tangletools left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Auto-approved drewstone PR — 951c7761

This PR was opened by the trusted drewstone account.
The full PR reviewer audit still runs separately and will publish findings if it detects issues.

tangletools · auto-approval · reason: drewstone_author · 2026-07-24T19:16:52Z

@tangletools

Copy link
Copy Markdown
Contributor

⚠️ Review Interrupted — 951c7761

The review runner stopped before publishing a final verdict: webhook_restarted.

State Detail
Interrupted webhook restarted

No review verdict was produced for this run. Trigger a fresh review on the current PR head if the PR is still open.

tangletools · #431 · model: kimi-for-coding · updated 2026-07-24T19:20:18Z

@drewstone

Copy link
Copy Markdown
Contributor Author

@tangletools review now

@tangletools tangletools left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Auto-approved drewstone PR — 951c7761

This PR was opened by the trusted drewstone account.
The full PR reviewer audit still runs separately and will publish findings if it detects issues.

tangletools · auto-approval · reason: drewstone_author · 2026-07-24T19:21:56Z

@tangletools tangletools left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Value Audit — sound

Verdict sound
Concerns 0 (none)
Heuristic 0.0s
Duplication 0.0s
Interrogation 93.8s (2 bridge agents)
Total 93.8s

💰 Value — sound

Extends the GEPA bridge to run against the published gepa[full]==0.1.4 PyPI wheel (not just the pinned git revision) via a clean API-shape resolver; coherent, in-grain, no existing equivalent to reuse.

  • What it does: Adds a gepa_api.py resolver (GepaApi dataclass + load_gepa_api()) that sniffs whether the installed GEPA exposes OptimizeAnythingConfig ('engine' shape, source revision) or GEPAConfig ('launcher' shape, published wheel), then branches _engine_config() to map the agent-eval-normalized inputs (maxEvaluations, maxProposerCostUsd, maxConcurrency, stopAtScore) into the correct kwargs for each shape. Re
  • Goals it achieves: (1) Remove the install-friction of requiring a git URL for the common case: users can now pip install gepa[full]==0.1.4 for the standard gepa engine. PyPI metadata cannot express a Git dependency, so the previous source-only requirement was a real blocker for the published agent-eval-rpc wheel. (2) Preserve the pinned source revision for composed recipes (sequential/adaptive/best-of/vote/omni) a
  • Assessment: Coherent and well-scoped. The GepaApi abstraction centralizes the 'which shape is installed?' decision in one load_gepa_api() and the bridge consumes it uniformly via api.optimize_anything / api.composition(name) — replacing 5 scattered try/except ImportError blocks. The two-branch _engine_config is unavoidable: the two GEPA APIs genuinely differ in kwargs (max_evals vs max_metric_calls, stop_at_s
  • Better / existing approach: Searched for an existing API-shape resolver to reuse: none. optimizer_bridge_common.inspect_optimizer_runtime (optimizer_bridge_common.py:143) resolves package provenance, not API shape. skillopt_bridge.py:44-51 does a simpler importlib.import_module with no shape-sniffing because SkillOpt only has one shape. The two-branch _engine_config cannot be collapsed into a unified mapping without an adapt
  • Model: opencode/zai-coding-plan/glm-5.2
  • Bridge attempts: 2
  • Bridge warning: opencode/kimi-for-coding/k2p7: bridge stream ended without value-audit content

🎯 Usefulness — sound

Adds published gepa[full]==0.1.4 wheel support to the GEPA bridge by normalizing both upstream API shapes behind one resolver, verified end-to-end through the real TypeScript caller in CI.

  • Integration: Fully wired and reachable. The bridge's single caller, gepaOptimizationMethod (src/campaign/gepa-optimization-method.ts:350), spawns agent_eval_rpc.gepa_bridge, which now calls load_gepa_api() once at startup (gepa_bridge.py:82). The resolver picks launcher shape for the published GEPAConfig or engine shape for the source OptimizeAnythingConfig (gepa_api.py:38-52); both branches are
  • Fit with existing patterns: Fits the established compat-layer grain. The new gepa_api.py mirrors how gepa_compat_0_1_4.py and skillopt_compat_v020.py already pin behavior to a specific upstream version/shape. It normalizes the two divergent upstream config+result shapes behind one GepaApi dataclass rather than forking the bridge or duplicating search logic (the bridge still delegates all search to GEPA). No competing
  • Real-world viability: Holds up beyond the happy path. Result-shape divergence is handled for both installs: _selected_score falls through best_score -> val_aggregate_scores[best_idx] (gepa_bridge.py:419-432) and _result_evaluations falls through total_evals -> total_metric_calls (gepa_bridge.py:518-521). The launcher path maps stopAtScore to ScoreThresholdStopper and rejects non-gepa engines with a cl
  • Model: opencode/zai-coding-plan/glm-5.2
  • Bridge attempts: 1

No concerns — sound change, no better or existing approach found. ✅


What this audit checks

It judges the change on its merits — not whether it was tasked out in an issue. Unticketed, fast-moving work is fine; the question is whether the change is good and whether a better or existing approach should be used instead.

Pass What it asks
Heuristic Vague title? Whitespace-only or cruft-bearing diff? (content signals only)
Duplication Do added function/class names already exist elsewhere in the repo?
Value Audit What does it do? What goal does it achieve? Is it good? Better architecture or already-exists?
Usefulness Audit Does it integrate and fit? Will it hold up in real use and actually get used?

Findings are concerns, not blocks — the human reviewer decides what to do with them.

value-audit · 20260724T192351Z

@drewstone
drewstone merged commit 4c3f6e6 into main Jul 24, 2026
2 checks passed
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