Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 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
9 changes: 7 additions & 2 deletions .agents/skills/manage-ci/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,13 @@ contract; no downstream product's workflow topology applies here.
Independent declarative PR filters select hosted offline automation, source
checks, and Linux ARM64 CUDA 13 plus macOS ARM64 Metal package/device smoke.
Qualification scripts and reporting do not select PR package builds. Reporting
and offline check recipes belong in `ci/automation.just`; root `Justfile` edits
remain conservative build inputs. Main pushes retain conservative source
and offline check recipes belong in `ci/automation.just`; qualification controller
and execution recipes belong in `ci/inference.just` and select the Spark ladder
without package rebuilds. Include that file in qualification native cache identities.
Root `Justfile` edits remain conservative build inputs. Test-support directories
and named display modules avoid PR hardware; mixed production changes retain it.
Keep shared Windows/build inputs conservative until platform validation replaces
the coverage being removed. Main pushes retain conservative source
checks. Inference, packaging and native main changes select both device
smokes; native changes additionally select Graph Contracts. Compare main
changes since a verified successful ancestor main-push CI run so coalesced
Expand Down
8 changes: 8 additions & 0 deletions .github/path-filters.yml
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ packages:
- '!**/*_tests.rs'
- '!**/tests_*.rs'
- '!**/test_support.rs'
- '!**/test_support/**'
- '!crates/llama-spec-bench/**'
- '!crates/metrics-server/**'
- '!crates/skippy-gpu-bench/**'
Expand Down Expand Up @@ -139,6 +140,7 @@ inference:
- 'scripts/lib/lld.sh'
- 'scripts/lib/macos-deployment-target*'
- '.gi/templates.yaml'
- 'ci/inference.just'
- 'ci/inference-ladder.json'
- 'ci/inference-artifacts.json'
- 'ci/inference-quality.json'
Expand All @@ -160,6 +162,7 @@ inference:
- '!**/*_tests.rs'
- '!**/tests_*.rs'
- '!**/test_support.rs'
- '!**/test_support/**'
- '!crates/llama-spec-bench/**'
- '!crates/metrics-server/**'
- '!crates/skippy-gpu-bench/**'
Expand All @@ -170,6 +173,11 @@ inference:
- '!scripts/lib/inference_markdown.py'
- '!scripts/lib/inference_charts.py'
- '!scripts/lib/inference_png.py'
- '!scripts/lib/inference_labels.py'
- '!scripts/lib/inference_mermaid.py'
- '!scripts/lib/inference_health.py'
- '!scripts/lib/inference_health_charts.py'
- '!scripts/lib/inference_health_markdown.py'

# Additional main-only smoke inputs; PRs use the independent packages filter.
packaging:
Expand Down
96 changes: 96 additions & 0 deletions .github/scripts/fixtures/hardware-routing-prs.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
[
{
"number": 252,
"title": "Compare inference changes on fixed hardware with calibrated intervals",
"url": "https://github.com/Mesh-LLM/skippy/pull/252",
"files": [
".gi/templates.yaml",
".github/workflows/inference.yml",
"Justfile",
"ci/README.md",
"ci/automation.just",
"scripts/inference-dispatch.py",
"scripts/inference-execute.py",
"scripts/inference-paired.py",
"scripts/inference-plan.py",
"scripts/inference-report.sh",
"scripts/lib/inference-report-baseline.sh",
"scripts/lib/inference_paired_collect.py",
"scripts/lib/inference_pairs.py",
"scripts/lib/inference_probe.py",
"scripts/lib/inference_rendezvous.py",
"scripts/tests/inference-report.sh",
"scripts/tests/inference_deadlines.py",
"scripts/tests/inference_paired_execution.py",
"scripts/tests/inference_pairs.py",
"scripts/tests/inference_peer_evidence.py",
"scripts/tests/inference_probe.py"
]
},
{
"number": 241,
"title": "Load a test runtime named directly, not only its parent directory",
"url": "https://github.com/Mesh-LLM/skippy/pull/241",
"files": [
"crates/skippy-runtime/src/test_support.rs",
"crates/skippy-runtime/src/test_support/libraries.rs"
]
},
{
"number": 240,
"title": "Keep Clippy clean on Windows in skippy-hf-hub and skippy-package-builder",
"url": "https://github.com/Mesh-LLM/skippy/pull/240",
"files": [
"crates/skippy-hf-hub/src/cache/storage.rs",
"crates/skippy-package-builder/src/cli.rs"
]
},
{
"number": 248,
"title": "Build and verify Skippy CPU runtimes for Windows ARM64",
"url": "https://github.com/Mesh-LLM/skippy/pull/248",
"files": [
".agents/skills/manage-ci/SKILL.md",
".github/actions/ci-package/action.yml",
".github/scripts/ci-gate.test.cjs",
".github/workflows/ci.yml",
".github/workflows/release.yml",
"CONTRIBUTING.md",
"Justfile",
"ci/README.md",
"ci/targets.json",
"scripts/build-llama.sh",
"scripts/build-windows.ps1",
"scripts/ci-plan.sh",
"scripts/ci-product.py",
"scripts/ci-release.py",
"scripts/enable-msvc-dev-env.ps1",
"scripts/lib/native_policy.py",
"scripts/native-inspect.py",
"scripts/package-cli-release.sh",
"scripts/package-native-runtime.sh",
"scripts/tests/release_contracts.py"
]
},
{
"number": 192,
"title": "Run the native build scripts with a Windows bash, not WSL's",
"url": "https://github.com/Mesh-LLM/skippy/pull/192",
"files": [
"crates/skippy-ffi/build/native_link.rs",
"crates/skippy-ffi/tests/windows_bash_paths.rs"
]
},
{
"number": 193,
"title": "Make a hardware probe die with the process that started it on Windows",
"url": "https://github.com/Mesh-LLM/skippy/pull/193",
"files": [
"Cargo.lock",
"crates/skippy-hardware-profile/Cargo.toml",
"crates/skippy-hardware-profile/src/probe.rs",
"crates/skippy-hardware-profile/src/probe/owner_job.rs",
"crates/skippy-hardware-profile/src/probe/tests.rs"
]
}
]
31 changes: 31 additions & 0 deletions .github/scripts/fork-admission.test.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -159,3 +159,34 @@ test('approved fork Cargo cache keys and restores stay outside main and branch n
]) assert.equal(prefix({ event_name }), expected, `${event_name}: ${line}`);
}
});


