feat(contract): selfImprove forwards neutralize to the placebo arm (0.108.0)#328
Merged
Conversation
…(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
approved these changes
Jul 8, 2026
tangletools
left a comment
Contributor
There was a problem hiding this comment.
✅ 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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
0.107.0 shipped
neutralizationGate+ therunImprovementLoop({ neutralize })placebo arm — but the publicselfImprovefacade (and everything built on it, incl. agent-runtimeimprove()and product loops like tax'sevolve.ts) did not forwardneutralize. 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 fnrunImprovementLoopaccepts.runImprovementLoopcall. When supplied and the winner ≠ baseline, the loop scores a third placebo arm and exposesctx.neutralizedJudgeScores; composeneutralizationGateintogateto act on it.Verify
selfImprovewith a winning proposer + aneutralizefn and asserts (a) the fn is called and (b) a capture-gate receivesneutralizedJudgeScores— 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 test→ 272 files, 2803 passed; typecheck 0 errors; build clean.