Files
Jyotisha/docs/tasks/PROGRESS-report-blocked-repairs-20260902.md
T
Jesse_ChenandClaude Fable 5.1 8db71aaf81 docs: product-level README, AGENTS.md split into code/reading parts, add CLAUDE.md, move task briefs to docs/tasks
- README.md is now the product/repo front door (architecture, repo map,
  local dev, test tiers, delivery flow, doc map). Engine positioning,
  VedAstro/Codex setup and the oracle/benchmark command reference move
  verbatim to docs/engine/README.md, docs/engine/vedastro-gateway.md and
  docs/benchmark/README.md. Capability badges realigned with the registry
  (91/78/8/0); tests/test_readme_badges.py was red on staging.
- AGENTS.md: Part A (environment truth, delivery, worktrees, record
  placement, bug workflow, growth freeze, frontend red lines, privacy,
  pre-work check, test tiers) and Part B (reading-rigor constraints).
  GitHub issue-tracker/triage boilerplate removed: GitHub is a read-only
  mirror. All strings locked by tests/ are preserved.
- CLAUDE.md added: roles, three working modes, task-brief sections,
  acceptance criteria, session discipline; imports AGENTS.md.
- 50 tracked TASK-*/PROGRESS-* files and 3 never-committed briefs move to
  docs/tasks/ with an index; REPO_LAYOUT.md merged into README.

Docs-only change (no gated path touched).

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0193vBv6w5MV2cifdTUu9H5P
2026-09-03 06:56:06 +00:00

