fix(core): trust.rs 的 PinnedKey 交回 rustfmt 排版(多行字段)+ 自测锁住多行解析
v0.2.4 推 main 后 CI 的 fmt job 红:cargo fmt --all --check 退出码 1,唯一 diff 在 crates/core/src/update/trust.rs:60 —— PRODUCTION 里那条 PinnedKey 被写成单行。 * trust.rs:由 `cargo fmt --all` 直接生成(不是手写对齐)。git diff 只有这一处; 两个 PINNED-KEYS 标记行的字形与行位置未动;public_key_hex 与 HEAD 逐字比对 identical。 * sign_manifest.py --self-test:补一条多行(rustfmt)形态样例的解析断言。解析器本身无需改 (KID_RE 字段之间是 \s*,本来就跨行),但旧自测只喂单行样例 —— 变异重放(换成单行整行正则) 时旧自测全绿、新断言红,正是这次事故的形状。 验证(真实退出码):cargo fmt --all --check = 0;python packaging/sign_manifest.py --check-pinned-keyring --key <私钥路径> = 0;signing_ready_selftest.py = 0; signing_ready_wiring_selftest.py = 0;sign_manifest.py --self-test = 0; cargo test -p unlucky-core --lib update = 0(114 passed / 0 failed)。
This commit is contained in:
1 parent
38c568d6b7
commit
00965e19d2
2 files changed
+10
-1
No files matched your search
@@ -60,7 +60,10 @@ pub(crate) struct PinnedKey {
|
||||
/// (`packaging/sign_manifest.py --check-pinned-keyring` 按标记解析这一段,标记变了它就找不到表)。
|
||||
pub(crate) const PRODUCTION: &[PinnedKey] = &[
|
||||
// >>> PINNED-KEYS >>>
|
||||
PinnedKey { key_id: "ull-release", public_key_hex: "1c3687ecd656a29fda87a7afb56e07d2b9e223b62cf3a6f1a901fb499a97b122" },
|
||||
PinnedKey {
|
||||
key_id: "ull-release",
|
||||
public_key_hex: "1c3687ecd656a29fda87a7afb56e07d2b9e223b62cf3a6f1a901fb499a97b122",
|
||||
},
|
||||
// <<< PINNED-KEYS <<<
|
||||
];
|
||||
|
||||
|
||||
Reference in new issue
Block a user