Repository navigation
feat(minimize): add optional intra-message ddmin after turn shrinking - #145
Open
BasilZafar11 wants to merge 1 commit into
Open
BasilZafar11 wants to merge 1 commit into
BasilZafar11 wants to merge 1 commit into
Conversation
|
@BasilZafar11 is attempting to deploy a commit to the priyanshu's projects Team on Vercel. A member of the Team first needs to authorize it. |
4 tasks
This branch has not been deployed
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.
Summary
Fixes #34
Add the opt-in Core parameter
minimize_genome(..., intra_message=True). After existing turn-level ddmin finishes, a second phase removes character partitions from each retained message. Every accepted deletion resets and executes the target and uses the existing policy evaluator to preserve every requested rule ID. Empty/whitespace-only deletion proposals are skipped.The default remains
False, preserving existing turn-only behavior, traces, execution counts, and lineage. Existing CLI and Hosted callers retain that default; this PR adds a Python API parameter, not a CLI or Hosted request flag. The shrink algorithm uses no LLM, tokenizer, or new dependency.Enabled runs include both phases in
reexec_count, retain the accepted final trace, and recordddmin_intra_message/intra_message=truein genome lineage. Smaller messages flow into the existing regression artifact and replay path. Character-level shrinking can require many additional target executions, so the lifecycle docs explain the opt-in cost.Type of change
Checklist
Test plan
uv run --locked pytest tests/unit/test_minimize.py tests/unit/test_regression.py -q --tb=short: 17 passed.MUTINY_SAMPLE_OFFLINE=1 uv run --locked pytest -q --tb=short: 771 passed, including unit, integration, reliability, and packaging checks.uv run --locked ruff check: passed.git diff --check: passed.New tests cover default/off equivalence, a verbose multi-sentence single-turn fixture, reducing each retained turn after turn-level shrink, preserving all specified rules rather than any violation, execution counts/final trace correspondence, parent isolation, irreproducible/empty inputs, already-minimal content, and saving/replaying the reduced regression.
CLI shell smoke, production web build, and container startup remain covered by existing CI. Branch starts at latest upstream main
99ed9ad, matching fork main at the final fetch.