docs: 修正 5 个漂移的行锚点(notify.rs 超时校验 411-414 → 491-494)

audit_anchors.py 只证明锚点可达,证明不了内容;本轮对 156 个唯一锚点
(150 个 .rs + 6 个 .js)做了逐条内容复核,抓到 2 处指向错误:

- reference.md §6.1:四个超时参数的「validated notify.rs:411/412/413/414」
  全部指向 notify.rs 的投递去重错误分支(error_response 的 4 行调用),
  而非校验谓词。真实位置在 491-494,原引用偏移恰好 80 行——是旧版本
  notify.rs 的残留锚点。
- reference.md §2.2:consent:ai:{chat_id} 的 EX 写为 state.rs:512,
  实际 .arg("EX") 在 511,512 是 TTL 取值行。

代码未改动,锚点基线 bfe0fd8 仍然成立,AGENTS.md 基线不 bump。
GATE-DOCS 仍 4/4 clean。
This commit is contained in:
anonsaber 2026-09-28 22:04:58 +08:00
parent a2297c21e8
commit c75338b305
1 changed files with 5 additions and 5 deletions

View File

@ -48,7 +48,7 @@ Notes:
| Key | TTL | Writer | Reader |
|---|---|---|---|
| `consent:ai:{chat_id}` | EX 3600 / 86_400 / 604_800 / 31_536_000 | `set_ai_consent` (state.rs:504; key at state.rs:506, `EX` at state.rs:512) | `ai_consent_until` (state.rs:518); cleared by `clear_ai_consent` (state.rs:527) |
| `consent:ai:{chat_id}` | EX 3600 / 86_400 / 604_800 / 31_536_000 | `set_ai_consent` (state.rs:504; key at state.rs:506, `EX` at state.rs:511) | `ai_consent_until` (state.rs:518); cleared by `clear_ai_consent` (state.rs:527) |
The stored value is an **absolute Unix expiry timestamp**, not a duration; the key's `EX`
carries the same duration, so the key removes itself (state.rs:508-513).
@ -359,10 +359,10 @@ endpoint.
| Parameter | Default | Range / cap | Source |
|---|---|---|---|
| `jmap_timeout_ms` | 15_000 | 100..=300_000 | default state.rs:55; validated notify.rs:411 |
| `telegram_timeout_ms` | 10_000 | 100..=300_000 | default state.rs:56; validated notify.rs:412 |
| `llm_timeout_ms` | 30_000 | 100..=300_000 | default state.rs:57; validated notify.rs:413 |
| `max_retries` | 3 | hard cap 5 | default state.rs:58; rejected at notify.rs:414; re-clamped at channel.rs:138 |
| `jmap_timeout_ms` | 15_000 | 100..=300_000 | default state.rs:55; validated notify.rs:491 |
| `telegram_timeout_ms` | 10_000 | 100..=300_000 | default state.rs:56; validated notify.rs:492 |
| `llm_timeout_ms` | 30_000 | 100..=300_000 | default state.rs:57; validated notify.rs:493 |
| `max_retries` | 3 | hard cap 5 | default state.rs:58; rejected at notify.rs:494; re-clamped at channel.rs:138 |
There is **no** `LLM_MAX_RETRIES` environment variable; retry count lives in
`config:outbound` and is bounded at 5 regardless of what is written.