Skip to content

v1.4.1 — public-demo guard hardening

Choose a tag to compare

@steponeerror steponeerror released this 28 Sep 15:57
· 1483 commits to master since this release

v1.4.1 — 2026-09-28

调整 Changed

  • stopforumspam 降权 reliability 0.70→0.60(用户拍板 2026-09-28,规则内保守档):月轮 eval 首跑实测 θ=0.001(n=117,k=0 零佐证)+ below-market 标记;缓解面=spam 轴 niche(unique 0.48)+ informational 裁决,故不一步到 .55。语料:model-20260928-144045(生产镜像月轮首跑,5/5 checks PASS)
    • stopforumspam demoted, reliability 0.70 -> 0.60 (user-approved 2026-09-28, conservative in-rule step): the first monthly eval round measured theta=0.001 (n=117, k=0 — zero corroborations) plus a below-market flag; mitigating context = the spam axis is a corpus niche (unique share 0.48) and its verdict is informational, hence not dropping all the way to .55. Corpus: model-20260928-144045 (first monthly round on the production mirror, 5/5 checks pass)

修复 Fixed

  • abuseipdb 生产断供根因修复(P1 实锤 2026-09-28):旧 download() 直写数据文件且 except 分支 unlink——免费层 5 次/天配额被重试烧穿(429)后,每次失败都删掉既有好文件 → raw 永久缺失、LMDB 冻结 9,987 条、stale 恒真。改为 scratch 落盘 + 校验通过才提交(danmeuk 同款),失败永不触碰数据文件
    • abuseipdb production outage root-cause fix (P1, confirmed live 2026-09-28): the old download() wrote straight to the data file and unlinked it in the except branch — once the free-tier 5-requests/day quota was burned by retries (429), every failure deleted the previously-good file, leaving the raw permanently missing, the LMDB frozen at 9,987 records, and is_stale stuck true. Now fetches to a scratch file and commits only after validation (same pattern as danmeuk_tor); a failed download never touches the existing data file
  • 公开演示守卫硬化:①OPTIONS 豁免收紧为真 CORS 预检形状(Origin + Access-Control-Request-Method 两头齐全,裸 OPTIONS 走既有 404/403 判定);②/api/update/status 全部署形态要求管理员鉴权(原完全公开);③守卫 404/403 改用标准错误信封(not_found/forbidden,新增 ErrorCode.not_found);④IP_RADAR_PUBLIC_DEMO 设为非 "1" 非空值时启动告警(唯一生效值是精确 "1",绝不阻断启动);⑤守卫注释口径更新(维护者旁路 = ADMIN_IPS 直连 peer + 可选 XFF 信任,须配套网关保证);⑥README 双语补 XFF 信任安全前提段
    • Public-demo guard hardening: ① OPTIONS exemption narrowed to real CORS preflights (both Origin and Access-Control-Request-Method present; bare OPTIONS falls through to the existing 404/403 checks); ② /api/update/status now requires admin auth in every deployment (was fully public); ③ guard 404/403 switched to the standard error envelope (not_found/forbidden, new ErrorCode.not_found); ④ a non-"1" non-empty IP_RADAR_PUBLIC_DEMO logs a startup warning (the only effective value is exactly "1"; never blocks startup); ⑤ guard comment doctrine updated (maintainer bypass = direct-peer ADMIN_IPS plus opt-in XFF trust that requires a gateway guarantee); ⑥ both READMEs gain the XFF-trust security-premise paragraph

