Skip to content

Serve split peer identity during model admission and planning - #258

Open
i386 wants to merge 1 commit into
mainfrom
ci/peer-before-model-admission
Open

i386 wants to merge 1 commit into
mainfrom
ci/peer-before-model-admission

Conversation

@i386

@i386 i386 commented Nov 28, 2026 •

Copy link
Copy Markdown
Contributor

Original problem

Split qualification can time out waiting for its own peer even after #256. The control listener opens after model admission and split planning, so a valid late-starting attempt remains invisible while it prepares its model. Serving this attempt's identity earlier lets the other role wait for real readiness instead of failing during preparation.

Diagnostics

In #239's failed Qwen3.6 split job, the JY worker attempt started at 07:08:12 UTC and the leader at 07:25:26 UTC. The worker's rendezvous timed out while the leader was still admitting the cached model and planning its stages. The workflow log records the leader's first peer request about 20 seconds after the worker timeout. The identity checks correctly rejected unrelated endpoint activity.

The added loopback regression failed in all four leader/worker × admission/planning cases against main before the fix: the control listener did not exist at either preparation callback.

Fix

Open formation-bound peer control after source, host, fixture and memory admission checks, before model content admission and split planning. Publish the internal preparing phase while those operations run. The context manager closes the listener if preparation fails.

The regression verifies both roles can inspect the matching attempt during both preparation steps, preparing does not satisfy ready, no native serving child starts early, and the control port closes on a preparation error. Existing listener ownership, wrong-formation/source/attempt, native-process exit and completion-acknowledgement checks continue to apply.

Compatibility

Runtime ABI, model/wire formats and qualification proof shape are preserved. The internal control response adds a preparing phase. Executor-derived benchmark identities record the changed execution contract; historical results retain their original identities. There is no performance claim or data migration.

Validation

  • Before the implementation change: PYTHONPATH=scripts /tmp/skippy-ci-repair/automation-venv312/bin/python scripts/tests/inference_peer.py failed in the four new preparation subcases.
  • After: the same command passed all 12 tests, including the new subcases and existing numerical-preparation/completion checks.
  • SKIPPY_PYTHON=/tmp/skippy-ci-repair/automation-venv312/bin/python just ci-automation: passed the complete offline automation suite.
  • git diff --check: passed.

This changes Python qualification orchestration and its offline tests. Native/model/hardware qualification for this new head is pending CI; loopback tests do not establish it. GitHub Actions workflow and composite-action files are not changed.

Acceptance criteria

  • I ran the relevant local checks, or explained why they do not apply.
  • I agree to license my contributions under the Apache License, Version 2.0.

Summary by CodeRabbit

  • Bug Fixes
    • Split-peer coordination is available while the model is being prepared, for both leader and worker roles.
    • A peer cannot enter the ready phase before preparation completes. If preparation fails, serving does not start and the peer control port is released.
    • Peer coordination and server shutdown remain within the control context throughout execution.

@coderabbitai

coderabbitai Bot commented Nov 28, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

execute now opens split-peer control before model admission and server setup. The context covers setup and server execution. A regression test checks peer visibility during preparation and confirms that preparation failure prevents execution and releases the control port.

Changes: Split-peer preparation control

Layer / File(s) Summary
Open peer control during preparation
scripts/inference-execute.py, scripts/tests/inference_peer.py
execute enters the peer control context before model admission and server setup. The test covers both roles and preparation stages, including peer visibility in the preparing phase, failure handling, and control-port release.

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix

Sequence Diagram(s)

sequenceDiagram
  participant Execute
  participant PeerControl
  participant Preparation
  participant Server
  Execute->>PeerControl: Open control context
  PeerControl-->>Execute: Set peer phase to preparing
  Execute->>Preparation: Admit model or prepare split
  Preparation-->>Execute: Return success or raise error
  Execute->>Server: Start after successful preparation
Loading

Possibly related PRs

  • Mesh-LLM/skippy#256: Defines the split-peer contract and checks that PR #258's earlier peer-control startup relies on.

Suggested reviewers: michaelneale

Merge Risk: Minimal · up to b7052

This change makes a split attempt's peer identity visible while it admits the model and plans stages, so other roles no longer time out waiting for a late-starting attempt. No concrete merge-blocking risk was found. The license-acceptance check should be completed, and the pending native qualification CI should pass, before merging.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title "Serve split peer identity during model admission and planning" matches the main change: the control listener now opens during model admission and split planning, with a new internal `prepar…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Full details: Title check

Explanation

