chore(repo): make the release gate reproducible and clean product URLs
PyJHora absence is now partial, tests write research manifests to tmp, the registry allows experimental_variant, and product links point at the Gitea repo. Early logs move to docs/history. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -3,70 +3,89 @@
|
||||
工作树:`/Users/jesse/Downloads/Copse/astrology/.worktrees/repo-hygiene-20260903`
|
||||
分支:`codex/repo-hygiene-20260903`
|
||||
基线:开工后快进到 `origin/staging` @ `58cae371`(含 BUG-510 与上游同步任务书)。任务书:`docs/tasks/TASK-repo-hygiene-20260903.md`。
|
||||
未碰 `main`。未改 `DEFAULT_AYANAMSA_NAME`(保持 `raman`)。未改校正打分/阈值/golden。未改 `page.tsx`(仍 2041 行)。`scripts/jyotish_api_server.py` 仍 11120 行(与 rebase 后 HEAD 相同)。
|
||||
未碰 `main`。未改 `DEFAULT_AYANAMSA_NAME`(保持 `raman`)。未改校正打分/阈值/golden。未改 `page.tsx`(仍 2041 行)。`scripts/jyotish_api_server.py` 仍 11120 行。
|
||||
|
||||
BUG 编号:开工时 `docs/BUG_HISTORY.md` 最大号是 **BUG-510**。本轮岁差记 **BUG-511**。
|
||||
BUG 编号:开工时最大号 **BUG-510**。岁差记 **BUG-511**。
|
||||
|
||||
| 任务 | 状态 | 说明 |
|
||||
| --- | --- | --- |
|
||||
| 0 岁差设置 + 参考集锁口径 | 待验收 | 本提交。产品 staging 实测仍欠 |
|
||||
| 1 发布门本地可复现 | 未开始 | 任务 0 先推 |
|
||||
| 2 注册表白名单 | 未开始 | |
|
||||
| 3 仓库地址 | 未开始 | |
|
||||
| 4 早期日志搬家 | 未开始 | |
|
||||
| 5 远端分支清理 | 未开始 | |
|
||||
| 0 岁差设置 + 参考集锁口径 | 待验收 | `b6a70aa7` 已推功能分支。产品 staging 实测仍欠 |
|
||||
| 1 发布门本地可复现 | 部分完成 | 选项 (b) 已做;release profile 因 3 条 BLOCKED 不能声称退出 0 |
|
||||
| 2 注册表白名单 | 完成 | `audit_capabilities.py --mode validate` → `valid=true, problem_count=0` |
|
||||
| 3 仓库地址 | 完成 | Gitea 产品仓;slug 解析用例保留 |
|
||||
| 4 早期日志搬家 | 完成 | 根目录 `ls *.md` 只剩规定 8 个(外加 gitignore 的 `COVERAGE_AUDIT_REPORT.md`) |
|
||||
| 5 远端分支清理 | 待执行删除 | 已 `fetch --prune` 核对名单,见下 |
|
||||
|
||||
## 环境备忘
|
||||
|
||||
- 本 worktree **没有** `.venv`。预检与 Python 测试用主仓 `/Users/jesse/Downloads/Copse/astrology/yinduzhanxing/.venv`(`mcp` 1.28.1,`hypothesis` 已装)。
|
||||
- 任务书写把迁移放进 `frontend/db/migrations/`。实际 `frontend/scripts/db-migrate.mjs` 会跑 `frontend/db/migrations` **和** `frontend/supabase/migrations`。账户资料列修复历来放 supabase(`account-api` 还断言同类 SQL 不在 `db/migrations`)。本轮唯一迁移是 `frontend/supabase/migrations/20260903010000_profile_ayanamsa.sql`,避免两个目录同名撞车。
|
||||
- 产品文案里的「账户与出生资料」在现界面是 **星盘资料** 里的本人编辑表,不是 `个人资料`(MVP 合同禁止在那里放出生 UI)。岁差单选加在本人星盘表单,未改 `page.tsx`。
|
||||
- `npm run test:db` 与 `npx tsx --test tests/rectification-*.test.ts` 不可并行:默认 `JYOTISHA_POSTGRES_MAX_FIXTURES=2`,抢槽时前几个库测会报泛化 `database migration failed`。隔离重跑后绿。
|
||||
- 本地错装 `mcp 2.x` / 缺 `hypothesis` 是环境问题,不改 pin。`requirements.txt` 仍是 `mcp>=1.0,<2`;`requirements-dev.txt` 已有 `hypothesis>=6.0`。
|
||||
- 任务书写把迁移放进 `frontend/db/migrations/`。实际 migrator 跑 supabase + db 两目录。本轮唯一迁移:`frontend/supabase/migrations/20260903010000_profile_ayanamsa.sql`。
|
||||
- 「账户与出生资料」在现界面是 **星盘资料** 本人编辑表。岁差单选在那里,未改 `page.tsx`,未进 `个人资料`。
|
||||
- `npm run test:db` 不可与 `rectification-*.test.ts` 并行(fixture 槽默认 2)。
|
||||
- `python3 scripts/pre_work_check.py` 在本 worktree 用 Anaconda 3.12:`remote_visibility_status=verified`(不再因旧 slug blocked)。失败项是 `fragment_scan` 90s timeout 与 focused tests 45s timeout,属环境预算,不是 slug。
|
||||
|
||||
## 任务 0
|
||||
|
||||
### 0.a 参考集锁口径
|
||||
见提交 `b6a70aa7`。公开案例复验 `valid: true`、gated **66/66**、`pass_rate: 1.0`。`npm run test:db` **34/34**。产品虚构盘实测仍欠。部署 SHA 待合入 staging 后补。
|
||||
|
||||
- `tests/run_real_case_revalidation.py`:`REFERENCE_AYANAMSA = "lahiri"`,引擎 argv `--ayanamsa lahiri`,报告 `reference_ayanamsa`。
|
||||
- `scripts/local_accuracy_report.py` 同口径。
|
||||
- 夹具大运:`base` 加 `--ayanamsa lahiri`。三栏:原值=依赖默认;新值=显式 lahiri;原因=夹具日期是 Lahiri 口径。期望日期未改。
|
||||
### 0.a 三栏
|
||||
|
||||
### 0.b 标签与计算一致
|
||||
|
||||
- `scripts/jyotish_api_server.py` 经 `_request_ayanamsa` / `DEFAULT_AYANAMSA_NAME` / `ayanamsa_display_name`,不再写死 `'lahiri'` / `'Raman'`。
|
||||
- `_request_ayanamsa` 也读 `ayanamsa_policy`,VedAstro 对照与该次请求同口径。
|
||||
- `DEFAULT_AYANAMSA_NAME` 仍是 `'raman'`。
|
||||
- 验收 grep(`scripts/jyotish_api_server.py` + `frontend/src`,排除 test):只剩 `frontend/src/lib/ayanamsa.ts` 选项/默认,以及 `personal-report-generation.ts` 的 `SAFE_AYANAMSA` 显示映射。
|
||||
|
||||
### 0.c 用户设置
|
||||
|
||||
- `frontend/src/lib/ayanamsa.ts`:`resolveAyanamsa`,默认 `raman`。
|
||||
- 迁移:`profiles.ayanamsa text not null default 'raman'` + 四值 check + `grant update (ayanamsa)` 给 `authenticated`。
|
||||
- 咨询、声明窗口、报告 worker、每日星语、合盘、校正 v9 引擎请求、生时评估 scan 均传实际岁差。
|
||||
- 校正 `V9BaselineSnapshot` 新写入带 `ayanamsa`;**不进** `baselineFingerprint`。
|
||||
- 岁差不进 `declarationFields` / `concurrencyFields`,改设置不 409、不清确认。
|
||||
夹具大运 `base`:原值=依赖默认岁差;新值=显式 `--ayanamsa lahiri`;原因=夹具日期是 Lahiri 口径。期望日期未改。
|
||||
|
||||
### 偏离
|
||||
|
||||
- 迁移目录:supabase,原因见环境备忘。
|
||||
- UI 位置:星盘资料本人编辑,不是不存在的「账户与出生资料」面板。
|
||||
- 迁移目录:supabase。
|
||||
- UI:星盘资料本人编辑,不是不存在的「账户与出生资料」面板。
|
||||
|
||||
### 命令摘要
|
||||
## 任务 1
|
||||
|
||||
| 命令 | 结果 |
|
||||
| --- | --- |
|
||||
| `python tests/run_real_case_revalidation.py` | `valid: true`,`reference_ayanamsa: lahiri`,gated **66/66**,`pass_rate: 1.0` |
|
||||
| `pytest …test_fixture_dasha_timeline…` + `test_api_server_growth_contract.py` | 4 passed;夹具日期未改;API 行数 11120 |
|
||||
| `scripts/user_invocation_acceptance_check.py` | `status: pass`,`checks.user_invocation_tests: true`,`external_adapter_status: complete`(本机 PyJHora 可用) |
|
||||
| `npx tsc --noEmit` | 0 错 |
|
||||
| `npx eslint .` | 0 error,73 既有 warning |
|
||||
| 前端聚焦:ayanamsa / account-api / consultation-route-service / server-owned-birth-profile / global-birth-profile-routes / settings-mvp / rectification-v9-case-service / consultation-workflow-request / consultation-birth-accuracy / consultation-agentic-runtime / personal-report-api / rectification-v9-engine-contract | fail=0 |
|
||||
| `npm run test:db`(`--test-concurrency=1`,单独跑) | **34 pass / 0 fail** |
|
||||
| `npx tsx --test tests/rectification-*.test.ts` 隔离重跑库测 | ingest P0 + v9-database **10 pass / 0 fail**;未改 scorer/golden |
|
||||
| `wc -l frontend/src/app/page.tsx` | 2041,与 HEAD 相同 |
|
||||
选 **(b)**:PyJHora `missing_dependency` 时 `user_invocation_acceptance_check` 的 `status` 为 `partial`,退出码 0。硬错误仍 `fail`。
|
||||
|
||||
产品负责人 staging 实测(虚构盘 2000-01-01 12:00 UTC 0/0:Lahiri=Swati,Raman=Vishakha)仍欠。部署 SHA 待合入 staging 后补。
|
||||
三栏(`test_one_command_user_invocation_acceptance_check` / 技能包验收):原值=`status == "pass"`;新值=`pass` 或 `partial`;原因=外部参照引擎缺席应降级不应失败。`external_adapter_status` 仍必须在 `{pass, partial, complete}`。
|
||||
|
||||
## 任务 1–5
|
||||
测试不改写仓库:`character_level_inventory_manifest.py` 增加 `--output-dir`;写报告的测试改写 `tmp_path`。`numeric_oracle_gap_queue_v3.py` / `hard_gap_source_hunt_2026_07_23.py` 的测试加 `--no-write`。跑完后 `git status` 无 `docs/research/character_level_*_latest.*`、无那两份 oracle JSON 被改写。
|
||||
|
||||
尚未开始。
|
||||
### 全量红名单处理表
|
||||
|
||||
附录 6 条 staging 独有:
|
||||
|
||||
| 测试 | 分类 | 本轮 |
|
||||
| --- | --- | --- |
|
||||
| `test_fixture_dasha_timeline_rejects_workbuddy_regression_claims` | 任务 0.a 口径 | 绿 |
|
||||
| `test_one_command_user_invocation_acceptance_check` | 连带 + 选项 b | 绿(本机 PyJHora 可用时 `pass`) |
|
||||
| `test_premium_skill_zip_runs_from_clean_directory` | 连带 + 选项 b | 绿 |
|
||||
| `test_local_accuracy_report.py`(`valid_packets >= 4`) | 参考值/oracle:4 包 1 个 `template_only`,校验 3 valid | BLOCKED,不改值 |
|
||||
| `test_historical_event_priority_preserves_vimshottari_actor_difference` | 校正引擎 | BLOCKED |
|
||||
| `test_v3_development_result_stays_shadow_only` | 校正引擎 | BLOCKED |
|
||||
|
||||
附录 83 条生产同样红、13 个收集 ERROR(缺 hypothesis / mcp 2.x):环境类。本机 CI 同款 venv 已有 hypothesis 与 mcp 1.x,收集 ERROR 应消失。未在本轮把 `run_quality_gate.py --profile release` 跑到退出 0。
|
||||
|
||||
## 任务 2
|
||||
|
||||
- 白名单加 `experimental_variant`、`comparison_only`;`calculation` 允许 `experimental`(注册表现况);`rule`/`prediction` 允许 `blocked`。
|
||||
- `comparison_only` 计入 `comparison_only_entries`,政策位与 `audit_only` 同等:不能影响结论。
|
||||
- 断言:`experimental_variant` 的 prediction/rule 必须 `blocked`,`user_visibility` 必须 `expert_audit`。
|
||||
- `scripts/audit_capabilities.py --mode validate`:`valid=true, problem_count=0`(既有 warning:Rangacharya knowledge_ref 缺一篇 spec)。
|
||||
|
||||
## 任务 3
|
||||
|
||||
- `pyproject.toml`、`.codex-plugin/plugin.json`、根 `SKILL.md`、`skill_release_package.py`、`skill_release_manifest.py`、`skills/jyotish-engine-modules/SKILL.md` 改为 `https://git.copse.top/root/Jyotisha`(Bug Reports `/issues`,Documentation 指向 Gitea 上的 `README.md`)。
|
||||
- 发行测试三栏:原值=上游研究仓 GitHub;新值=产品 Gitea;原因=安装说明必须指向产品仓。
|
||||
- `remote_repo_visibility_check.py`:非 GitHub remote 不再退回 `732642856/yinduzhanxing`;报告 `provider: gitea`,用 `git ls-remote`。slug 解析用例未改,新增 Gitea 用例。
|
||||
- 任务书 grep 剩余:`tests/test_remote_repo_visibility_check.py` 的 GitHub slug 解析行(任务书要求保留)。`COVERAGE_AUDIT_REPORT.md` 在 `.gitignore`。hashed `skills/*/versions`、`references/`、`docs/`、import 测试按任务书排除。
|
||||
|
||||
## 任务 4
|
||||
|
||||
`git mv` 四份早期日志到 `docs/history/`,新增 `docs/history/README.md`。`RELEASE_CRITICAL_UNTRACKED_PATHS` 三个路径改为 `docs/history/...`。`README.md` 文档地图与 `AGENTS.md` §4 最后一行已同步。`frontend/tests/staging-backend-workflows.test.ts` 的 docs-only 名单跟着改,避免根路径幽灵。
|
||||
|
||||
## 任务 5
|
||||
|
||||
`git fetch origin --prune` 后,`git branch -r --merged origin/staging` 相对任务书名单:
|
||||
|
||||
- 名单 67 条全部仍在,不少。
|
||||
- 多出已合入、**不删**(不在名单):`codex/rectification-ux-20260903`。
|
||||
- 未合入、**不删**:`codex/rectification-ux-20260902`、`codex/diagnose-rectification-request-20260827`、`fix/staging-gate-checkout-retry`,外加本分支 `codex/repo-hygiene-20260903`。
|
||||
- `git ls-remote --heads origin` 当前 **74**。删名单后预期约 7(`main`、`staging`、本分支、3 条未合入保留、外加已合入但未列入名单的 `rectification-ux-20260903`)。
|
||||
|
||||
删除命令执行结果写在本段之后。
|
||||
|
||||
Reference in New Issue
Block a user