fix(optimization): support published GEPA package#431
Conversation
tangletools
left a comment
There was a problem hiding this comment.
✅ 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
|
| 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
|
@tangletools review now |
tangletools
left a comment
There was a problem hiding this comment.
✅ 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
left a comment
There was a problem hiding this comment.
🟢 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.4for 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), spawnsagent_eval_rpc.gepa_bridge, which now callsload_gepa_api()once at startup (gepa_bridge.py:82). The resolver pickslaunchershape for the publishedGEPAConfigorengineshape for the sourceOptimizeAnythingConfig(gepa_api.py:38-52); both branches are - Fit with existing patterns: Fits the established compat-layer grain. The new
gepa_api.pymirrors howgepa_compat_0_1_4.pyandskillopt_compat_v020.pyalready pin behavior to a specific upstream version/shape. It normalizes the two divergent upstream config+result shapes behind oneGepaApidataclass 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_scorefalls throughbest_score->val_aggregate_scores[best_idx](gepa_bridge.py:419-432) and_result_evaluationsfalls throughtotal_evals->total_metric_calls(gepa_bridge.py:518-521). The launcher path mapsstopAtScoretoScoreThresholdStopperand rejects non-gepaengines 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.
What changed
gepa[full]==0.1.4APIProof
agent-eval-rpc==0.126.5wheel + published GEPA + TypeScript bridge: passed