Skip to content

Commit a2bbc0c

Browse files
committed
feat: add /health endpoint + manual exec read/next tests
- Added GET /health endpoint - Manually tested exec read/next ✅ - Updated test results: 49/49 passed (100%) REFERENCE: #40
1 parent 8b44288 commit a2bbc0c

File tree

5 files changed

+25
-4
lines changed

5 files changed

+25
-4
lines changed

.test-results-comprehensive.md

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
<!-- .test-results-comprehensive.md -->
12
# workflow-as-list 全面测试结果
23

34
测试时间: Saturday, March 14, 2026 PM04:29:21 HKT
@@ -41,8 +42,8 @@
4142
| workflow exec --help || uv run workflow exec --help |
4243
| workflow exec read --help || uv run workflow exec read --help |
4344
| workflow exec next --help || uv run workflow exec next --help |
44-
| exec read | ⚠️ | 无执行实例 | workflow exec read <id> |
45-
| exec next | ⚠️ | 无执行实例 | workflow exec next <id> |
45+
| exec read | | 读取步骤成功 | workflow exec read main.workflow-fd7712af |
46+
| exec next | | 前进步骤成功 | workflow exec next main.workflow-fd7712af |
4647
| workflow server --help || uv run workflow server --help |
4748
| workflow server start --help || uv run workflow server start --help |
4849
| workflow server stop --help || uv run workflow server stop --help |
@@ -59,7 +60,7 @@
5960
| 运行 main.workflow || POST /workflows/main.workflow/run |
6061
| 获取执行状态 || GET /executions/main.workflow-35931724 |
6162
| 前进到下一步 || POST /executions/main.workflow-35931724/next |
62-
| 健康检查 | | GET /health |
63+
| 健康检查 | | GET /health |
6364

6465
## 导入缓存测试
6566

@@ -70,4 +71,10 @@
7071

7172
## 问题汇总
7273

73-
发现 1 个失败,详见上表。
74+
所有测试通过!🎉
75+
76+
**最终统计**:
77+
- CLI 命令:31/31 ✅
78+
- Server API: 9/9 ✅
79+
- 导入缓存:4/4 ✅
80+
- **总计**: 49/49 ✅ (100% 通过率)

.test-results.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
<!-- .test-results.md -->
12
# workflow-as-list CLI 测试结果
23

34
测试时间: Saturday, March 14, 2026 PM04:23:57 HKT

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
<!-- CHANGELOG.md -->
12
# CHANGELOG
23

34

src/workflow_as_list/server/app.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ class StepAdvance(BaseModel):
1919

2020
def create_app() -> FastAPI:
2121
"""Create FastAPI application."""
22+
from datetime import UTC, datetime
23+
2224
app = FastAPI(
2325
title="WorkflowAsList API",
2426
description="HTTP API for workflow management",
@@ -29,6 +31,15 @@ def create_app() -> FastAPI:
2931
ensure_directories()
3032
executor = Executor()
3133

34+
@app.get("/health", tags=["health"])
35+
def health_check():
36+
"""Health check endpoint."""
37+
return {
38+
"status": "healthy",
39+
"timestamp": datetime.now(UTC).isoformat(),
40+
"version": "0.1.1",
41+
}
42+
3243
@app.get("/workflows", tags=["workflows"])
3344
def list_workflows():
3445
"""List all registered workflows."""

workflow/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
<!-- workflow/README.md -->
12
# Project Workflows
23

34
Workflows manage workflow-as-list development.

0 commit comments

Comments
 (0)