test(audit): register membership app route
This commit is contained in:
@@ -2442,3 +2442,19 @@
|
|||||||
- 相关记录:BUG-136
|
- 相关记录:BUG-136
|
||||||
- 复发自:无
|
- 复发自:无
|
||||||
- 修复版本:本次提交(staging-only)
|
- 修复版本:本次提交(staging-only)
|
||||||
|
|
||||||
|
## BUG-143 | 新增 membership 页面未同步能力审计精确路由集合
|
||||||
|
|
||||||
|
- 状态:resolved(local candidate,远端 gate 待 follow-up 更新)
|
||||||
|
- 首次发现:2026-08-07
|
||||||
|
- 最近更新:2026-08-07
|
||||||
|
- 影响面:`tests/test_api_server_security.py::test_capability_audit_scans_registry_and_local_sources`、Gitea staging quality gate;会员页实现本身未由本记录改动。
|
||||||
|
- 用户现象:staging gate run `1549` 中 290 passed、1 skipped、1 failed;能力审计已扫描到新 `membership` 页面(位于 `login` 之后、`reports/[reportId]` 之前的排序位置),但测试仍精确断言旧集合,publish 被跳过,自动 deploy 未发生。
|
||||||
|
- 触发条件:新增 `frontend/src/app/membership/page.tsx` 后运行 capability audit 精确集合回归。
|
||||||
|
- 根因:这是 BUG-126(reports 页面)、BUG-132(后台 14 页面)同类精确路由集合防复发模式第三次复发。旧防线失效的直接原因是会员页本地交付矩阵只运行了 frontend tests(`membership-page/sidebar/starter/epay` 等静态合同),没有把 Python 侧 `test_capability_audit_scans_registry_and_local_sources` 纳入同变更验证,因此真实 App Router 路由集合与测试期望再次分叉;该测试由 staging quality gate 动态扫描 `frontend/src/app` 才能捕获。
|
||||||
|
- 修复:在预期排序位置 `login` 之后、`reports/[reportId]` 之前加入 `membership`,保留精确完整集合,不放宽为子集/包含断言。
|
||||||
|
- 验证:本地目标节点 `/Users/jesse/Documents/Jyotisha/.venv/bin/python -m pytest tests/test_api_server_security.py::test_capability_audit_scans_registry_and_local_sources -q` 通过(1 passed);`git diff --check` 通过;远端 staging gate 需在 follow-up 提交/推送后更新确认,本记录不提前声称远端收口。
|
||||||
|
- 防复发:新增或删除任何 `frontend/src/app/**/page.tsx` 页面时,必须在本变更中同步运行 `test_capability_audit_scans_registry_and_local_sources`(或完整 `test_api_server_security.py` 聚焦切片),并在本地验证通过后才进入推送门禁;前端本地矩阵不能替代该 Python 能力审计节点。
|
||||||
|
- 相关记录:BUG-126、BUG-132
|
||||||
|
- 复发自:BUG-126(模式:新增页面未同步能力审计精确路由集合)
|
||||||
|
- 修复版本:待 follow-up commit / gate
|
||||||
|
|||||||
@@ -1588,6 +1588,7 @@ def test_capability_audit_scans_registry_and_local_sources() -> None:
|
|||||||
'admin/users',
|
'admin/users',
|
||||||
'home',
|
'home',
|
||||||
'login',
|
'login',
|
||||||
|
'membership',
|
||||||
'reports/[reportId]',
|
'reports/[reportId]',
|
||||||
]
|
]
|
||||||
assert set(audit['surfaces']['app_visible_topics']) == {
|
assert set(audit['surfaces']['app_visible_topics']) == {
|
||||||
|
|||||||
Reference in New Issue
Block a user