f224146348
Three-way-merge calculation modules and pl9-export into the product fork while keeping commercial API routes, Raman ayanamsa, and the consultation contract as a keypath superset. Co-authored-by: Cursor <cursoragent@cursor.com>
317 lines
25 KiB
Markdown
317 lines
25 KiB
Markdown
# PROGRESS · 上游同步(任务 0–2,2026-09-03)
|
||
|
||
工作树:`/Users/jesse/Downloads/Copse/astrology/.worktrees/upstream-sync-20260903`
|
||
分支:`codex/upstream-sync-20260903`
|
||
上游只读克隆:`/Users/jesse/Downloads/Copse/astrology/.upstream-readonly/yinduzhanxing`(HTTPS + `gh auth git-credential`;未写入、未提交、未推送)
|
||
任务书:`docs/tasks/TASK-upstream-sync-20260903.md`
|
||
|
||
未碰 `main`。未改 `.gitea/workflows/**`。任务 2 已合完,未提交。
|
||
|
||
## 基线与 rebase
|
||
|
||
| 点 | SHA | 说明 |
|
||
| --- | --- | --- |
|
||
| 开工基线 | `58cae371` | 当时的 `origin/staging`(含并行规则那段任务书) |
|
||
| rebase 后 HEAD | `01a45363` | rebase 到已含整备 0–3 的 `origin/staging` |
|
||
| 任务 0/1/4 提交 | `45d13258` | 快照 + 真相层 + VedAstro REST;任务 2 尚未提交 |
|
||
| 整备合入 | `b6a70aa7`、`2415e751`、`01a45363` | 岁差参考集 / 发布门与产品 URL / 整备进度与状态板 |
|
||
| 上游 pin | `a6f47abd2c9b7c6baa911ea00c971e1ec902380c` | `source_committed_at=2026-09-03T05:33:11Z` |
|
||
| 上游 tree | `650551ddcaddce0dacc76360efca425158ebb8d4` | `source_tree_sha256=790fd5c05ffd6c1a17c6347259143d3c174e0e425246ea2207a8405f7bf6eaed` |
|
||
|
||
rebase 无冲突。任务 2 的 ours 以 rebase 后的工作树为准,没有在 `58cae371` 上预合并。
|
||
|
||
本 worktree **没有** `.venv`(导入器 `validate_clean_target` 会拒 ignored 文件)。Python 用主仓 `/Users/jesse/Downloads/Copse/astrology/yinduzhanxing/.venv/bin/python -B`,`PYTHONDONTWRITEBYTECODE=1`。
|
||
|
||
## 任务状态
|
||
|
||
| 任务 | 状态 | 说明 |
|
||
| --- | --- | --- |
|
||
| 0 快照 / golden / 冲突表 | 完成(`45d13258`) | 导入记录、上游镜像、golden、新测试;语义合并六路径保持 `review_required` |
|
||
| 1 真相层 | 完成(`45d13258`) | 116 项注册表、覆盖层 25+Ashtottari、根 SKILL 三段、徽章、`6.9.15` 版本目录 |
|
||
| 2 引擎三方合并 | 合完(未提交) | 零/低/高冲突文件已按硬红线 5 裁决;API 保持商业文件;golden 已重采;quick 门 Python 段与任务 1 同绿 |
|
||
|
||
任务 4 写在 `PROGRESS-upstream-capabilities-20260903.md`。
|
||
|
||
## 预检
|
||
|
||
`scripts/pre_work_check.py --remote-timeout 8 --command-timeout 45`:`remote_visibility_status=verified`。失败项是 `fragment_scan` 90s timeout 与 focused tests 45s timeout(ERR-078 / ERR-084 同类环境预算),不是远端同步失败。未因此停任务 0 / 4。
|
||
|
||
## 任务 0
|
||
|
||
### 导入
|
||
|
||
干净只读克隆:porcelain 空,ignored 0。Importer dry-run 退出码 2(semantic review required)。镜像只有 `SKILL.md`。六个 semantic-merge 路径全部 `review_required`,未覆盖。
|
||
|
||
写入:
|
||
|
||
- `references/cross_project_contract/imports/commit-a6f47abd2c9b7c6baa911ea00c971e1ec902380c.json`:`source_mode=git`,`source_commit` 40-hex,`source_tree_hash` 与 manifest 一致,`target_base_commit=58cae371…`
|
||
- `references/upstream/yinduzhanxing/SKILL.md`:sha256 `2cf15abe82e80fd1eba1fb232bc31b15a6998cafd586bbd281e76a7522b744be`(= 上游 HEAD SKILL.md)
|
||
- `references/upstream/yinduzhanxing/source-manifest.json`:git 模式,无 archive 字段;`imported_at=2026-09-03T08:19:47Z` ≠ `source_committed_at`
|
||
- `references/upstream/yinduzhanxing/import-plan.json`:身份字段改到 `a6f47abd`,entries / rejected_regressions 保留
|
||
|
||
镜像 SKILL.md 原文里仍有上游对 `yn-1993` 的研究备注。那是快照,不是产品默认出生参数。产品脚本与 golden 未带 `1993-04-17` / `14:49`。
|
||
|
||
### 咨询契约 golden
|
||
|
||
虚构 smoke:1990-01-01 12:00 Beijing(`39.9, 116.4, tz 8`),`defer_optional_external_evidence=true`。career / marriage / wealth / timing / health × `skip_full_reading_for_thematic` true/false,外加 `/api/chart`、`/api/varga_full`、`/api/daily_guidance`、`/api/synastry`。
|
||
|
||
无界 flatten 曾到 8.1 MB。按任务书「只记键路径和类型」收成 **最多 2 段** 点路径(workflow ~290,chart 161,golden 157 KB / 3213 行)。整备改的是岁差取值与标签,不改键路径,故 **不因 rebase 重采**。任务 2 合完后按任务书重采一次。
|
||
|
||
新文件:`tests/golden/consultation_contract_keypaths_v1.json`、`tests/test_consultation_contract_golden.py`、`tests/test_upstream_git_import_a6f47abd.py`。
|
||
|
||
### 测试(任务 0)
|
||
|
||
主仓 venv,`PYTHONDONTWRITEBYTECODE=1`:
|
||
|
||
```
|
||
tests/test_consultation_contract_golden.py
|
||
tests/test_upstream_git_import_a6f47abd.py
|
||
tests/test_import_yinduzhanxing.py
|
||
```
|
||
|
||
**35 passed, 1 skipped**(skip = live HTTP 重采,需 `JYOTISH_LIVE_CONTRACT_GOLDEN=1`)。
|
||
|
||
`tests/test_upstream_import_plan.py` **预期红直到任务 1**:它仍钉 archive `5db72537` / `source_mode=archive` / 旧 SKILL sha256。本轮按并行规则未改该文件。新 git 记录由 `tests/test_upstream_git_import_a6f47abd.py` 锁住。
|
||
|
||
### 冲突表(任务 2 工作清单)
|
||
|
||
方法:`git merge-file -p`,ours = **rebase 后** 本 worktree,base = 上游 `5db72537741fcedaa7b5498502d4a31b0f9fc147`,theirs = `a6f47abd`。改动行 = `diff -u` 的 `+`/`-` 行数(不含 hunk 头)。
|
||
|
||
任务书「现状实证 4」的冲突块数在 `58cae371` 上复核时与表一致。rebase 之后 **冲突块数有两处因整备变了**:
|
||
|
||
| 文件 | ours 改动行 | theirs 改动行 | 冲突块 | 相对任务书 |
|
||
| --- | ---: | ---: | ---: | --- |
|
||
| `scripts/jyotish_api_server.py` | 8367 | 3381 | **38** | 任务书 36;整备 0 改四处岁差字面量,+2 块 |
|
||
| `scripts/jyotish_engine.py` | 3649 | 10934 | 25 | 同 |
|
||
| `scripts/unified_consultation_orchestrator.py` | 557 | 757 | 18 | 同 |
|
||
| `mcp_server.py` | 655 | 625 | 11 | 同 |
|
||
| `scripts/active_rectification_questions.py` | 197 | 160 | 7 | 同;硬红线 3,任务 2 跳过 |
|
||
| `scripts/ashtottari_dasha.py` | 264 | 134 | 5 | 同 |
|
||
| `scripts/active_rectification_events.py` | 210 | 101 | 5 | 同;硬红线 3,任务 2 跳过 |
|
||
| `scripts/domain_calculation_service.py` | 412 | 20 | 5 | 同 |
|
||
| `references/technique_registry.json` | 5612 | 966 | 5 | 同块数;ours 行数含本仓格式 diff,任务 1 收内容不收回格式 |
|
||
| `scripts/narayana_dasha.py` | 488 | 269 | 4 | 同 |
|
||
| `scripts/run_quality_gate.py` | 140 | 54 | 4 | 任务书 ours 132;整备 1 改发布门,块数仍 4 |
|
||
| `scripts/kp_system.py` | 205 | 145 | 3 | 同 |
|
||
| `scripts/varga.py` | 35 | 43 | 1 | 同 |
|
||
| `scripts/tajika.py` | 324 | 88 | 1 | 同 |
|
||
| `scripts/report_orchestrator.py` | 108 | 28 | 1 | 同 |
|
||
| `scripts/jaimini.py` | 1 | 137 | **0** | 同 |
|
||
| `scripts/muhurta.py` | 2 | 1618 | **0** | 同 |
|
||
| `scripts/western_timing_engine.py` | 0 | 230 | **0** | 同 |
|
||
| `scripts/solar_return.py` | 54 | 84 | **0** | 同 |
|
||
|
||
`jyotish_engine.py` 的 25 处仍落在任务书点名的同一批函数。逐块取舍(ours / theirs / 手工合成)等任务 2 逐文件合并时填,本表只作清单。
|
||
|
||
硬红线 3 已核过、PROGRESS 记一句:`references/rectification_evidence_contract_v1.json` 与 `compare_candidate_minutes` **不取**;本仓 `rectification_technique_contract.py` 已是代码化合同且不含 D60/D40/D45。
|
||
|
||
## 任务 1
|
||
|
||
- `references/strict-workflow-router.md` / `quick-reference-guide.md`:`finance-timing-strict` 为主名,`wealth-timing-strict` 为旧别名。health 三窗与 D6/D8/D30 本仓已有,未逐字覆盖。
|
||
- 注册表 91→116。上游 25 项 ID 全部接收。本仓没有的 CLI/脚本(classical / ziwei / unified-western-reading)改为 `guarded`、空 command / output_path,避免 `audit_fragments --strict` 因缺文件红。`western_solar_arc_directions` 指向已有 `scripts/western_timing_engine.py`,registry `covered`。
|
||
- 覆盖层:25 项 `research_only_blocked`(`full_technique_invocation_matrix` 与 `/api/consultation_workflow` 均无这些 ID)。`ashtottari_dasha`:`partial`,规则族 `rahu_from_lagna_lord_kendra_trikona_plus_paksha_daynight`,`selected_rule_family_parameter_sensitive` 不得进确定性结论。
|
||
- 根 `SKILL.md` 只加三段(Ashtottari、`professional_report_reference`、VedAstro REST)。版本 6.9.14→6.9.15。
|
||
- 徽章:Capabilities 91→116,Covered 78→79(只多 solar arc 这一条本地有脚本的 covered)。
|
||
- 新增 `skills/jyotish-vedic-astrology/versions/6.9.15/`(从 6.9.14 复制后叠上述真相层文件)。**未改** `6.9.14`。
|
||
- `audit_capabilities.py --mode validate`:`valid=true, problem_count=0`;warning 含 Rangacharya 旧缺文 + 新项指向未 vendor 的研究路径。
|
||
- 未提交时 `git ls-files --others` 会列出整个 6.9.15 树(约 1100 文件),fragment audit 不把 untracked 当 hard fail。
|
||
|
||
### 25 项覆盖层
|
||
|
||
| technique_id | 上游 registry status | 本仓 registry | 覆盖层 |
|
||
| --- | --- | --- | --- |
|
||
| classical_astrology_core | guarded | guarded | research_only_blocked |
|
||
| classical_event_chart | guarded | guarded | research_only_blocked |
|
||
| classical_real_case_calibration | guarded | guarded | research_only_blocked |
|
||
| classical_usable_loop_audit | guarded | guarded | research_only_blocked |
|
||
| western_draconic_chart | covered | guarded | research_only_blocked |
|
||
| western_profection | covered | guarded | research_only_blocked |
|
||
| western_relocation_chart | covered | guarded | research_only_blocked |
|
||
| western_solar_arc_directions | covered | covered(本地脚本) | research_only_blocked |
|
||
| western_zodiacal_release | guarded | guarded | research_only_blocked |
|
||
| ziwei_app_js | covered | guarded | research_only_blocked |
|
||
| ziwei_bio_core_js | covered | guarded | research_only_blocked |
|
||
| ziwei_bridge_script_pack | comparison-only | comparison-only | research_only_blocked |
|
||
| ziwei_character_bio_enhanced_js | covered | guarded | research_only_blocked |
|
||
| ziwei_character_bio_generator_js | covered | guarded | research_only_blocked |
|
||
| ziwei_complete_js | covered | guarded | research_only_blocked |
|
||
| ziwei_doushu_bridge | comparison-only | comparison-only | research_only_blocked |
|
||
| ziwei_face_writing_bundle | covered | guarded | research_only_blocked |
|
||
| ziwei_i18n_bridge_bundle | covered | guarded | research_only_blocked |
|
||
| ziwei_i18n_complete_js | covered | guarded | research_only_blocked |
|
||
| ziwei_mainline_packet | covered | guarded | research_only_blocked |
|
||
| ziwei_patterns_js | covered | guarded | research_only_blocked |
|
||
| ziwei_personal_report_export | covered | guarded | research_only_blocked |
|
||
| ziwei_psychology_js | covered | guarded | research_only_blocked |
|
||
| ziwei_runtime_bridge_scripts | comparison-only | comparison-only | research_only_blocked |
|
||
| ziwei_star_details_js | covered | guarded | research_only_blocked |
|
||
| ashtottari_dasha(已有项) | covered | covered | **partial** |
|
||
|
||
### 被触碰的既有断言
|
||
|
||
| 文件 | 原值 | 现在 | 原因 |
|
||
| --- | --- | --- | --- |
|
||
| README 徽章 | 91 / 78 / 8 / 0 | 116 / 79 / 8 / 0 | 注册表 25 项 |
|
||
| `test_capability_evidence_pool` total_entries | 91 | 116 | 同上 |
|
||
| 同上 comparison_only_entries | 仅 rangacharya | +3 个 ziwei comparison-only | 上游新项 |
|
||
| `test_cli_smoke` capability_pool.total_entries | 91 | 116 | 同上 |
|
||
| `test_api_server_security` not_user_ready | 0 | `== registry_only` | 网页未执行项保持 registry_only |
|
||
| `test_upstream_import_plan` 身份 | archive `5db72537` | git `a6f47abd` | 任务 0 快照推进,任务 1 把钉死测试跟上 |
|
||
| `jyotish_vedic.__version__` / pyproject / plugin | 6.9.14 | 6.9.15 | 新 skill 版本目录 |
|
||
|
||
任务 1 清单 pytest(readme badges / skill hard constraints / capability evidence pool / import / commercial truth / 上面两条 quality-gate 红测)已绿。`run_quality_gate.py --profile quick`:Python 段 **503 passed, 1 skipped**;随后 `frontend` `npm test` 因 worktree 无 `node_modules` 报 `tsx: command not found`(exit 127)。把主仓 `frontend/node_modules` symlink 进来后 `./node_modules/.bin/tsc --noEmit` **0**,`skill-binding` + `skill-registry` **22/22**。symlink 不提交。
|
||
|
||
## 偏离
|
||
|
||
1. 导入器 `--output artifacts/…` 会被策略拒绝(必须落在 `references/cross_project_contract/imports/` 或仓外)。记录直接写在 imports 目录。
|
||
2. 未在 worktree 内建 `.venv` / 未 symlink `.venv`。
|
||
3. golden 深度上限 2 段,不是全树。前端已读的顶层与下一层键仍在。
|
||
4. 上游 25 项的 command/output_path 按本仓实文件改过,没有把 `classical_astrology.py` / ziwei 研究脚本带进来。
|
||
5. 为避免 capability audit 把 `report`/`timing` 域误判成 thematic-report API,从网页未执行项的 domains 里拿掉了这些触发词;ID 与覆盖层不变。
|
||
|
||
## 任务 2
|
||
|
||
三方基线:ours = `45d13258` 工作树,base = `5db72537`,theirs = `a6f47abd`。硬红线 3 校正文件跳过。`technique_registry.json` 已在任务 1 处理。
|
||
|
||
### 零冲突文件(全取 merge-file,0 hunk)
|
||
|
||
| 文件 | 取舍 | 测试 |
|
||
| --- | --- | --- |
|
||
| `scripts/jaimini.py` | theirs 新函数 | `test_jaimini.py` + `test_jaimini_rangacharya_api.py` 绿 |
|
||
| `scripts/muhurta.py` | theirs +1600 | `test_muhurta.py` 绿。`test_muhurta_factor_probe` 的 `full_scoring_status` 基线已是 `factor_only_scoring_observation`,与本合并无关 |
|
||
| `scripts/western_timing_engine.py` | theirs +230 | `test_western_timing_engine.py` / `test_western_chart_engine.py` 绿 |
|
||
| `scripts/solar_return.py` | theirs +84 | 无专属测试;`py_compile` 过 |
|
||
|
||
### 低冲突计算模块
|
||
|
||
| 文件 | hunks | 取舍 | 理由 |
|
||
| --- | ---: | --- | --- |
|
||
| `scripts/tajika_kernel.py` | 0 | merge-file | 无冲突 |
|
||
| `scripts/varga.py` | 1 | theirs + `mapping_status` / `normalize_varga_ascendant` | 计算正确性;`test_varga_bphs` 绿。`test_varga_vedastro_mode` 在 HEAD 已红(D2 Ascendant Leo vs Sagittarius),不是本轮新增 |
|
||
| `scripts/tajika.py` | 1 | theirs 新年主/PyJHora sidecar 辅助函数 | 纯新增;import 在本仓可解析。工作机路径只作可选探测 |
|
||
| `scripts/gulika.py` | 1 | theirs 新 Upagraha 函数 + `DAY_RULERS` 常量 | 新函数。`calculate_gulika` 默认 Raman;PyJHora smoke 测例显式 `ayanamsa="lahiri"` |
|
||
| `scripts/kp_system.py` | 3 | theirs `kp_maturity_profile` / `build_kp_report_pack` | 无守护读取 oracle,已带入 4 个 JSON(打开过,无出生资料)。另两个已在本仓的 hash/workflow 文件一并读取 |
|
||
| `scripts/ashtottari_dasha.py` | 5 | 手工:保留 paksha 白名单(改从 `ashtottari_rule_profiles` 导入)+ theirs 候选规则族 | 任务 1 已解冻的 `rahu_from_lagna_lord_kendra_trikona_plus_paksha_daynight`。纯计算模块 `ashtottari_rule_profiles.py` 一并带入 |
|
||
| `scripts/narayana_dasha.py` | 4 | theirs 新 profile/序列函数;**去掉** Gemini/Sagittarius 1993 平局硬编码 | 默认 `legacy_*` 保持本仓 AD 行为。`test_narayana_dasha.py` 绿 |
|
||
| `scripts/ayanamsa_utils.py` | 5 | **全部 ours** | 商业岁差 API(`DEFAULT_AYANAMSA_NAME` / `UnsupportedAyanamsaError`)。auto-merge 曾把 `apply_ayanamsa` 的未知岁差改成吞掉 ValueError,已撤回 |
|
||
| `scripts/domain_calculation_service.py` | 5 | **hunks ours**;补 `is_supported_ayanamsa_name` import | `position_mode` 不取(引擎尚未接)。transit 校验是 theirs 非冲突插入 |
|
||
| `scripts/run_quality_gate.py` | 4 | **全部 ours**(CORE 列表 / glob 展开 / 门禁范围) | 不让上游换掉商业 quick 列表。profile 里多了未使用的 `test_timeout_seconds` 与 `--test-timeout` 参数,未接入 pytest 调用 |
|
||
| `scripts/report_orchestrator.py` | 1 | ours 商业 `CANONICAL_DOMAINS` import | `build_report_language_contract_audit` 本仓无模块,本地 fallback `blocked` |
|
||
| `scripts/report_pack_contract.py` | 1(新文件) | theirs 合同壳 + 缺失研究模块 fallback | 不拖 `canonical_jyotish_profile` / dashboard 研究脚本 |
|
||
|
||
KP 带入(无隐私):
|
||
|
||
- `references/oracle/kp_exact_cusp_closure_dashboard_2026_08_22.json`
|
||
- `references/oracle/kp_exact_cusp_mainline_status_2026_08_22.json`
|
||
- `references/oracle/kp_12_cusp_numeric_oracle_readiness_2026_07_23.json`
|
||
- `references/oracle/kp_real_event_replay_gate_2026_07_30.json`
|
||
|
||
### 产品面数据(ours==base,0 hunk,快进 theirs)
|
||
|
||
- `references/interpretation_template_registry.json` +145
|
||
- `references/ai-reading-workflow-prompt.md` +9
|
||
- `references/mandatory-verification-gate-protocol.md` +39
|
||
|
||
无 `1993-04-17` / `14:49` / nadi 清单。
|
||
|
||
### 高冲突入口
|
||
|
||
#### `scripts/unified_consultation_orchestrator.py`(18 hunks)
|
||
|
||
**18 hunks 全 ours**(商业路由/reader 合同/分盘命名)。再手工:health `focus_techniques` 对齐上游并保留 `non-medical boundary`;`route_surface_contract` 用本仓 `normalize_domain`(wealth 为运行时名,finance 为别名,**不**引入会把 wealth 改成 finance 的 `route_aliases.py`);`evidence_packet_required_sections` health 加 D6/D8/D30/Narayana/功能吉凶/transit/non_medical;专家判断影子层因缺 `expert_judgment` 返回 `blocked`;不取 `build_full_spectrum_invocation_plan`。`test_unified_consultation_orchestrator.py` 全绿。
|
||
|
||
#### `scripts/jyotish_engine.py`(25 hunks)
|
||
|
||
| hunk | 函数 | 取舍 | 理由 |
|
||
| ---: | --- | --- | --- |
|
||
| 1 | 顶层 import | 手工 | `Path` / `SimpleNamespace` / `Any` + `re` / `contextlib` / `io` |
|
||
| 2 | import | 手工 | 只留 `build_guided_topics`;本地 stub `build_report_theme_catalog` / `attach_calculation_profile`;不导入缺失的 startrack / calculation_profile_contract |
|
||
| 3 | `_calc_sidereal_planets_for_jd` | theirs 速度旗标 + 补 `calc_flags` | 计算正确性;ours 同函数无商业改动 |
|
||
| 4 | 新 PL9/报告辅助函数(~9107 行) | theirs + 消毒 | 纯新增且 import 可解析或已守护。去掉 1993 候选表加载、Domi 控制样本、`14:49`、本机路径 |
|
||
| 5 | envelope / startrack | 手工 stub | `_build_response_envelope` **原样返回 payload**,避免 CLI/API 合同变形 |
|
||
| 6 | `_add_chart_args` | ours | `DEFAULT_AYANAMSA_NAME`;不接 `position-mode` / `chesta-profile` CLI(shadbala 无该参数) |
|
||
| 7 | `_build_ai_prompt_pack` 岁差默认 | 手工 | name=`DEFAULT_AYANAMSA_NAME`,display=`Raman`(产品默认,不再写 Lahiri) |
|
||
| 8 | `compute_chart_data` | theirs 速度旗标 + 补 `calc_flags` | 计算正确性;签名保持无 `position_mode` |
|
||
| 9 | `cmd_chart` | ours | 不包 envelope |
|
||
| 10 | `cmd_dasha` 日期轴 | ours | 商业 MD 用完整年数从出生前回推,与 balance 展示数学等价 |
|
||
| 11 | `cmd_dasha` AD 字段 | theirs | 超集:`start_datetime` + `pratyantar_dasha_timeline` |
|
||
| 12 | `cmd_dasha` result | ours | 不接缺失的 `canonical_jyotish_profile` |
|
||
| 13 | `cmd_shadbala` | ours | 无 `chesta_profile`;不覆盖本地 ranking |
|
||
| 14 | `_resolve_tajika_year_lord` | theirs | 新年主辅助;缺 `calc_panchadhikari_year_lord` 时 try/except 回退 |
|
||
| 15 | `cmd_tajika` return | ours | 不包 envelope |
|
||
| 16 | natal foundation helpers | theirs | 内部已 try/except;full-reading 暂未接线 |
|
||
| 17 | `cmd_full_reading` friendship | theirs | `planetary_friendship` 模块 |
|
||
| 18 | `build_pl9_style_export_packet` 后半 + `cmd_pl9_export` | 手工 | 收到 `cmd_pl9_export` 为止;**不取** visual-ocr / classical / nadi |
|
||
| 19–20 | `main` 岁差/`position-mode` | ours | 商业岁差 API |
|
||
| 21 | `pl9-export` argparse | 手工 | 只注册 `pl9-export`,不注册 visual-ocr |
|
||
| 22–23 | `main` 岁差应用 | ours | fail-closed `UnsupportedAyanamsaError` |
|
||
| 24 | 命令表 | 手工 | 加 `pl9-export`;不加 classical/nadi/visual |
|
||
| 25 | `pl9-export` 输出 | 手工 | json / markdown / pdf / **authority**(MCP 工具需要);缺模块降级 blocked |
|
||
|
||
`cmd_classical_*` / `cmd_nadi_*` 未取。auto-merge 进来的 argparse 与 dispatch 已删。缺失研究模块一律 stub / `_try_attr_import`,不拖脚本。
|
||
|
||
消毒:`_load_1993_candidate_segment_table` 恒返回 `None`;`_is_domi_pl9_control_case` 恒 `False`;Domi 视觉页 PDF/fixture 合同(原按空日期 + 控制样本时刻触发)整段不导入。`scripts/tajika.py` 的 PyJHora sidecar 只认 `JYOTISH_PYJHORA_PYTHON` / `python3.14` / `python3`,不带本机用户路径。`scripts/narayana_dasha.py` 把 `observed_pl9_1993_case_only` 改成 `observed_pl9_control_case_only`(答案泄漏字面量守卫)。
|
||
|
||
虚构 Beijing 1990-01-01 12:00:`full-reading`(quick 门 `test_cli_smoke` 全绿)、`pl9-export --format json` schema=`pl9_style_professional_export_v1`、树内 `status=failed` 为 0;岁差日志 `[Ayanamsa] raman`。缺研究文件的段是 `blocked`(可接受)。
|
||
|
||
#### `scripts/jyotish_api_server.py`(38 hunks)
|
||
|
||
**全部 ours。** 商业路由、`_request_ayanamsa`、咨询工作流、校正入口都不让上游改。auto-merge 曾把 nadi leaf assistant 整段插进来(+1500 行,会打穿 growth cap 11363),已整文件回到合并前的商业版本(11120 行)。nadi 路由不取。`test_api_server_growth_contract.py`、`test_commercial_domain_calculation_contract.py` 绿。
|
||
|
||
任务 5 的 `/api/professional_report_reference` 仍按任务书另开,不在本文件加功能体。
|
||
|
||
#### `mcp_server.py`(11 hunks)
|
||
|
||
| hunk | 取舍 | 理由 |
|
||
| ---: | --- | --- |
|
||
| 1 | ours(空) | `varga_evidence_matrix` / `full_spectrum_invocation_plan` / `domain_profile_builder` 本仓没有 |
|
||
| 2 | theirs | `_single_varga_engine_call` / `_dasha_at_date` 纯辅助 |
|
||
| 3 | 手工 | 只加 `engine_observations`;不调缺失的 `build_domain_profile` |
|
||
| 4 | 手工 | 保留 D10,并入 D4/D11/D16/D24 |
|
||
| 5–6 | ours(空) | calculation archive / varga matrix 模块缺失 |
|
||
| 7 | ours | 商业 `calculate_transit` 体 |
|
||
| 8 | theirs | 给 transit 补 `ayanamsa`/`date` |
|
||
| 9 | theirs | `_build_execution_receipt` |
|
||
| 10 | theirs | `route_surface_contract`(编排器已有) |
|
||
| 11 | ours(空) | `_attach_requested_official_formal_varga_audit` 未带入 |
|
||
|
||
三个新工具(`get_pl9_expert_reader_report` / `get_pl9_full_report_authority` / `route_jyotish_question`)是非冲突插入,已保留。`route_jyotish_question` 对缺失 `knowledge_registry` 返回 blocked。
|
||
|
||
H03 曾让 `_attach_top_reader_contract` 直接调用 `_build_engine_observations()`。该函数依赖本仓没有的 `load_external_profiles`,NameError 会打断整个 `strict-evidence-collector`,咨询/报告里的 `career_strict_evidence` / `confidence_boundary` 随之消失。现已在调用处 try/except,缺模块时写入 `status=blocked`。`tests/test_cli_smoke.py` 相关 4 条与 thematic 报告 5 条已绿。
|
||
|
||
校正:`active_rectification_*` 按硬红线 3 跳过。
|
||
|
||
### 被触碰的既有断言(任务 2)
|
||
|
||
| 文件 | 原值 | 现在 | 原因 |
|
||
| --- | --- | --- | --- |
|
||
| `tests/test_gulika.py` PyJHora smoke | 隐式 Lahiri(函数写死 `SIDM_LAHIRI`) | 显式 `ayanamsa="lahiri"` | 函数现接收岁差,产品默认 Raman;该 oracle 是 Lahiri |
|
||
| `tests/test_report_orchestrator_reader_contract.py` `source_mode` | `archive` | `git` | 任务 1 快照已改成 git,这条测试当时没跟上 |
|
||
|
||
### 因缺文件而 blocked(有守护,未拖研究脚本)
|
||
|
||
- `_event_replay_contract` / 1993 候选分段表:不导入
|
||
- `_load_rectification_evidence_contract`:缺 JSON 时 blocked
|
||
- `_profile_aware_benchmark_appendix` / ch10 ashtama / chara-narayana 书测 JSON:缺则空或 blocked
|
||
- MCP `engine_observations`:`evidence_maturity` 不在本仓 → blocked
|
||
- MCP `route_jyotish_question`:`knowledge_registry` 不在本仓 → blocked
|
||
- 专家判断影子层:`expert_judgment` 不在本仓 → blocked
|
||
- `full_report_quality_gate` / `kp_monthly_report_packet` / startrack / calculation archive:blocked
|
||
- `report_quality_gate.reason=full_report_quality_gate_absent`
|
||
|
||
### 基线已红、本轮未新增
|
||
|
||
- `tests/test_varga_vedastro_mode.py`:HEAD 的 `calc_varga(..., mode="vedastro")` 已与 golden 不一致
|
||
- `tests/test_muhurta_factor_probe.py::test_muhurta_factor_probe_keeps_full_scoring_blocked`:HEAD 已是 `factor_only_scoring_observation`
|
||
- `frontend/tests/class-name-definition-contract.test.ts`:`ayanamsa-preference` 无 CSS 规则。`origin/staging` 同文件同红(整备岁差选择器只复用了 `sheet-section`)。任务 2 未改 `frontend/**`,fail 数不高于基线。
|
||
|
||
### 门禁与契约
|
||
|
||
- `run_quality_gate.py --profile quick` Python 段:**503 passed, 1 skipped**(与任务 1 相同)。随后 `npm test`:**2607 pass / 1 fail**,即上面的 CSS 基线项;lint 未跑到,单独 `npm run lint`:**0 error**(73 warning,不修)。
|
||
- `./node_modules/.bin/tsc --noEmit`:**0**(symlink 的主仓 `node_modules`,不提交)。
|
||
- golden 已重采:14 个 case 全是超集(咨询链每题多 `routing.audit_route` / `document_route` / `registry_route` / `route_aliases` / `runtime_route`,以及 `runtime_evidence_log.{finance_astrology_support_review,kp_western_support,specialized_indian_closure_review}`;wealth skip_false 与 timing skip_true 另多 VedAstro gateway 键)。无丢键、无类型变化。career / wealth / health 的 `/api/consultation_workflow` 全部 HTTP 200。
|
||
- `tests/test_api_server_growth_contract.py`、`tests/test_commercial_domain_calculation_contract.py` 绿。隐私扫描 `public_release_privacy_scan` / `commercial_privacy_artifact_scan`:**pass, 0 findings**。
|
||
- `next build` 本轮未跑(前端字节未改)。staging 部署验收留到推送之后。
|
||
|
||
未 push。未提升 `main`。任务 3 / 5 / 6 / 7 按任务书另开 `codex/upstream-capabilities-20260903`。
|