新增 Added

  • 新源 alibaba_ranges(cloud-ip-ranges.com 聚合的阿里云网段表):云足迹第 5 名成员(aws/gcp/azure/oracle 之后),service=cloud + is_hosting、provider 标签 Alibaba、asset-only 空裁决;第三方聚合非官方自发布 → reliability 0.75(官方系 0.95);观测 2026-09-28:2,394 CIDR(v4 2,148 / v6 246)、零重复、Last-Modified 每日 04:00 UTC 推进(站方许可未声明,非商用用户拍板 2026-09-28);下载内容守卫拒 200-HTML 错误页;新增后公开源 43→44 口径
    • New source alibaba_ranges (Alibaba Cloud ranges aggregated by cloud-ip-ranges.com): fifth member of the cloud footprint family (after aws/gcp/azure/oracle), service=cloud + is_hosting, provider label Alibaba, asset-only empty verdict; third-party aggregator rather than publisher-self → reliability 0.75 (official houses sit at 0.95); observed 2026-09-28: 2,394 CIDRs (v4 2,148 / v6 246), zero duplicates, Last-Modified advancing daily 04:00 UTC (site license unstated; approved for non-commercial use 2026-09-28); download content guard rejects 200-HTML error pages; public-source count moves 43→44
  • admin 选源器(SourcePickerBody,创建/编辑/种子行共用)新增「全选 / 反选」:物化当前源目录为显式清单(区别于「全部源」开关的 null 动态语义,固化场景从此不用逐个点勾)
    • admin source picker (SourcePickerBody, shared by create/edit/seed-row) gains Select all / Invert selection: materializes the current catalog as an explicit list (unlike the all-sources switch's null dynamic semantics — frozen-set workflows no longer need per-source clicks)
  • 新源 danmeuk_tor(dan.me.uk Tor 节点表):is_tor / tor 分类的第二独立证人(官方 tor_exits 保留权威否决位,新源只佐证);/torlist/ 为全量 relay 口径(native 标签 RELAY,~10.7k 行,2026-08-23 存档观测、2026-09-28 复核);30 分钟拉取限速,12h 自动刷新在限内(手动更新同计限速);下载内容守卫拒绝限速 200-HTML 页,数据文件永不被替换;新增后公开源 42→43 口径
    • New source danmeuk_tor (dan.me.uk Tor node list): a second independent witness for is_tor / the tor classification (official tor_exits keeps its authoritative veto; the new source corroborates only); the /torlist/ URL ships the full relay set (native label RELAY, ~10.7k rows, 2026-08-23 archived capture re-verified 2026-09-28); fetch rate limit is one pull per 30 minutes, the 12h auto-refresh stays within it (manual updates count against the limit too); a download content guard rejects the rate-limit 200-HTML page so the data file is never replaced; public-source count moves 42→43
  • eval v2 Phase 1(设计:docs/superpowers/specs/2026-09-28-eval-algorithm-optimization-brief.md):评估语料加中性公网层静态资产(逐轮恒定,eval 与源自家 raw 佐证解耦)
    • eval v2 Phase 1 (design: docs/superpowers/specs/2026-09-28-eval-algorithm-optimization-brief.md): a static neutral public-network corpus layer in the eval corpus (constant across rounds, decoupling eval evidence from each source's own raw feeds)
  • eval v2 Phase 1:LSO 双轨制——scores/checks 维持旧基线(不含源自身佐证),leave-self-out 去偏结果降为 advisory 视图(scores_lso + "LSO advisory" 报告节)
    • eval v2 Phase 1: dual-track LSO — scores/checks keep the old baseline (self-evidence included), while leave-self-out debiased results are demoted to an advisory view (scores_lso + the "LSO advisory" report section)
  • eval v2 Phase 1:NO-DATA 双判据 verdict(feed 空 / record-count 相对历史坍塌,先于其它判定)+ 模型报告 source_health 块 + C1 specialist 分支;前端源页 NO-DATA 灰底红字徽章(title 说明“数据为空或坍塌,该源未在贡献”)
    • eval v2 Phase 1: NO-DATA dual-criteria verdict (feed empty / record-count collapse vs history, gated ahead of all other verdicts), a source_health block in the model report, and the C1 specialist branch; the frontend sources page renders a NO-DATA badge (red on gray, titled "feed empty or collapsed — source did not contribute")
  • eval v2 Phase 1:--temporal λ_s prequential 确认率仪器(Fisher 精确检验 + Wilson CI,预注册 θ̂ 中位数拆分,需 ≥2 轮 model 历史)
    • eval v2 Phase 1: --temporal λ_s prequential confirmation-rate instrument (Fisher exact test + Wilson CI, preregistered θ̂ median split, requires ≥2 rounds of model history)
  • eval v2 Phase 1:谱系审计改前向流方向判定(替换 Dong 时钟,三态 confirmed/not-yet/no-relation + C-3 双向检查);新增 scripts/monthly_eval.sh 月轮脚本(master+clean 守卫 → rsync 生产镜像 → 五连 eval 命令,--dry-run 预演)
    • eval v2 Phase 1: lineage audit switches to forward-flow direction (replacing the Dong clock, three states confirmed/not-yet/no-relation + the bidirectional C-3 check); adds scripts/monthly_eval.sh for monthly rotation (master+clean guards → rsync prod mirror → the five eval commands, with --dry-run rehearsal)
  • 公开演示守卫(opt-in,净移植自 demo 分支):IP_RADAR_PUBLIC_DEMO=1 开启守卫中间件套件——写/内部端点对匿名访客 404(当作不存在)、查询面校验 x-ipradar-client: web 头、维护者直连 peer IP 旁路(IP_RADAR_DEMO_ADMIN_IPS,XFF 可伪造勿默认信;IP_RADAR_DEMO_TRUST_XFF=1 须配套网关保证);默认关闭,未设 env 零行为变化
    • Public-demo guard (opt-in, byte-for-byte port from the demo branch): IP_RADAR_PUBLIC_DEMO=1 enables the guard middleware suite — write/internal endpoints answer 404 to anonymous visitors, query endpoints enforce the x-ipradar-client: web header, and maintainers bypass via direct-peer IPs (IP_RADAR_DEMO_ADMIN_IPS; XFF is forgeable, don't trust by default — IP_RADAR_DEMO_TRUST_XFF=1 requires a gateway guarantee); off by default, zero behavior change without the env
  • 前端配套:所有请求带 x-ipradar-client: web 头;STIX 导出改同源 fetch+blob 下载(鉴权路径与页面一致,过守卫同规)
    • Frontend companion: every request carries the x-ipradar-client: web header; STIX export switches to same-origin fetch+blob download (same auth path as the page, same rule through the guard)

修复 Fixed

  • CI:后端测试批更新竞态——test_update_db_enqueues_returns_batch_id 打桩 manager.enqueue_batch,消灭真网络副作用与 _active_batch 跨测试泄漏
    • CI: backend test batch-update race — stub manager.enqueue_batch in test_update_db_enqueues_returns_batch_id, eliminating real-network side effects and cross-test _active_batch leakage