fix(api): 修复自动墙检父节点筛选与启用语义

统一自动墙检查询逻辑,兼容 parent_id 为 null 或 0 的父节点
将 gfw_check_enabled 的空值视为开启,避免页面显示已启用却未入队

同时调整管理端自动墙检统计仅计算父节点
并更新 CI 配置以忽略 .helloagents 变更触发后端发布
This commit is contained in:
yinjianm
2026-04-28 14:53:19 +08:00
parent 4c66d1fbe0
commit a62a124710
18 changed files with 506 additions and 13 deletions
@@ -0,0 +1,69 @@
# 任务清单: ci-ignore-helloagents-for-backend-docker
> **@status:** completed | 2026-04-28 14:39
```yaml
@feature: ci-ignore-helloagents-for-backend-docker
@created: 2026-04-28
@status: completed
@mode: R2
```
## LIVE_STATUS
```json
{"status":"completed","completed":3,"failed":0,"pending":0,"total":3,"percent":100,"current":"任务全部完成,准备归档方案包","updated_at":"2026-04-28 14:36:00"}
```
## 进度概览
| 完成 | 失败 | 跳过 | 总数 |
|------|------|------|------|
| 3 | 0 | 0 | 3 |
---
## 任务列表
### 1. CI 触发规则
- [√] 1.1 修改 `.github/workflows/docker-publish.yml`
- 预期变更: 在后端 Docker 发布 workflow 的 `on.push.paths-ignore` 中追加 `.helloagents/**`
- 完成标准: `.helloagents/**` 变更被后端 workflow 忽略,现有 `admin-frontend/**` 和前端 workflow ignore 保持不变
- 验证方式: 读取文件并解析 YAML,核对 `paths-ignore` 列表
- depends_on: []
### 2. 知识库同步
- [√] 2.1 更新项目知识库中的 CI 行为记录
- 预期变更: 在项目上下文或对应模块记录后端 Docker workflow 会忽略 `.helloagents/**`
- 完成标准: 知识库描述与 workflow 实际行为一致
- 验证方式: 读取更新后的知识库文件并核对描述
- depends_on: [1.1]
### 3. 验证与收尾
- [√] 3.1 验证 workflow 语法和触发路径推断
- 预期变更: 使用本地 YAML 解析和路径集合核对证明改动满足需求
- 完成标准: workflow YAML 可解析;上一 commit 的 `.helloagents/CHANGELOG.md``admin-frontend/**` 在新规则下不会触发后端 workflow
- 验证方式: PowerShell/Python 本地验证脚本或等效命令输出
- depends_on: [1.1, 2.1]
---
## 执行日志
| 时间 | 任务 | 状态 | 备注 |
|------|------|------|------|
| 2026-04-28 14:35 | 3.1 | completed | 结构化读取 `paths-ignore` 通过;上一 commit 路径全部命中 ignore;后端示例路径未被 ignore;`git diff --check` 通过 |
| 2026-04-28 14:34 | 2.1 | completed | 已新增 `ci-workflows` 模块并在项目上下文记录后端 workflow ignore 规则 |
| 2026-04-28 14:33 | 1.1 | completed | 已在后端 Docker workflow 的 `paths-ignore` 中追加 `.helloagents/**` |
| 2026-04-28 14:32 | DESIGN | completed | 已确定最小方案:后端 workflow 追加 `.helloagents/**` ignore |
---
## 执行备注
本次只处理用户确认的最小范围,不切换到后端 `paths` 白名单,不修改前端 Docker 发布 workflow,不执行 Docker build/push。
验证备注:本机缺少 Python `PyYAML`、Node `yaml/js-yaml` 和 Ruby,因此未执行通用 YAML parser 校验;已通过缩进结构读取确认 `paths-ignore` 列表,并用 `git diff --check` 完成空白错误检查。