Files
Jyotisha/docs/tasks/PROGRESS-privacy-venv-20260920.md
T

47 lines
2.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.
# 门禁 `.venv` 符号链接与头像合同 · 执行记录
## 基线
- 日期:2026-09-20。
- 模式:直接执行(用户要求修复并重跑门禁)。
- 基线:`origin/staging` `980c77c3`。
- 工作树:`.worktrees/privacy-venv-20260920`,分支 `codex/privacy-venv-20260920`。
- 不改 workflow、不提升 main、不动 DNS。主检出未跟踪文件未纳入本轮。
## 事故
| 门禁 | SHA | 失败点 |
| --- | --- | --- |
| [2804](https://git.copse.top/root/Jyotisha/actions/runs/2804)–[2806](https://git.copse.top/root/Jyotisha/actions/runs/2806) | `eb8f5147` 起 | `npm test`:Beam 头像合同 |
| [2807](https://git.copse.top/root/Jyotisha/actions/runs/2807) | `8497587e` | Python 快速门:`READ_ERROR .venv`(858 通过 / 1 失败) |
线上 `/api/health` 仍为上次绿灯 `d6fc4fb8`。
## 根因
1. **BUG-974**:`9375012f` 把 `.venv` 符号链接写进跟踪树;`.gitignore` 的 `.venv/` 不忽略符号链接。门禁 `rm -rf -- .venv && python3 -m venv --clear .venv` 把链接换成目录,隐私扫描对跟踪路径读目录 → `READ_ERROR`。
2. **BUG-975**:设置弹窗头像说明已改,源码合同未改。
## 改动
- `git rm .venv`
- `.gitignore`:`.venv/` → `.venv`
- `tests/test_repo_privacy_markers.py`:锁定 `.venv` 不在 `git ls-files`,且 `check-ignore --no-index .venv` 命中
- `frontend/tests/beam-avatar.test.ts`:对齐现行文案
### 断言三栏(BUG-975)
| 项 | 原值 | 新值 | 原因 |
| --- | --- | --- | --- |
| `beam-avatar.test.ts` 头像说明 | `/Beam 形象由随机种子生成/` | `/Beam 形象会在刷新和换设备后保持一致/` | 组件文案已改;合同锁旧句导致 2804–2806 红 |
## 验证
- `python -m pytest tests/test_repo_privacy_markers.py`:62 collected / 62 passed(基线 60,本轮 +2:`.venv` 不得跟踪、gitignore 覆盖符号链接名)。
- `tsx --test tests/beam-avatar.test.ts`:6/6 通过,含原先红的第 6 条。
- 未跑全量 `npm test` / `run_quality_gate.py --profile quick`(工作树无独立依赖;以门禁为准)。
- 本轮代码提交:`8dc460da`。远端 `staging` 头 `12fdaed9`(文档回填 SHA)。
- 门禁 [2809](https://git.copse.top/root/Jyotisha/actions/runs/2809) validate + publish 成功。
- 迁移 [2810](https://git.copse.top/root/Jyotisha/actions/runs/2810) 成功;部署 [2811](https://git.copse.top/root/Jyotisha/actions/runs/2811) 成功。
- `https://staging.jyotisha.chat/api/health` 的 `deployment.gitCommit` = `12fdaed90b81014378fe5eaa9231e50d2b838a37`。