[nightshift] 20260422 multi-cleanup#5044
Merged
claude-nightshift[bot] merged 2 commits intomainfrom Apr 22, 2026
Merged
Conversation
Move ``from iris.rpc import logging_pb2`` and the ``_STR_TO_ENUM`` mapping to module scope so each ``str_to_log_level`` call no longer re-executes the import and rebuilds the dict. The deferred import had no corresponding circular dependency (``iris.rpc.logging_pb2`` does not import ``iris.logging``) and every file that imports ``str_to_log_level`` already imports ``logging_pb2`` directly. Widen the parameter type to ``str | None`` and fold the falsy-check into the function itself, then drop the redundant ``if level_name else 0`` guards at four call sites. Update the stale CALLABLE_RUNNER comment that pointed at ``iris.logging`` for ``LevelPrefixFormatter``/``_LEVEL_PREFIX`` — those moved to ``rigging.log_setup``.
The coordinator-side scatter manifest was removed in #4853 but its plumbing — the `scatter_manifest_dir` parameter on `_regroup_result_refs` and the `output_stage_name` / `join_output_stage_name` locals that only existed to build that path — was left behind. Remove the unused parameter, its two call sites, and the two dead locals. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
rjpower
approved these changes
Apr 22, 2026
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
Nightshift cleanup sweep across
lib/irisandlib/zephyr. Two scouts producedchanges; two filed
no_changewith notes recorded below for follow-up.lib/iris/src/iris (applied — 7505fd9)
from iris.rpc import logging_pb2import and the_STR_TO_ENUMmapping in
iris/logging.pyout of thestr_to_log_levelfunction body tomodule scope. The deferred import had no corresponding circular dependency
(
iris.rpc.logging_pb2does not importiris.logging) and every file thatimports
str_to_log_levelalready importslogging_pb2directly.str_to_log_levelparameter type tostr | Noneand folded thefalsy-check into the function, allowing four call sites to drop their
redundant
if level_name else 0guards.cluster/types.pythat pointed atiris.loggingforLevelPrefixFormatter/_LEVEL_PREFIX— those helperslive in
rigging.log_setup.lib/zephyr/src/zephyr (applied — a3d9e7c)
scatter_manifest_dirparameter from_regroup_result_refs,its two call sites, and the two local variables (
output_stage_name,join_output_stage_name) that only existed to construct the now-unused path.The coordinator-side scatter manifest was removed in [zephyr] Eliminate coordinator-side scatter manifest consolidation #4853 but this plumbing
was left behind.
lib/levanter/src/levanter (no_change — findings only)
Scout flagged but could not commit (sandbox denied file writes):
levanter/schedule.py:value_at_stepiterates theschedule forward and returns the first entry whose
start <= step, whichalways yields the earliest segment's value for any schedule with more than
one
ScheduleStep. The call sitelevanter/trainer.py:batch_axis_at_stepdepends on this, so a training run configuring
train_batch_sizeas anIntSchedulegets the wrong batch size after the first segment boundary.Regressed in PR Reproduce Olmo 2 SFT #887 / commit 83f3f34 (renamed
until→startwithoutreversing the iteration order).
utils/stat_utils.py:RunningMean.addrecomputesself.total + totaltwice(harmless duplicate).
shapes.py:conformsappears unreferenced acrosslib/.utils/background_iterable.py:80-87has tautologicalexcept StopIteration: raise/except Exception as e: raise eblocks flagged by the AGENTS.mdLLM-pitfall list.
lib/marin/src/marin (no_change — findings only)
Scout identified dead code but was also blocked by the sandbox:
asdict_excludinginutils.py(~27 LOC + self-referential tests) —last real caller was removed when speedrun code was deleted in Remove all marin -> experiment import paths #4541.
lib/marin/src/marin/cluster/ray.py(959 LOC, entirely unused) — alreadybeing removed in open PR Delete dead Marin Ray glue (cluster/ray.py + executor branches) #5028, so not duplicated here.
evaluation/utils.pyusesprintinstead ofloggerindownload_from_gcs/upload_to_gcs.core/runtime.pystill callsdatetime.utcnow()(deprecated in 3.12).Test plan
./infra/pre-commit.py --all-files --fix— cleanuv run pytest -x lib/iris/tests/test_logging.py— 19 passeduv run pytest -x lib/zephyr/tests/test_execution.py— 42 passed