fix(inference): restore qualification loopback publish - #8672
Conversation
Signed-off-by: Apurv Kumaria <akumaria@nvidia.com>
📝 WalkthroughWalkthroughThe qualification runner adds validated loopback-only Docker port publishing. Server argument construction uses the new helper. Tests cover ephemeral and fixed host ports, alternate plan ports, image validation, duplicate publish rejection, GPU flags, and security options. ChangesQualification loopback publishing
Estimated code review effort: 3 (Moderate) | ~20 minutes Possibly related PRs
Suggested labels: Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@scripts/checks/run-llama-cpp-dgx-spark-qualification.mts`:
- Around line 329-331: Update the publish-argument validation around the
--publish check to reject every Docker port-publication spelling: -p,
--publish=<mapping>, attached -p<mapping>, -P, and --publish-all, while
retaining rejection of --publish. Add tests covering each spelling before the
qualification materializer inserts its loopback mapping.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Enterprise
Run ID: d54da0d2-8e9b-4e1e-a485-0ce50f5f145a
📒 Files selected for processing (2)
scripts/checks/run-llama-cpp-dgx-spark-qualification.mtstest/llama-cpp-dgx-spark-qualification-runner.test.ts
Signed-off-by: Apurv Kumaria <akumaria@nvidia.com>
PR Review Advisor — No blocking findings reportedAdvisor assessment: No blocking advisor findings reported Model lanes
2 terminology differences from the second opinionAdvisory only. These are normalized differences from the primary terminology receipt.
Second-opinion terminology and E2E selections are advisory. Live E2E does not run automatically for pull requests. 2 semantic terminology decisionsTerminology decisions are advisory. They affect the assessment only when a separate finding identifies concrete semantic impact.
E2E guidanceAdvisory only. A maintainer can dispatch the default E2E suite against this exact revision. Recommended E2E: 1 optional E2E recommendation
This automated review informs maintainers. Warnings and suggestions do not require a response. A maintainer decides whether to merge. |
Signed-off-by: Apurv Kumaria <akumaria@nvidia.com>
|
Post-merge follow-ups:
No follow-up code change is needed for the merged #8672 head. The protected DGX Spark live qualification remains optional evidence, not a merge-gate blocker. |
Summary
The llama.cpp qualification runner launches Docker directly and cannot rely on the normal lifecycle provider to publish its guarded port. This change completes the qualification-only loopback adapter by placing exactly one declarative mapping immediately before the image reference and failing closed when the materialized argument boundary conflicts, while the shared materializer and product lifecycle remain unchanged.
Related Issue
Fixes #8667
Changes
--entrypointposition heuristic with an adapter that requires exactly one image-reference boundary, validates the host and container ports, and rejects long, short, attached, and publish-all Docker publication options before the image.127.0.0.1::<container-port>for ephemeral qualification and127.0.0.1:<host-port>:<container-port>for fixed-port agent qualification, with the container port derived from the validated recipe.docker run,docker port, and the live probe directly.Type of Change
Quality Gates
Documentation Writer Review
no-docs-neededdocs/inference/set-up-llama-cpp.mdxremains accurate for the normal managed runtime.DGX Station Hardware Evidence
scripts/prepare-dgx-station-host.shis unchanged.Verification
Signed-off-by:line and every commit appears asVerifiedin GitHubpre-commit,commit-msg, andpre-pushhooks passed, ornpm run validate:prpassed after refreshingorigin/mainwhen hooks were skipped or unavailablenpx vitest run --project integration test/llama-cpp-dgx-spark-qualification-runner.test.ts test/llama-cpp-dgx-spark-qualification-contract.test.ts(31 passed);npx vitest run --project cli src/lib/inference/llama-cpp/host-local-runtime.test.ts src/lib/onboard/runtime-provider/docker-llama-cpp-managed-lifecycle.test.ts(57 passed);npm run typecheck:cliandnpx prek run --from-ref main --to-ref HEADpassed.npm testfor broad runtime/test-harness changes;npm run checkfor repo-wide validation/coverage changes — command/result:npm run docsbuilds without warnings (doc changes only)Full PR CI reached a terminal state with 38 passed, 14 skipped, and one unrelated root failure plus two downstream aggregators. CLI shard 5 reproduced the deterministic current-main regression tracked in #8674 on both its initial run and one retry: the stale-recovery fixture upgrades OpenShell 0.0.99 to 0.0.101, then stops on its live-route mismatch before reaching the expected assertion. No maintainer acceptance is recorded, so the non-success checkbox remains unchecked.
Protected DGX Spark qualification was not run pre-merge. The local host is Darwin/ARM64 without the required GB10 GPU or model, and the protected PR workflow deliberately executes this runner script from trusted
mainrather than the candidate checkout. A trusted-main protected run after merge remains the live validation step fordocker portresolution and the health probe.Signed-off-by: Apurv Kumaria akumaria@nvidia.com