Skip to content

feat(executors, common): the toolbox's small edits to existing main modules - #2326

Open
zoroyihan7 wants to merge 4 commits into
mainfrom
feature/yihan/toolbox-pr0
Open

zoroyihan7 wants to merge 4 commits into
mainfrom
feature/yihan/toolbox-pr0

Conversation

@zoroyihan7

@zoroyihan7 zoroyihan7 commented Oct 30, 2026 •

Copy link
Copy Markdown
Collaborator
  • Description: PR-0 of the toolbox (multibranch W1) workstream's merge into main: the toolbox's small edits to modules that already exist on main, taken from multibranch-dev and kept only where the hunk is the toolbox's (git log on multibranch-dev, authored by zoroyihan7 / toolbox commits). Each hunk stands on main alone: no import of a module that is not on main. The later toolbox PRs (measure, runner, toolbox) import these names.
    • hyperloom_common/gpu_identity (moved there by refactor(common): give Hyperloom and KernelForge one shared package #2308): AMD_GPU_DEVICE_IDS, normalise_device_id, gpu_type_for_device_id (from 333d2dd; with the R9700/0x7551 correction siliangchen-amd made in e40ef60).
    • executors/__init__: exports of the names the measurement backend calls (grid runner, workload rendering and its option types, server lifecycle, subprocess kill and RoundWatch, launch evidence, prefix-cache and speculative-decoding refusals, TraceLens vLLM patch). The option-type exports came in with siliangchen-amd's sync 6f64999 for the same callers.
    • executors/_profile_setup: VLLM_PATCH_PROFILER_FIELDS, the two --profiler-config fields only a TraceLens-patched vLLM accepts, as one constant the renderer and the backend read (e81281d).
    • executors/_subprocess_kill: vLLM's Rust frontend ready line is a server-ready marker (22afe76).
    • executors/benchmark_result: harvest_leaked_artifacts(..., leak_root=) scans only the named root (f4b7589).
    • Left out on purpose: the outside_facts constant refactor of common/{env_safety,failure_signature,gpu_power_settings,provenance,visible_devices} (imports hyperloom.common.outside_facts, not on main; it goes with the rule-pack PR); HIP_RUNTIME_ERROR (already on main via fix(failure-signature): a HIP call that failed while running is not a missing kernel #2141); profile_{sglang,vllm,atom}.yaml, _grid_runner, executors/profile, bringup/ladder (no difference left from main); benchmark_backend/magpie_confined, _accuracy_gate, _magpie_patcher, _workload_envs, benchmark_config, magpie_agentx (other workstreams' hunks).
  • Linked issue(s): none (multibranch merge plan, toolbox PR-0)
  • Tests: added hyperloom_common/tests/test_gpu_identity.py, executors/tests/test_package_exports.py, test_harvest_named_leak_root_is_the_only_root_scanned, test_scan_server_log_increment_detects_vllm_rust_frontend_ready; the vLLM profile flag tests now also assert VLLM_PATCH_PROFILER_FIELDS is exactly what is added when patched and absent when not. Each new test fails against main's modules (ImportError / AttributeError / TypeError / AssertionError) and passes with this change. Ran on py3.10 and py3.11: pytest src/hyperloom/plugs/tests src/hyperloom/orchestrator/actions/executors/tests src/hyperloom/common/tests plus test_benchmark_result.py test_kill_spawned_server.py test_profile_and_kernel_handlers.py test_shared_profile_setup.py test_grid_runner_behavior_lock.py; ruff check, ruff format --check, lint-imports (11 kept, 0 broken).
  • Size/complexity triggers crossed: none; no function added above the ceiling.
  • If this simplifies or refactors: _apply_vllm_profile derives its two patched-only flags from VLLM_PATCH_PROFILER_FIELDS instead of two literal lines; same flags, pinned by the existing profile tests.
  • Observable effect:
    • A vLLM server started with the Rust frontend (VLLM_USE_RUST_FRONTEND=1) prints no uvicorn line; it is now seen as ready from "OpenAI server is ready to accept requests". Before, the boot watchdog never saw it ready and ended the round at its boot share.
    • harvest_leaked_artifacts gains an optional leak_root; existing callers pass none and see no change. A caller that names its work directory no longer gets artifacts another test left in /workspace, $RESULT_DIR or INFERENCE_OPTIMIZER_LEAK_ROOTS copied into its output.
    • gpu_identity and the executors exports are new names with no caller on main yet; nothing an operator sees changes until the measurement PRs land.
  • Breaking changes: no
  • PR addresses single concern: no. It bundles the toolbox's small edits to existing main files so that the following toolbox PRs (new files only) have their imports on main; each item is listed above with its own effect.
  • Root cause is upstream: no

🤖 Generated with Claude Code

…odules

- common/gpu_identity: AMD_GPU_DEVICE_IDS, normalise_device_id and
  gpu_type_for_device_id name the board a PCI device id belongs to (from the
  driver's amdgpu.ids), so a node whose VBIOS reports a different market name
  is still identified; ids shared by two boards name none.
- executors/__init__: export the grid runner, workload rendering, server
  lifecycle, subprocess kill, launch evidence and speculative-decoding names
  that the measurement backend calls, so it does not import private modules.
- executors/_profile_setup: the two --profiler-config fields only TraceLens's
  vLLM patch adds are one constant, VLLM_PATCH_PROFILER_FIELDS (exported).
- executors/_subprocess_kill: vLLM's Rust frontend ready line ("OpenAI server
  is ready to accept requests") marks the server ready.
- executors/benchmark_result: harvest_leaked_artifacts takes leak_root; when
  given it is the only root scanned.

Co-Authored-By: Claude <noreply@anthropic.com>
@zoroyihan7 zoroyihan7 added the type:feature New capability or improvement label Oct 30, 2026
@github-actions

github-actions Bot commented Oct 30, 2026 •

Copy link
Copy Markdown

Code metrics gate: PASSED

Judged: the 10 files this change touches. Files it does not touch never fail it; anything found there is listed under Outside this change for information.

Dimension Limit New Worse Improved Over the limit vs base
Cyclomatic complexity fails > 20 0 0 0 0 +0
Cognitive complexity fails > 30 0 0 0 34 +0
Function length (lines) fails > 60 0 0 0 249 +0
Nested block depth fails > 4 0 0 0 37 +0
Parameter count fails > 5 0 0 0 0 +0
Module length (lines) warns > 800, fails > 1200 0 0 0 42 +0
Duplicated lines per file fails > 0 0 0 0 76 +0
Dead code (vulture) fails > 0 0 0 0 2 +0
Directory size (entries) fails > 50 0 0 0 1 +0
Check Findings Effect
Comments 0
Broad catch without a reason 0
Broad catch that records nothing 0
English only 0
Production code imports test code 0
Repeated literals 0
A1 Private name of another package 0
A8 Flag argument 0
A9 Tuple return 0
A10 Raw vocabulary comparison 0
A11 Hidden global write 0
A12 Pure forwarder 0
A12 Single-implementation abstraction 0

Module length warning: over 800 lines, within the 1200-line failure limit (not failing): 2

Module Lines Limit
src/hyperloom/orchestrator/actions/executors/_subprocess_kill.py 1151 warns > 800
src/hyperloom/orchestrator/actions/executors/benchmark_result.py 924 warns > 800

Verdict computed by the gate scripts in /home/runner/work/_temp/code-metrics-gate, not by this tree's copy.

Thresholds and sources: [tool.hyperloom.code_metrics] in pyproject.toml. Tools: complexipy 8.0.1, jscpd 5.4.1, radon 6.0.1, ruff 0.16.2, vulture 2.16.

@zoroyihan7
zoroyihan7 marked this pull request as ready for review October 30, 2026 02:00
@zoroyihan7
zoroyihan7 requested a review from a team as a code owner October 30, 2026 02:00
zoroyihan7 and others added 3 commits October 31, 2026 15:42
main's #2308 moved gpu_identity to hyperloom_common; its test now lives in
hyperloom_common/tests and imports it from there.

Co-Authored-By: Claude <noreply@anthropic.com>
The move in eb45040 left the import unstaged.

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

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type:feature New capability or improvement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant