docs(tasktree): document deterministic L1 startup

This commit is contained in:
pikastech
2026-07-21 10:24:30 +02:00
parent dcd17291dd
commit 084e390caf
@@ -96,11 +96,19 @@ HWLAB_TASKTREE_API_URL=http://127.0.0.1:6673 \
```bash
cd web/hwlab-cloud-web
bun run tasktree:native:start
TASKTREE_NATIVE_DATABASE_ENV_FILE=/root/.unidesk/.state/secrets/hwlab/tasktree-nc01-db.env \
TASKTREE_TEMPORAL_ADDRESS="$(trans NC01:k3s kubectl -n temporal get service temporal-frontend \
-o 'jsonpath={.spec.clusterIP}:{.spec.ports[0].port}')" \
bun run tasktree:native:start
bun run tasktree:native:status
```
- lifecycle 操作规则:
- database env 路径必须对应 `config/hwlab-tasktree.yaml` 当前 native target 的
`database.sourceRef`,不得从运行面反解 DSN
- Temporal 地址每次启动时从 Service 动态解析,禁止保存 ClusterIP;
- `start` 必须在启动前一次性报告缺失输入,并在返回成功前确认 supervisor
未立即退出;不得让调用方通过 `start → status → logs` 才发现前置条件缺失;
- `start` 一次拉起三个 TaskTree native 进程;
- `status` 用一个 JSON 结果判定 supervisor 生命周期;
- 只有启动或验收失败时才运行 `bun run tasktree:native:logs`