The title "Serve split peer identity during model admission and planning" matches the main change: the control listener now opens during model admission and split planning, with a new internal preparing phase. The changeset (execute() control context, peer phase set to preparing, and a loopback regression test for leader and worker roles) directly reflects this. The title is specific and describes the primary change without file lists or vague terms.

Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
Fix failing CI checks

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 995f5eae-74e0-410a-a491-06591bb997ea
Commits

Reviewing files that changed from the base of the PR and between cc2a274 and b705294.

Files selected for processing: 2

  • scripts/inference-execute.py
  • scripts/tests/inference_peer.py

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

@i386

i386 commented Nov 28, 2026

Copy link
Copy Markdown
Contributor Author

@i386 Please review and tick the Apache 2.0 contribution declaration in this PR’s acceptance criteria when you agree; PR checks requires the author’s declaration.

i386 added a commit that referenced this pull request Nov 28, 2026
Apply the shared CI repair from #258 while preserving the Metal backend and its fixture interfaces.
i386 added a commit that referenced this pull request Nov 28, 2026
Apply the shared CI repair from #258 while preserving the Metal backend and its fixture interfaces.
@github-actions

Copy link
Copy Markdown

Skippy Lab Qualification: Passed

Commit: b705294df9d5b411c0c5de2bc9a9b2ea127dfc22 · PR smoke · Workflow and timings · Saved evidence

Native Spark lab qualification.

Latest successful main: run 45835599636, attempt 1, commit f243a305f497cbe5f897fdbe384235b0a62edf3f. Comparison unavailable: workload inputs changed or could not be verified.

Configuration Outcome Prefill tok/s Prefill vs main Decode tok/s Decode vs main Actions logs
qwen35-4b-standalone Passed 3818.0 Unavailable 61.9 Unavailable Logs
qwen3-coder-30b-a3b-standalone Passed 2815.4 Unavailable 85.2 Unavailable Logs
qwen3-coder-30b-a3b-split Passed 2047.3 Unavailable 53.5 Unavailable Logs
qwen36-35b-a3b-standalone Passed 1990.3 Unavailable 63.7 Unavailable Logs
qwen36-35b-a3b-split Passed 1914.4 Unavailable 42.0 Unavailable Logs
qwen38-flash-next-standalone Passed 728.9 Unavailable 30.3 Unavailable Logs
qwen38-flash-next-split Passed 529.0 Unavailable 26.2 Unavailable Logs

TPS comes from three separate warmed, uncached probes at concurrency 1, each generating exactly 128 tokens. The scored correctness answers and each probe's 64-token warmup are excluded. Each rate is total tokens / total server-reported phase time, not an average of request rates. Client elapsed times and raw responses are retained in throughput-probe.json. These bounded samples are not sustained benchmarks or controlled speedup comparisons. Legacy short-answer receipts and missing or invalid probe evidence show as Unavailable.

Deltas use unrounded rates from matching PR-profile smoke receipts on the latest successful main run, including the nightly smoke evidence. Positive means faster. Changed workload inputs, different serving host classes, unequal phase token counts or missing evidence show Unavailable. Physical Spark placement and runtime conditions can differ; deltas are descriptive, not controlled speedup claims.

Smoke checks cover GPU startup, deterministic endpoint repeats and bounded streaming. They do not establish an AgentX performance score. Nightly history and saved performance baselines are published separately; a saved baseline can be older than the latest successful main run used here. Native build and qualification output streams into each configuration’s Actions log, with per-attempt copies in Saved evidence. Any capture gaps are reported in the log and saved diagnostics. GitHub evidence copies expire after 30 days.

@i386 i386 left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Commented at head b705294df9d5b411c0c5de2bc9a9b2ea127dfc22 — content verified and CI green at head; blocked on a rebase, and this account is the PR author so a maintainer approval is needed after it.

  • The reorder is right: entering the peer control context before admit() and prepare_split(...) keeps the control endpoint observable during long model admission and split planning, with phase = "preparing" reported. The new test_control_precedes_model_admission_and_split_planning proves it for both roles and both blocked stages: the observer connects during preparation, sees phase "preparing", a "ready" await fails as it should, start is never called, and the port is released after the failure.
  • CI at head: all qualification lanes green, Automation checks green (the new script tests ran), lab qualification passed, PR checks success. Boxes ticked.
  • Blocked on a rebase: conflicts with current main in exactly scripts/inference-execute.py and scripts/tests/inference_peer.py (main evolved those files after this branch's point). After the rebase this is the critical-path PR — landing it clears #192's and #240's carried conflicts and removes the split-qualification flake class the 11-28 snapshots hit.

@i386

i386 commented Dec 1, 2026

Copy link
Copy Markdown
Contributor Author

@michaelneale can I get a ✝️

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

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant