浅念
|
7194d1bcef
|
feat(preview): 路由驱动的本地预览服务器
Plan 4 Task 7(V2 spec §12.2):apps/preview-server 零依赖 node:http 服务——
只读 succeeded job 的 dist + route-manifest(不查库),exact/ignore 双索引匹配
(query_key 行全串优先),html/asset 文件服务(manifest content_type 优先、
扩展名 MIME 表兜底、未知扩展 octet-stream)、redirect 301+Location、gone 410、
未命中 404 走 dist/404.html 自定义页;全响应 X-Robots-Tag noindex + HTML 响应
基础 CSP;回环绑定白名单(库级即拒);穿越预检先于 URL 解析(裸/编码点段、
反斜杠)+ target_file resolve+realpath 双检在 dist 内;目录请求一律 404(禁
列表);仅 GET/HEAD。sf.ts 增 preview:start(job 定位 + succeeded 校验 + 产物
行读取后即断池;--host 外值拒绝先于 DB 访问)。集成测试 12 例:真实构建产物
全链 + 手构 gone/MIME 探针行 + CLI 拒绝与子进程 happy path 冒烟。
Co-Authored-By: Claude Code <noreply@anthropic.com>
|
2026-10-22 13:29:30 +08:00 |
|
浅念
|
eb81a57ebc
|
fix(theme): payload 契约上提 contracts;空路由明错;ui.routeHrefFor;eslint astro ignore
审查修复(Plan 4 Task 3 review):
- 载荷类型单一事实来源:ContentEntry/TaxonomyEntry/TaxonomyTerm/RouteEntry/
AssetEntry/RenderManifestMeta/SiteConfigPayload/BrandConfigPayload 上提
@sf/contracts/render-snapshot(纯新增、不动既有导出——冻结面加法无需升版);
物化端(apps/api build/render-snapshot.ts)与主题 load-render-data 同源引用,
双份手写镜像漂移即编译期破裂;主题侧 re-export 保持既有 import 面
- loader 空路由表前置明错(正常发布站点至少含首页路由——静默渲染会产零页站点)
- ui.routeHrefFor:targetContentId → 纯路径 html 落点(redirect/查询行不参与,
无落点 undefined 不虚构——Task 4 分派器入口)+ 测试
- 具夹 assets.json copyPath 去机器相关绝对路径(改仓库相对)
- eslint ignores 增 **/.astro/**(astro build 再生目录)
354 根测试 + 18 主题测试全绿;五段 typecheck;lint(.astro 存在态验证后清理)。
Co-Authored-By: Claude Code <noreply@anthropic.com>
|
2026-10-22 08:58:33 +08:00 |
|
浅念
|
21ef37232d
|
test(evidence): 阶段2真实WXR冒烟通过
真实 hesupipe WXR(5,490,399B,SHA-256 与 Plan 1 基线一致)跑 wxr:probe 全链:
计数 18 项对照全过(rows 1047 / terms 451 / unsupported 75 细分一致 / failed 0 /
item 总数 1122);heapUsed max 62.2MiB < 100MiB(setInterval(100ms) 双 max 口径,
全程 167ms 仅 2 样本如实注明);parseMs 含流 IO 等待口径注明。
nicename 锚点核对:在表 taxonomy 706/706 全命中(nicename≡slug,违例 0);
category/post_tag 共 807 引用因 wp:term 表缺该 taxonomy 不可解析——阶段 3 需按
(domain, nicename) 自建缺失 term,不能假设 term 表完备。
eslint.config.js:scripts/*.mjs 显式 node 全局(no-undef 误报)。
Co-Authored-By: Claude Code <noreply@anthropic.com>
|
2026-10-21 13:25:09 +08:00 |
|
浅念
|
c128ebf5a0
|
docs(plan): Task 14 勾选——Plan 1 全部任务完成;修注释笔误
Co-Authored-By: Claude Code <noreply@anthropic.com>
|
2026-10-20 20:59:58 +08:00 |
|
浅念
|
3c32becba6
|
chore: 收尾清账——type:module/gitattributes/engines/lint/CI/根typecheck覆盖
Co-Authored-By: Claude Code <noreply@anthropic.com>
|
2026-10-20 20:56:26 +08:00 |
|