Protect fact-check credentials and verify precise failure claims #621

Merged
weichen merged 11 commits from feature/norm-remediation-u4 into feature/norm-remediation 2026-10-18 17:47:38 +00:00
Owner

feature/norm-remediation-u4 任务卡

任务主记录:PR #621 https://git-home.u1680832.nyat.app:30319/weichen/Agent-System-Dev/pulls/621;状态:已完成(合入前闭合);owner:weichen

  • 权威仓:ssh://git@git-ssh.u1680832.nyat.app:31411/weichen/Agent-System-Dev.git;目标分支:main;R0(initial_base_sha)= eef7e5e778

  • 工作区:/home/weichen/projects/Agent-System-Dev-wt-feature-norm-remediation-u4(worktree);分支:feature/norm-remediation-u4

  • 分支类型:child;initiative_id:feature-norm-remediation;root_target:main;immediate_target:feature/norm-remediation;accepting_requirements:false;parent_branch:feature/norm-remediation;parent_head_sha:6cee4c5728f1c5e723e599986f1f0e4372ec3032;parent_pr:无;parent_source:origin

  • 需求分流:免(父 initiative 子任务登记已列出 feature/norm-remediation-u4;parent_head_sha=6cee4c5728f1c5e723e599986f1f0e4372ec3032)

  • 授权与交付终点:按用户批准的 U1-U7 规范整改计划实施 U4,并完成 Review、测试、PR/CI 后合入 initiative。范围限 policy/facts.md、scripts/facts-verify.sh、tests/test_facts_verify.py;不接触真实凭据、不跑现场事实刷新、不修改平台或其他 U-ID。

  • 交付模式:goal-first(目标、范围和交付终点一次确认;范围内连续推进)

  • 实施执行:agent-per-unit(配置:AGENT-EXECUTION.md)

  • 合入执行:agent(已授权交付范围内,Review 通过、冲突解决且当前 HEAD 的 CI 通过后合入)

  • 流程依据:仓库根目录 policy/delivery.md(归档后仍按仓库根目录定位)

目标与非目标

目标:F2 的验证路径不让展开后的 token 进入子进程 argv、输出或证据;F4 验证只刷新它能证明的事实,DNS/超时/泛化网络错误不能刷新 TLS 特定原因。复用已有 token-safe 请求模式,回归使用合成 HOME/IMC 凭据、桩客户端和临时表,验证正常/异常及 --update 日期语义。

计划:U1-U7 规范整改实施计划 U4(唯一正文位于 Agent-System-Dev-wt-feature-norm-remediation-plan/docs/superpowers/plans/2026-10-18-0849-fix-development-norm-remediation-plan.md)。实际 child 代码基线为 parent_head_sha 6cee4c5;启动收据的 R0 为当时最新 root main 快照,二者不混同。

Agent 实施收据

路由与 fail-stop 规则见根目录 AGENT-EXECUTION.md 与 policy/delivery.md;每次尝试一行,原始日志留在源码外收据路径。

单元 ID 预期范围 配置摘要 角色 候选顺序 attempt CLI/模型 终态 transport fallback 源码外收据路径
norm-u4-safe-credential-truthful-facts facts policy/probes/offline tests caefcb72 implementation cursor, agy, pi 1 cursor-agent-stable / auto success 7e0b0e4ff8 0 /tmp/norm-u4-facts-receipt.json
norm-u4-credential-destination-repair exact destination and redirect negative cases caefcb72 repair cursor, agy, pi 1 cursor-agent-stable / auto success 39834ead7d 0 /tmp/norm-u4-credential-boundary-repair-receipt.json
norm-u4-security-correctness-review independent fixed-diff review and offline replay caefcb72 review pi, agy, cursor, codex 1 pi / minimax-cn/MiniMax-M3 success 25cdc6adc8 0 /tmp/norm-u4-independent-review-receipt.json

同步记录

节点 sync_base_sha tested_head_sha checked_at
启动 eef7e5e778 6cee4c5728 2026-10-18T17:17:00Z

证据(Evidence)

时间(UTC) 命令 被测HEAD exit 来源 sha256(16)

结果与验证

  • 结果:F2 token 仅在进程内读取/发送,不进入 child argv/输出/收据;端点在读取凭据前逐字核对,不跟随 301/302/303/307/308 重定向。F4 将退役禁令与现场 TLS 现象分开,DNS/超时/连接错误/握手成功均不刷新 TLS 特定事实;历史日期明确不证明新判据。
  • 验证:host 在代码候选 39834ead7d5cae48477621b5e68f737ae0082e65 重放 8 项离线事实测试、shell syntax/diff 检查通过;make test-governance 执行 503 项(18 项 skip),无失败(SELF,完整收据经 evidence 导入)。独立 PI Review 同 head 重放 8 项并判无阻塞项。测试先红后绿证据在各 worker receipt;所有用例只使用合成 HOME/IMC 和客户端桩,不读真实凭据、不访问 Gitea。
  • 影响与剩余项:没有刷新任何真实 last_verified 日期;无部署、凭据轮换、平台或其他范围修改。F4 若需重新证明当前 TLS 现象应另行现场重验,不能沿用旧宽泛失败。

