Skip to content

refactor(campaign): finish Proposer migration — uniform optimize-a-surface DX#278

Merged
drewstone merged 1 commit into
mainfrom
feat/finish-proposer-migration
Jun 22, 2026
Merged

refactor(campaign): finish Proposer migration — uniform optimize-a-surface DX#278
drewstone merged 1 commit into
mainfrom
feat/finish-proposer-migration

Conversation

@drewstone

Copy link
Copy Markdown
Contributor

What

Finishes the Proposer migration so the optimize-a-surface DX is uniform: every optimizer is a factory xProposer(opts): SurfaceProposer exported from /campaign, drivable by selfImprove({ proposer }).

The two flagship proposers already conform on main (shipped in 83505fb):

  • skillOptProposer(opts): SurfaceProposer — factory at src/campaign/proposers/skill-opt.ts, wraps applySkillPatch / runSkillOpt internals behind the contract (also exposes the patch-native proposePatches used by the runSkillOpt preset). Exported from /campaign.
  • gepaProposer — at src/campaign/proposers/gepa.ts, exported from /campaign AND re-exported from /contract.

This PR closes the last gap — the Proposer name collision: the behavior-fuzzing Proposer<S> (src/fuzz/types.ts) is a different concept from the optimization SurfaceProposer. Renamed it to MutationProposer<S> (matches its sole value, mutationProposer) so SurfaceProposer is unambiguously THE optimization proposer. A @deprecated Proposer<S> alias keeps the public ./fuzz export back-compatible.

Verified

  • pnpm run typecheck clean, pnpm run build clean, pnpm run lint 0 errors.
  • pnpm test: 247 files, 2533 passed, 2 skipped.
  • Runtime probe against built dist/campaign: import { gepaProposer, skillOptProposer } from "@tangle-network/agent-eval/campaign" resolves to real functions; both produce objects satisfying SurfaceProposer (.kind gepa/skill-opt, .propose); skillOptProposer exposes proposePatches.
  • ./fuzz .d.ts still exports both MutationProposer and the deprecated Proposer alias.

Version

Additive exports + alias-only on the public surface → minor bump 0.96.50.97.0 (package.json + clients/python/pyproject.toml + __init__.py together).

…rface DX

Every optimizer is now a factory `xProposer(opts): SurfaceProposer` exported
from /campaign and drivable by `selfImprove({ proposer })`. gepaProposer and
skillOptProposer already conform and export from /campaign (and gepaProposer is
re-exported from /contract). This resolves the remaining name collision: the
behavior-fuzzing `Proposer<S>` (fuzz/types) is renamed `MutationProposer<S>` so
`SurfaceProposer` is unambiguously THE optimization proposer. A deprecated
`Proposer<S>` alias keeps the public ./fuzz export back-compatible.

Additive + alias-only on the public surface → minor bump 0.96.5 -> 0.97.0
(package.json + clients/python/pyproject.toml + __init__.py together).

@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 PR — 6e508ab1

Blanket team auto-approval is enabled for this reviewer service.
The full PR reviewer audit still runs separately and will publish findings if it detects issues.

tangletools · auto-approval · reason: blanket_auto_approve · 2026-06-22T22:31:39Z

@drewstone drewstone merged commit 09cdae7 into main Jun 22, 2026
1 check passed
drewstone added a commit that referenced this pull request Jun 22, 2026
The fuzz proposer is `MutationProposer<S>`. PR #278 renamed it and kept a
`@deprecated export type Proposer<S> = MutationProposer<S>` back-compat
alias; the house rule forbids compat shims, so remove it head-on. The
alias and its `./fuzz` barrel re-export are deleted — `MutationProposer`
is the only name.

Removing a published export is breaking on 0.x: minor bump to 0.98.0
(npm + PyPI version trio kept in lock-step).
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