Skip to content

Cleanup: unreferenced symbols removed, cross-module helpers public in their owners, explicit check=False, logged excepts - #338

Merged
renmengye merged 2 commits into
mainfrom
chore/dead-code-private-imports
Sep 8, 2026
Merged

renmengye merged 2 commits into
mainfrom
chore/dead-code-private-imports

Conversation

@renmengye

Copy link
Copy Markdown
Member

Digest #332, groupings 1, 2 and 8 (dead code, cross-module helpers, small smells). Every claim was grep-verified before acting.

  • Removed, no references anywhere: image.containment_available, intake.STEWARD_LABEL (and its now-unused label_name import), tick.read_pending (list_pendings stays; the four probes that used it now call list_pendings), housekeeping.shed_candidates (shed_ended_workspaces uses _is_shed_candidate, not it). Left gpus_in_gres, result_summary, parse_result_json alone — those are decision items in the digest.
  • Cross-module private helpers made public in their owning module (renamed in place, every importer updated, no aliases — nothing in scripts or docs used the old names): brief.code_fence, brief.cap, attempt.target_clone_url, attempt.stage_launch_job_ids, orchestrator.metric_from_output, review_agent.emit_envelope, review_agent.pull_request. _fence became code_fence rather than fence because most call sites bind a local fence.
  • check=False made explicit on the seven subprocess.run calls that inspect returncode themselves (ruff PLW1510); none should raise.
  • A log line on three silent excepts: attempt (HEAD lookup failed, self-merge not armed), tick._last_worked_ts (unreadable work marker), init (account-type lookup failed).

The merge brings in the maintenance module (#334), whose two files imported the old _emit; retargeted onto emit_envelope in this branch.

One CHANGELOG bullet under Changed (public names moved). No behaviour change.

🤖 Generated with Claude Code

renmengye and others added 2 commits September 7, 2026 22:39
…ic in their owners, explicit check=False, logged excepts

Digest #332, sections 1, 2 and 8.

Unreferenced code removed:
- image.containment_available (no caller)
- intake.STEWARD_LABEL (no reader; label_name import dropped with it)
- tick.read_pending (test-only; the tests that used it as a probe now
  read through list_pendings, which stays)
- housekeeping.shed_candidates (test-only; shed_ended_workspaces uses
  _is_shed_candidate) and its assertion in test_housekeeping

Private helpers imported across modules are public in their owning module:
- attempt._target_clone_url -> target_clone_url (followup, tick)
- attempt._stage_launch_job_ids -> stage_launch_job_ids (tick)
- brief._fence -> code_fence, brief._cap -> cap (intake, followup,
  steward, syscall, panel); "fence" would shadow the local of the same
  name at every call site
- review_agent._emit -> emit_envelope, review_agent._pull_request ->
  pull_request (verify_agent, review_summarize_cli, verify_post_cli,
  review_post_cli, review_agent_cli)
- orchestrator._metric_from_output -> metric_from_output (dispatch)
No alias kept: nothing under scripts/ or docs/ imports the old names.

subprocess.run calls that inspect returncode themselves say check=False:
cli._resident_jobs, cli._cancel, cli.start, compute._subprocess_runner,
dispatch._filter_neutral_env, github._filter_override_pairs,
CodexHarness login. The two `git config --get-regexp` calls exit 1 on
"no filter drivers", so raising there would be wrong.

Silent excepts log before returning their fallback:
attempt._blessed_head (warning), tick._last_worked_ts (debug),
init._owner_type (warning; init.py gains a module logger).

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Round 1 — reviewed head 2133ac55 — reviewer summarizer:hermes/gpt-5.6-terra over coverage+credentials+deployment+general+lifecycle+prose.

terra
Advisory findings from outerloop — the code owner decides. Reply to disagree; the outerloop:no-review label opts this PR out.

Verdict: no defects found.

Verdict: no findings were reported by any review lens; no findings rejected.

@renmengye
renmengye merged commit 1bdefc3 into main Sep 8, 2026
16 checks passed
@renmengye
renmengye deleted the chore/dead-code-private-imports branch September 8, 2026 03:06
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.

1 participant