test('test support and display reports admit offline fork CI without native work', async () => {
for (const filename of ['crates/skippy-runtime/src/test_support/libraries.rs',
'scripts/lib/inference_labels.py', 'scripts/lib/inference_health.py']) {
const outputs = await admission({ files: [{ filename }] });
assert.equal(outputs.ci, 'true');
assert.equal(outputs.inference, 'false');
const selected = JSON.parse(outputs.routes);
assert.equal(selected.packages, false);
assert.equal(selected.inference, false);
assert.equal(selected.code, filename.startsWith('crates/'));
}
const outputs = await admission({ files: [{ filename: 'ci/inference.just' }] });
assert.equal(outputs.inference, 'true');
assert.equal(JSON.parse(outputs.routes).packages, false);
});

test('fork aggregate does not wait for excluded inference jobs but still requires offline CI', async () => {
const checked = { ...run, event: 'workflow_run' };
const successful = ['admission', 'ci / CI'].map((name, index) =>
({ name, id: index + 1, status: 'completed', conclusion: 'success', run_attempt: 1 }));
const files = [{ filename: 'crates/skippy-runtime/src/test_support/libraries.rs' }];
const github = { rest: { actions: { listJobsForWorkflowRun: 'jobs' } },
paginate: async () => successful };
await forkRuns.requireForkJobs(github, { owner: 'Mesh-LLM', repo: 'skippy' }, checked, files);
await assert.rejects(forkRuns.requireForkJobs({ ...github, paginate: async () => successful.slice(0, 1) },
{ owner: 'Mesh-LLM', repo: 'skippy' }, checked, files), /ci \/ CI: missing or incomplete/);
await assert.rejects(forkRuns.requireForkJobs(github, { owner: 'Mesh-LLM', repo: 'skippy' }, checked,
[{ filename: 'ci/inference.just' }]), /Inference qualification: plan: missing or incomplete/);
});
78 changes: 76 additions & 2 deletions .github/scripts/path-routing.test.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ test('reports and workflow controllers need only offline automation', () => {
for (const file of [
'scripts/inference-render-report.py', 'scripts/lib/inference_markdown.py',
'scripts/lib/inference_charts.py', 'scripts/lib/inference_png.py',
'scripts/lib/inference_labels.py', 'scripts/lib/inference_mermaid.py',
'scripts/lib/inference_health.py', 'scripts/lib/inference_health_charts.py',
'scripts/lib/inference_health_markdown.py',
'scripts/inference-report.sh', 'scripts/lib/inference-report-baseline.sh',
'scripts/tests/inference_nightly.py', '.github/scripts/pr-checks.cjs',
'.github/workflows/ci.yml', '.github/workflows/inference.yml',
Expand All @@ -48,7 +51,7 @@ test('qualification inputs do not rebuild the runtime packages', () => {
'scripts/inference-plan.py', 'scripts/inference-execute.py', 'scripts/inference-dispatch.py',
'scripts/inference-publish-nightly.py', 'scripts/lib/inference_baselines.py',
'scripts/lib/inference_checks.py', 'scripts/lib/inference_inputs.py',
'scripts/lib/jy_qualification.py', '.gi/templates.yaml', 'ci/inference-ladder.json',
'scripts/lib/jy_qualification.py', '.gi/templates.yaml', 'ci/inference.just', 'ci/inference-ladder.json',
'ci/inference-artifacts.json', 'ci/inference-quality.json',
]) {
assert.deepEqual(route([file]), { automation: true, code: false, packages: false, inference: true }, file);
Expand All @@ -71,7 +74,8 @@ test('runtime and packaging changes still select hardware, including mixed PRs',
assert.equal(selected.packages, true, file);
assert.deepEqual(route(['scripts/inference-render-report.py', file]), selected, file);
}
for (const file of ['crates/skippy-cli/tests/smoke.rs', 'crates/skippy-cli/src/helper_tests.rs']) {
for (const file of ['crates/skippy-cli/tests/smoke.rs', 'crates/skippy-cli/src/helper_tests.rs',
'crates/skippy-runtime/src/test_support/libraries.rs']) {
assert.deepEqual(route([file]), { automation: true, code: true, packages: false, inference: false }, file);
}
for (const file of ['README.md', 'crates/skippy-api/README.md', 'docs/design/proposal.md']) {
Expand Down Expand Up @@ -132,3 +136,73 @@ test('CI selects package jobs independently of qualification and preserves full
assert.equal(decide(name, 'push', {}, true), false, name);
}
});


test('audited PRs separate automation recipes and test support from native inputs', () => {
const audited = require('./fixtures/hardware-routing-prs.json');
const pr = number => audited.find(pr => pr.number === number).files;
const recipes = pr(252).map(file => file === 'Justfile' ? 'ci/inference.just' : file);
assert.deepEqual(route(pr(252)), { automation: true, code: true, packages: true, inference: true });
assert.deepEqual(route(recipes), { automation: true, code: false, packages: false, inference: true });
assert.deepEqual(route(pr(241)), { automation: true, code: true, packages: false, inference: false });
// Inline Rust tests and Windows edits inside shared files remain conservative.
for (const number of [240, 248, 192, 193]) {
assert.equal(route(pr(number)).packages, true, `PR #${number}`);
assert.equal(route(pr(number)).inference, true, `PR #${number}`);
}
});

test('protected fork routes and aggregate triggers agree for exclusions, mixed changes and renames', () => {
const files = [
'crates/skippy-runtime/src/test_support/libraries.rs',
'scripts/lib/inference_labels.py', 'scripts/lib/inference_health.py',
'ci/inference.just', 'crates/skippy-runtime/src/session.rs',
];
for (const filename of files) {
assert.deepEqual(expectedWorkflows.routes([{ filename }]), route([filename]), filename);
assert.equal(expectedWorkflows([{ filename }]).has('.github/workflows/inference.yml'),
route([filename]).inference, filename);
const fork = expectedWorkflows([{ filename }], false);
assert.equal(fork.has('.github/workflows/fork-native.yml'), true, filename);
}
const report = 'scripts/lib/inference_labels.py';
const runtime = 'crates/skippy-runtime/src/session.rs';
assert.deepEqual(route([report, runtime]), route([runtime]));
// Moving code into an excluded directory must still validate the removed runtime path.
for (const change of [
{ filename: files[0], previous_filename: runtime },
{ filename: runtime, previous_filename: files[0] },
]) {
assert.equal(expectedWorkflows.routes([change]).packages, true);
assert.equal(expectedWorkflows.routes([change]).inference, true);
assert.equal(expectedWorkflows([change]).has('.github/workflows/inference.yml'), true);
}
});

test('inference implementation changes always require qualification, including mixed PRs', () => {
const inference = [
'crates/skippy-inference-api/src/router.rs',
'crates/skippy-serving/src/split_dflash.rs',
'crates/skippy-scheduler/src/engine.rs',
'crates/skippy-runtime/src/native.rs',
'crates/skippy-ffi/src/static_bindings.rs',
'skippy_api/src/llama/staged.cpp',
'llama_cpp/patches/model_support/series',
'scripts/inference-execute.py',
'scripts/lib/inference_checks.py',
'scripts/lib/inference_admission.py',
'scripts/lib/inference_probe.py',
'scripts/lib/inference_new_execution_helper.py',
'ci/inference.just',
];
for (const filename of inference) {
for (const files of [[filename], [filename, 'scripts/lib/inference_labels.py',
'crates/skippy-runtime/src/test_support/libraries.rs']]) {
const changed = files.map(filename => ({ filename }));
assert.equal(route(files).inference, true, filename);
assert.equal(expectedWorkflows.routes(changed).inference, true, filename);
assert.equal(expectedWorkflows(changed).has('.github/workflows/inference.yml'), true, filename);
assert.equal(expectedWorkflows(changed, false).has('.github/workflows/fork-native.yml'), true, filename);
}
}
});
4 changes: 4 additions & 0 deletions .github/scripts/pr-checks.test.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,10 @@ test('native trigger patterns distinguish metadata, code-only, inference and mix
['crates/skippy-cli/docs/reference.rs', []],
['crates/skippy-cli/tests/smoke.rs', ['ci.yml']],
['crates/skippy-cli/src/helper_tests.rs', ['ci.yml']],
['crates/skippy-runtime/src/test_support/libraries.rs', ['ci.yml']],
['scripts/lib/inference_labels.py', ['ci.yml']],
['scripts/lib/inference_health.py', ['ci.yml']],
['ci/inference.just', ['ci.yml', 'inference.yml']],
['crates/skippy-cli/src/main.rs', ['ci.yml', 'inference.yml']],
['crates/skippy-runtime/src/session.rs', ['ci.yml', 'inference.yml']],
['llama_cpp/upstream.txt', ['ci.yml', 'inference.yml']],
Expand Down
7 changes: 7 additions & 0 deletions .github/workflows/inference.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ on:
- 'scripts/lib/lld.sh'
- 'scripts/lib/macos-deployment-target*'
- '.gi/templates.yaml'
- 'ci/inference.just'
- 'ci/inference-ladder.json'
- 'ci/inference-artifacts.json'
- 'ci/inference-quality.json'
Expand All @@ -47,6 +48,7 @@ on:
- '!**/*_tests.rs'
- '!**/tests_*.rs'
- '!**/test_support.rs'
- '!**/test_support/**'
Comment thread
coderabbitai[bot] marked this conversation as resolved.
Resolved
- '!crates/llama-spec-bench/**'
- '!crates/metrics-server/**'
- '!crates/skippy-gpu-bench/**'
Expand All @@ -57,6 +59,11 @@ on:
- '!scripts/lib/inference_markdown.py'
- '!scripts/lib/inference_charts.py'
- '!scripts/lib/inference_png.py'
- '!scripts/lib/inference_labels.py'
- '!scripts/lib/inference_mermaid.py'
- '!scripts/lib/inference_health.py'
- '!scripts/lib/inference_health_charts.py'
- '!scripts/lib/inference_health_markdown.py'
schedule:
- cron: '0 14 * * *'
workflow_dispatch:
Expand Down
25 changes: 1 addition & 24 deletions Justfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ export MACOSX_DEPLOYMENT_TARGET := if macos_target == "" { trim(read(justfile_di
default: build

import "ci/automation.just"
import "ci/inference.just"

docs-install:
@npm ci --prefix docs-site
Expand Down Expand Up @@ -185,33 +186,9 @@ llama-check: skippy-ffi-bindgen-check
ci-plan:
@bash scripts/ci-plan.sh

[positional-arguments]
inference-plan profile source output="target/ci-evidence/inference-plan.json":
@"{{ automation_python }}" scripts/inference-plan.py plan "$@"

process-supervision-test:
@cargo test --locked -p skippy-subprocess

[positional-arguments]
inference-dispatch profile source output="target/ci-evidence/inference" *configuration:
@"{{ automation_python }}" scripts/inference-dispatch.py dispatch "$@"

[positional-arguments]
inference-execute profile model mode:
@"{{ automation_python }}" scripts/inference-execute.py "$@"

[positional-arguments]
inference-cancel ledger="target/ci-evidence/inference/jobs.json":
@"{{ automation_python }}" scripts/inference-dispatch.py cancel "$@"

inference-build:
@"{{ automation_python }}" scripts/inference-build.py

inference-build-uncached:
@command -v hf uv nvidia-smi
@SCCACHE_BASEDIRS="$PWD" LLAMA_STAGE_BACKEND=cuda LLAMA_STAGE_CUDA_ARCHITECTURES=121 LLAMA_STAGE_LINK_MODE=static just llama-build
@LLAMA_STAGE_BACKEND=cuda LLAMA_STAGE_CUDA_ARCHITECTURES=121 LLAMA_STAGE_LINK_MODE=static cargo build --locked -p skippy-cli -p skippy-correctness

# Linux diagnostic: retain all MiMo2 graph assertions and report peak memory.
native-contract-build: llama-prepare
@LLAMA_STAGE_BACKEND=cpu LLAMA_STAGE_LINK_MODE=static LLAMA_STAGE_BUILD_TESTS=ON scripts/build-llama.sh --build-only
Expand Down
Loading
Loading