@@ -0,0 +1,173 @@
# 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` (含并行规则那段任务书) |
| 当前 HEAD | `01a45363` | rebase 到已含整备 0– 3 的 `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 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:rebase 后的冲突表,从零冲突文件 `jaimini.py` / `muhurta.py` / `western_timing_engine.py` / `solar_return.py` 开始 `git merge-file` 。