7.1 KiB
PROGRESS · 上游同步验收修复单(2026-09-04)
任务书:TASK-upstream-sync-fix-20260903.md
工作树:/Users/jesse/Downloads/Copse/astrology/.worktrees/upstream-sync-fix-20260903
分支:codex/upstream-sync-fix-20260903
实际开工基线:origin/staging @ 779717f48c7ce08f9c731663f2203dae19c250c3
原任务书验收基线:origin/staging @ c1e3f32a
当前状态:本地修复与验证完成,改动仍在独立工作树且未提交。本记录未声明提交、推送或部署完成。
1. 非原生主题恢复 degraded
scripts/jyotish_api_server.py 重建 ai_prompt_pack 时,先合并既有 evidence_snapshot,再刷新本次请求的 birth / ayanamsa / core 等字段。这样不会丢掉上游已装配的 strict_workflow_contracts,报告适配器仍可识别 upstream_contract_available=true。
预期合同:
general/timing/family/education/migration/annual:degraded;- 上述主题的 adapter:
upstream_contract_available=true; career/marriage/wealth/health:继续为supported。
真实 HTTP 十主题 smoke 全部返回 HTTP 200:career / marriage / wealth / health 为 supported;education / migration / family / annual / timing / general 为 degraded,且六个非原生主题的 upstream_contract_available=true。耗时 70.82s,脱敏结果保存于 /tmp/upstream-sync-fix-http-smoke.json;本地 API 已停止。
2. finance 严格证据口径
Yogi / Avayogi 断言取舍
| 原值 | 新值 | 原因 |
|---|---|---|
Yogi 点公式为 Sun + Moon |
Sun + Moon + 93°20′;formula_profile=pyjhora_yogi_sphuta_v1 |
接受任务书决策:旧公式漏掉 Pushya 起点常量,改为 PyJHora Yogi Sphuta 标准式。 |
| Avayogi 由旧 Yogi 点派生 | Yogi + 186°40′ |
与新的标准 Yogi Sphuta 点配套计算。 |
示例 Yogi 点 20° / Bharani / 1宫 |
113.3333° / Ashlesha / 4宫;Avayogi 点锁定 300° |
同一虚构夹具按标准公式重算后的确定性结果,不保留旧错误期望。 |
Yogi=Venus、duplicate_yogi=Mars、Avayogi=Saturn |
Yogi=Mercury、duplicate_yogi=Moon、Avayogi=Mars |
点位重算后对应星曜随之变化。 |
level=strong,存在 lagna_yogi_tight_orb、yogi_planet_is_2l 和三条 strong signals |
level=weak,距离 93.3333°,tight-orb / wealth-lord links / signals 为空 |
新点位不再满足旧强钩子条件,弱 Yogi 不得抬高财富主判据或写入 yogi_active。 |
primary_source=dhana_yogi_hooks、source diversity 2、支持源 dhana+yogi |
primary_source=dhana_yogas、source diversity 1、支持源仅 dhana |
Yogi 仅作 modifier;该夹具的新 Yogi 为 weak,不能计作独立财富支持源。 |
D11 与 confidence cap
d11_rudramsa保留在 finance 证据包中,但定位为支持项,不是严格证据的必需项,也不是主判据。wealth_promise_strength继续作为财富承诺的主判据。confidence_cap回归根因:finance 的missing_evidence过滤表未把新增的d11_rudramsa列入非阻断证据。结果是没有 D11 时,即使 Shadbala 分量完整,也会被误判为缺必需证据并把 cap 从medium-high压到low。- 修复:把
d11_rudramsa纳入非阻断集合;不改完整 Shadbala 用例原有的medium-high断言。 - MCP 公开边界继续使用
finance:统一路由器内部 canonicalwealth会映射回公开名称;当annual/timing时间词先命中、但问题同时有明确财富关键词时,在 MCP strict 边界以wealth重新解析,避免漏装 finance 的 VedAstro / external evidence。 - 旧 source-pack 元数据恢复到当前 Next.js 真路径:
frontend_interpretation_layer指向 report interpretation packs,frontend_planet_house_details指向personal-report-generation.ts,覆盖仍为9_planets_x_12_houses。
对应 Bug:BUG-515。
3. 模板注册表引用取舍
没有复制缺失的 references/mevg_chinese_full_layer_and_practice_audit_2026_08_26.md;四个模板保留,改指向仓内已有且语义直接匹配的规范:
| 模板 | 新引用 | 取舍理由 |
|---|---|---|
dual_luminary_timing_context |
references/transit-comprehensive-guide.md |
模板要求 Moon、Lagna/Sun、Dasha 与 transit 的交叉检查,综合行运指南比缺失的通用审计文档更直接。 |
seventh_house_topic_split |
references/house-domain-planet-mapping.md |
模板核心是区分婚恋、合同、公众与对手等七宫主题,宫位—领域映射是本仓直接真源。 |
empty_window_not_success |
references/prediction-boundary-protocol.md |
“没有阻碍不等于成功”属于预测边界与置信度约束,应由边界协议承载。 |
dasha_boundary_not_event_date |
references/mandatory-verification-gate-protocol.md |
换运边界不能直接写成事件日,需要多重 Dasha、transit、命盘承诺及外部验证门共同收敛。 |
其余 source_refs 保留不变。
4. quick CORE 扩列
scripts/run_quality_gate.py 的 CORE_PYTEST_TARGETS 新增:
tests/test_consultation_workflow_domains.pytests/test_mcp_strict_workflow_finance.pytests/test_interpretation_template_registry.pytests/test_vedastro_external_technique_evidence.py
目的:让本次发现的主题合同、finance 严格证据、模板引用与 VedAstro 外部证据回归进入自动 staging 快速门,而不是只在全量测试中暴露。
5. 本地验证实证
聚焦 pytest
以下集合共收集并通过 88 条测试,墙钟耗时 31.71s:
tests/test_consultation_workflow_domains.py:31 条;tests/test_mcp_strict_workflow_finance.py:37 条;tests/test_interpretation_template_registry.py:2 条;tests/test_vedastro_external_technique_evidence.py:10 条;tests/test_api_server_growth_contract.py:3 条;tests/test_consultation_engine_field_bridge.py:5 条。
模板 validator
scripts/validate_interpretation_templates.py 退出 0:valid=true、problem_count=0、template_count=15(约 0.04s)。
quick gate
首次运行因独立 worktree 没有安装前端依赖而在 npm test 报 tsx: command not found;执行 npm ci 后重跑通过。没有运行 npm audit fix,避免把依赖升级混入本修复单;frontend/node_modules/ 受 .gitignore 排除,不是交付文件。
最终结果:
- Python CORE:585 passed、1 skipped、183 warnings;
- 前端测试:2628 passed、0 failed、0 skipped;
- lint:0 errors、74 warnings;
- Next build:通过;
scripts/run_quality_gate.py --profile quick:退出 0,墙钟 575.45s。
完整日志:/tmp/upstream-sync-fix-quick-gate.log。
文件守卫
scripts/jyotish_api_server.py:11200 行,与HEAD同文件行数一致,满足“不增长”红线;git diff --check:通过;frontend/node_modules/:无 Git tracked 文件。
交付边界
- 本工作树改动目前未提交。
- 未 push 到任何远端;
origin/staging未因本工作树前进。 - 未触发 CI、迁移或部署。
- 未检查或声称 staging
/api/health已包含本修复。