合入与清理

  • Review 记录(独立 fresh CLI session,2026-10-18):PI / minimax-cn / MiniMax-M3;host 按 run 03b4578a94b710425f11bd74df523a20、attempt d0bfc2e77832 核验新进程及独立 Review,执行器本地记录为 SELF,不冒充 CI/GATE 身份;
    base/head=6cee4c5728f1c5e723e599986f1f0e4372ec3032..39834ead7d5cae48477621b5e68f737ae0082e65,
    tested_head=39834ead7d5cae48477621b5e68f737ae0082e65(git rev-parse HEAD 已对账);
    离线 focused test PYTHONDONTWRITEBYTECODE=1 python3 -m unittest tests.test_facts_verify -v
    → 8 tests in 4.608s OK(test_f2_pass_sends_home_token_in_process_and_leaks_nowhere / test_f2_missing_or_malformed_credentials_fail_without_echo / test_f2_rejected_or_failing_request_does_not_refresh_or_leak / test_f2_rejects_unregistered_destination_before_reading_credentials / test_f2_refuses_redirect_without_forwarding_authorization / test_f4_only_tls_handshake_failure_passes_and_refreshes / test_f4_helper_reports_each_condition_distinctly / test_registry_separates_retired_endpoint_policy_from_tls_observation);
    bash -n scripts/facts-verify.sh 无语法错误。
    验收逐项:
    · HOME token 仅进程内经 Authorization 头发送,child argv/stderr/stdout/收据/登记表中不存在 HOME/IMC 真实凭据值:test_f2_pass 断言 http 拦截仅 1 次且 url=https://git-home.u1680832.nyat.app:30319/api/v1/user,authorization=token <HOME_TOKEN>;assert_no_secrets 覆盖子进程 argv、PATH 桩 curl/wget argv、stdout/stderr、收据 JSON、登记表;
    · 凭据缺失/格式错/文件缺失三条 subTest 均 FAIL,http 拦截=[] 即未发请求,stderr 含 "ACCESS_TOKEN" 但不含 token 字面值,且 --update 不刷新 F2 日期(保持 OLD_DATE):test_f2_missing_or_malformed_credentials_fail_without_echo;
    · URL 校验 11 个变体(含 http://、不同端口、userinfo、userinfo@、fragment、查询串、路径尾缀 /../、路径变体、尾随空格)全部 exit 6 且无 http 拦截,且 ACCESS_TOKEN 不在 stderr(端点先于凭据校验):test_f2_rejects_unregistered_destination_before_reading_credentials;脚本侧 if sys.argv[2] != ENDPOINT: ... sys.exit(6) 是逐字字符串等价,避开任何 URL 归一化;
    · 301/302/303/307/308 五种全不转发 Authorization:NoRedirect(HTTPRedirectHandler).redirect_request 固定返回 None,stub 拦截 [r["url"] for r in requests]==["https://git-home.u1680832.nyat.app:30319/api/v1/user"] 无后续请求、收不到 redirect-target 主机名,且 --update 模式下 F2 仍是 FAIL 且未刷新日期;
    · F4 仅 TLS 握手错误判 PASS,dns/timeout/refused/reset/tls-timeout/ok 全 FAIL 且不刷新日期:test_f4_only_tls_handshake_failure_passes_and_refreshes;probe tls-handshake-fails 出口 0/3/4/5/6 区分明确,F4 现有 2026-10-14 last_verified 在 policy/facts.md 被显式标注为「历史日期…不证明当前 TLS 层握手失败判据;经该判据独立重验前不得当作已核实」,与 F4 行禁用字符串「不得使用」(政策禁令,相对独立)分离(test_registry_separates_retired_endpoint_policy_from_tls_observation);
    · 测试全离线:socket.socket.connect/_ex = _deny 拒绝未桩接的真实连接,socket.create_connection、ssl.SSLContext.wrap_socket、urllib.request.HTTPSHandler/https_open / http_open 全部经 sitecustomize 桩化;HOME 指向 tmpdir 不读真实 ~/.secrets;PATH 桩化 curl/wget 仅写 argv 日志;全程未触达 Gitea 或旧端点;本评审运行无任何 --update 写回真实 policy/facts.md。
    · reviewer profile/model 以独立运行事件为依据;Shell=bash,Bash 语法 bash -n 通过;Python=3.x,task_triage.TOKEN_RE、task_triage.secrets_file_token()、task_triage.http_get_json()、task_triage.Stop 已直接阅读验证其 token 仅入 Authorization 头、异常消息仅含 type(exc).__name__ 不含凭据。
    无阻塞项;不修正实现;不在本评审做合入/CI/PR 操作(合规范围内仅写一条 review 记录)。
  • 冲突记录:最新 initiative c6fe5ad 已经 task-sync 合入;仅父任务元数据变化,无冲突;实现/测试/事实文件相对已审已测代码候选 39834ead 的 diff 为空,既有直接验证仍适用。
  • CI 记录:NOT_RUN(当前 HEAD 完整 SHA、全部必需检查、运行链接、执行身份及 GATE 结果)
  • 合入记录:NOT_RUN(交付授权范围、PR、被核验 HEAD、合入 SHA、目标分支及内容核验)
  • 清理记录:NOT_RUN(授权依据、写者退出确认、worktree/分支/任务卡处置)
{
  "summary_schema": 1,
  "source": "SELF",
  "timestamp": "2026-10-18T17:16:04.326553+00:00",
  "command": "make precheck",
  "exit_code": 0,
  "cwd": "/home/weichen/projects/Agent-System-Dev",
  "before_head": "eef7e5e778cabcb6216f74b74213a3d7511f383b",
  "after_head": "eef7e5e778cabcb6216f74b74213a3d7511f383b",
  "branch": "main",
  "target_branch": "main",
  "target_head": "eef7e5e778cabcb6216f74b74213a3d7511f383b",
  "root_target": "main",
  "immediate_target": "main",
  "before_tracked_diff_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
  "after_tracked_diff_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
  "output_tail": [
    "make[1]: Entering directory '/home/weichen/projects/Agent-System-Dev'",
    "[repo]   branch=main head=eef7e5e778",
    "[remote] origin/main=eef7e5e778 ahead=0 behind=0",
    "[tree]   clean submodules_drift=0 uninit=12",
    "[warn] 12 个子模块未初始化——构建/测试前需物化(不阻断写入)",
    "[worktrees] linked=8",
    "[recycle] merged un-recycled branches: feature/layered-python-env",
    "[initiatives] local cards (not authoritative): none",
    "[hooks]   core.hooksPath=scripts/hooks(pre-commit/post-merge 实际接线)",
    "[facts]   policy/facts.md 6 条事实均在有效期内",
    "[required-reading] core/baseline.md, workflows/delivery.md §1, policy/delivery.md",
    "[R0] eef7e5e778(完整:eef7e5e778cabcb6216f74b74213a3d7511f383b)",
    "[worktree] before-sync: recursive component checks passed",
    "[verdict] READY — 保留本次 precheck receipt 后建任务工作区:PRECHECK_RECEIPT=/tmp/task-precheck.json make task-start NAME=feature/your-branch",
    "make[1]: Leaving directory '/home/weichen/projects/Agent-System-Dev'"
  ],
  "output_sha256": "b1b224c850fc8ccfd988d17caaf1f716e2c2e07ab50d9c5387de9ed292aa9ad0",
  "receipt_sha256": "818aca5afe7aca05cc3436a020562d87b532a92ebdee7a828b83a39b417e003c",
  "receipt_path": "/home/weichen/.cache/agent-system-dev/evidence/818aca5afe7aca05cc3436a020562d87b532a92ebdee7a828b83a39b417e003c.json"
}
{
  "summary_schema": 1,
  "source": "SELF",
  "timestamp": "2026-10-18T17:22:01.884792+00:00",
  "command": "python3 -m unittest tests.test_facts_verify && bash -n scripts/facts-verify.sh && git diff --check",
  "exit_code": 0,
  "cwd": "/home/weichen/projects/Agent-System-Dev-wt-feature-norm-remediation-u4",
  "before_head": "7e0b0e4ff8c54e9095d86be133965ab1828a8e3d",
  "after_head": "7e0b0e4ff8c54e9095d86be133965ab1828a8e3d",
  "branch": "feature/norm-remediation-u4",
  "target_branch": "main",
  "target_head": "eef7e5e778cabcb6216f74b74213a3d7511f383b",
  "root_target": "main",
  "immediate_target": "feature/norm-remediation",
  "before_tracked_diff_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
  "after_tracked_diff_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
  "output_tail": [
    "......",
    "----------------------------------------------------------------------",
    "Ran 6 tests in 3.532s",
    "",
    "OK"
  ],
  "output_sha256": "0fff5c17193d077cf601d6c73735a79a0074e48107773120f33b8f14d8e71409",
  "receipt_sha256": "7101fa8f0bf09c8e8ca06be96351cc1f81f4a13e69363b427a61b49b37ad9941",
  "receipt_path": "/home/weichen/.cache/agent-system-dev/evidence/7101fa8f0bf09c8e8ca06be96351cc1f81f4a13e69363b427a61b49b37ad9941.json"
}
{
  "summary_schema": 1,
  "source": "SELF",
  "timestamp": "2026-10-18T17:29:35.268634+00:00",
  "command": "python3 -m unittest tests.test_facts_verify && bash -n scripts/facts-verify.sh && git diff --check",
  "exit_code": 0,
  "cwd": "/home/weichen/projects/Agent-System-Dev-wt-feature-norm-remediation-u4",
  "before_head": "39834ead7d5cae48477621b5e68f737ae0082e65",
  "after_head": "39834ead7d5cae48477621b5e68f737ae0082e65",
  "branch": "feature/norm-remediation-u4",
  "target_branch": "main",
  "target_head": "eef7e5e778cabcb6216f74b74213a3d7511f383b",
  "root_target": "main",
  "immediate_target": "feature/norm-remediation",
  "before_tracked_diff_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
  "after_tracked_diff_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
  "output_tail": [
    "........",
    "----------------------------------------------------------------------",
    "Ran 8 tests in 4.333s",
    "",
    "OK"
  ],
  "output_sha256": "c5b777791a060b3d9c4ef8c01df28662e588ac3c05ccd2de96068357ba5438d3",
  "receipt_sha256": "0f6b6ec11bdbe651b8f6f73c82501755916e9f0d495af8cd6c8ddc0dc6e408e1",
  "receipt_path": "/home/weichen/.cache/agent-system-dev/evidence/0f6b6ec11bdbe651b8f6f73c82501755916e9f0d495af8cd6c8ddc0dc6e408e1.json"
}
{
  "summary_schema": 1,
  "source": "SELF",
  "timestamp": "2026-10-18T17:30:04.489780+00:00",
  "command": "make test-governance",
  "exit_code": 0,
  "cwd": "/home/weichen/projects/Agent-System-Dev-wt-feature-norm-remediation-u4",
  "before_head": "39834ead7d5cae48477621b5e68f737ae0082e65",
  "after_head": "39834ead7d5cae48477621b5e68f737ae0082e65",
  "branch": "feature/norm-remediation-u4",
  "target_branch": "main",
  "target_head": "eef7e5e778cabcb6216f74b74213a3d7511f383b",
  "root_target": "main",
  "immediate_target": "feature/norm-remediation",
  "before_tracked_diff_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
  "after_tracked_diff_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
  "output_tail": [
    "test_feature_missing_parent_is_allowed (test_write_guard.WriteGuardTests.test_feature_missing_parent_is_allowed) ... ok",
    "test_invalid_json_is_denied (test_write_guard.WriteGuardTests.test_invalid_json_is_denied) ... ok",
    "test_missing_parent_on_main_is_denied (test_write_guard.WriteGuardTests.test_missing_parent_on_main_is_denied) ... ok",
    "test_missing_unknown_and_malformed_write_input_are_denied (test_write_guard.WriteGuardTests.test_missing_unknown_and_malformed_write_input_are_denied) ... ok",
    "test_non_git_destination_is_explicitly_outside_scope (test_write_guard.WriteGuardTests.test_non_git_destination_is_explicitly_outside_scope) ... ok",
    "test_nonwrite_tools_are_outside_scope (test_write_guard.WriteGuardTests.test_nonwrite_tools_are_outside_scope) ... ok",
    "test_relative_path_uses_hook_cwd_not_process_cwd (test_write_guard.WriteGuardTests.test_relative_path_uses_hook_cwd_not_process_cwd) ... ok",
    "test_symlink_into_main_with_missing_parents_is_denied (test_write_guard.WriteGuardTests.test_symlink_into_main_with_missing_parents_is_denied) ... ok",
    "test_valid_multi_file_patch_on_feature_is_allowed (test_write_guard.WriteGuardTests.test_valid_multi_file_patch_on_feature_is_allowed) ... ok",
    "",
    "----------------------------------------------------------------------",
    "Ran 503 tests in 368.596s",
    "",
    "OK (skipped=18)",
    "make[1]: Leaving directory '/home/weichen/projects/Agent-System-Dev-wt-feature-norm-remediation-u4'"
  ],
  "output_sha256": "54c9dc06bb99075654b296b8d494da68390cc635159c9a364bcc4cf9925c84a0",
  "receipt_sha256": "3621e9d21fb28c174997b1c2fdbc100eda2ad653ea81d96f6206a36b15bf8ba3",
  "receipt_path": "/home/weichen/.cache/agent-system-dev/evidence/3621e9d21fb28c174997b1c2fdbc100eda2ad653ea81d96f6206a36b15bf8ba3.json"
}

| 同步(记录前对象) | c6fe5adba3 | ddad783853 | 2026-10-18T17:37:17Z |

{
  "summary_schema": 1,
  "source": "SELF",
  "timestamp": "2026-10-18T17:36:52.906926+00:00",
  "command": "make task-sync",
  "exit_code": 0,
  "cwd": "/home/weichen/projects/Agent-System-Dev-wt-feature-norm-remediation-u4",
  "before_head": "53897dc218b492c1498637cca9a736143793e3df",
  "after_head": "e2da2fef9a205584ba5d82a9e70cf43ad294c9db",
  "branch": "feature/norm-remediation-u4",
  "target_branch": "main",
  "target_head": "eef7e5e778cabcb6216f74b74213a3d7511f383b",
  "root_target": "main",
  "immediate_target": "feature/norm-remediation",
  "before_tracked_diff_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
  "after_tracked_diff_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
  "output_tail": [
    "make[1]: Entering directory '/home/weichen/projects/Agent-System-Dev-wt-feature-norm-remediation-u4'",
    "[worktree] before-sync: recursive component checks passed",
    "Merge made by the 'ort' strategy.",
    " .task/feature-norm-remediation.md | 16 ++++++++++++++--",
    " 1 file changed, 14 insertions(+), 2 deletions(-)",
    "[worktree] before-update: recursive component checks passed",
    "[worktree] materialize: recursive component checks passed",
    "[worktree] after-sync: recursive component checks passed",
    "admit: ok",
    "[evidence] WARN JSON receipt line 73: unverified: recorded component state was not at its pinned SHA ——关键检查须重跑并以 make evidence 重新写入",
    "[evidence] WARN JSON receipt line 114: recorded HEAD predates non-card changes ——关键检查须重跑并以 make evidence 重新写入",
    "[synced] sync_base=c6fe5adba34d7266e7bcfbb9a2c64a0ae61e9b8e tested_head=e2da2fef9a205584ba5d82a9e70cf43ad294c9db checked_at=2026-10-18T17:37:17Z changed=1 sync_target=feature/norm-remediation",
    "[next] 跑正式验收(make test 等),证据写入任务卡",
    "make[1]: Leaving directory '/home/weichen/projects/Agent-System-Dev-wt-feature-norm-remediation-u4'"
  ],
  "output_sha256": "f0e3a1083a6d4caf71bdb0213510488f7496f8bf8e73ae3bcb8eee8bd940d977",
  "receipt_sha256": "3f384a0ba3dba53089f1d7b26c15265f8bcc7f9007d001e7666e74245388d94d",
  "receipt_path": "/home/weichen/.cache/agent-system-dev/evidence/3f384a0ba3dba53089f1d7b26c15265f8bcc7f9007d001e7666e74245388d94d.json"
}

闭合记录(合入前折叠)

# feature/norm-remediation-u4 任务卡 任务主记录:PR #621 https://git-home.u1680832.nyat.app:30319/weichen/Agent-System-Dev/pulls/621;状态:已完成(合入前闭合);owner:weichen - 权威仓:ssh://git@git-ssh.u1680832.nyat.app:31411/weichen/Agent-System-Dev.git;目标分支:main;R0(initial_base_sha)= eef7e5e778cabcb6216f74b74213a3d7511f383b - 工作区:/home/weichen/projects/Agent-System-Dev-wt-feature-norm-remediation-u4(worktree);分支:feature/norm-remediation-u4 - 分支类型:child;initiative_id:feature-norm-remediation;root_target:main;immediate_target:feature/norm-remediation;accepting_requirements:false;parent_branch:feature/norm-remediation;parent_head_sha:6cee4c5728f1c5e723e599986f1f0e4372ec3032;parent_pr:无;parent_source:origin - 需求分流:免(父 initiative 子任务登记已列出 feature/norm-remediation-u4;parent_head_sha=6cee4c5728f1c5e723e599986f1f0e4372ec3032) - 授权与交付终点:按用户批准的 U1-U7 规范整改计划实施 U4,并完成 Review、测试、PR/CI 后合入 initiative。范围限 `policy/facts.md`、`scripts/facts-verify.sh`、`tests/test_facts_verify.py`;不接触真实凭据、不跑现场事实刷新、不修改平台或其他 U-ID。 - 交付模式:goal-first(目标、范围和交付终点一次确认;范围内连续推进) - 实施执行:agent-per-unit(配置:AGENT-EXECUTION.md) - 合入执行:agent(已授权交付范围内,Review 通过、冲突解决且当前 HEAD 的 CI 通过后合入) - 流程依据:仓库根目录 policy/delivery.md(归档后仍按仓库根目录定位) ## 目标与非目标 目标:F2 的验证路径不让展开后的 token 进入子进程 argv、输出或证据;F4 验证只刷新它能证明的事实,DNS/超时/泛化网络错误不能刷新 TLS 特定原因。复用已有 token-safe 请求模式,回归使用合成 HOME/IMC 凭据、桩客户端和临时表,验证正常/异常及 --update 日期语义。 计划:U1-U7 规范整改实施计划 U4(唯一正文位于 `Agent-System-Dev-wt-feature-norm-remediation-plan/docs/superpowers/plans/2026-10-18-0849-fix-development-norm-remediation-plan.md`)。实际 child 代码基线为 parent_head_sha `6cee4c5`;启动收据的 R0 为当时最新 root main 快照,二者不混同。 ## Agent 实施收据 路由与 fail-stop 规则见根目录 AGENT-EXECUTION.md 与 policy/delivery.md;每次尝试一行,原始日志留在源码外收据路径。 | 单元 ID | 预期范围 | 配置摘要 | 角色 | 候选顺序 | attempt | CLI/模型 | 终态 | transport | fallback | 源码外收据路径 | |---|---|---|---|---|---|---|---|---|---|---| | norm-u4-safe-credential-truthful-facts | facts policy/probes/offline tests | caefcb72 | implementation | cursor, agy, pi | 1 | cursor-agent-stable / auto | success | 7e0b0e4ff8c5 | 0 | /tmp/norm-u4-facts-receipt.json | | norm-u4-credential-destination-repair | exact destination and redirect negative cases | caefcb72 | repair | cursor, agy, pi | 1 | cursor-agent-stable / auto | success | 39834ead7d5c | 0 | /tmp/norm-u4-credential-boundary-repair-receipt.json | | norm-u4-security-correctness-review | independent fixed-diff review and offline replay | caefcb72 | review | pi, agy, cursor, codex | 1 | pi / minimax-cn/MiniMax-M3 | success | 25cdc6adc848 | 0 | /tmp/norm-u4-independent-review-receipt.json | ## 同步记录 | 节点 | sync_base_sha | tested_head_sha | checked_at | |---|---|---|---| | 启动 | eef7e5e778cabcb6216f74b74213a3d7511f383b | 6cee4c5728f1c5e723e599986f1f0e4372ec3032 | 2026-10-18T17:17:00Z | ## 证据(Evidence) <!-- CMD="<命令>" make evidence 写入;手抄/转写输出视为无效证据(AGENTS.md 证据与验证门禁)。 --> | 时间(UTC) | 命令 | 被测HEAD | exit | 来源 | sha256(16) | |---|---|---|---|---|---| ## 结果与验证 - 结果:F2 token 仅在进程内读取/发送,不进入 child argv/输出/收据;端点在读取凭据前逐字核对,不跟随 301/302/303/307/308 重定向。F4 将退役禁令与现场 TLS 现象分开,DNS/超时/连接错误/握手成功均不刷新 TLS 特定事实;历史日期明确不证明新判据。 - 验证:host 在代码候选 `39834ead7d5cae48477621b5e68f737ae0082e65` 重放 8 项离线事实测试、shell syntax/diff 检查通过;`make test-governance` 执行 503 项(18 项 skip),无失败(SELF,完整收据经 evidence 导入)。独立 PI Review 同 head 重放 8 项并判无阻塞项。测试先红后绿证据在各 worker receipt;所有用例只使用合成 HOME/IMC 和客户端桩,不读真实凭据、不访问 Gitea。 - 影响与剩余项:没有刷新任何真实 last_verified 日期;无部署、凭据轮换、平台或其他范围修改。F4 若需重新证明当前 TLS 现象应另行现场重验,不能沿用旧宽泛失败。 ## 合入与清理 - Review 记录(独立 fresh CLI session,2026-10-18):PI / minimax-cn / MiniMax-M3;host 按 run `03b4578a94b710425f11bd74df523a20`、attempt `d0bfc2e77832` 核验新进程及独立 Review,执行器本地记录为 SELF,不冒充 CI/GATE 身份; base/head=6cee4c5728f1c5e723e599986f1f0e4372ec3032..39834ead7d5cae48477621b5e68f737ae0082e65, tested_head=39834ead7d5cae48477621b5e68f737ae0082e65(`git rev-parse HEAD` 已对账); 离线 focused test `PYTHONDONTWRITEBYTECODE=1 python3 -m unittest tests.test_facts_verify -v` → 8 tests in 4.608s OK(test_f2_pass_sends_home_token_in_process_and_leaks_nowhere / test_f2_missing_or_malformed_credentials_fail_without_echo / test_f2_rejected_or_failing_request_does_not_refresh_or_leak / test_f2_rejects_unregistered_destination_before_reading_credentials / test_f2_refuses_redirect_without_forwarding_authorization / test_f4_only_tls_handshake_failure_passes_and_refreshes / test_f4_helper_reports_each_condition_distinctly / test_registry_separates_retired_endpoint_policy_from_tls_observation); bash -n scripts/facts-verify.sh 无语法错误。 验收逐项: · HOME token 仅进程内经 Authorization 头发送,child argv/stderr/stdout/收据/登记表中不存在 HOME/IMC 真实凭据值:test_f2_pass 断言 http 拦截仅 1 次且 url=https://git-home.u1680832.nyat.app:30319/api/v1/user,authorization=token <HOME_TOKEN>;assert_no_secrets 覆盖子进程 argv、PATH 桩 curl/wget argv、stdout/stderr、收据 JSON、登记表; · 凭据缺失/格式错/文件缺失三条 subTest 均 FAIL,http 拦截=[] 即未发请求,stderr 含 "ACCESS_TOKEN" 但不含 token 字面值,且 `--update` 不刷新 F2 日期(保持 OLD_DATE):test_f2_missing_or_malformed_credentials_fail_without_echo; · URL 校验 11 个变体(含 http://、不同端口、userinfo、userinfo@、fragment、查询串、路径尾缀 /../、路径变体、尾随空格)全部 exit 6 且无 http 拦截,且 ACCESS_TOKEN 不在 stderr(端点先于凭据校验):test_f2_rejects_unregistered_destination_before_reading_credentials;脚本侧 `if sys.argv[2] != ENDPOINT: ... sys.exit(6)` 是逐字字符串等价,避开任何 URL 归一化; · 301/302/303/307/308 五种全不转发 Authorization:`NoRedirect(HTTPRedirectHandler).redirect_request` 固定返回 None,stub 拦截 `[r["url"] for r in requests]==["https://git-home.u1680832.nyat.app:30319/api/v1/user"]` 无后续请求、收不到 redirect-target 主机名,且 `--update` 模式下 F2 仍是 FAIL 且未刷新日期; · F4 仅 TLS 握手错误判 PASS,dns/timeout/refused/reset/tls-timeout/ok 全 FAIL 且不刷新日期:test_f4_only_tls_handshake_failure_passes_and_refreshes;probe `tls-handshake-fails` 出口 0/3/4/5/6 区分明确,F4 现有 2026-10-14 last_verified 在 `policy/facts.md` 被显式标注为「历史日期…不证明当前 TLS 层握手失败判据;经该判据独立重验前不得当作已核实」,与 F4 行禁用字符串「不得使用」(政策禁令,相对独立)分离(test_registry_separates_retired_endpoint_policy_from_tls_observation); · 测试全离线:`socket.socket.connect/_ex = _deny` 拒绝未桩接的真实连接,`socket.create_connection`、`ssl.SSLContext.wrap_socket`、`urllib.request.HTTPSHandler/https_open / http_open` 全部经 sitecustomize 桩化;HOME 指向 tmpdir 不读真实 ~/.secrets;PATH 桩化 curl/wget 仅写 argv 日志;全程未触达 Gitea 或旧端点;本评审运行无任何 `--update` 写回真实 `policy/facts.md`。 · reviewer profile/model 以独立运行事件为依据;Shell=bash,Bash 语法 `bash -n` 通过;Python=3.x,`task_triage.TOKEN_RE`、`task_triage.secrets_file_token()`、`task_triage.http_get_json()`、`task_triage.Stop` 已直接阅读验证其 token 仅入 Authorization 头、异常消息仅含 `type(exc).__name__` 不含凭据。 无阻塞项;不修正实现;不在本评审做合入/CI/PR 操作(合规范围内仅写一条 review 记录)。 - 冲突记录:最新 initiative `c6fe5ad` 已经 task-sync 合入;仅父任务元数据变化,无冲突;实现/测试/事实文件相对已审已测代码候选 `39834ead` 的 diff 为空,既有直接验证仍适用。 - CI 记录:NOT_RUN(当前 HEAD 完整 SHA、全部必需检查、运行链接、执行身份及 GATE 结果) - 合入记录:NOT_RUN(交付授权范围、PR、被核验 HEAD、合入 SHA、目标分支及内容核验) - 清理记录:NOT_RUN(授权依据、写者退出确认、worktree/分支/任务卡处置) <!-- Local receipt: SELF. Digests detect corruption; they do not authenticate a reviewer or CI. --> ```json { "summary_schema": 1, "source": "SELF", "timestamp": "2026-10-18T17:16:04.326553+00:00", "command": "make precheck", "exit_code": 0, "cwd": "/home/weichen/projects/Agent-System-Dev", "before_head": "eef7e5e778cabcb6216f74b74213a3d7511f383b", "after_head": "eef7e5e778cabcb6216f74b74213a3d7511f383b", "branch": "main", "target_branch": "main", "target_head": "eef7e5e778cabcb6216f74b74213a3d7511f383b", "root_target": "main", "immediate_target": "main", "before_tracked_diff_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", "after_tracked_diff_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", "output_tail": [ "make[1]: Entering directory '/home/weichen/projects/Agent-System-Dev'", "[repo] branch=main head=eef7e5e778", "[remote] origin/main=eef7e5e778 ahead=0 behind=0", "[tree] clean submodules_drift=0 uninit=12", "[warn] 12 个子模块未初始化——构建/测试前需物化(不阻断写入)", "[worktrees] linked=8", "[recycle] merged un-recycled branches: feature/layered-python-env", "[initiatives] local cards (not authoritative): none", "[hooks] core.hooksPath=scripts/hooks(pre-commit/post-merge 实际接线)", "[facts] policy/facts.md 6 条事实均在有效期内", "[required-reading] core/baseline.md, workflows/delivery.md §1, policy/delivery.md", "[R0] eef7e5e778(完整:eef7e5e778cabcb6216f74b74213a3d7511f383b)", "[worktree] before-sync: recursive component checks passed", "[verdict] READY — 保留本次 precheck receipt 后建任务工作区:PRECHECK_RECEIPT=/tmp/task-precheck.json make task-start NAME=feature/your-branch", "make[1]: Leaving directory '/home/weichen/projects/Agent-System-Dev'" ], "output_sha256": "b1b224c850fc8ccfd988d17caaf1f716e2c2e07ab50d9c5387de9ed292aa9ad0", "receipt_sha256": "818aca5afe7aca05cc3436a020562d87b532a92ebdee7a828b83a39b417e003c", "receipt_path": "/home/weichen/.cache/agent-system-dev/evidence/818aca5afe7aca05cc3436a020562d87b532a92ebdee7a828b83a39b417e003c.json" } ``` <!-- Local receipt: SELF. Digests detect corruption; they do not authenticate a reviewer or CI. --> ```json { "summary_schema": 1, "source": "SELF", "timestamp": "2026-10-18T17:22:01.884792+00:00", "command": "python3 -m unittest tests.test_facts_verify && bash -n scripts/facts-verify.sh && git diff --check", "exit_code": 0, "cwd": "/home/weichen/projects/Agent-System-Dev-wt-feature-norm-remediation-u4", "before_head": "7e0b0e4ff8c54e9095d86be133965ab1828a8e3d", "after_head": "7e0b0e4ff8c54e9095d86be133965ab1828a8e3d", "branch": "feature/norm-remediation-u4", "target_branch": "main", "target_head": "eef7e5e778cabcb6216f74b74213a3d7511f383b", "root_target": "main", "immediate_target": "feature/norm-remediation", "before_tracked_diff_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", "after_tracked_diff_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", "output_tail": [ "......", "----------------------------------------------------------------------", "Ran 6 tests in 3.532s", "", "OK" ], "output_sha256": "0fff5c17193d077cf601d6c73735a79a0074e48107773120f33b8f14d8e71409", "receipt_sha256": "7101fa8f0bf09c8e8ca06be96351cc1f81f4a13e69363b427a61b49b37ad9941", "receipt_path": "/home/weichen/.cache/agent-system-dev/evidence/7101fa8f0bf09c8e8ca06be96351cc1f81f4a13e69363b427a61b49b37ad9941.json" } ``` <!-- Local receipt: SELF. Digests detect corruption; they do not authenticate a reviewer or CI. --> ```json { "summary_schema": 1, "source": "SELF", "timestamp": "2026-10-18T17:29:35.268634+00:00", "command": "python3 -m unittest tests.test_facts_verify && bash -n scripts/facts-verify.sh && git diff --check", "exit_code": 0, "cwd": "/home/weichen/projects/Agent-System-Dev-wt-feature-norm-remediation-u4", "before_head": "39834ead7d5cae48477621b5e68f737ae0082e65", "after_head": "39834ead7d5cae48477621b5e68f737ae0082e65", "branch": "feature/norm-remediation-u4", "target_branch": "main", "target_head": "eef7e5e778cabcb6216f74b74213a3d7511f383b", "root_target": "main", "immediate_target": "feature/norm-remediation", "before_tracked_diff_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", "after_tracked_diff_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", "output_tail": [ "........", "----------------------------------------------------------------------", "Ran 8 tests in 4.333s", "", "OK" ], "output_sha256": "c5b777791a060b3d9c4ef8c01df28662e588ac3c05ccd2de96068357ba5438d3", "receipt_sha256": "0f6b6ec11bdbe651b8f6f73c82501755916e9f0d495af8cd6c8ddc0dc6e408e1", "receipt_path": "/home/weichen/.cache/agent-system-dev/evidence/0f6b6ec11bdbe651b8f6f73c82501755916e9f0d495af8cd6c8ddc0dc6e408e1.json" } ``` <!-- Local receipt: SELF. Digests detect corruption; they do not authenticate a reviewer or CI. --> ```json { "summary_schema": 1, "source": "SELF", "timestamp": "2026-10-18T17:30:04.489780+00:00", "command": "make test-governance", "exit_code": 0, "cwd": "/home/weichen/projects/Agent-System-Dev-wt-feature-norm-remediation-u4", "before_head": "39834ead7d5cae48477621b5e68f737ae0082e65", "after_head": "39834ead7d5cae48477621b5e68f737ae0082e65", "branch": "feature/norm-remediation-u4", "target_branch": "main", "target_head": "eef7e5e778cabcb6216f74b74213a3d7511f383b", "root_target": "main", "immediate_target": "feature/norm-remediation", "before_tracked_diff_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", "after_tracked_diff_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", "output_tail": [ "test_feature_missing_parent_is_allowed (test_write_guard.WriteGuardTests.test_feature_missing_parent_is_allowed) ... ok", "test_invalid_json_is_denied (test_write_guard.WriteGuardTests.test_invalid_json_is_denied) ... ok", "test_missing_parent_on_main_is_denied (test_write_guard.WriteGuardTests.test_missing_parent_on_main_is_denied) ... ok", "test_missing_unknown_and_malformed_write_input_are_denied (test_write_guard.WriteGuardTests.test_missing_unknown_and_malformed_write_input_are_denied) ... ok", "test_non_git_destination_is_explicitly_outside_scope (test_write_guard.WriteGuardTests.test_non_git_destination_is_explicitly_outside_scope) ... ok", "test_nonwrite_tools_are_outside_scope (test_write_guard.WriteGuardTests.test_nonwrite_tools_are_outside_scope) ... ok", "test_relative_path_uses_hook_cwd_not_process_cwd (test_write_guard.WriteGuardTests.test_relative_path_uses_hook_cwd_not_process_cwd) ... ok", "test_symlink_into_main_with_missing_parents_is_denied (test_write_guard.WriteGuardTests.test_symlink_into_main_with_missing_parents_is_denied) ... ok", "test_valid_multi_file_patch_on_feature_is_allowed (test_write_guard.WriteGuardTests.test_valid_multi_file_patch_on_feature_is_allowed) ... ok", "", "----------------------------------------------------------------------", "Ran 503 tests in 368.596s", "", "OK (skipped=18)", "make[1]: Leaving directory '/home/weichen/projects/Agent-System-Dev-wt-feature-norm-remediation-u4'" ], "output_sha256": "54c9dc06bb99075654b296b8d494da68390cc635159c9a364bcc4cf9925c84a0", "receipt_sha256": "3621e9d21fb28c174997b1c2fdbc100eda2ad653ea81d96f6206a36b15bf8ba3", "receipt_path": "/home/weichen/.cache/agent-system-dev/evidence/3621e9d21fb28c174997b1c2fdbc100eda2ad653ea81d96f6206a36b15bf8ba3.json" } ``` | 同步(记录前对象) | c6fe5adba34d7266e7bcfbb9a2c64a0ae61e9b8e | ddad7838535ae06070bfef973106e582c75c6380 | 2026-10-18T17:37:17Z | <!-- Local receipt: SELF. Digests detect corruption; they do not authenticate a reviewer or CI. --> ```json { "summary_schema": 1, "source": "SELF", "timestamp": "2026-10-18T17:36:52.906926+00:00", "command": "make task-sync", "exit_code": 0, "cwd": "/home/weichen/projects/Agent-System-Dev-wt-feature-norm-remediation-u4", "before_head": "53897dc218b492c1498637cca9a736143793e3df", "after_head": "e2da2fef9a205584ba5d82a9e70cf43ad294c9db", "branch": "feature/norm-remediation-u4", "target_branch": "main", "target_head": "eef7e5e778cabcb6216f74b74213a3d7511f383b", "root_target": "main", "immediate_target": "feature/norm-remediation", "before_tracked_diff_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", "after_tracked_diff_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", "output_tail": [ "make[1]: Entering directory '/home/weichen/projects/Agent-System-Dev-wt-feature-norm-remediation-u4'", "[worktree] before-sync: recursive component checks passed", "Merge made by the 'ort' strategy.", " .task/feature-norm-remediation.md | 16 ++++++++++++++--", " 1 file changed, 14 insertions(+), 2 deletions(-)", "[worktree] before-update: recursive component checks passed", "[worktree] materialize: recursive component checks passed", "[worktree] after-sync: recursive component checks passed", "admit: ok", "[evidence] WARN JSON receipt line 73: unverified: recorded component state was not at its pinned SHA ——关键检查须重跑并以 make evidence 重新写入", "[evidence] WARN JSON receipt line 114: recorded HEAD predates non-card changes ——关键检查须重跑并以 make evidence 重新写入", "[synced] sync_base=c6fe5adba34d7266e7bcfbb9a2c64a0ae61e9b8e tested_head=e2da2fef9a205584ba5d82a9e70cf43ad294c9db checked_at=2026-10-18T17:37:17Z changed=1 sync_target=feature/norm-remediation", "[next] 跑正式验收(make test 等),证据写入任务卡", "make[1]: Leaving directory '/home/weichen/projects/Agent-System-Dev-wt-feature-norm-remediation-u4'" ], "output_sha256": "f0e3a1083a6d4caf71bdb0213510488f7496f8bf8e73ae3bcb8eee8bd940d977", "receipt_sha256": "3f384a0ba3dba53089f1d7b26c15265f8bcc7f9007d001e7666e74245388d94d", "receipt_path": "/home/weichen/.cache/agent-system-dev/evidence/3f384a0ba3dba53089f1d7b26c15265f8bcc7f9007d001e7666e74245388d94d.json" } ``` ## 闭合记录(合入前折叠) - 本卡在 PR #621(https://git-home.u1680832.nyat.app:30319/weichen/Agent-System-Dev/pulls/621)合入前闭合并归档,随该 PR 一同合入。 - 该 PR 的合并提交即本任务的落地记录。 - 合入后无需回填,也无需单独的闭合 PR。
weichen added 10 commits 2026-10-18 17:38:02 +00:00
Why: establish the authorized task workspace and its initial baseline.

Evidence: preserved precheck receipt in .task/feature-norm-remediation-u4.md; R0=eef7e5e778cabcb6216f74b74213a3d7511f383b.

Impact: task metadata only; the feature workspace starts at 6cee4c5728.

Refs: .task/feature-norm-remediation-u4.md
Why: Bind the worker to approved U4 paths and offline regression scenarios.

Evidence: U4 plan and strict READY receipt; parent head 6cee4c5.

Impact: Task metadata only.

Refs: PR #616
Why: Save offline verification before the final credential-boundary repair.

Evidence: Six offline fact verification tests and syntax/diff checks passed on 7e0b0e4.

Impact: SELF task record only.

Refs: U4 remediation plan
Why: Preserve credential-boundary and truthful-fact verification before delivery.

Evidence: Eight offline tests and 503 governance tests passed (18 skipped); independent fresh PI review has no blocker.

Impact: Task record only; implementation remains at reviewed candidate 39834ead.

Refs: U4 remediation plan
Why: include the current parent initiative baseline before verification.

Evidence: resolved feature/norm-remediation=c6fe5adba34d7266e7bcfbb9a2c64a0ae61e9b8e.

Impact: integrate parent initiative changes without rewriting task history.

Refs: task-sync
Why: bind the task validation checkpoint to the integration baseline.

Evidence: SELF recursive component checks; sync_base=c6fe5adba34d7266e7bcfbb9a2c64a0ae61e9b8e; before_record=ddad7838535ae06070bfef973106e582c75c6380.

Impact: task metadata only.

Refs: .task/feature-norm-remediation-u4.md
Record U4 delivery sync
ci / test-pg (pull_request) Skipped
ci / svc-realcombo (pull_request) Skipped
ci / test (pull_request) Failing after 5m37s
a5318e58a9
Why: Preserve the current initiative sync and distinguish skipped tests accurately.

Evidence: task-sync merged c6fe5ad with task metadata only; implementation diff from 39834ead remains empty.

Impact: Task record only; candidate ready for exact-head CI.

Refs: PR #616
weichen added 1 commit 2026-10-18 17:38:14 +00:00
Fold-close the task card before merge
ci / svc-realcombo (pull_request) Skipped
ci / test (pull_request) Successful in 7m33s
ci / test-pg (pull_request) Skipped
4b718344c7
Why: close the task card inside its own PR so landing it needs no post-merge backfill or separate close PR.
Evidence: .task/feature-norm-remediation-u4.md -> .task/archive/feature-norm-remediation-u4.md; status 已完成(合入前闭合); PR #621 https://git-home.u1680832.nyat.app:30319/weichen/Agent-System-Dev/pulls/621.
Impact: task metadata only; the card is archived within PR #621 and lands with its merge commit.
Refs: task.sh close --self
weichen merged commit 825e4fc98f into feature/norm-remediation 2026-10-18 17:47:38 +00:00
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: weichen/Agent-System-Dev#621