Skip to content

feat(single_controller): support group length penalties - #5206

Merged
yuki-97 merged 8 commits into
mainfrom
ruit/sc-length-penalty
Nov 15, 2026
Merged

yuki-97 merged 8 commits into
mainfrom
ruit/sc-length-penalty

Conversation

@RayenTian

@RayenTian RayenTian commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

What

Adds per-prompt-group length penalties for GRPO on the SingleController path
(both the ordinary and the token-capture rollout paths). It rewards conciseness
among correct generations: a group-relative, zero-centered reward adjustment
that shortens correct rollouts while never lifting or sign-flipping a wrong
one
, and never touches non-binary / multi-component reward groups.

Channels (all per-agent configurable, grpo.length_penalty):

  • group-relative zero-centered length penalty (reasoning / answer / total)
  • shortest-among-top-scorers bonuses and longest-among-top-percentile penalties
  • Iglewicz–Hoaglin modified-Z (MAD) length outliers
  • profiled-reference-length penalties, profile-band multipliers, prompt-level gate
  • pass-rate-scaled penalty
  • length units: tokens / chars / all_generated_tokens

How it integrates

  • Measures each rollout's length/profile metadata at rollout time (before the
    token-capture path discards the response envelope) and threads it through the
    capture/reassembly pipeline on the existing RewardChecks /
    CaptureRewardSettings carriers (capture sidecar bumped v1→v2,
    backward-compatible, checked on resume via require_compatible).
  • Applies group-relative at group completion on both paths
    (apply_group_length_penalties / apply_group_length_penalties_from_inputs).

Verification

  • Offline: an independent oracle matches production
    apply_group_length_penalties to ~2e-16 across mixed-reward topologies
    (all-correct, mixed, all-wrong, <2-positive early return).
  • E2E on main (Qwen3-0.6B, 100 optimizer steps, ordinary + token-capture):
    with a 0/1 reward decorrelated from length, per-rollout reward and GRPO
    advantage match the independent mixed-reward oracle to <1e-7; correct
    rollouts are shortened while wrong rollouts stay at exactly 0; the
    capture/finalizer path is healthy. This validates the mechanism
    (reward-gating + advantage consumption), not task-quality gains.

E2E experiment config

Reuses the 1-node / 2-GPU Qwen3-0.6B NeMo-Gym functional-test topology (1 trainer,
1 generator). A test-only verifier returns reward = parity of
sha256(answer_text) → {0, 1} (~50% positive, decorrelated from length), so
the length signal is isolated from task correctness while the env reward genuinely
varies. Auxiliary reward terms are disabled so the advantage is a transparent
function of the length penalty.

group setting
model / data Qwen/Qwen3-0.6B, NeMo-Gym single-tool-call, test verifier above
GRPO max_num_steps=100, num_prompts_per_step=4, num_generations_per_prompt=4
advantage adv_estimator=grpo, normalize_rewards=false, use_leave_one_out_baseline=false, no advantage clip
length penalty length_type=all_generated_tokens, group_total_length_penalty_coeff=0.2
policy / optim train_global_batch_size=16, micro=1, max_total_sequence_length=1024, max_new_tokens=256, constant lr=2e-6
loss (zeroed for a clean oracle) reference_policy_kl_penalty=0, positive_example_nll_weight=0, use_importance_sampling_correction=false
logging async_rl.log_full_train_data=true (per-sample JSONL the oracle checks)

W&B runs (nvidia/nemo-rl-sc-length-penalty)

Penalty on, measured on this PR's main-based branch:

arm W&B run env reward mean (pass rate) gen length first-20 → last-20 steps max reward err max adv err
ordinary axnaok30 0.52 40.7 → 11.7 5.9e-8 8.3e-8
token-capture x4ook896 0.57 69.9 → 9.7 5.9e-8 8.3e-8

Control arms with the penalty off (same verifier): generation length is not
systematically reduced and the adjusted reward equals the raw {0, 1} env reward
(reward/advantage error exactly 0). Across on-runs the <2-positive early-return
path is exercised ~120×/run, and length_penalty/skipped_non_binary_frac == 0.

ordinary path

image

Token capture path

image

Nightly result

image

Notes

🤖 Generated with Claude Code

Validation

Ran the shipped length-penalty nightly end to end on 1n8g (Qwen3-1.7B, vLLM gym, capture off). All metric gates pass; the group length penalty rewrites rewards (adjusted_frac peaks at 0.375), stays zero-centred (reward_delta_mean at machine epsilon), and the vLLM decode length falls from 35 to 3 tokens over 100 steps.

W&B run: https://forge.coreweave.com/wandb/nvidia/nemo-rl-sc-length-penalty/runs/r6103tcc

@copy-pr-bot

copy-pr-bot Bot commented Nov 13, 2026

Copy link
Copy Markdown

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@github-actions github-actions Bot added the Documentation Improvements or additions to documentation label Nov 13, 2026
@RayenTian
RayenTian force-pushed the ruit/sc-length-penalty branch from 0029e2f to 10ea96d Compare November 13, 2026 12:53
@RayenTian RayenTian added the CI:Lfast Runs a fast test suite and re-use nightly `main` container (but sync dependencies to PRs version) label Nov 13, 2026
@RayenTian
RayenTian requested a review from yuki-97 November 13, 2026 12:55
@RayenTian
RayenTian force-pushed the ruit/sc-length-penalty branch from 10ea96d to 85ed9ab Compare November 13, 2026 13:01
@RayenTian

Copy link
Copy Markdown
Contributor Author

/ok to test 85ed9ab

@RayenTian

Copy link
Copy Markdown
Contributor Author

/ok to test 481eb39

@RayenTian
RayenTian force-pushed the ruit/sc-length-penalty branch from 85ed9ab to 481eb39 Compare November 13, 2026 13:26
@RayenTian
RayenTian marked this pull request as ready for review November 13, 2026 13:32

@svcnvidia-nemo-ci svcnvidia-nemo-ci 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.

One test-contract bug needs fixing before merge.

  1. (C1) The new capture regression test reads length metrics from the wrong output dictionary, so both parameter cases fail instead of checking metric parity.

The review covered all 18 changed files and their affected setup, rollout, Forest, checkpoint, and metric paths. One delegated reviewer finished without a delivered report; I inspected that topic directly. Validation was static only: tests and linters weren’t executed, and CI results weren’t available.

Note: formal approval is not available for this request, so this review is posted as a comment only.

Review generated by codex. This was a full review. Request a full review with /review reset=true.

@yuki-97 yuki-97 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.

Thanks for reusing the existing group length-adjustment algorithms across the SingleController rollout paths.

The reported 100-step ordinary/capture on/off runs and independent reward/advantage comparisons make the adjustment mechanism clear.

CI is red. The redispatch unit test fails on the new _length_penalty_config read because its fixture bypasses the constructor; initialize impl._length_penalty_config = None in test_rollout_generation_failures.py:558–588. Other failed jobs include Ray startup, vLLM initialization and GPU-test timeouts; these do not establish additional length-penalty regressions.

Scope: group length penalties across ordinary, capture, Forest and checkpoint paths, at 481eb39.

Checked:

  • Traced ordinary and capture reward ordering, low-effort bypass and Forest metadata preparation through publication.
  • Confirmed the capture adapter reuses the shared adjustment algorithm with separately supplied lengths. length_penalty.py:429–468
  • Confirmed the current loader accepts version-1 and version-2 reward settings. reward_penalties.py:330–355
  • Inspected checkpoint comparison and existing coverage statically; no tests were run on this host.

Remaining comments are on:

  • Defer Forest support: reject Forest plus length penalties at setup and remove this PR's Forest-specific support; preserve the metadata-loss diagnosis for the follow-up.
  • Write the missing ordinary low-effort marker so reward behavior agrees with capture.
  • Unify length and effort checkpoint representations, exclude logging-only settings from compatibility checks, and consistently write v2 while retaining v1 loading.
  • Add or update an enabled nightly and cover changed coefficients and absent-to-enabled checkpoint settings.
  • Simplify the reward-evidence dataclasses, share profile-field extraction, and remove the unreachable fallback.

