feat(gates): DEC-N1 把 accent 第二条通道钉成判据 B,并抓到一条绕开色值真源的真漂移
裁定:7 个产品线色相**保留**为受控例外(实测 hero 徽章占视口 0.538%、色相仅以 6.3% alpha
底纹存在、1600×846 hero 视口冷色像素普查 = 0),但**不再**让 check:accents 的口径停在「仅类名通道」——
那等于第二条通道无人看守。判据 B 扫三处:真源 hero-themes 的 accentColor/accentBg、
可达营销代码里 style={{…}} 的色彩属性(含 --badge-accent 与内联引用 accent 令牌的更隐蔽形态)、
营销页就地组装 accentColor。豁免按 文件+色值 登记且归一化成 #rrggbb(否则换个 rgba() 写法就绕过);
登记了却命中 0 ⇒ 判红;棘轮 MAX_NON_BRAND_HUES=7,存量恰在上限 ⇒ 第 8 个色相即判红。
战果:落盘即抓到 erp-upgrade-v3/page.tsx 的 deriveTheme() 在营销页里抄了一整份 theme
(含 accentColor '#1e3a5f' 与两段渐变)绕开真源。改走 getHeroTheme(heroThemeId || 'erp') 只覆盖动态字段 badge;
与真源逐字段对拍全等,并用库内实值确认 erp 行 heroThemeId='erp' ⇒ 渲染不变(查过,不是推定)。
自证与改正(原稿从未跑成过):selftest 11 情景 EXIT=0,每情景只喂一维。
修掉两处不自洽 —— 把「另一维的豁免腐化」当串维证据会让自证永远红(腐化只是该维没喂料的必然产物,
违规数才是证据),以及 4 情景棘轮期望与 分母0 情景 stale(写 9、实取 7)按实测改正。
连带新增 scripts/check-package-keys.mjs:按父路径+键名分组查 JSON 重复键,退出码 0/1/2 三档,
--selftest 三条各测一维;活体负对照注入重复 "lint" 键 ⇒ EXIT=1 点名 scripts.lint,还原 ⇒ EXIT=0。
背景见 qa-tracker §12.8:我先前用来去重的那条 node 回读只扫顶层缩进,对目标那一维根本不敏感。
读数:check:accents 0、check:visual 0、tsc 0、jest --testPathPatterns products 48 例 0、selftest 0。
ADR-0008 补决策五并 supersede 决策一的「本批不收」,同时把被证伪的 DEC-N2 默认值 0.15 就地标注更正。
This commit is contained in:
1 parent
0e17327ef0
commit
ffd709ae06
5 files changed
+675
-117
No files matched your search
@@ -8,7 +8,7 @@ import { ProductValueSection } from '@/components/detail/detail-product-value';
|
||||
import { DetailTrustSection } from '@/components/detail/detail-trust-section';
|
||||
import { DetailCTASection } from '@/components/detail/detail-cta-section';
|
||||
import { L3EmptyFallback } from '@/components/detail';
|
||||
import type { HeroTheme } from '@/lib/constants/hero-themes';
|
||||
import { getHeroTheme, type HeroTheme } from '@/lib/constants/hero-themes';
|
||||
import type { Product, CaseStudy, DataProof, Certification } from '@/lib/constants/products';
|
||||
|
||||
export const metadata: Metadata = {
|
||||
@@ -17,20 +17,12 @@ export const metadata: Metadata = {
|
||||
};
|
||||
|
||||
function deriveTheme(productData: Record<string, unknown>): HeroTheme {
|
||||
const heroThemeId = productData.heroThemeId as string;
|
||||
// Build a theme from product data fields, with sensible defaults
|
||||
return {
|
||||
id: heroThemeId || 'default',
|
||||
name: 'ERP主题',
|
||||
gradientFrom: '#f8f6f3',
|
||||
gradientTo: '#f0ebe4',
|
||||
gradientAngle: 135,
|
||||
accentColor: '#1e3a5f',
|
||||
accentBg: 'rgba(30, 58, 95, 0.06)',
|
||||
texture: { type: 'grid' as const, opacity: 0.03 },
|
||||
layout: 'left' as const,
|
||||
badge: productData.category as string,
|
||||
};
|
||||
// 色值与渐变一律取自真源 src/lib/constants/hero-themes.ts。
|
||||
// 这一版原先在营销页里就地抄了一整份 theme(含 erp 的 accentColor '#1e3a5f' 与两段渐变),
|
||||
// 被 check:accents 判据 B 的「绕过色值真源」当场抓红 —— 抄本会随真源漂移而静默过期,
|
||||
// 而且它在营销面制造了一个未登记的硬编码色相。本页只补动态字段 badge。
|
||||
const base = getHeroTheme((productData.heroThemeId as string) || 'erp');
|
||||
return { ...base, badge: productData.category as string };
|
||||
}
|
||||
|
||||
export default async function ERPUpgradeV3Page() {
|
||||
|
||||
Reference in new issue
Block a user