From e5228a1734d35a5d6c921bb47344f31af764483e Mon Sep 17 00:00:00 2001 From: root Date: Fri, 17 Apr 2026 13:33:33 +0800 Subject: [PATCH] docs(seo): record full-scene source restore findings --- ...1270-SEONexus-Codex多版本协作交接总文档.md | 129 +++++++++++++++++- 1 file changed, 125 insertions(+), 4 deletions(-) diff --git a/docs/1270-SEONexus-Codex多版本协作交接总文档.md b/docs/1270-SEONexus-Codex多版本协作交接总文档.md index 7c4c8cd..1f7ee0a 100644 --- a/docs/1270-SEONexus-Codex多版本协作交接总文档.md +++ b/docs/1270-SEONexus-Codex多版本协作交接总文档.md @@ -2640,12 +2640,32 @@ php code/scripts/seo_copy_restore_from_source.php \ --source= ``` -这个脚本当前只会处理: +当前版本的这个脚本已经升级为: -1. `detail` -2. `play` +1. 不传 `--scenes` 时,自动识别 source 里实际存在的已知场景并回灌 +2. 传 `--scenes=...` 时,只恢复指定场景 -比较适合最小重建阶段使用。 +目前默认支持: + +1. `home` +2. `category_index` +3. `category_list` +4. `search` +5. `rank_index` +6. `rank_list` +7. `detail` +8. `forge` +9. `play` + +如果只想做最小恢复,仍然可以显式指定: + +```bash +php code/scripts/seo_copy_restore_from_source.php \ + --host= \ + --source= \ + --scenes=detail,play \ + --dry-run +``` ### 七、回灌后的文件审计 @@ -2937,6 +2957,107 @@ php scripts/seo_copy_front_verify.php play 2. 本质上更接近 bootstrap 深页资产链的结果 3. 不是后台那条“固定 6 槽位”通用发布链的自然产物 +### 2.1 2026-04-17 再确认:旧 `restore_from_source` 的缺口已经补上 + +这轮继续排查 `jpjdxs.com` 后,已经进一步确认: + +1. 有些 host 不是“source 没有资产” +2. 而是“source 里有更多场景,但旧恢复脚本只写回了 `detail/play`” + +以本机这次实际找到的 source 为例: + +- `code/storage/domain_bootstrap_bundles/jpjdxs-seed-a1/data/seo_copy/jpjdxs-com` + +里面实际存在: + +1. `home/index.json` +2. `category_index/dian-ying.json` +3. `category_list/dian-ying--shao-shi-dian-ying.json` +4. `search/h-2d9bf00ea1f2e5ee.json` +5. `rank_index/index.json` +6. `rank_list/daily.json` +7. `detail/76342.json` +8. `forge/76342-forge-1.json` +9. `play/76342-play-douban-1.json` + +但旧版 `code/scripts/seo_copy_restore_from_source.php` 只会扫: + +1. `detail` +2. `play` + +所以会出现一种很容易把人带偏的现象: + +1. bundle/source 里明明有榜单、forge、分类、搜索资产 +2. 执行恢复后却只有 `detail/play` 被补进 `published` +3. 前台就会表现成“有些引导文回来了,有些还是像没恢复” + +这轮已经把: + +- `code/scripts/seo_copy_restore_from_source.php` + +升级成“按 source 中实际存在场景自动回灌”的版本,默认支持: + +1. `home` +2. `category_index` +3. `category_list` +4. `search` +5. `rank_index` +6. `rank_list` +7. `detail` +8. `forge` +9. `play` + +并且已在本机对 `jpjdxs-com` 做过 dry-run 与正式写回验证: + +```bash +php code/scripts/seo_copy_restore_from_source.php \ + --host=jpjdxs-com \ + --source=code/storage/domain_bootstrap_bundles/jpjdxs-seed-a1/data/seo_copy \ + --dry-run + +php code/scripts/seo_copy_restore_from_source.php \ + --host=jpjdxs-com \ + --source=code/storage/domain_bootstrap_bundles/jpjdxs-seed-a1/data/seo_copy +``` + +写回后重新审计,已经新增恢复出: + +1. `category_index/dian-ying.json` +2. `category_list/dian-ying--shao-shi-dian-ying.json` +3. `search/h-2d9bf00ea1f2e5ee.json` +4. `rank_index/index.json` +5. `rank_list/daily.json` +6. `forge/76342-forge-1.json` + +同时前台闭环验证已经通过: + +```bash +php code/scripts/seo_copy_front_verify.php jpjdxs.com rank_index --target-root=code/data/seo_copy_published --base-url=https://jpjdxs.com --format=text +php code/scripts/seo_copy_front_verify.php jpjdxs.com rank_list daily --target-root=code/data/seo_copy_published --base-url=https://jpjdxs.com --format=text +php code/scripts/seo_copy_front_verify.php jpjdxs.com forge 76342 1 --target-root=code/data/seo_copy_published --base-url=https://jpjdxs.com --format=text +``` + +结果都已经: + +1. `status: 200` +2. `all_matched: yes` + +这条结论以后非常重要: + +1. 如果 `source` 里有 `rank_index / rank_list / forge / category / search` +2. 但 `published` 里只有 `detail / play` + +优先先查: + +1. 当前机器上的 `seo_copy_restore_from_source.php` 是否已经是“全场景版本” +2. 之前是不是只跑过旧脚本或 `--scenes=detail,play` + +不要再直接误判成: + +1. 这些资产从来没生成过 +2. bundle/source 已经失效 +3. 之前做好的差异化已经全部被删光 + ### 3. 系统并不是“不能导入深页文件”,而是“缺少深页源文件” 已再次核对: