From 51926b582b53c79a5800d302dc1a00b4018698f4 Mon Sep 17 00:00:00 2001 From: weichen Date: Sun, 4 Oct 2026 12:52:50 +0000 Subject: [PATCH 1/9] Record the task card for fix-settings-dotted-keys --- .task/fix-settings-dotted-keys.md | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 .task/fix-settings-dotted-keys.md diff --git a/.task/fix-settings-dotted-keys.md b/.task/fix-settings-dotted-keys.md new file mode 100644 index 00000000..b14450df --- /dev/null +++ b/.task/fix-settings-dotted-keys.md @@ -0,0 +1,25 @@ +# fix/settings-dotted-keys 任务卡 + +任务主记录:;状态:进行中;owner:weichen + +## 基线与授权 + +- 权威仓:ssh://git@git-ssh.u1680832.nyat.app:31411/weichen/Agent-System-Dev.git;目标分支:main;R0(initial_base_sha)= 5d3a4b3ee3e69d9c47eeb2779eb1c7156c42186b +- 工作区:/home/weichen/projects/Agent-System-Dev-wt-fix-settings-dotted-keys(worktree);分支:fix/settings-dotted-keys +- 授权与交付终点:<本次允许的动作与终点;未授权事项写明> + +## 目标与非目标 + +<预期结果、受影响入口/模块/契约;明确不做什么。> + +## 同步记录 + +| 节点 | sync_base_sha | tested_head_sha | checked_at | +|---|---|---|---| +| 启动 | 5d3a4b3ee3e69d9c47eeb2779eb1c7156c42186b | 5d3a4b3ee3e69d9c47eeb2779eb1c7156c42186b | 2026-10-04T12:52:50Z | + +## 结果与验证(完成后填写) + +- 结果: +- 验证: +- 影响与剩余项: -- 2.54.0 From fc8cf3f5aba48b9da8148e434ed5de8f1bd88934 Mon Sep 17 00:00:00 2001 From: weichen Date: Sun, 4 Oct 2026 13:04:11 +0000 Subject: [PATCH 2/9] Pin backend dotted-key settings fix Why: dotted setting writes were stored as unread keys, and secret pools were returned in clear text. Evidence: Backend go test ./... at d90b9c0. Dev make test follows this pin. Impact: the dev branch tracks Backend fix/settings-dotted-keys until that PR merges, then the pin moves to main. Refs: fix/settings-dotted-keys Co-authored-by: Cursor --- .task/fix-settings-dotted-keys.md | 19 +++++++++++++------ modules/backend | 2 +- 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/.task/fix-settings-dotted-keys.md b/.task/fix-settings-dotted-keys.md index b14450df..7a72cef1 100644 --- a/.task/fix-settings-dotted-keys.md +++ b/.task/fix-settings-dotted-keys.md @@ -1,16 +1,23 @@ # fix/settings-dotted-keys 任务卡 -任务主记录:;状态:进行中;owner:weichen +任务主记录:[Backend #61](https://git-home.u1680832.nyat.app:30319/weichen/Agent-System-Backend/pulls/61);Dev PR 待建;状态:进行中;owner:weichen ## 基线与授权 - 权威仓:ssh://git@git-ssh.u1680832.nyat.app:31411/weichen/Agent-System-Dev.git;目标分支:main;R0(initial_base_sha)= 5d3a4b3ee3e69d9c47eeb2779eb1c7156c42186b - 工作区:/home/weichen/projects/Agent-System-Dev-wt-fix-settings-dotted-keys(worktree);分支:fix/settings-dotted-keys -- 授权与交付终点:<本次允许的动作与终点;未授权事项写明> +- 授权与交付终点:修复设置点路径死键、密钥明文返回、掩码写回。改 Backend,Dev 仓推进 gitlink。部署到 dev 环境验收,并重测小队入口。合入由所有者执行。不改 Core,不改前端,不改 svc.sh 播种时序。 ## 目标与非目标 -<预期结果、受影响入口/模块/契约;明确不做什么。> +- 目标:`PUT /api/settings/user|project/{id}` 的点路径键展开成嵌套并生效;嵌套对象与点路径冲突时嵌套胜出;启动时迁移存量点路径键(在注册 Tavily 之前);`GET /api/settings` 按 schema 掩码 secret(含 `apiKeys`);写回 `••••••` 不覆盖已存密钥。 +- 非目标:不按 schema 校验键名。不改前端。不改 Core。不改 svc.sh 播种时序。不修小队路径 `tool.result` 恒为 ok。 + +## 合同、依赖与兼容 + +- 合同:点路径在写入时展开。两种形态并存时嵌套胜出。GET 对 `type=secret` 或 `secret=true` 的路径,以及叶子名 `apiKey`/`api_key`/`apiKeys`/`secret`/`token`,非空值返回 `••••••`。写回该占位符视为未修改。有迁移时日志为 `settings: normalized N dotted key(s) in M scope(s)`。掩码占位符存量只记路径。 +- 依赖:Backend 先合入,再把本仓 gitlink 改钉到 Backend main 的合入提交。 +- 兼容:以前静默失效的点路径写入,升级后会生效。与已存在的嵌套对象冲突时,已生效的嵌套值保持不变。 ## 同步记录 @@ -20,6 +27,6 @@ ## 结果与验证(完成后填写) -- 结果: -- 验证: -- 影响与剩余项: +- 结果:Backend `d90b9c0`,[Backend #61](https://git-home.u1680832.nyat.app:30319/weichen/Agent-System-Backend/pulls/61)。 +- 验证:Backend `go test ./...` 通过。Dev `make test` 与 dev 部署验收待补。 +- 影响与剩余项:升级后点路径写入生效。dev 环境验收、小队入口重测、报告订正在部署之后。合入由所有者执行。 diff --git a/modules/backend b/modules/backend index cd57276f..d90b9c04 160000 --- a/modules/backend +++ b/modules/backend @@ -1 +1 @@ -Subproject commit cd57276f1caa781735478ebdf9d0fe16c05f119b +Subproject commit d90b9c045b20d9a39d43607ed2d955f4c834c557 -- 2.54.0 From 1684a061a0d8109bd5e0f31e5bf33e0a5778d3dd Mon Sep 17 00:00:00 2001 From: weichen Date: Sun, 4 Oct 2026 13:04:26 +0000 Subject: [PATCH 3/9] Record the sync checkpoint --- .task/fix-settings-dotted-keys.md | 1 + 1 file changed, 1 insertion(+) diff --git a/.task/fix-settings-dotted-keys.md b/.task/fix-settings-dotted-keys.md index 7a72cef1..674f0f0a 100644 --- a/.task/fix-settings-dotted-keys.md +++ b/.task/fix-settings-dotted-keys.md @@ -30,3 +30,4 @@ - 结果:Backend `d90b9c0`,[Backend #61](https://git-home.u1680832.nyat.app:30319/weichen/Agent-System-Backend/pulls/61)。 - 验证:Backend `go test ./...` 通过。Dev `make test` 与 dev 部署验收待补。 - 影响与剩余项:升级后点路径写入生效。dev 环境验收、小队入口重测、报告订正在部署之后。合入由所有者执行。 +| 同步前验收 | 3836ea88e3954878f257b7708ae5ccef947ccd79 | f2516ef1ce2dc3ffc702a3a623711978c90de626 | 2026-10-04T13:04:26Z | -- 2.54.0 From e34db45bfe1443ea8e29d0621d86908b6f0b8918 Mon Sep 17 00:00:00 2001 From: weichen Date: Sun, 4 Oct 2026 13:07:39 +0000 Subject: [PATCH 4/9] Record make test evidence on the settings fix Why: the acceptance sync needs the verification result on the task card before review. Evidence: make test exited 0 after task-sync onto 3836ea88e3. Impact: documentation only. The backend pin is unchanged. Refs: fix/settings-dotted-keys Co-authored-by: Cursor --- .task/fix-settings-dotted-keys.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.task/fix-settings-dotted-keys.md b/.task/fix-settings-dotted-keys.md index 674f0f0a..5529702b 100644 --- a/.task/fix-settings-dotted-keys.md +++ b/.task/fix-settings-dotted-keys.md @@ -24,10 +24,10 @@ | 节点 | sync_base_sha | tested_head_sha | checked_at | |---|---|---|---| | 启动 | 5d3a4b3ee3e69d9c47eeb2779eb1c7156c42186b | 5d3a4b3ee3e69d9c47eeb2779eb1c7156c42186b | 2026-10-04T12:52:50Z | +| 同步前验收 | 3836ea88e3954878f257b7708ae5ccef947ccd79 | f2516ef1ce2dc3ffc702a3a623711978c90de626 | 2026-10-04T13:04:26Z | ## 结果与验证(完成后填写) - 结果:Backend `d90b9c0`,[Backend #61](https://git-home.u1680832.nyat.app:30319/weichen/Agent-System-Backend/pulls/61)。 -- 验证:Backend `go test ./...` 通过。Dev `make test` 与 dev 部署验收待补。 +- 验证:Backend `go test ./...` 通过。Dev worktree `make test` 通过(boundaries、pins、libs、core、backend、frontend vitest 77、ui vitest 79、agent-command;exit 0,2026-10-04T13:05:13Z)。dev 部署验收待补。 - 影响与剩余项:升级后点路径写入生效。dev 环境验收、小队入口重测、报告订正在部署之后。合入由所有者执行。 -| 同步前验收 | 3836ea88e3954878f257b7708ae5ccef947ccd79 | f2516ef1ce2dc3ffc702a3a623711978c90de626 | 2026-10-04T13:04:26Z | -- 2.54.0 From 8b63e2bce09d5d3e2b7097c6cfd5e8af18bd46f0 Mon Sep 17 00:00:00 2001 From: weichen Date: Sun, 4 Oct 2026 13:08:24 +0000 Subject: [PATCH 5/9] Link the settings fix task card to its pull requests Why: the task card is the review record and needs the Dev and Backend PR links. Evidence: Dev #181 and Backend #61 exist. Impact: documentation only. Refs: fix/settings-dotted-keys Co-authored-by: Cursor --- .task/fix-settings-dotted-keys.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.task/fix-settings-dotted-keys.md b/.task/fix-settings-dotted-keys.md index 5529702b..77c3bf30 100644 --- a/.task/fix-settings-dotted-keys.md +++ b/.task/fix-settings-dotted-keys.md @@ -1,6 +1,6 @@ # fix/settings-dotted-keys 任务卡 -任务主记录:[Backend #61](https://git-home.u1680832.nyat.app:30319/weichen/Agent-System-Backend/pulls/61);Dev PR 待建;状态:进行中;owner:weichen +任务主记录:[Dev #181](https://git-home.u1680832.nyat.app:30319/weichen/Agent-System-Dev/pulls/181)([Backend #61](https://git-home.u1680832.nyat.app:30319/weichen/Agent-System-Backend/pulls/61));状态:进行中;owner:weichen ## 基线与授权 @@ -28,6 +28,6 @@ ## 结果与验证(完成后填写) -- 结果:Backend `d90b9c0`,[Backend #61](https://git-home.u1680832.nyat.app:30319/weichen/Agent-System-Backend/pulls/61)。 +- 结果:Backend `d90b9c0`,[Backend #61](https://git-home.u1680832.nyat.app:30319/weichen/Agent-System-Backend/pulls/61)。Dev [Dev #181](https://git-home.u1680832.nyat.app:30319/weichen/Agent-System-Dev/pulls/181)。 - 验证:Backend `go test ./...` 通过。Dev worktree `make test` 通过(boundaries、pins、libs、core、backend、frontend vitest 77、ui vitest 79、agent-command;exit 0,2026-10-04T13:05:13Z)。dev 部署验收待补。 - 影响与剩余项:升级后点路径写入生效。dev 环境验收、小队入口重测、报告订正在部署之后。合入由所有者执行。 -- 2.54.0 From fa16e9d2518f8850ff94f9bdddff10fb90d2fce3 Mon Sep 17 00:00:00 2001 From: weichen Date: Sun, 4 Oct 2026 13:39:31 +0000 Subject: [PATCH 6/9] Record dev deployment and squad retest evidence Why: acceptance of the settings fix is the deploy log and the live key checks, and that evidence belongs on the task card. Evidence: dev@8b63e2b logged normalized 4 dotted keys in 2 scopes and registered 1 Tavily key. The web_search probe returned ok. Impact: documentation only. The backend pin is unchanged. Merging stays with the owner. Refs: fix/settings-dotted-keys Co-authored-by: Cursor --- .task/fix-settings-dotted-keys.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.task/fix-settings-dotted-keys.md b/.task/fix-settings-dotted-keys.md index 77c3bf30..1684be09 100644 --- a/.task/fix-settings-dotted-keys.md +++ b/.task/fix-settings-dotted-keys.md @@ -29,5 +29,5 @@ ## 结果与验证(完成后填写) - 结果:Backend `d90b9c0`,[Backend #61](https://git-home.u1680832.nyat.app:30319/weichen/Agent-System-Backend/pulls/61)。Dev [Dev #181](https://git-home.u1680832.nyat.app:30319/weichen/Agent-System-Dev/pulls/181)。 -- 验证:Backend `go test ./...` 通过。Dev worktree `make test` 通过(boundaries、pins、libs、core、backend、frontend vitest 77、ui vitest 79、agent-command;exit 0,2026-10-04T13:05:13Z)。dev 部署验收待补。 -- 影响与剩余项:升级后点路径写入生效。dev 环境验收、小队入口重测、报告订正在部署之后。合入由所有者执行。 +- 验证:Backend `go test ./...` 通过。Dev worktree `make test` 通过(boundaries、pins、libs、core、backend、frontend vitest 77、ui vitest 79、agent-command;exit 0,2026-10-04T13:05:13Z)。dev 部署 `scripts/svc.sh dev deploy --from dev@8b63e2b` 成功(pid 1759380)。库已备份 `runtime/dev/data-backup-20261004T130825Z.db`。启动日志 `normalized 4 dotted key(s) in 2 scope(s)`,`registered (1 key(s))`。库中不再有点路径键,`context.maxHistoryMessages=30` 已是嵌套值。GET 对 Tavily 密钥池返回掩码。点路径写入 `runtime.entry` 后 GET 读到嵌套值,已改回 direct。写回掩码占位符后主模型密钥长度仍为 126。web_search 探针 3 次 status=ok。 +- 影响与剩余项:这次启动迁移让原先无效的点路径写入生效(dev 库的 deliverables.style、runtime.entry、project 历史窗口)。小队入口重测见仓外报告 §10:入口接通,B6 的 delegation.json 解析失败,C4 停在 HITL。合入由所有者执行。合入后把本仓 gitlink 改钉到 Backend main 的合入提交,再 `make test`、`make task-sync`,然后合入 Dev #181。合入后在 worktree 内 `make task-finish`,并把 dev 重新部署到 main。 -- 2.54.0 From 71ea1dcb30b202bbae854bb5c713ffb8a0ea52f2 Mon Sep 17 00:00:00 2001 From: weichen Date: Sun, 4 Oct 2026 13:44:21 +0000 Subject: [PATCH 7/9] Pin backend settings fix at its merge on main Why: the Dev branch must record the Backend main commit that contains the settings fix, not the unmerged feature tip. Evidence: Backend #61 merged as fd17011. Impact: modules/backend gitlink moves from d90b9c0 to fd17011. Behavior is the merged fix. Refs: fix/settings-dotted-keys Co-authored-by: Cursor --- modules/backend | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/backend b/modules/backend index d90b9c04..fd170110 160000 --- a/modules/backend +++ b/modules/backend @@ -1 +1 @@ -Subproject commit d90b9c045b20d9a39d43607ed2d955f4c834c557 +Subproject commit fd17011047e5059e59df5f2f10965c7b6ef34070 -- 2.54.0 From bc115e22e1c91010294b5b5a95449a6587eb4508 Mon Sep 17 00:00:00 2001 From: weichen Date: Sun, 4 Oct 2026 13:44:24 +0000 Subject: [PATCH 8/9] Record the sync checkpoint --- .task/fix-settings-dotted-keys.md | 1 + 1 file changed, 1 insertion(+) diff --git a/.task/fix-settings-dotted-keys.md b/.task/fix-settings-dotted-keys.md index 1684be09..00b8f9fb 100644 --- a/.task/fix-settings-dotted-keys.md +++ b/.task/fix-settings-dotted-keys.md @@ -31,3 +31,4 @@ - 结果:Backend `d90b9c0`,[Backend #61](https://git-home.u1680832.nyat.app:30319/weichen/Agent-System-Backend/pulls/61)。Dev [Dev #181](https://git-home.u1680832.nyat.app:30319/weichen/Agent-System-Dev/pulls/181)。 - 验证:Backend `go test ./...` 通过。Dev worktree `make test` 通过(boundaries、pins、libs、core、backend、frontend vitest 77、ui vitest 79、agent-command;exit 0,2026-10-04T13:05:13Z)。dev 部署 `scripts/svc.sh dev deploy --from dev@8b63e2b` 成功(pid 1759380)。库已备份 `runtime/dev/data-backup-20261004T130825Z.db`。启动日志 `normalized 4 dotted key(s) in 2 scope(s)`,`registered (1 key(s))`。库中不再有点路径键,`context.maxHistoryMessages=30` 已是嵌套值。GET 对 Tavily 密钥池返回掩码。点路径写入 `runtime.entry` 后 GET 读到嵌套值,已改回 direct。写回掩码占位符后主模型密钥长度仍为 126。web_search 探针 3 次 status=ok。 - 影响与剩余项:这次启动迁移让原先无效的点路径写入生效(dev 库的 deliverables.style、runtime.entry、project 历史窗口)。小队入口重测见仓外报告 §10:入口接通,B6 的 delegation.json 解析失败,C4 停在 HITL。合入由所有者执行。合入后把本仓 gitlink 改钉到 Backend main 的合入提交,再 `make test`、`make task-sync`,然后合入 Dev #181。合入后在 worktree 内 `make task-finish`,并把 dev 重新部署到 main。 +| 同步前验收 | 5a791fd1c37a40fcec8178e463c3f91b0153ac28 | 6042402c79b7d992fe3b26d340d85a1df1b9caed | 2026-10-04T13:44:24Z | -- 2.54.0 From 4df29aa7bc89d498f8ddd61ff48fe4dfa3678cfe Mon Sep 17 00:00:00 2001 From: weichen Date: Sun, 4 Oct 2026 13:47:07 +0000 Subject: [PATCH 9/9] Record the backend merge pin and the post-sync test Why: the task card must show that Backend #61 is on main and the Dev branch was retested after syncing. Evidence: make test exited 0 at 2026-10-04T13:45:06Z on the pin of fd17011. Impact: documentation only. Refs: fix/settings-dotted-keys Co-authored-by: Cursor --- .task/fix-settings-dotted-keys.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.task/fix-settings-dotted-keys.md b/.task/fix-settings-dotted-keys.md index 00b8f9fb..417771c9 100644 --- a/.task/fix-settings-dotted-keys.md +++ b/.task/fix-settings-dotted-keys.md @@ -25,10 +25,10 @@ |---|---|---|---| | 启动 | 5d3a4b3ee3e69d9c47eeb2779eb1c7156c42186b | 5d3a4b3ee3e69d9c47eeb2779eb1c7156c42186b | 2026-10-04T12:52:50Z | | 同步前验收 | 3836ea88e3954878f257b7708ae5ccef947ccd79 | f2516ef1ce2dc3ffc702a3a623711978c90de626 | 2026-10-04T13:04:26Z | +| 同步前验收 | 5a791fd1c37a40fcec8178e463c3f91b0153ac28 | 6042402c79b7d992fe3b26d340d85a1df1b9caed | 2026-10-04T13:44:24Z | ## 结果与验证(完成后填写) -- 结果:Backend `d90b9c0`,[Backend #61](https://git-home.u1680832.nyat.app:30319/weichen/Agent-System-Backend/pulls/61)。Dev [Dev #181](https://git-home.u1680832.nyat.app:30319/weichen/Agent-System-Dev/pulls/181)。 +- 结果:Backend #61 已合入,合并提交 `fd17011`。本分支 gitlink 已钉到该提交。Dev [Dev #181](https://git-home.u1680832.nyat.app:30319/weichen/Agent-System-Dev/pulls/181)。 - 验证:Backend `go test ./...` 通过。Dev worktree `make test` 通过(boundaries、pins、libs、core、backend、frontend vitest 77、ui vitest 79、agent-command;exit 0,2026-10-04T13:05:13Z)。dev 部署 `scripts/svc.sh dev deploy --from dev@8b63e2b` 成功(pid 1759380)。库已备份 `runtime/dev/data-backup-20261004T130825Z.db`。启动日志 `normalized 4 dotted key(s) in 2 scope(s)`,`registered (1 key(s))`。库中不再有点路径键,`context.maxHistoryMessages=30` 已是嵌套值。GET 对 Tavily 密钥池返回掩码。点路径写入 `runtime.entry` 后 GET 读到嵌套值,已改回 direct。写回掩码占位符后主模型密钥长度仍为 126。web_search 探针 3 次 status=ok。 -- 影响与剩余项:这次启动迁移让原先无效的点路径写入生效(dev 库的 deliverables.style、runtime.entry、project 历史窗口)。小队入口重测见仓外报告 §10:入口接通,B6 的 delegation.json 解析失败,C4 停在 HITL。合入由所有者执行。合入后把本仓 gitlink 改钉到 Backend main 的合入提交,再 `make test`、`make task-sync`,然后合入 Dev #181。合入后在 worktree 内 `make task-finish`,并把 dev 重新部署到 main。 -| 同步前验收 | 5a791fd1c37a40fcec8178e463c3f91b0153ac28 | 6042402c79b7d992fe3b26d340d85a1df1b9caed | 2026-10-04T13:44:24Z | +- 影响与剩余项:这次启动迁移让原先无效的点路径写入生效(dev 库的 deliverables.style、runtime.entry、project 历史窗口)。小队入口重测见仓外报告 §10:入口接通,B6 的 delegation.json 解析失败,C4 停在 HITL。合入由所有者执行。合入 Dev #181 后在 worktree 内 `make task-finish`,并把 dev 重新部署到 main。 -- 2.54.0