122 lines
7.5 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# PROGRESS · 个人报告全主题 blocked 修复(2026-09-02
任务书:`TASK-report-blocked-repairs-20260902.md`
分支:`codex/report-blocked-repairs-20260902`
基线:`origin/staging` @ `e37f8272`(任务书提交;内容基线 `24a1cf37`
开工前置:已读 `docs/research/pre_work_error_ledger.md``frontend/AGENTS.md``docs/BUG_HISTORY.md` 检索 BUG-486 及相邻条目;`python3 scripts/pre_work_check.py --remote-timeout 8 --command-timeout 45``status=pass``remote_visibility_status=verified`)。按任务书从 `origin/staging` 建 worktree。
---
## 任务 0 · Golden fixture 与形状契约
捕获命令(虚构 smoke 出生,非真人):
```bash
.venv/bin/python scripts/capture_report_blocked_repairs_golden.py
```
脚本调用 `JyotishAPIHandler._compute_consultation_workflow`body 对齐 worker`entry_mode=direct_chart`question `请为个人报告计算 <theme> 主题证据``plan_version=consultation-plan-v2`,并设 `defer_optional_external_evidence=true` 以跳过 VedAstro(本轮修的是本地 varga / transits / jaimini 层)。主题:career / marriage / timing / wealth。出生:1993-06-15 10:30lat 36.42 / lon 114.21 / tz 8city Handan。
裁剪规则:
- 保留 `chart.ascendant/planets/houses/dasha`
- `modules.varga_full` 只留 `D2_Hora` / `D9_Navamsa` / `D10_Dasamsa` / `D11_Rudramsa` / `D24_Chaturvimsamsa` 的完整值(引擎 D24 名是 Chaturvimsamsa,不是任务书举例的 Siddhamsa
- 保留 `modules.transits``modules.jaimini`(含新增 `chara_karakas`)、`narayana_dasha``arudha_padas``yogas``ashtakavarga``dasha_sub_periods`
- 保留 `consumer_context` 的 route/core_status/available_layers/missing_route_layers/hard_blockers/answer_policy
- 保留 machine packet 中与主题闭合相关的 sections
- 删除 `ai_prompt_pack`、VedAstro、varga_spectrum、guided_topics、western、technique_audit_table,并压缩行星/宫位/dasha 字段
入库:`frontend/tests/fixtures/consultation-workflow-report-blocked-repairs-golden.json`(约 154KB)。入库前检索无邮箱、用户 id、真实姓名。
形状契约:`frontend/tests/report-blocked-repairs.test.ts` 直接读 golden,断言小写 `ascendant``sign_index``planets` 字典、`house_chart`,以及 `modules.transits.status``chara_karakas.AmK/DK`。该测试不依赖前端提取行为。
红线 9`report-interpretive-facts.test.ts``engineVarga()` 原值是 `{ _meta, Ascendant: {sign, sign_idx, degree_in_sign}, Sun/Moon/Mars: {sign, sign_idx} }`(643f6f7a 手造旧形状,锁住了本轮要修的缺陷)。已换成 golden 派生的 D2/D11/D24 真值;断言语义未放宽。
---
## 任务 1 · 分盘值形状
`deriveVargaHousesFromEngine` 现读 `ascendant ?? Ascendant`,索引 `sign_index ?? sign_idx ?? sign`,度数 `degree ?? degree_in_sign`。优先 `varga.planets`(有 `house` 用 house,否则整星座宫推导);无 `planets` 时退回顶层行星键。不复制 `house_chart` 与未知键。`VARGA_KEY_ALIASES.D24` 补上真实键 `D24_Chaturvimsamsa`
复现管线(golden 四主题):`charts` 含 D1/D2/D9/D10/D11/D24wealth 出 claim card`demoteThemesMissingRequiredCharts` 不触发;D2/D11 回执 executed。
---
## 任务 2 · Transit 回执
提取层读 `chart.modules.transits`:仅 `status === "executed"` 时 upsert `Transit``partial` + `executed: true`)。缺失或其他 status 不产回执。
单元覆盖:executed / 缺失 / `blocked` 三态。timing 在 executed 时出 claim card。
---
## 任务 3 · Chara Karaka
引擎 `_attach_local_consultation_layers` 调用既有 `jaimini.calc_chara_karaka_7`,把结果挂到 `chart.modules.jaimini.chara_karakas`。键同时保留全名(`Amatyakaraka`/`Darakaraka`)与任务书建议的短名(`AmK`/`DK`)。不改 `arudha_padas`
前端按 AmK/DK 行星存在性 upsert 回执。Python`test_local_consultation_layers_attach_chara_karakas_from_jaimini`
四主题复现:**claimCards 4blockedSections 0**ledger 中 AmK/DK/Transit/D2/D11 均 executed。
---
## 九主题逐项(golden career 图层复用到未单独捕获的主题)
| 主题 | 结果 |
|---|---|
| career | claim |
| marriage | claim |
| wealth | claim |
| education | claim |
| migration_home | claim |
| family | claim |
| health_pressure | claim |
| timing | claim |
| general | claim |
---
## 任务 4 · 质量门与部署
`requiredTechniqueGroups` 相对任务书基线 `e37f8272` 无 diff。未改 `.gitea/workflows/**`,未提升 main。
| 门 | 结果 |
|---|---|
| `frontend/node_modules/.bin/tsc --noEmit` | 通过(exit 0,无输出) |
| `eslint`(与 CI 相同,无 `--max-warnings` | 0 error / 73 既有 warningexit 0 |
| `tsx --test tests/*.test.ts` | tests 2515 / pass 2514 / fail 1 / skipped 0。相对 skill-parity 基线(2444 / 2410 / 24,本机当时无 Docker)本轮 Docker 可用,那 24 条环境失败已过。唯一失败是 `rectification-v9-database.test.ts`「v9 enforces profile gating, ownership and terminal read-only」:`database migration failed``1 !== 0`)。同文件单独重跑 **7/7 通过**。这是 `BLOCKED.md` 已记录的全量并发 Docker 争用 flake,与本轮 varga/Transit/karaka 改动无关。 |
| `next build --webpack` | exit 0Compiled 2.9minTS 2.3minstatic 62/62。两条 `Failed to copy traced files` 指向 `rishi-ai-mcp/.cursor` / `.vscode` 的 sandbox `EPERM`,不影响路由表。 |
| `pytest tests/test_consultation_consumer_context.py` | 28 passed |
| 相关测试聚焦 | `report-blocked-repairs` + generation / v2 / contract / interpretive-facts64 passed / 0 failed |
### Staging 部署
- 提交:`7faf8555a589a0bdf14a5b17323352470816a7ee` 已在 `origin/staging`
- Independent Staging Quality Gate[run 2308](https://git.copse.top/root/Jyotisha/actions/runs/2308) successvalidate 9m + publish 1m
- Deploy staging[run 2309](https://git.copse.top/root/Jyotisha/actions/runs/2309) success
- `GET https://staging.jyotisha.chat/api/health``.deployment.gitCommit` = `7faf8555a589a0bdf14a5b17323352470816a7ee`
### 复现管线(本轮当场,非 golden 缓存)
2026-09-02 18:26 用当前 worktree 引擎对虚构 smoke 出生重跑四主题 `_compute_consultation_workflow`(未覆盖 golden fixture),再喂给 `buildReportEvidenceBundleV2`
- 四主题均 `success=True``varga_full` 含 D2_Hora / D9_Navamsa / D10_Dasamsa / D11_Rudramsa / D24_Chaturvimsamsa`transits.status=executed``chara_karakas` 含 AmK/DK 及全名
- claimCards = career, marriage, timing, wealthblockedSections = []
- charts = D1/D2/D9/D10/D11/D24ledger 中 AmK/DK/Transit/D2/D11 均 executed
- 九主题全 claim
Staging 登录后的 writer 正文 / token 抽查仍需委托方:本环境无会话;浏览器代登被拦为未授权开户。`GET /api/reports` 仍为 401。health SHA 已对齐 `7faf8555`
委托方登录后:
1. 用虚构或自有资料生成一份 `personal_full`,主题 career / marriage / timing / wealth。
2. 四个主题应有正文,不再全部 blocked,摘要不应再是「报告主题尚未生成」。
3. 顺带完成上一轮欠账:≥3 处 writer 输出回溯;每章真实 `inputTokens` / 墙钟对照 `PROGRESS-report-skill-parity-20260901.md` 的 2 倍线裁决(产品已接受离线 2.28× 计费加权,以第一份实测为准)。
---
## 开工回执后的实现顺序
先落引擎 `chara_karakas` 再捕获 golden(使 fixture 含新层),再修提取层与测试。形状契约只读 JSON,不依赖提取实现。