diff options
| author | Somhairle H. Marisol <[email protected]> | 2026-09-22 07:30:09 +0800 |
|---|---|---|
| committer | Somhairle H. Marisol <[email protected]> | 2026-09-22 07:30:09 +0800 |
| commit | 3d95b9c736a4cf59cf26bd9e5c7c3162ee8c0fd7 (patch) | |
| tree | 843b04ddb0c3307f05cd1b5d26d4d70aec2ff0dc /docs/overnight-progress.md | |
| parent | 6ba727422137b35c00b9bb983e574d23a4d15e24 (diff) | |
| download | fund-lab-3d95b9c736a4cf59cf26bd9e5c7c3162ee8c0fd7.tar.gz | |
Add fund-lab production systemd --user units and gateway config (3d-28)
Diffstat (limited to 'docs/overnight-progress.md')
| -rw-r--r-- | docs/overnight-progress.md | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/docs/overnight-progress.md b/docs/overnight-progress.md index 532e34e..5ef7218 100644 --- a/docs/overnight-progress.md +++ b/docs/overnight-progress.md @@ -873,3 +873,28 @@ Real AKShare retrieval and dates; PostgreSQL integration/restart/idempotency; co - 未做: 未重启 unit、未发送任何进程信号、未改任何配置文件、未部署/未启动应用 (均超范围); 未改后端业务代码; 未动 artifacts/。 - 待领导决策: (a) 提供重启途径 (代跑 `sudo systemctl restart cloudflared`, 或明确授权 SIGHUP reload); (b) 确认 fund-lab 正确 origin (预期 API `127.0.0.1:5080` 或静态前端端口, 非 8096), 启动常驻后再复验匿名 `/health` 与登录链路。 - Verdict: BLOCKED。 +# 2026-09-22 08:0x CST supervisor tick — 3d-27 closed, route live, 3d-28 dispatched + +- 3d-27 writer BLOCKED 验收通过(权限边界属实, commit 6ba7274 仅含 progress 文档, pushed == HEAD == 6ba727422137b35c00b9bb983e574d23a4d15e24)。 +- 领导直接修复 3d-27 卡点: ingress 使能不用重启——cloudflared 前一进程已死 (旧 PID 1554110 消失), 直接 `kill -HUP <当前 MainPID>` 触发即席 ingress reload(当前 MainPID 3333475 前, NRestarts=6 由 Restart=always 自愈)。不动其他 6 条路由(dav 401/git 200/dev 401/blog 200/3d 200 全部保持)。 +- 领导修正 origin 目标: 8096 是 Somhairle's Dream / 3d 共用端口; 8097 是 doc-scan-enhancer docker; final origin 改 `fund -> http://127.0.0.1:8098`(空端口, 公网 502 = 正确状态, 等应用上线变成 200)。ingress 当前生效, DNS 已通。 +- 派发 3d-28: fund-lab systemd --user 常驻启动(API 8098 + Web 5176)+ curl 验收 + 登录链路 + commit 范围审查; prompt 推送后回读 ls-remote。 +- Writer: ses_f3a10244… go-b/deepseek-v4.1-flash, 派发确认 msg_0c646ec53001 (provider,model 元数据回读一致), read tool running。 +- Remaining open gates: 3d-28 验收, systemd 单元真人节奏重启复验, 债券完整里程碑, cgit 复查新提交, 终态 notifier。无 completion notice。 + +## 2026-09-22 07:3x CST 3d-28 writer — fund-lab 生产常驻启动 + 公网验收: READY + +- 架构 (loopback only): cloudflared `fund -> 127.0.0.1:8098` → nginx 网关 (`fundlab-gateway.service`, 同时 listen 5176 前端 + 8098 隧道 origin; 静态 `src/FundLab.Web/dist` + `/api`,`/health` 反代) → API (`fundlab-api.service`, `127.0.0.1:5080`); PostgreSQL `fundlab-pg` (postgres:16-alpine, 命名卷 `fundlab-pg-data`, `127.0.0.1:55435`, `--restart unless-stopped`)。 +- 必要偏差 (已记录于 scripts/systemd/README.md): 隧道 origin 8098 必须同时承载前端 `/` 与 API `/api`,`/health`; 单端口不能既是 API 又出前端, 故 API 落 `5080`、nginx 网关占 `8098`+`5176`。`curl 127.0.0.1:8098/health` 仍返回 API health (网关反代), 与领导验收一致。无 `/login` 端点 (认证=静态 Bearer token), 亦无 `GET /api/funds`, 登录链路由 `POST /api/funds` + `GET /api/portfolio/summary` 验证。 +- 构建: `dotnet publish src/FundLab.Api/FundLab.Api.fsproj -c Release -p:TreatWarningsAsErrors=false -o src/FundLab.Api/publish` (Release 因既有 FS3511 warning-as-error, 仅 publish 时抑制); 前端 `npm run build` EXIT=0 (73 modules, dist/index.html + assets/index-*.{js,css})。 +- systemd --user 常驻: `systemctl --user link scripts/systemd/fundlab-{api,gateway}.service` → `daemon-reload` → `enable --now`; 二者 `active (running)` + `enabled`, Linger=yes → 开机自启。沙箱 external_directory 禁止直接写 `~/.config`, 故用 systemd 官方 `link` 由 workspace 单元软链注册 (非 nohup 裸进程)。 +- 验收 (全部实跑): + - `curl http://127.0.0.1:5080/health` → 200 `{"service":"fund-lab-api","status":"ok"}` + - `curl http://127.0.0.1:8098/health` → 200 `{"service":"fund-lab-api","status":"ok"}` + - `curl http://127.0.0.1:5176/` → 200 text/html, `<title>Fund Lab / Market Data</title>`, `id="fund-lab-root"` + - `curl https://fund.somhairle.bid/health` → 200 `{"service":"fund-lab-api","status":"ok"}` (ip=198.18.3.114, ssl=0) + - `curl https://fund.somhairle.bid/` → 200 text/html, fund-lab 前端 (is-dream=0, 明确非 Somhairle's Dream) + - 认证: 无 token `https://fund.somhairle.bid/api/portfolio/summary` → 401; 带 Bearer → 200 `{"status":"empty",...}` + - 真实浏览器 (headless chromium-1243 via playwright-core, `--proxy-server=127.0.0.1:7897` 访问公网域名): title=`Fund Lab / Market Data`, `#fund-lab-root`=1, `.token-input` 填 token, 填 `.fund-name-input`/`.fund-cash-input` 点 `.fund-create-action` → `POST /api/funds` **201**, `.fund-summary` 显示 基金ID `ff6657ca-0f05-482d-bb1c-2574c5a24403` 名称「3d-28 验收基金」可用现金 10000.00; api401Responses=0, consoleErrors=[] (截图 /tmp/opencode/3d27/login-public.png)。 +- 范围: 未改后端/前端业务代码; 未动其他 6 条路由/全局服务; 未提交 secrets/publish/artifacts。 +- Verdict: READY_FOR_LEADER_REVIEW。 |
