Why: F2 token extraction predates the two-section (HOME/IMC) layout of ~/.secrets/gitea so it concatenated both tokens and always failed; F6 registered a grep BRE alternation that facts-verify unescapes into a literal pipe, failing re-verification and misaligning precheck's naive pipe split into a spurious F6 date-format expiry warning, while both underlying facts still hold. Evidence: make facts-verify now 6/6 PASS with last_verified refreshed to 2026-10-14; new regression test for escaped pipes in facts rows; full governance suite 342 tests OK (18 skipped); precheck [facts] line reports all facts fresh on the fixed parser. Impact: policy/facts.md F2 (HOME-section awk extraction) and F6 (negated pipe-free grep); scripts/task.sh precheck neutralizes escaped pipes the same way facts-verify does; tests/test_task.py covers it. Refs: precheck WARN 过期事实 F6(日期格式); AGENTS.md 证据与验证门禁.
2.4 KiB
2.4 KiB
项目外部事实登记表
规则见 AGENTS.md「证据与验证门禁」与 deps/development-guidelines/standards/verification.md「声明与证据来源」。
- 每条事实 = 陈述 + 验证命令 + last_verified + TTL;引用前必须先执行其验证命令(外部事实零信任)。
- 过期(>TTL)必须重验后更新:
make facts-verify逐条重验,make facts-verify ARGS=--update把 PASS 项的 last_verified 刷新为当天并写回本表(随 PR 合入)。 - 表内验证命令不得含竖线
|(保持表格与解析可核);新增事实先实测再登记,不得凭记忆填日期。 - precheck 的
[facts]行报告过期项;AGENTS.md「Gitea 与 Git 访问事实」节为本表的叙述版。
| ID | 事实 | 验证命令 | last_verified | TTL(天) |
|---|---|---|---|---|
| F1 | Gitea Web/API 可达:https://git-home.u1680832.nyat.app:30319(1.27.3) | curl -fsS -m 10 https://git-home.u1680832.nyat.app:30319/api/v1/version |
2026-10-14 | 30 |
| F2 | API token 存在且可用(值在 ~/.secrets/gitea,HOME/IMC 两段各一组 - ACCESS_TOKEN=…,本条取 HOME 段;不入仓不回显) |
t=$(awk '/^HOME:/{h=1;next} /^IMC:/{h=0} h&&sub(/^- ACCESS_TOKEN=/,""){print;exit}' ~/.secrets/gitea); test -n "$t" && curl -fsS -m 10 -o /dev/null -H "Authorization: token $t" https://git-home.u1680832.nyat.app:30319/api/v1/user |
2026-10-14 | 30 |
| F3 | Git over SSH 可达:ssh://git@git-ssh.u1680832.nyat.app:31411/weichen/<Repo>.git(key ~/.ssh/home_gitea) | GIT_SSH_COMMAND="ssh -i ~/.ssh/home_gitea -o BatchMode=yes" git ls-remote ssh://git@git-ssh.u1680832.nyat.app:31411/weichen/Development-Guidelines.git HEAD |
2026-10-14 | 30 |
| F4 | 旧端点 git-panel.u1680832.nyat.app:30319 已失效(TLS 握手失败),不得使用 | ! curl -fsS -m 8 https://git-panel.u1680832.nyat.app:30319/api/v1/version |
2026-10-14 | 180 |
| F5 | 基座 users 表存有姓名(name 列,CreateAccount/ListUsersAdmin 读写;EXT-19 目录自 P3 起向授权管理读面下发) | cd modules/backend && go test ./internal/app/ -run TestInprocHostSearchAccounts -count=1 |
2026-10-14 | 180 |
| F6 | 基座账号无停用位(users 表无 disabled;EXT-19 Valid 恒为存在性)——停用机制未实现,不得当已具备 | cd modules/backend && ! grep -rn -e disabled -e Disabled internal/store/auth.go pkg/extension/extension.go |
2026-10-14 | 180 |