fix: 收口模板契约与安全门禁
统一模板包 visual 契约并补齐完成证据;修复 release 版本一致性、管理员 token 撤销、CORS 与默认品牌配置;收敛依赖安全风险并完成全量回归验证。
This commit is contained in:
1 parent
456171aa85
commit
4f0b50c7f1
84 files changed
+7367
-5180
No files matched your search
@@ -123,6 +123,24 @@ test("uninstalled historical snapshots are reported without blocking mapped bran
|
||||
});
|
||||
});
|
||||
|
||||
test("migration audit supports the post-migration single-contract schema", () => {
|
||||
const report = buildTemplateContractMigrationReport({
|
||||
brands: [
|
||||
brandRow({
|
||||
brandVisualTemplateKey: null,
|
||||
installationPackageVersionId: "version-1",
|
||||
snapshotPackageKey: "acheng-campus-food",
|
||||
}),
|
||||
],
|
||||
versions: [packageVersion({ visualTemplateKey: undefined })],
|
||||
});
|
||||
|
||||
assert.equal(report.ready, true);
|
||||
assert.equal(report.brands[0].mappingSource, "installation.configSnapshot.packageKey");
|
||||
assert.equal(report.brands[0].packageKey, "acheng-campus-food");
|
||||
assert.deepEqual(report.brands[0].blockers, []);
|
||||
});
|
||||
|
||||
test("migration audit blocks conflicting explicit package declarations", () => {
|
||||
const report = buildTemplateContractMigrationReport({
|
||||
brands: [brandRow({ installationVisualTemplateKey: "linjing-editorial" })],
|
||||
|
||||
Reference in new issue
Block a user