Skip to content

feat(contract): selfImprove forwards neutralize to the placebo arm (0.108.0)#328

Merged
drewstone merged 1 commit into
mainfrom
feat/selfimprove-neutralize
Jul 8, 2026
Merged

feat(contract): selfImprove forwards neutralize to the placebo arm (0.108.0)#328
drewstone merged 1 commit into
mainfrom
feat/selfimprove-neutralize

Conversation

@drewstone

Copy link
Copy Markdown
Contributor

Why

0.107.0 shipped neutralizationGate + the runImprovementLoop({ neutralize }) placebo arm — but the public selfImprove facade (and everything built on it, incl. agent-runtime improve() and product loops like tax's evolve.ts) did not forward neutralize. The placebo gate was effectively unreachable from the one-call entry point. This completes the 0.107.0 lift.

Change

  • SelfImproveOptions.neutralize? — the same footprint-matched blanking fn runImprovementLoop accepts.
  • Forwarded in the runImprovementLoop call. When supplied and the winner ≠ baseline, the loop scores a third placebo arm and exposes ctx.neutralizedJudgeScores; compose neutralizationGate into gate to act on it.

Verify

  • New test drives selfImprove with a winning proposer + a neutralize fn and asserts (a) the fn is called and (b) a capture-gate receives neutralizedJudgeScores — covers the facade passthrough AND the loop's placebo-arm run (a gap left by 0.107.0, which tested the gate in isolation).
  • pnpm test272 files, 2803 passed; typecheck 0 errors; build clean.
  • Additive (one optional field) → minor bump 0.107.0 → 0.108.0, no consumer lockstep. Version trio + CHANGELOG updated.

…(0.108.0)

0.107.0 wired the footprint-matched placebo arm at runImprovementLoop but the
public selfImprove facade did not forward it — the neutralizationGate was
unreachable from the one-call entry point. Thread `neutralize` through
SelfImproveOptions -> runImprovementLoop so selfImprove({ neutralize }) scores
the placebo arm and hands ctx.neutralizedJudgeScores to the gate.

Test drives selfImprove with a winning proposer + a neutralize fn and asserts
the fn is called AND a capture-gate receives neutralizedJudgeScores (covers the
facade passthrough + the loop's placebo-arm run). Additive optional field.

@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 — fefb1b53

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-08T14:32:24Z

@drewstone drewstone merged commit ad98e44 into main Jul 8, 2026
1 check 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