Repository navigation
ci: en setup-action, en lista över cargo-grindar, strukturella CI-tester (#358) - #435
Merged
Merged
Conversation
…358) - .github/actions/setup: the toolchain preamble (Python, Rust, MSRV toolchain, Node, rust-cache, model cache, npm ci) that six lanes repeated. - scripts/ci/cargo-gates.mjs: the one list of cargo gates, run by every lane with --os (and --profile msrv); per-OS exclusions carry their reason in the list. Workspace clippy and test replace the bare app/CLI invocations, and the cargo check steps clippy --all-targets already covers are gone. - scripts/ci/smoke-cli.mjs: one cross-platform smoke script replaces the four inline bash and PowerShell blocks; Windows now verifies the JSON, JSONL and error streams like macOS. - scripts/ci/assert-lanes.mjs: the check-* aggregators run one tested script. - windows-package.yml: x64 no longer repeats the workspace tests and clippy on pull requests (test-windows owns them); ARM64, releases and manual runs keep them. - The ci tests read the workflows as parsed YAML (scripts/lib/ci-workflow.mjs) instead of matching text; the parity test expands the gate list and the setup action. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
pwsh reports only the last native command's exit code, so a failing npm run test:frontend ahead of a passing npm run format:check went green in test-windows. The step now runs under bash, a structural test requires it for every multi-command step of a Windows lane, and the smoke test compares recorded commands in one path spelling. windows-package.yml keeps the old step for every path but the x64 pull request, so release behaviour is unchanged. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
rust-cache saves only when its key is new, and the key follows Cargo.lock, so the artifacts of a changed gate list would never reach the cache and every run would recompile them. Appending the hash of scripts/ci/cargo-gates.mjs to the shared key makes a gate change a new key that the first run saves. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
windows-package.yml no longer repeats cargo test --workspace and cargo clippy --workspace on a pull request, for either architecture. In that pwsh step only the last command's exit code counts, so a failing test or lint there never failed the job; test-windows runs the same workspace gates through scripts/ci/cargo-gates.mjs and does. Releases (workflow_call from prebuild-release.yml) and manual runs keep the step unchanged. A pull request builds the lean debug CLI in a step of its own, which the CPU policy checks read. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The CI structure tests parse the workflows with yaml, which was only vite's optional peer. yaml 2.9.1 is the version the lockfile already resolved, so the lockfile change is the root devDependencies entry and the dropped optional/peer flags of the existing node_modules/yaml entry; nothing new is downloaded. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…before npm ci (#358) - setup action: the native-build input replaces models. The native build lanes cache their models and keep the gate list out of their Rust cache key, so a gate change no longer evicts the caches of lanes that never run gates; the other lanes still carry the hash. A structural test checks both directions against the lanes that invoke the gate script. - scripts/lib/import-graph.mjs: the relative-import walker, shared by the test-group package check and by the check that the pre-npm-ci Windows identity tests reach no npm package even through a repository module. - ci.yml header: the check-* jobs run assert-lanes.mjs from the PR checkout, at the trust level of ci.yml itself. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Declaring yaml as a devDependency made it a non-optional lockfile package, so the notice generator now includes its ISC license. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Magnus-Gille
marked this pull request as ready for review
October 16, 2026 06:58
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
ci.ymlgår från 976 till 348 rader. Varje grind finns på ett ställe och körs likadant på alla tre operativsystemen. CI-testerna läser YAML-strukturen i stället för att matcha text med regex.Struktur
.github/actions/setupär en composite action för förberedelsen: Python, Rust-toolchain (eller MSRV), Node, rust-cache, apt-bibliotek, modellcache ochnpm ci. Checkout ligger kvar i varje jobb.scripts/ci/cargo-gates.mjsär den enda listan över cargo-grindar.--os, och msrv-linux med--profile msrv.os:-poster med ettwhy, och ett test kräver motiveringen.scripts/ci/smoke-cli.mjsär ett plattformsoberoende smoke-skript med nivåernabasicochmodel. Det ersätter fyra inline-block i bash och PowerShell.scripts/ci/assert-lanes.mjsutgör kroppen icheck-*-jobben.if: always()och fårNEEDS: toJSON(needs).successfäller jobbet: misslyckat, avbrutet, överhoppat på en full körning, okäntdocs_onlyeller felaktig indata.scopeligger kvar inline, eftersom det jobbet checkar ut PR:ens bas, som saknar de nya skripten.ci.ymlinnehåller nu bara kopplingen mellan jobben.dependabot.ymltäcker också action-katalogen.check-macosochcheck-windowsheter samma sak och aggregerar samma spår.Samma grindar på alla OS. Jämförelsen kommer från jobbloggarna: main 65b5247 mot PR:ens körning.
clippy --workspace --all-targets,test --workspace,clippy -p core,test -p core,clippy -p cli --no-default-features,test -p cli --no-default-featuresclippyochtestdiarizationochrecord, ORT, lean-bygget, ALSA-trädet och release-vaktencargo check --lockedBorttaget för att det täcks av något annat:
cargo check, eftersomclippy --all-targetstäcker samma mål;cargo test,-p clioch-p engine-protocol, eftersom workspace-grindarna täcker dem;npm run test:frontendredan kör.diarization-testerna körs fortfarande på macOS och Windows inomcargo test --workspace(159 tester). Funktionen har ingen OS-specifik kod.Windows-testerna ägs av
test-windows.test-windowsär den obligatoriska kontrollen och enda ägaren på PR:er.pull_requesthopparwindows-package.ymlnu övercargo test --workspaceochcargo clippy --workspaceför båda arkitekturerna. Release (workflow_call) och manuell körning är oförändrade.cargo testoch clippy på PR:er. Det var bara logg, aldrig en grind. ARM64 bygger fortfarande lean-CLI:t, appens testbinär och release-CLI:t på varje PR, och det finns ingen Windows-kod som är specifik för aarch64.Strukturella CI-tester
scripts/lib/ci-workflow.mjsläser workflow-filerna medyaml, som nu är en deklarerad devDependency. Den låg redan i lockfilen som vites valfria peer, och licensen är ISC.assert.match(ciYaml, …)finns kvar. Tio testfiler är omskrivna, och två är nya:test-ci-cargo-gatesochtest-ci-smoke-cli, med en körning mot en fejkad binär.check-*harneeds:på varje spår och fäller allt som inte lyckats;shell: bash;test-verify-ci-parity.mjsexpanderar nu grindlistan och setup-actionen till kommandon, så paritet mellanverify.mjsoch CI bevisas fortfarande.Why
#358:
ci.ymlupprepade förberedelsen i fem jobb, åtta cargo-steg mellan macOS och Windows, och fyra smoke-block. Kopiorna hade redan glidit isär: Windows saknade diariseringsmatrisen och JSON-strömkontrollen. Regex-testerna låste kopiorna i stället för att skydda strukturen.windows-package.ymlkörde dessutomcargo test --workspaceen gång till på varje PR, utan att den körningen kunde fälla något.Testing
npm run verify -- --keep-goinggav 29 pass och 2 skip (Swift och engine-host-conformance körs bara på macOS).npm run licenses:check: aktuell. CI-gruppen: 245 tester.needs;--os;continue-on-errorellerif:på en grind;if: always()borttaget;check-windowsomdöpt;windows-package-villkoret borttaget eller inverterat.c08f53b.53bee3cföll Windows-paketets licenskontroll, eftersom den nya devDependency:nyamlsaknades iTHIRD_PARTY_NOTICES.md.bd832e0. Kontrollen ingår inte iverifylokalt.Runner-minuter. Måttet är summan av jobbens väggklocktid. Faktureringsdata finns inte, eftersom repot är publikt.
c08f53btog 105,7 min (CI 45,8 + paket 59,9).Paketdelen var kall, eftersom ändrat
windows-package.ymlgav ny cachenyckel. ARM64 gick från 21,9 till 28,7 min av det skälet, medan x64 gick från 39,9 till 31,1.Per jobb, från gammal head
f2cbc92till nyc08f53b:windows-package.ymlger ny cachenyckel, så första körningen påmainefter mergen blir kall, ungefär 30 min extra en gång.cargo testoch clippy i paketbygget.mainoch rapporterar i Avdupliceraci.ymloch ersätt regex-testerna på YAML #358.Review
Oberoende review av Claude Fable 5.1. Författare: Claude Sonnet 5.5.
contents: readoch inga nya hemligheter;yamlär nu deklarerad som devDependency;npm ci;ci.yml.Avvikelser och uppföljning
windows-package.ymlhar kvar tre PowerShell-steg med flera kommandon som kan dölja fel:cargo testoch clippy på releasevägen;release:check+licenses:check;npm run build+npm run check.Att rätta dem ändrar hur releasebyggen grindas och görs därför separat, efter ägarens beslut.
release:checkgrindas redan under bash irelease-quality-gate.ymlochrelease-build-macos.yml.check-linuxär inte en obligatorisk kontroll i rulesetet. Den är oförändrad här.actionlintfanns inte på värden. Workflow-filerna validerades genom att parsas och genom PR:ens riktiga körningar.Closes #358
🤖 Generated with Claude Code