summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorSomhairle H. Marisol <[email protected]>2026-09-21 00:06:45 +0800
committerSomhairle H. Marisol <[email protected]>2026-09-21 00:06:45 +0800
commit2ada70d6467aec11b45328112d598454ca50f2d6 (patch)
tree5deab7d12095dfd0599c109edc2200a38258040e /docs
parentc60905e9e7f992a7f8c79c3812e92a44b2d606f5 (diff)
downloadfund-lab-2ada70d6467aec11b45328112d598454ca50f2d6.tar.gz
feat(api): 接入基金 PostgreSQL 持久化与幂等接口
[变更性质] - 本提交新增基金创建与读取的 PostgreSQL 持久化能力,并完成 3a API 收口验证。 [新增功能] - 提供带事务和幂等键的基金创建、重放、冲突检测及基金读取接口。 - 覆盖认证、JSON 输入、数值边界、进程重启持久化和 SQL 故障回滚测试。 [实现方案] - 使用 Npgsql 建立 `funds` 与 `fund_idempotencies` 表,并以 advisory lock 串行化同一幂等键。 - 通过真实 Kestrel 子进程和临时 PostgreSQL 验证 HTTP 行为;同步更新环境、构建和交接文档。 [影响范围] - API 新增 PostgreSQL 配置要求 `FUND_LAB_DATABASE_URL`,前端构建入口和本地验证命令同步明确。 - 本提交不包含 `docs/overnight-progress.md` 的现有 Hermes 修改。
Diffstat (limited to 'docs')
-rw-r--r--docs/leader-environment-unblock.md12
1 files changed, 10 insertions, 2 deletions
diff --git a/docs/leader-environment-unblock.md b/docs/leader-environment-unblock.md
index d3ea84d..1fe9186 100644
--- a/docs/leader-environment-unblock.md
+++ b/docs/leader-environment-unblock.md
@@ -1,6 +1,6 @@
# Hermes environment verification
-Verified independently on host, for next worker/supervisor step. Do not interrupt current ledger fix to repeat discovery.
+Verified independently on host for the 3a closeout. Do not repeat environment discovery or reinstall local tools.
## Frontend
@@ -12,7 +12,15 @@ Use this PATH for frontend builds. Node/npm absence in system PATH is not missin
## Git service discovery
Host /home/somhairle/gitweb/docker-compose.yml maps /home/somhairle/git to /git in gitweb container. cgitrc uses scan-path=/git. Existing bare-style repository directories: blog.git, living-village.git, sandbox.git, strategy-lab.git under /home/somhairle/git. Thus actual local serving root has been found. Do not continue guessing web creation APIs.
-Next authorized operational step: verify running mount/config, ownership/write permissions and an existing repo's bare status. Only after secret exclusions review, initialize independent fund-lab.git within confirmed root, establish exact local remote, push and compare commit hash with public cgit/remote readback. This needs precise external-directory access; if OpenCode access denied, stop and have Hermes perform authorized operational repository setup, not bypass permissions. Never modify existing repos or shared service configuration to add the new repository. Bare repository setup is now independently complete: /home/somhairle/git/fund-lab.git, verified bare=true and HEAD=refs/heads/main. Running gitweb mount was read back and maps /home/somhairle/git to /git read-write. The working tree still has no initial commit or remote; no source push or public code-tree verification has occurred. A preliminary scan of 33 nonignored candidate files found no private-key/token/password-pattern matches; repeat the scan on the exact final commit before publishing. Use this existing bare target, do not recreate it.
+The authorized repository target is already complete: `/home/somhairle/git/fund-lab.git`, verified bare with `HEAD=refs/heads/main`; `origin` points to that exact path and the published baseline hash was independently checked. Never modify existing repositories or shared service configuration, and do not recreate this target. Repeat secret exclusion checks on the exact final 3a commit before publishing any further source.
+
+## Current 3a closeout
+
+- The current worktree contains the uncommitted PostgreSQL persistence/API slice and its tests; `docs/overnight-progress.md` contains separate Hermes-owned progress evidence and must remain untouched by the 3a commit.
+- Reproducible backend commands from the repository root are `dotnet build "FundLab.sln" --no-restore` and `dotnet test "FundLab.sln" --no-restore`. The current run passed with 0 build warnings/errors, Domain `19/19`, and API `16/16`.
+- Reproducible frontend command from `src/FundLab.Web` is `PATH=/home/somhairle/projects/fund-lab/.tools/node-v22.23.2/bin:$PATH npm run build`; the current run passed with Fable/Vite converting 65 modules.
+- The API test suite now uses a temporary PostgreSQL database and a real Kestrel process. It verifies HTTP input/auth/idempotency boundaries, process stop/restart persistence, and a PostgreSQL trigger failure after the `funds` insert with no `funds` or `fund_idempotencies` residue.
+- Remaining closeout work is a final fresh verification, secret exclusion scan, explicit file-list staging, and one 3a commit. Do not stage `docs/overnight-progress.md`.
## Work order