Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions .github/workflows/ci-product-smoke-slice.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ permissions:
jobs:
core:
name: Core inference smoke
if: ${{ contains(inputs.smoke_matrix, '"id":"core"') }}
if: ${{ contains(fromJson(inputs.smoke_matrix).*.id, 'core') }}
uses: ./.github/workflows/smoke.yml
with:
source_sha: ${{ inputs.source_sha }}
Expand All @@ -45,7 +45,7 @@ jobs:

core_cuda:
name: CUDA inference smoke
if: ${{ contains(inputs.smoke_matrix, '"id":"core-cuda"') }}
if: ${{ contains(fromJson(inputs.smoke_matrix).*.id, 'core-cuda') }}
uses: ./.github/workflows/smoke.yml
with:
source_sha: ${{ inputs.source_sha }}
Expand All @@ -58,7 +58,7 @@ jobs:

two_node_client:
name: Two-node client smoke
if: ${{ contains(inputs.smoke_matrix, '"id":"two-node-client"') }}
if: ${{ contains(fromJson(inputs.smoke_matrix).*.id, 'two-node-client') }}
uses: ./.github/workflows/scripted-binary-smoke.yml
with:
source_sha: ${{ inputs.source_sha }}
Expand All @@ -73,7 +73,7 @@ jobs:

two_node_split:
name: Two-node split smoke
if: ${{ contains(inputs.smoke_matrix, '"id":"two-node-split"') }}
if: ${{ contains(fromJson(inputs.smoke_matrix).*.id, 'two-node-split') }}
uses: ./.github/workflows/scripted-binary-smoke.yml
with:
source_sha: ${{ inputs.source_sha }}
Expand All @@ -88,7 +88,7 @@ jobs:

metal_model_load:
name: Metal model-load smoke
if: ${{ contains(inputs.smoke_matrix, '"id":"metal-model-load"') }}
if: ${{ contains(fromJson(inputs.smoke_matrix).*.id, 'metal-model-load') }}
uses: ./.github/workflows/smoke.yml
with:
source_sha: ${{ inputs.source_sha }}
Expand All @@ -103,7 +103,7 @@ jobs:

model_download:
name: Model download smoke
if: ${{ contains(inputs.smoke_matrix, '"id":"model-download"') }}
if: ${{ contains(fromJson(inputs.smoke_matrix).*.id, 'model-download') }}
uses: ./.github/workflows/hf-download-smoke.yml
with:
source_sha: ${{ inputs.source_sha }}
Expand Down
11 changes: 4 additions & 7 deletions crates/mesh-llm-ui/src/features/chat/api/mesh-connection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,18 +93,15 @@ async function waitForModelRouteRetry(abortSignal?: AbortSignal): Promise<boolea
if (abortSignal?.aborted) return false

return new Promise((resolve) => {
let timerId: ReturnType<typeof setTimeout> | undefined
let abortHandler: (() => void) | undefined

const finish = (shouldRetry: boolean) => {
if (timerId !== undefined) clearTimeout(timerId)
if (abortHandler) abortSignal?.removeEventListener('abort', abortHandler)
clearTimeout(timerId)
abortSignal?.removeEventListener('abort', abortHandler)
resolve(shouldRetry)
}

abortHandler = () => finish(false)
const abortHandler = () => finish(false)
abortSignal?.addEventListener('abort', abortHandler, { once: true })
timerId = setTimeout(() => finish(true), MODEL_ROUTE_RETRY_DELAY_MS)
const timerId = setTimeout(() => finish(true), MODEL_ROUTE_RETRY_DELAY_MS)
})
}

Expand Down
17 changes: 17 additions & 0 deletions scripts/tests/test_ci_lane_workflows.py
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,23 @@ def test_dispatched_pr_lanes_receive_no_hugging_face_credential(self) -> None:
workflow = self.workflow(name)
self.assertIn("inputs.original_event_name == 'push'", workflow)

def test_product_smoke_jobs_parse_formatted_matrix_json(self) -> None:
workflow = self.workflow("ci-product-smoke-slice.yml")
for smoke_id in (
"core",
"core-cuda",
"two-node-client",
"two-node-split",
"metal-model-load",
"model-download",
):
with self.subTest(smoke_id=smoke_id):
self.assertIn(
f"contains(fromJson(inputs.smoke_matrix).*.id, '{smoke_id}')",
workflow,
)
self.assertNotIn("contains(inputs.smoke_matrix,", workflow)

Comment on lines +204 to +220

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Assert each smoke ID on its intended job.

The test checks each expression anywhere in ci-product-smoke-slice.yml. It can pass when two IDs are attached to the wrong jobs. Scope each assertion to the matching job block, or parse the workflow and assert the job-to-ID mapping. Keep the negative assertion for the obsolete direct lookup.

🤖 Prompt for 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.

In `@scripts/tests/test_ci_lane_workflows.py` around lines 204 - 220, Update
test_product_smoke_jobs_parse_formatted_matrix_json to verify each smoke ID
within its intended job block in ci-product-smoke-slice.yml, rather than
searching the entire workflow text. Parse or scope the workflow so the expected
job-to-ID mapping is enforced, while retaining the negative assertion that
rejects the obsolete direct inputs.smoke_matrix lookup.

def test_dispatched_main_preserves_trusted_runner_policy(self) -> None:
selector = (ROOT / ".github/actions/select-ci-runners/action.yml").read_text(
encoding="utf-8"
Expand Down
Loading