BE-PR-001: Rename Propose -> Proposal across backend
- Backend: new canonical Proposal model + /proposals router - Backward-compat shims for old Propose imports and /proposes API - Tests updated to use /proposals, legacy compat tests added - Impact checklist: docs/BE-PR-001-rename-impact.md - TASKLIST.md: BE-PR-001 marked complete All 21 proposal tests pass.
This commit is contained in:
Submodule HarborForge.Backend updated: 7fd93cf8a8...cfacd432f5
Submodule HarborForge.Test updated: 23cad37e03...62d339b58c
31
docs/BE-PR-001-rename-impact.md
Normal file
31
docs/BE-PR-001-rename-impact.md
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
# BE-PR-001: Propose → Proposal Rename Impact Checklist
|
||||||
|
|
||||||
|
## Summary
|
||||||
|
Unified all backend Python-level naming from `Propose` to `Proposal`. DB table and column names kept unchanged for backward compatibility (no migration needed).
|
||||||
|
|
||||||
|
## Files Changed
|
||||||
|
|
||||||
|
### New Files
|
||||||
|
- `app/models/proposal.py` — Canonical model: `Proposal`, `ProposalStatus`
|
||||||
|
- `app/api/routers/proposals.py` — Canonical router at `/projects/{id}/proposals`
|
||||||
|
|
||||||
|
### Modified Files
|
||||||
|
- `app/models/propose.py` — Now a backward-compat shim re-exporting from `proposal.py`
|
||||||
|
- `app/api/routers/proposes.py` — Now a backward-compat shim delegating to `proposals.py` (legacy `/proposes` URL still works)
|
||||||
|
- `app/schemas/schemas.py` — Renamed: `ProposalStatusEnum`, `ProposalBase`, `ProposalCreate`, `ProposalUpdate`, `ProposalResponse` (old names kept as aliases)
|
||||||
|
- `app/main.py` — Registers both `proposals_router` (canonical) and `proposes_router` (legacy compat)
|
||||||
|
- `app/init_wizard.py` — Updated comments to say "Proposal" (permission names `propose.*` kept for DB compat)
|
||||||
|
- `tests/test_propose.py` — Updated all tests to use `/proposals` URL; added legacy endpoint compat tests
|
||||||
|
|
||||||
|
## What Was Kept for Backward Compatibility
|
||||||
|
| Item | Kept As-Is | Reason |
|
||||||
|
|------|-----------|--------|
|
||||||
|
| DB table name | `proposes` | Avoid DB migration |
|
||||||
|
| DB column | `propose_code` | Avoid DB migration |
|
||||||
|
| Permission names | `propose.accept`, `propose.reject`, `propose.reopen` | Already stored in DB |
|
||||||
|
| Legacy API path | `/projects/{id}/proposes/*` | Client compat |
|
||||||
|
| Python aliases | `Propose`, `ProposeStatus`, `ProposeCreate`, etc. | Import compat |
|
||||||
|
|
||||||
|
## API Endpoints
|
||||||
|
- **Canonical:** `/projects/{project_id}/proposals` (new)
|
||||||
|
- **Legacy:** `/projects/{project_id}/proposes` (still works, delegates to canonical)
|
||||||
@@ -30,10 +30,10 @@
|
|||||||
|
|
||||||
## B. HarborForge.Backend - Proposal / Essential / Story restricted
|
## B. HarborForge.Backend - Proposal / Essential / Story restricted
|
||||||
|
|
||||||
- [ ] BE-PR-001:后端统一重命名 `Propose` 概念为 `Proposal`(backend only)
|
- [x] BE-PR-001:后端统一重命名 `Propose` 概念为 `Proposal`(backend only)
|
||||||
- [ ] 盘点 `models / schemas / routers / services / tests` 中 `propose` 命名
|
- [x] 盘点 `models / schemas / routers / services / tests` 中 `propose` 命名
|
||||||
- [ ] 明确保留兼容别名还是直接切换
|
- [x] 明确保留兼容别名还是直接切换 → 保留别名 + legacy API 路由
|
||||||
- [ ] 输出重命名影响清单
|
- [x] 输出重命名影响清单 → `docs/BE-PR-001-rename-impact.md`
|
||||||
|
|
||||||
- [ ] BE-PR-002:新增 Proposal 数据模型调整(backend only)
|
- [ ] BE-PR-002:新增 Proposal 数据模型调整(backend only)
|
||||||
- [ ] 调整 Proposal 模型命名与字段注释
|
- [ ] 调整 Proposal 模型命名与字段注释
|
||||||
|
|||||||
8
plans/automation/cron/hf-dev-kimi-scheduler-state.json
Normal file
8
plans/automation/cron/hf-dev-kimi-scheduler-state.json
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
{
|
||||||
|
"createdAt": "2026-03-29T11:50:00Z",
|
||||||
|
"lastRun": null,
|
||||||
|
"totalRuns": 0,
|
||||||
|
"completedTasks": [],
|
||||||
|
"currentTask": null,
|
||||||
|
"status": "active"
|
||||||
|
}
|
||||||
56
plans/automation/cron/hf-dev-kimi-scheduler.prompt.md
Normal file
56
plans/automation/cron/hf-dev-kimi-scheduler.prompt.md
Normal file
@@ -0,0 +1,56 @@
|
|||||||
|
# HarborForge 自动化开发任务 - 定时唤醒
|
||||||
|
# 模型: kimi/k2p5 | Agent: developer
|
||||||
|
# 目标: Discord 1474327736242798612
|
||||||
|
|
||||||
|
## 任务说明
|
||||||
|
|
||||||
|
每次唤醒后执行以下操作:
|
||||||
|
|
||||||
|
### 1. 读取计划文档
|
||||||
|
- 阅读 `/root/.openclaw/workspace/workspace-developer/HarborForge/plans/NEXT_WAVE_DEV_DIRECTION.md`
|
||||||
|
- 理解当前开发方向和架构设计
|
||||||
|
|
||||||
|
### 2. 读取任务列表
|
||||||
|
- 阅读 `/root/.openclaw/workspace/workspace-developer/HarborForge/plans/TASKLIST.md`
|
||||||
|
- 识别未完成的任务项
|
||||||
|
|
||||||
|
### 3. 任务执行策略
|
||||||
|
- 从 TASKLIST.md 中选择一个**未完成的、可独立执行**的任务
|
||||||
|
- 优先选择只涉及单个子模块的任务(Backend/Frontend/CLI/Plugin)
|
||||||
|
- 避免一次任务横跨多个子模块
|
||||||
|
- 如任务过大,拆分为更小的子任务
|
||||||
|
|
||||||
|
### 4. 执行流程
|
||||||
|
1. 创建任务分支(如需要)
|
||||||
|
2. 实现功能代码
|
||||||
|
3. 编写/更新测试
|
||||||
|
4. 本地验证(如可能)
|
||||||
|
5. 提交代码并推送
|
||||||
|
6. 更新 TASKLIST.md,将完成的任务标记为 `[x]`
|
||||||
|
|
||||||
|
### 5. 汇报要求
|
||||||
|
向 Discord channel `1474327736242798612` 发送执行摘要:
|
||||||
|
- 本次处理的任务ID和标题
|
||||||
|
- 完成状态(已完成/部分完成/遇到阻塞)
|
||||||
|
- 关键变更摘要
|
||||||
|
- 下一步计划或遇到的问题
|
||||||
|
|
||||||
|
### 6. 任务完成检测
|
||||||
|
- 检查 TASKLIST.md 中是否还有未完成任务
|
||||||
|
- 如果**所有任务都已完成**:
|
||||||
|
- 在 Discord 汇报最终完成情况
|
||||||
|
- 调用 `openclaw cron delete hf-dev-kimi-scheduler` 删除本定时任务
|
||||||
|
- 说明删除原因
|
||||||
|
|
||||||
|
## 开发原则
|
||||||
|
|
||||||
|
- **单一职责**:每次只处理一个任务
|
||||||
|
- **小步快跑**:任务可拆分则拆分
|
||||||
|
- **及时汇报**:每个任务完成后立即汇报进度
|
||||||
|
- **安全优先**:涉及破坏性变更时先确认
|
||||||
|
|
||||||
|
## 当前上下文
|
||||||
|
|
||||||
|
- 工作目录: `/root/.openclaw/workspace/workspace-developer/HarborForge`
|
||||||
|
- Git 仓库: https://git.hangman-lab.top/zhi/HarborForge
|
||||||
|
- 包含子模块: Backend, Frontend, Cli, Monitor, OpenclawPlugin, Test
|
||||||
Reference in New Issue
Block a user