feat(upstream): snapshot a6f47abd, REST VedAstro path, and 116-technique truth layer

Advance the one-way import to git commit a6f47abd with consultation keypath golden, switch official VedAstro comparison to the REST Calculate bridge, and receive the 25 new registry entries behind research_only_blocked.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Jesse_Chen
2026-09-03 17:35:26 +08:00
parent 01a4536333
commit 45d132588f
1184 changed files with 464058 additions and 70 deletions
+1 -1
View File
@@ -202,7 +202,7 @@ machine-readable registry.
| Project | Type | Strength | Weakness |
|---------|------|----------|-----------|
| **PyJHora** | Calculation library | Strongest traditional algorithm coverage (50+ Dashas, 284 Yogas) | No interpretive pipeline; user must interpret results themselves |
| **VedAstro** | API / Web platform | 200+ endpoints, Docker, MCP Server, MIT license | Interpretive audit & confidence labeling weaker |
| **VedAstro** | API / Web platform | 200+ endpoints, Docker, MCP Server, MIT license | Interpretive audit & confidence labeling weaker. Default official comparison in this repo is the REST Calculate bridge (`scripts/vedastro_rest_bridge.py`, 5 req/min); official MCP `tools/call` is protocol-probe only after the 2026-09-01 "Invalid or Outdated Call" regression. Match/synastry stays `official_blocked`. |
| **Maitreya** | Desktop software | Mature cross-platform GUI | Jyotish depth not as deep as specialized projects |
| **jyotisha** | Panchanga / calendar | Excellent Panchanga accuracy | Not a full reading system |
| **This project** | AI-native analysis system | Full pipeline + audit + degradation | Pure calculation accuracy still being benchmarked |
@@ -0,0 +1,50 @@
# PROGRESS · 上游能力接入(任务 372026-09-03
工作树 / 分支同 `PROGRESS-upstream-sync-20260903.md`。任务 4 不依赖任务 2,按并行规则与任务 0 一起做。任务 3 / 5 / 6 / 7 **未开**(等任务 1–2,且 7b 在整备之后;整备 0–3 已在 staging)。
| 任务 | 状态 | 说明 |
| --- | --- | --- |
| 3 health 三窗 + 个人报告 | 未开 | 会改 `personal-report-generation.ts` 与编排器,须在任务 2 之后 |
| 4 VedAstro REST 桥 | 完成(未提交) | 文件集与整备无交集 |
| 5 专业报告导出 | 未开 | 依赖任务 2 的 `pl9-export` |
| 6 新字段透传 | 未开 | 任务 6 先于任务 3 与 7c |
| 7 校正三项 | 未开 | 7b 岁差/交点按请求:整备已交付 `resolveAyanamsa`,仍等任务 2 后做 Python + 前端接线 |
## 任务 4
### 做了什么
1. 引入 `scripts/vedastro_rest_bridge.py`(对齐上游 `a6f47abd` 的 REST Calculate 调用)。**去掉 yn-1993 / Handan / 1993-04-17 14:49 默认值。** 默认改为虚构 smokeBeijing `39.9042, 116.4074``12:00 01/01/1990 +08:00``LAHIRI`
2. 本地 5 次/分钟限流。HTTP 429 与本地令牌耗尽均降为 `official_blocked`,不抛给调用方当硬错误。`match` 子命令返回 `official_blocked` / `match_subcommand_not_implemented`,不伪造合盘。
3. `scripts/vedastro_gateway.py`:官方健康改为打 `/api/Calculate``Status: Pass`status 输出 `transport=rest``rate_limit_per_minute=5``mcp_bridge_role=protocol_probe_only``JYOTISH_SKIP_LOCAL_ENV=1` 时探测为 `not_probed`
4. `scripts/vedastro_parity_matrix.py` 与 fast-path checklistMCP/API Surface 的 `fastest_path_lane` 改为 `rest_adapter`MCP 桥文件保留,只作协议探测。
5. `scripts/diagnose_vedastro_mode.py``scripts/vedastro_official_mcp_bridge.py` 文档、`docs/engine/README.md` 同步。
### 测试(无网络)
未设置 `VEDASTRO_ENABLE_NETWORK=0` 污染进程时:
```
tests/test_vedastro_rest_bridge.py
tests/test_vedastro_parity_matrix.py
tests/test_vedastro_gateway.py
tests/test_vedastro_runtime_mode_diagnostics.py
tests/test_vedastro_fast_path_checklist.py
tests/test_vedastro_official_mcp_bridge.py
```
**67 passed**(含任务 0 的 `test_import_yinduzhanxing.py`)。REST 桥测试用录制响应,不打真网。曾有一次 `active_backend=local_fallback` 失败是 pytest 进程被 `VEDASTRO_ENABLE_NETWORK=0` 污染,不是产品回归。
`tests/test_vedastro_rest_bridge.py` 断言默认 payload **不含** `14:49`
### 有网络手工跑
```
.venv/bin/python -B scripts/vedastro_rest_bridge.py horoscope
```
虚构 Beijing smoke。**`Status: Pass`,耗时 1.566 s。** 未打到 429。限流路径由单测覆盖:gateway 降 `official_blocked`
### 未做
未改 `jyotish_api_server.py` 的咨询路由。`/api/vedastro_gateway/status` 字段已在 gateway 模块与 `tests/test_vedastro_gateway.py` 锁住;本轮未起 Docker 打 staging 该端点。
@@ -0,0 +1,173 @@
# PROGRESS · 上游同步(任务 022026-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`(含并行规则那段任务书) |
| 当前 HEAD | `01a45363` | rebase 到已含整备 03 的 `origin/staging` |
| 整备合入 | `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 / 冲突表 | 完成(未提交) | 只写了导入记录、上游镜像、golden、新测试;语义合并六路径保持 `review_required` |
| 1 真相层 | 完成(未提交) | 116 项注册表、覆盖层 25+Ashtottari、根 SKILL 三段、徽章、`6.9.15` 版本目录 |
| 2 引擎三方合并 | 未开 | 工作清单见下方冲突表(rebase 后复核) |
任务 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 timeoutERR-078 / ERR-084 同类环境预算),不是远端同步失败。未因此停任务 0 / 4。
## 任务 0
### 导入
干净只读克隆:porcelain 空,ignored 0。Importer dry-run 退出码 2semantic 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
虚构 smoke1990-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 ~290chart 161golden 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 后** 本 worktreebase = 上游 `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→116Covered 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 清单 pytestreadme 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:rebase 后的冲突表,从零冲突文件 `jaimini.py` / `muhurta.py` / `western_timing_engine.py` / `solar_return.py` 开始 `git merge-file`
+1 -1
View File
@@ -97,7 +97,7 @@
| 任务书 | 进度 | 主题 | 状态 | 落点 |
| --- | --- | --- | --- | --- |
| `TASK-upstream-sync-20260903.md` | | 上游快照推进到 `a6f47abd`、引擎三方合并、health 三窗 / VedAstro REST 桥 / 专业报告导出 / 新字段接聊天与报告 / 校正解冻三项(自适应选题、岁差按请求、报告敏感度节) | 待领取 | — |
| `TASK-upstream-sync-20260903.md` | `PROGRESS-upstream-sync-20260903.md``PROGRESS-upstream-capabilities-20260903.md` | 上游快照推进到 `a6f47abd`、引擎三方合并、health 三窗 / VedAstro REST 桥 / 专业报告导出 / 新字段接聊天与报告 / 校正解冻三项(自适应选题、岁差按请求、报告敏感度节) | 执行中 | 分支 `codex/upstream-sync-20260903` @ `01a45363`;任务 0 与 4 已回报,任务 1–3 / 5–7 未开 |
## 命名与归档