fix(ci): untrack .venv symlink and align Beam avatar contract

The staging gate failed on READ_ERROR .venv after a docs commit tracked a
symlink that gitignore .venv/ does not ignore. CI replaces that path with a
real venv directory. Drop the symlink, ignore the name itself, and lock it
in the privacy scan. Also point the Beam avatar source contract at the
current profile-panel copy so npm test stops failing after Python.
This commit is contained in:
jesse-ux
2026-09-20 09:11:24 +08:00
parent 980c77c33e
commit 8dc460da23
7 changed files with 91 additions and 4 deletions
@@ -0,0 +1,43 @@
# 门禁 `.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`(工作树无独立依赖;以门禁为准)。
- 本轮提交:`2bdab58c`。门禁结论在推送后补。
+1
View File
@@ -9,6 +9,7 @@
- [上游私人案例与本机路径清理](PROGRESS-owner-case-purge-20260919.md) — 2026-09-19,执行分支已创建;删除依赖与全仓扫描口径发现任务范围冲突,未交付。
- [侧栏导航注册循环修复与验收](PROGRESS-sidebar-navigation-loop-20260919.md) — 2026-09-19,修复/回归已完成,完整验收与 staging 交付状态见记录。
- [门禁隐私扫描 `.venv` 与头像合同](PROGRESS-privacy-venv-20260920.md) — 2026-09-20,直接执行:删跟踪的 `.venv` 符号链接、对齐 Beam 文案合同(BUG-974/975)。
## 状态板