From fa858d0577b30c05ce5727ab9558a4bd32da7427 Mon Sep 17 00:00:00 2001 From: user Date: Fri, 28 Aug 2026 02:39:41 +0800 Subject: [PATCH 1/2] fix(ci): pass --format-version 1 to cargo metadata validation steps Newer cargo releases print a warning on every invocation that omits an explicit metadata format version, which pollutes the three "Verify ... metadata" steps in the upstream CI logs (Verify committed Cargo metadata, Verify committed release metadata, Verify projected release metadata). Pass --format-version 1 explicitly to all three `cargo metadata --locked --no-deps` invocations so the output stays clean and the invocation keeps its current machine-readable contract. Adopted-from: upstream-consistent repair (the taiji workspace shows the same unpatched invocations, so there is no local fix commit to adopt). Test: python yaml.safe_load parses .github/workflows/ci.yml with all eight jobs intact; the three run lines match `cargo metadata --locked --no-deps --format-version 1`. AI: implemented with AI assistance, lightly tested (yaml syntax check only; no compile surface). --- .github/workflows/ci.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c9d51a229e..0142da09f7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -260,7 +260,7 @@ jobs: # Validate the committed manifests and lockfile before any release # projection is allowed to rewrite workspace package entries. - name: Verify committed Cargo metadata - run: cargo metadata --locked --no-deps + run: cargo metadata --locked --no-deps --format-version 1 # rust-cache prunes the workspace target directory before saving it, so # native libraries stored under target need an independent cache lifecycle. @@ -504,7 +504,7 @@ jobs: - name: Verify committed release metadata if: needs.build-impact.outputs.frontend_required != 'false' - run: cargo metadata --locked --no-deps + run: cargo metadata --locked --no-deps --format-version 1 - name: Verify Installer i18n projection if: needs.build-impact.outputs.frontend_required != 'false' @@ -597,4 +597,4 @@ jobs: - name: Verify projected release metadata if: needs.build-impact.outputs.frontend_required != 'false' - run: cargo metadata --locked --no-deps + run: cargo metadata --locked --no-deps --format-version 1 From 793e97b87ca386b0fcedb53300737b437d86bfd8 Mon Sep 17 00:00:00 2001 From: 1688mengdie <1688mengdie@users.noreply.github.com> Date: Fri, 28 Aug 2026 05:04:45 +0800 Subject: [PATCH 2/2] test(ci): align github-config contract assertions with --format-version 1 The workflow change in fa858d057 updated the three cargo metadata validation steps to pass --format-version 1, but the strictEqual assertions in check-github-config.test.mjs (rust-build-check 'Verify committed Cargo metadata' + frontend-build committed/projected release metadata) still expected the old command, so CI Frontend Build 'Validate GitHub config' failed (node --test: 2 failing subtests at lines 206/361). --- scripts/check-github-config.test.mjs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/check-github-config.test.mjs b/scripts/check-github-config.test.mjs index b2d9bddae6..826f5a2c81 100644 --- a/scripts/check-github-config.test.mjs +++ b/scripts/check-github-config.test.mjs @@ -323,7 +323,7 @@ test('keeps Rust CI independent, restore-only on PRs, and target-focused', () => const verifyMetadata = rustJob.steps.find( (step) => step.name === 'Verify committed Cargo metadata', ); - assert.equal(verifyMetadata?.run, 'cargo metadata --locked --no-deps'); + assert.equal(verifyMetadata?.run, 'cargo metadata --locked --no-deps --format-version 1'); assert.ok( rustJob.steps.indexOf(verifyMetadata) < rustJob.steps.indexOf(checkCompilation), 'CI must validate the committed Cargo.lock before the workspace check', @@ -407,7 +407,7 @@ test('gates fast checks and PR packaging behind one fail-closed build decision', `${stepName} must run for code changes and skip documentation-only changes`, ); } - const releaseMetadata = 'cargo metadata --locked --no-deps'; + const releaseMetadata = 'cargo metadata --locked --no-deps --format-version 1'; assert.equal( frontendJob.steps.find((step) => step.name === 'Verify committed release metadata')?.run, releaseMetadata,