nit

  • Complete public-interface docstrings, shorten the added function-body comments and qualify the PPO-only diagnostic.
  • Optional, nonblocking follow-up: let the adjustment core consume typed inputs directly, with the legacy dictionary entry point as its wrapper.

Generated by Codex (#4999 version)

Comment thread nemo_rl/experience/rollout_manager.py Resolved
Comment thread nemo_rl/experience/rollout_manager.py Resolved
Comment thread nemo_rl/utils/length_penalty.py Resolved
Comment thread nemo_rl/utils/length_penalty.py Resolved
Comment thread nemo_rl/experience/reward_penalties.py Resolved
Comment thread nemo_rl/experience/reward_penalties.py Resolved
Comment thread nemo_rl/utils/length_penalty.py Resolved
@RayenTian

Copy link
Copy Markdown
Contributor Author

/ok to test cd2118a

@RayenTian
RayenTian force-pushed the ruit/sc-length-penalty branch 2 times, most recently from cd2118a to b1f5792 Compare November 13, 2026 20:54
@RayenTian

Copy link
Copy Markdown
Contributor Author

/ok to test b1f5792

1 similar comment
@RayenTian

Copy link
Copy Markdown
Contributor Author

/ok to test b1f5792

@RayenTian
RayenTian force-pushed the ruit/sc-length-penalty branch from b1f5792 to fabab92 Compare November 14, 2026 02:21
RayenTian added a commit that referenced this pull request Nov 14, 2026
Address review on #5206:
- Keep length-penalty metrics out of token_metrics; read the pooled
  finalize/length_penalty/*_sum in the data-plane reassembler test.
- Reject token_capture.forest_training together with grpo.length_penalty at
  config validation, drop the Forest-specific length aggregation/broadcast,
  remove the Forest length-penalty test and add a config-rejection test, and
  update docs. Forest length penalties are deferred to a follow-up.

Signed-off-by: ruit <[email protected]>
@RayenTian
RayenTian force-pushed the ruit/sc-length-penalty branch from fabab92 to 03a6ec1 Compare November 14, 2026 02:25
RayenTian added a commit that referenced this pull request Nov 14, 2026
…tation

Address review on #5206 (checkpoint representation):
- Store length-penalty checkpoint settings in a frozen LengthRewardSettings
  dataclass (like effort), holding the exclude_unset reward rules and excluding
  the logging-only verbose flag, so a logging change no longer blocks resume.
- Always write version 2 (with a null length_penalty when none) and keep
  backward-compatible version-1 loading; compare the normalized projection.
- Cover changed coefficients, absent-to-enabled and logging-only changes; update
  the single-controller guide.

Signed-off-by: ruit <[email protected]>
RayenTian added a commit that referenced this pull request Nov 14, 2026
…ction

Address review on #5206: extract the task-data merge and the three profile-field
reads into a shared length_profile_fields helper, used by both the SingleController
prepare_length_penalty_input path and the legacy rollout path, so the outer-field
precedence and missing-to-None rules live in one place.

Signed-off-by: ruit <[email protected]>
RayenTian added a commit that referenced this pull request Nov 14, 2026
Address review on #5206: _apply_effort_shaping classified low effort but never
wrote result["low_effort_applied"], so the group length penalty could not bypass
low-effort rollouts on the ordinary and legacy paths the way the capture path does
(it reads RewardChecks.low_effort). Record the classification per rollout before
the missing-length guard, and cover the marker for low/high effort and disabled
shaping.

Signed-off-by: ruit <[email protected]>
RayenTian added a commit that referenced this pull request Nov 14, 2026
- Keep length-penalty metrics out of token_metrics; read the pooled
  finalize/length_penalty/*_sum in the data-plane reassembler test (C1).
- Defer Forest length penalties: reject token_capture.forest_training together
  with grpo.length_penalty at setup, drop the Forest-specific aggregation and
  test, and add a config-rejection test.
- Unify the length-penalty checkpoint representation with a frozen
  LengthRewardSettings projection that excludes the logging-only verbose flag,
  always write version 2 with backward-compatible version-1 loading, and cover
  changed/absent/logging-only compatibility.
- Share the profile-field extraction via length_profile_fields across the
  SingleController and legacy rollout paths.
- Write the ordinary low-effort marker so the group length penalty bypasses the
  same rollouts as the capture path.
- Nits and dead code: remove the unreachable chars fallback, complete public
  docstrings, shorten an over-long comment, and qualify the PPO-only diagnostic.

Signed-off-by: ruit <[email protected]>
@RayenTian
RayenTian force-pushed the ruit/sc-length-penalty branch from 0f98f6a to 5a816da Compare November 14, 2026 03:47
RayenTian added a commit that referenced this pull request Nov 14, 2026
… post-init checks

Address review on #5206: remove the construct-time type checks on RewardChecks
and LengthPenaltyInput, and RewardChecks.from_state. Rebuild the saved reward
checks (and their optional LengthPenaltyInput) directly at the recovery restore
site instead.

Signed-off-by: ruit <[email protected]>
RayenTian added a commit that referenced this pull request Nov 14, 2026
- Keep length-penalty metrics out of token_metrics; read the pooled
  finalize/length_penalty/*_sum in the data-plane reassembler test (C1).
- Defer Forest length penalties: reject token_capture.forest_training together
  with grpo.length_penalty at setup, drop the Forest-specific aggregation and
  test, and add a config-rejection test.
- Unify the length-penalty checkpoint representation with a frozen
  LengthRewardSettings projection that excludes the logging-only verbose flag,
  always write version 2 with backward-compatible version-1 loading, and cover
  changed/absent/logging-only compatibility.
- Share the profile-field extraction via length_profile_fields across the
  SingleController and legacy rollout paths.
- Write the ordinary low-effort marker so the group length penalty bypasses the
  same rollouts as the capture path.
- Drop the construct-time type checks on RewardChecks and LengthPenaltyInput and
  RewardChecks.from_state; rebuild saved reward checks at the recovery site.
- Nits and dead code: remove the unreachable chars fallback, complete public
  docstrings, shorten an over-long comment, and qualify the PPO-only diagnostic.

Signed-off-by: ruit <[email protected]>
@RayenTian
RayenTian force-pushed the ruit/sc-length-penalty branch 3 times, most recently from 5bb0e2d to d0e227f Compare November 14, 2026 06:38
RayenTian added a commit that referenced this pull request Nov 14, 2026
- Keep length-penalty metrics out of token_metrics; read the pooled
  finalize/length_penalty/*_sum in the data-plane reassembler test (C1).
- Defer Forest length penalties: reject token_capture.forest_training together
  with grpo.length_penalty at setup, drop the Forest-specific aggregation and
  test, and add a config-rejection test.
- Unify the length-penalty checkpoint representation with a frozen
  LengthRewardSettings projection that excludes the logging-only verbose flag,
  always write version 2 with backward-compatible version-1 loading, and cover
  changed/absent/logging-only compatibility.
- Share the profile-field extraction via length_profile_fields across the
  SingleController and legacy rollout paths.
- Write the ordinary low-effort marker so the group length penalty bypasses the
  same rollouts as the capture path.
- Drop the construct-time type checks on RewardChecks and LengthPenaltyInput and
  RewardChecks.from_state; rebuild saved reward checks at the recovery site.
- Nits and dead code: remove the unreachable chars fallback, complete public
  docstrings, shorten an over-long comment, and qualify the PPO-only diagnostic.

Signed-off-by: ruit <[email protected]>
RayenTian added a commit that referenced this pull request Nov 14, 2026
Address review on #5206: the unsupported-feature entry read "length_penalty",
so the error named the bare key. Use "ppo.length_penalty" so the message points
at the exact config path the run must disable.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Signed-off-by: ruit <[email protected]>
RayenTian added a commit that referenced this pull request Nov 14, 2026
- Bootstrap restart: _normalize_capture_reward_config now drops the
  length-penalty verbose flag from the bootstrap identity, so a verbose-only
  change no longer rejects the restart before the sidecar compare. Extend
  test_capture_bootstrap_uses_semantic_reward_settings to cover it.
- Drop test_restore_rejects_malformed_reward_checks: the decoder no longer
  validates the raw record, so the test's expectation was stale.
- Move the length projection onto LengthRewardSettings.from_configs, narrow the
  capture factory's length input to LengthPenaltyConfig | None, and rebuild the
  saved length config via LengthPenaltyConfig.model_validate in from_state.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Signed-off-by: ruit <[email protected]>
@RayenTian
RayenTian force-pushed the ruit/sc-length-penalty branch from e79b1e6 to b3f7694 Compare November 14, 2026 10:51
@RayenTian

Copy link
Copy Markdown
Contributor Author

/ok to test b3f7694

@RayenTian

Copy link
Copy Markdown
Contributor Author

/ok to test 1d13e96

RayenTian and others added 8 commits November 14, 2026 04:45
- Keep length-penalty metrics out of token_metrics; read the pooled
  finalize/length_penalty/*_sum in the data-plane reassembler test (C1).
- Defer Forest length penalties: reject token_capture.forest_training together
  with grpo.length_penalty at setup, drop the Forest-specific aggregation and
  test, and add a config-rejection test.
- Unify the length-penalty checkpoint representation with a frozen
  LengthRewardSettings projection that excludes the logging-only verbose flag,
  always write version 2 with backward-compatible version-1 loading, and cover
  changed/absent/logging-only compatibility.
- Share the profile-field extraction via length_profile_fields across the
  SingleController and legacy rollout paths.
- Write the ordinary low-effort marker so the group length penalty bypasses the
  same rollouts as the capture path.
- Drop the construct-time type checks on RewardChecks and LengthPenaltyInput and
  RewardChecks.from_state; rebuild saved reward checks at the recovery site.
- Nits and dead code: remove the unreachable chars fallback, complete public
  docstrings, shorten an over-long comment, and qualify the PPO-only diagnostic.

Signed-off-by: ruit <[email protected]>
Add a 1n8g Qwen3-1.7B SingleController Gym recipe that turns grpo.length_penalty
on, plus its nightly driver and nightly.txt entry. length_penalty requires
env.should_use_nemo_gym=true on SC (config.py) but not token capture, so this runs
the workplace_assistant Gym env with capture off; the penalty is applied on the
no-receipt rollout path (rollout_manager.py). vLLM generates, Megatron trains.

Thresholds come from a measured 100-step run: gen_kl_error median 0.0017, reward
mean 0.15, adjusted_frac peaked at 0.375, reward_delta_mean at machine epsilon
(zero-centred), and the vLLM decode length fell from 35 to 3 tokens.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Signed-off-by: ruit <[email protected]>
Address review on #5206: the unsupported-feature entry read "length_penalty",
so the error named the bare key. Use "ppo.length_penalty" so the message points
at the exact config path the run must disable.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Signed-off-by: ruit <[email protected]>
Strip the keys that already equal the inherited base (token_capture off,
data_plane block, generation backend/vllm defaults, tp/pp sizes) so the recipe
passes configs-minimize-check. The resolved config is unchanged.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Signed-off-by: ruit <[email protected]>
- Bootstrap restart: _normalize_capture_reward_config now drops the
  length-penalty verbose flag from the bootstrap identity, so a verbose-only
  change no longer rejects the restart before the sidecar compare. Extend
  test_capture_bootstrap_uses_semantic_reward_settings to cover it.
- Drop test_restore_rejects_malformed_reward_checks: the decoder no longer
  validates the raw record, so the test's expectation was stale.
- Move the length projection onto LengthRewardSettings.from_configs, narrow the
  capture factory's length input to LengthPenaltyConfig | None, and rebuild the
  saved length config via LengthPenaltyConfig.model_validate in from_state.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Signed-off-by: ruit <[email protected]>
test_length_penalty_metadata_survives_sealed_attempt_restore seals a receipt
with attempted call IDs, which reaches the optional nemo_gym staging import in
_receipt_staging_keys. Every other _forest_sealed_ledger caller carries the
marker; add it so the test runs in the nemo_gym shard instead of L0 Other.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Signed-off-by: ruit <[email protected]>
The recipe pinned env.nemo_gym to 10000-10999, which test_example_service_port_
ranges_are_isolated rejects (gym ports must stay in the below-9000 layout, 5000-
5999 by default). Drop the override so the recipe inherits the isolated default.

Signed-off-by: ruit <[email protected]>
@RayenTian
RayenTian force-pushed the ruit/sc-length-penalty branch from 1d13e96 to 673d462 Compare November 14, 2026 12:45
@RayenTian

Copy link
Copy Markdown
Contributor Author

/ok to test 673d462

RayenTian added a commit that referenced this pull request Nov 14, 2026
… richer gates

Extend the windowed/ready_first dynamic-sampling nightlies from a 10-step smoke
to a 100-step convergence run (one job, no checkpoint chaining) and gate on the
same shape as the dapo-nanov3.5 SC nightly, calibrated to this llama3.1-8b run:
all-steps-reached, finite loss/token_mult_prob_error, median and final-step
token_mult_prob_error < 1.05, grad_norm still positive, an unfiltered_reward
floor, a zero_variance_groups_total floor that proves dynamic sampling actually
filtered, no skipped steps or dropped prompt groups, and a step-time perf guard.
No max(token_mult_prob_error) gate: a single ready_first step spikes the ratio,
which median and all_finite tolerate.

Bump the nightly GPU-hour cap to 5400 to fit the two 100-step runs (32 GPU-hrs
each) on top of the current baseline and #5206's length-penalty nightly, which
merges first.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Signed-off-by: ruit <[email protected]>
@RayenTian
RayenTian requested a review from yuki-97 November 14, 2026 22:35
@yuki-97
yuki-97 merged commit 5939fa5 into main Nov 15, 2026
177 of 179 checks passed
@yuki-97
yuki-97 deleted the ruit/sc-length-penalty branch November 15, 2026 03:49
RayenTian added a commit that referenced this pull request Nov 15, 2026
… richer gates

Extend the windowed/ready_first dynamic-sampling nightlies from a 10-step smoke
to a 100-step convergence run (one job, no checkpoint chaining) and gate on the
same shape as the dapo-nanov3.5 SC nightly, calibrated to this llama3.1-8b run:
all-steps-reached, finite loss/token_mult_prob_error, median and final-step
token_mult_prob_error < 1.05, grad_norm still positive, an unfiltered_reward
floor, a zero_variance_groups_total floor that proves dynamic sampling actually
filtered, no skipped steps or dropped prompt groups, and a step-time perf guard.
No max(token_mult_prob_error) gate: a single ready_first step spikes the ratio,
which median and all_finite tolerate.

Bump the nightly GPU-hour cap to 5400 to fit the two 100-step runs (32 GPU-hrs
each) on top of the current baseline and #5206's length-penalty nightly, which
merges first.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Signed-off-by: ruit <[email protected]>
@RayenTian RayenTian mentioned this pull request Nov 17, 2026
alexandery-nvidia added a commit that referenced this pull request Nov 24, 2026
…warning

Since #4429 a materialized task row carries no agent_ref, so the warning,
which read row["agent_ref"]["name"], raised KeyError for a group of such
rows whose first prompts differ. It now reads the attribution key that
_postprocess_single_nemo_gym_group stamps on every result (the agent of a
flat row, the taskset of a materialized task), reports once per key, and
says "attribution key(s)" in the message. The test covers a group of
materialized task rows.

Two tests that main added (#4500, #5206) run _run_rollouts on results
that carry tokens with no tokenizer. The diagnostic pads the first
prompts with the tokenizer's pad id, so both tests get the tokenizer
stand-in that the other tests of this path use.

Signed-off-by: alexandery <[email protected]>
Co-Authored-By: Claude Fable 5.2 <[email protected]>
macandro96 added a commit that referenced this pull request Nov 25, 2026
…ecks

main's #5206 added RewardChecks.length_penalty after this branch was cut.
_reward_checks_state listed the three boolean fields by hand, so a
checkpoint written with it dropped the length-penalty input and a resumed
run restored that attempt without its length penalty. Copy the field the
way dataclasses.asdict does.

Cover a real LengthPenaltyInput in the projection, capture and restore
tests, and expect the multi_harness_routes key main's #5158 added to the
recovery state.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Anish Mahishi <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CI:Lfast Runs a fast test suite and re-use nightly `main` container (but sync dependencies to PRs version) Documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants