Skip to content

feat(profile): 头部 13 张图表改为双簇页签布局——锚点条 + details 页签; - #8

Merged
ThreeFish-AI merged 10 commits into
masterfrom
ThreeFish-AI/fwez1
Oct 1, 2026
Merged

ThreeFish-AI merged 10 commits into
masterfrom
ThreeFish-AI/fwez1

Conversation

@ThreeFish-AI

@ThreeFish-AI ThreeFish-AI commented Oct 1, 2026 •

Copy link
Copy Markdown
Owner

变更内容(两部分:页签布局 + 刷新管线梳理清减)

一、主页头部 13 图表页签化

13 张图表由竖直堆叠(约 13 模块高)改为双簇页签切换布局:沿用 9+4 分组,每簇居中锚点栏 + <details> 页签,growth/latency 默认展开,图表连同说明原子移入页签,高度约缩 3.7×。锚点栏链接用 #user-content-<id> 前缀命中 GitHub 渲染锚点(实机验证后修正)。

二、scripts/build_profile_svgs.py 梳理清减(六阶段流水线)

  • 特征化护栏先行(L4 → 有护栏):新建 tests/(464 行 Python + 454 行金样,31 用例 0.3s):契约函数锁定、双 README 真实 Golden Master、13/13 渲染器合成输入字节级金样、9 类 SVG 闸门变异拒绝、CLI 快照;AST 按名加载器绕开模块级网络执行
  • 结构重塑:模块级线性执行(import 即跑网络)收敛为 refresh()(采集+派生+渲染,窄接口)+ main() + __main__ 守卫;闭包依赖三函数随之内聚;保持单文件零依赖(README 承诺)
  • 死代码剪除(git 考古证伪):恒真星拆分守卫、ZERO_Y 常量断言 ×2、ext_owners 死全局、emit 僵尸参数
  • 语义重铸 12 处:lang_of_commit→commit_dates、_join→oxford_join、sub1pct→types_under_one_pct 等(AST 作用域感知,不触字符串)
  • 去重收敛 SSOT:HOUR_ORDER 常量(6→1)、parse_iso/parse_iso_local(15 处格式串→2)、连击算法双实现统一、sweep_x_motion 提取(4 处内联 CSS)
  • 真围栏保留(考古确认):幂等不动点守卫簇(v4 生产事故遗产)、FONT_SLACK 实测值、单 @Keyframes 规则、releases 无分页(roster 守卫兜底)

验证

  • 31/31 测试全绿;--lint 输出与基线逐字节一致;PR CI lint 绿
  • 实时全链路 --check 三次对比:结构重塑后、去重后均与基线脚本输出逐字节一致(含同点 fail-closed 单调性 ABORT)
  • 独立 Verifier 四维盲审全绿(测试零弱化、CLI/加载器/文档锚点/workflow 契约零断裂、卫生零缺陷、度量对账一致)
  • 顺带发现的真实运维事实:当日实时 2026 计数 9,246 < README 的 9,313,月度 cron 将按设计拒绝写入(数据回缩原因待查,与本次重构无关)

🤖 Generated with Claude Code

ThreeFish-AI and others added 10 commits October 1, 2026 13:46
- 9+4 双簇:每簇一行居中锚点栏 + 13 个 details 页签,growth/latency 默认展开,图表连同说明行原子移入页签
- FIG/DATA 标记序列零变更(lint 计数与改前一致:75 DATA + 13 FIG),中英 README 逐行镜像,锚点 id 两版共用
- 离线 substitute() 模拟通过:包裹层逐字节存活、替换幂等、标记流稳定、cur_year 仍为单行
- 页面高度由约 13 个模块收敛至页签条 + 双展开页签(约 3.7 倍缩减)

🤖 Generated with [Claude Code](https://github.com/claude), [CodeX](https://openai.com), [Gemini](https://github.com/apps/gemini-code-assist)
Co-Authored-By: Aurelius Huang<threefish.ai@gmail.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
- GitHub 将 summary 内 <a name> 重写为 name="user-content-<id>",裸 #<id> 无法命中;
- 跟随 GitHub 脚注机制的官方约定,13 个栏链接 href 统一加前缀,实机验证可滚动定位

🤖 Generated with [Claude Code](https://github.com/claude), [CodeX](https://openai.com), [Gemini](https://github.com/apps/gemini-code-assist)
Co-Authored-By: Aurelius Huang<threefish.ai@gmail.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
- tests/_bps.py:AST 按名提取加载器,绕开模块级网络执行暴露纯函数接缝,行号无关抗重构
- test_contract.py:scan_markers/audit_parity/audit_assets/substitute 契约锁定 + 双 README 真实 Golden Master(75 DATA + 13 FIG、幂等、标记流稳定、标记外逐字节不变)
- test_svg_gates.py:13 张真实资产过闸 + 9 类变异逐门拒绝 + 3 个渲染器合成输入字节级 Golden Master
- test_cli.py:--lint 退出码与输出格式、未知参数 ABORT 快照
- tests/golden/:渲染 Golden Master(生成时已验确定性与过闸)

🤖 Generated with [Claude Code](https://github.com/claude), [CodeX](https://openai.com), [Gemini](https://github.com/apps/gemini-code-assist)
Co-Authored-By: Aurelius Huang<threefish.ai@gmail.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
- 全部 13 个渲染器以合成输入字节级锁定(生成器从测试 _cases() 直接生成,杜绝夹具双源漂移)
- 参数化 subTest 覆盖 + 金样文件恰好十三份的闭包断言
- 每份金样生成时验证确定性与过闸

🤖 Generated with [Claude Code](https://github.com/claude), [CodeX](https://openai.com), [Gemini](https://github.com/apps/gemini-code-assist)
Co-Authored-By: Aurelius Huang<threefish.ai@gmail.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
- 模块级线性执行(import 即跑网络)收敛为 refresh()(采集+派生+渲染,窄接口 6 键返回)+ main()(argv/lint/守卫/写盘),文件区段顺序即控制流的 L4 根因消除
- 闭包依赖三函数(ecdf_points/windowed_run/cadence_alt)随数据闭包内聚移入 refresh()
- 单文件零依赖设计保持(README 承诺),不拆包;测试加载器零改动
- 等价性证明:31/31 特征化测试 + --lint 逐字一致 + 实时全链路 --check 新旧代码输出字节级相同(含同点 fail-closed ABORT)

🤖 Generated with [Claude Code](https://github.com/claude), [CodeX](https://openai.com), [Gemini](https://github.com/apps/gemini-code-assist)
Co-Authored-By: Aurelius Huang<threefish.ai@gmail.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
- 星拆分守卫(v3 出生即恒真,真守卫是 acc_stars None-die,git 考古 01380a0)
- ZERO_Y 常量断言 ×2(常量表达式永不可触发,不变量由注释承载;且 assert 与全文件 die() 风格不一致并在 -O 下消失)
- ext_owners 死全局(计算后零读取,四维雷达确认)
- emit() 僵尸参数 cls(函数体不读,调用方自行推导)

🤖 Generated with [Claude Code](https://github.com/claude), [CodeX](https://openai.com), [Gemini](https://github.com/apps/gemini-code-assist)
Co-Authored-By: Aurelius Huang<threefish.ai@gmail.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
- lang_of_commit→commit_dates(名为语言实为提交日期);ta/ts/na/ns→total_*/share_*(ts 与 CSS 类名碰撞)
- surplus_alt 的 wp/ep→wd_peak_h/we_peak_h(对齐既有 fact 键);render_ground 参数 rel→rel_counts(他处 rel 指 release 对象)
- anon_contribution_counts 的 html→page(遮蔽 import html);punchcard 的 pc,pr→mo,ring(pc_ 前缀他处指 punchcard facts)
- sub1pct/sub1_txt→types_under_one_pct/under_one_pct_note;_join→oxford_join;render_growth docstring 悬空引用 figure_alt→*_alt/ALTS
- AST 作用域感知重命名(只改标识符不触字符串字面量),13/13 金样字节级守护

🤖 Generated with [Claude Code](https://github.com/claude), [CodeX](https://openai.com), [Gemini](https://github.com/apps/gemini-code-assist)
Co-Authored-By: Aurelius Huang<threefish.ai@gmail.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
- 小时轴序 6 处重复推导 → HOUR_ORDER 模块常量(加载器白名单机制同步)
- GitHub 时间戳格式串 15 处散布 → parse_iso/parse_iso_local 双助手
- 最长连击双实现(全时段手写循环 vs windowed_run)→ 统一为 windowed_run 全域调用(空窗由 IndexError 变为干净 die)
- translateX 扫掠 CSS 4 处内联 → sweep_x_motion(sweep_y_motion 的孪生,逐图调参显式保留)
- 13/13 金样字节级守护 + 实时全链路 --check 与基线逐字节一致

🤖 Generated with [Claude Code](https://github.com/claude), [CodeX](https://openai.com), [Gemini](https://github.com/apps/gemini-code-assist)
Co-Authored-By: Aurelius Huang<threefish.ai@gmail.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@ThreeFish-AI
ThreeFish-AI merged commit 9e3068b into master Oct 1, 2026
2 checks passed
@ThreeFish-AI
ThreeFish-AI deleted the ThreeFish-AI/fwez1 branch October 1, 2026 09:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant