Files
CyberGril/deploy/hel895-release-candidate.md
T
zonggongandmultica-agent c121c42e39 HEL-896 release completion: the A/B/C budget becomes an executable two-instance split, the real-browser false positive is fixed precisely (product untouched), the SDK gap list is corrected to the honest 41-distribution closure with the pip-download erratum, and release archiving becomes a consistency snapshot - (1) budget split: the manager's independent review reproduced on a temp store that writing A's total_requests=55 into the shared product ledger blocks B's mem0_extract and C's dialogue_main with budget_total_requests_exhausted:55/55 while budget_total/request_usage/token_usage have no stage or authorization-source column; docs/budget-package-hel895.md gains §6 making the split executable: A lives ONLY on the isolated 8360 team-test instance with its own DB and models.yaml (55/500000 one-shot totals plus same-value daily category caps), the user instance NEVER carries one-shot totals (its budget_total rows are record-only, no gate), A is sealed by stop+consistent-snapshot archiving with budget_total never zeroed and restart/archive proving the seal holds, old test data has no import path into the user instance (release checklist forbids copying the 8360 data dir), B starts only after baiqizhi approval writes llm_cap/embed_cap per the 500+180 formula with the authority frozen prefix, the real-Mem0 smoke is counted INSIDE B's 60/180, B cap-hit queues batches (no retry burn, no lost rows, FTS fallback, chat uninterrupted) and first-week end requires a fresh approval to continue, and §6.4 gives one responsible limited recommendation (A 55/500k isolated, B 60 LLM/180 embeds, C daily table) plus errata for the two unsafe original claims ('A shares C's daily account' and 'WAL single file copies whole'); tools/verify_budget_split_hel896.py 8/8 on temp stores and stand-ins only (S0 exact-shape repro of the manager's finding, S1 team instance consumes the §1 step plan to 55 then hard-stops with the tightest gate winning - life daily 8/8 rejects before the total, S2 seal survives restart and backup-API archive, S3 user instance B/C unblocked after A with dialogue 60/semantic 40/daily-token stacking and rejections booking nothing, S4 the misconfigured-total guard on the user instance, S5 repo configs and authoritative facts untouched, real caps all stay 0); (2) browser false positive fixed without touching any product file: web/tests/hel895_real.mjs B3 used '!!stage || any visible button' and clicked the FIRST button containing 回 which is the 日子与回忆 home nav button, so stage=false still PASSed and the screenshot stayed on days - the verbatim original rerun reproduces the false 7/7 with B3 stage=false (docs/rework/hel896/browser-before/), and the revised test passes 9 checks by precise interaction: B2 asserts the letter card carries her exact words plus the talk-nav unread aria-label, B3a waits for the VISIBLE reach card (aside.reach.show, aria-hidden=false, non-zero box, exact words) over days, B3b clicks only THAT card's 回她 button and strictly asserts the conversation stage .conversation .sr contains the reach-out text with the unread mark cleared, B4/B5 prove dedup by server message id (data-mid in the record panel: zero duplicates, gap and live reach-outs each exactly once), B5 asserts /api/health epoch bumps exactly +1 (1->2) before rechecking, B6 counts the page's OWN permissions.query/getUserMedia calls from first document load (0/0, instrumented via Page.addScriptToEvaluateOnNewDocument after Page.enable), B7 runs the service under a temp loopback models config (CYBERGRIL_MODELS, all caps 0) plus a sitecustomize socket guard that REJECTS and eagerly reports non-loopback connects (0 attempts, 0 non-loopback DNS lookups, report survives signal death) - under precise interaction the stage really plays, unread really clears, dedup and epoch semantics really hold: it was a test defect, not a product defect, so no interface change and nothing to escalate; (3) SDK honesty: tools/audit_sdk_offline_hel896.py (read-only, zero downloads/installs/inference) computes the 3.11-Linux closure from the installed 3.10 pinned metadata - 55 dists, 41 missing from the product venv (28 pure + 13 native incl. grpcio/numpy/onnxruntime/tokenizers/sqlalchemy/protobuf), all three top-level pins are py3-none-any (no 'cp311 wheel' needed for them), mem0ai's installed direct_url is the local fixed source hel857-src and hel857-data/mem0-2c81af3.tar.gz hashes exactly to the lock's 9dcef930...dda23 (an index mem0ai==2.2.1 wheel proves nothing), the wheel built during hel857 lived only in an ephemeral cache and hatchling is not offline-available, exactly 3 of the 41 are cache-reusable today for 3.11 (greenlet 3.5.6 cp311, pillow 12.3.0 cp311, truststore 0.10.5 py3-none-any - version+tag verified), the fastembed model cache is measured (Qdrant/bge-small-zh-v1.5 + bm25, ~92MB, placement = instance data dir copy), and the seq48-51 pip event is settled by cache forensics: uv's pip-26.2.2 wheel entry (files.pythonhosted.org, sha256 fd7f4dfa...) was CREATED 2026-10-27 02:10:04 inside the HEL-895 run window as the ONLY new cache entry, so that step DID fetch from the network - the prior card's zero-download claim is corrected to 'download' by the conservative reading (byte-level download vs conditional request is indistinguishable from cache evidence) while the lock install itself added no new cache entries; deploy/hel895-release-candidate.md §4 is rewritten to this accurate list, all future installs forced offline/no-index; (4) release archiving: tools/release_snapshot_hel896.py implements the two safe modes (stop+wal_checkpoint(TRUNCATE)+copy, or online SQLite backup API), writes per-file sha256 manifests carrying the exact code commit, per-table row-count verification and a verify-mode rollback drill; its selftest reproduces the manager's WAL finding (online naive copy of the main .db: 'no such table: companion') and proves both fixed modes complete (backup API and checkpoint copies both hold companion=1/chat_message=1, archive hashes+rows verify, commit 04eff61 recorded); §5 of the release doc now carries the copy-paste commands covering the product DB, semantic vector root, history root and the authoritative embed ledger, archives are never deleted, and the section explicitly does NOT claim R6 complete backup; regression on this head: pytest 299/299 (3.11.16 venv + requirements.lock offline), ruff clean (src/tests/tools), web typecheck 0 errors / lint 0 errors 1 pre-existing warning / vitest 55/55 / build passes with CSS still index-DdDYzR5S.css, pinned-SDK reruns all green (close-ownership 16/16, shutdown-queued 12/12, inflight 6/6, semantic-recovery 7/7, mem0-real 12/12, reports in docs/rework/hel896/regression/), check_release_offline R1-R7 passes, real-HTTP pagination 7/7 rerun saved as docs/rework/hel896/http-pagination-rerun.json with the original hel895 evidence byte-untouched, requirement checks 6/6 (origin/main, de8874a3803b, 152479b, each with and without handoff-HEL-896.json); handoff-HEL-896.json written; zero real LLM, zero real embeddings, zero new downloads beyond existing caches, authoritative ledgers and freezes (39/60, 498/500, 2 frozen, HEL-835 gate) untouched, not deployed, PR#11 appended-not-merged, no visual changes, R5/R6/R7 honestly deferred
Co-authored-by: multica-agent <github@multica.ai>
2026-10-27 03:06:23 +08:00

11 KiB
Raw Blame History

HEL-895 · 统一发布候选(离线核验过,未执行部署)

HEL-896 修订(2026-10-27,正常追加 PR#11):按总管独立复审补齐——①浏览器 「真实服务 7/7」中 B3 原为已证实误报,测试已修为精确交互+严格断言(9 项检查, 含权限 API 调用计数与非回环出站守卫,证据 docs/rework/hel896/browser/); ②A/B/C 预算改为独立团队测试实例 + 全新用户实例的可执行分账 (docs/budget-package-hel895.md §6);③固定 SDK 缺项勘误为 41 项闭包清单 (§4);④归档/回退改为一致性快照口径(§5)。候选 head 与交付物不变,未部署、 未合并、未写权威账。

状态:候选。审核通过与预算/部署授权前不启动面向用户的真实循环、不部署、不合并 PR、不交体验地址。 本文件把已通过独立复审的内核(HEL-894 @ 152479b)与 HEL-881 已审核的主动留言前端(bf234570)装成一个统一候选,给出精确 head、 交付物清单、安装命令、健康矩阵与停用回退。发布卡照抄即可执行;不触 8300–8350 与共享 ASR/TTS/口型,不访问 4080,不导入演示/测试档案为用户伴侣。

0. 精确 head 与整合方式

  • 候选 head:见交付评论(分支 hel-870-assembly,PR #11 的正常追加提交, 未强推、未合并)。第一父为 HEL-894 通过复审的 152479b3503c3d1ab27681170e6bfd592c54380a, 合并入 HEL-881 已审核的 bf234570c0b6595a72f8dbc79e42c63685e08e01 (origin/hel-880-inbox-continuation,与 origin/hel-875-proactive-wiring 同点)。
  • 整合的机械性:母线 31970c4..152479b 从未触碰 web/(git diff 31970c4 152479b -- web/ 为空),合并只带入原作者六个前端文件与 handoff-HEL-875/880.json 共 9 个文件;src/tests/tools/config 相对 152479b 逐字不变。无重设计、无视觉决定;旧 b48d28b 测试合并未推送,由本候选取代。
  • 合成后验证(全部在本 head 实跑):299 pytest(3.11.16 venv + requirements.lock 离线)+ ruff 干净;web typecheck 0 错、lint 0 错/1 条既有警告、 vitest 55/55、build 通过且 CSS 仍为 index-DdDYzR5S.css(视觉零改动); 固定 SDK 回归:关闭所有权 16/16、关闭排队 12/12、处理中生命周期 6/6、语义恢复 7/7、真实接线 12/12;发布离线检查 15/15;真实 HTTP 分页合同 7/7 (tools/verify_http_pagination_hel895.py,真实服务 + 327 行播种 + fetchAfter 缺口游标移植对真实后端复验);真实服务浏览器 7/7(web/tests/hel895_real.mjs, Chromium CDP 对真实 API:留言卡、舞台播放、260 行缺口不跳留言、重启 epoch 去重、 零权限申请。HEL-896 勘误:原 7/7 中 B3 为已证实误报——兜底断言+点击 「日子与回忆」导航钮,stage=false 仍 PASS;修订版改精确交互+严格断言共 9 项 检查全过,含权限 API 调用计数 0 与非回环出站守卫 0,证据 docs/rework/hel896/browser/,原误报证据保留于 docs/rework/hel896/browser-before/)。双目标及实际母线需求检查各含/不含 handoff-HEL-895 共 6/6 通过(origin/main、原产品目标 de8874a3803b、实际母线)。

1. 交付物清单

交付物 位置/来源 说明
代码 分支 hel-870-assembly,精确 head 见交付评论 含本文件、docs/budget-package-hel895.md、tools/verify_http_pagination_hel895.py、web/tests/hel895_real.mjs
Python 依赖 requirements.lock(19 项固定版本,uv 离线可装) Python 3.11(发布机 3.11.16 实测)
前端产物 web/(原作者界面 + HEL-875/880 主动留言) npm ci && npm run build;CSS 哈希与已审核版一致
mem0 固定栈 deploy/mem0-stack.lock(mem0ai 2.2.1 / qdrant-client 1.20.0 / fastembed 0.9.1) 3.11 缺 41 项闭包,见 §4;缺项不阻塞其余发布
systemd 模板 deploy/cybergril-hel874-8360.service.example(PYTHONPATH=src 已内置) 独立单元/端口/数据目录模式
配置模板 config/models.yaml(预算全 0)+ config/semantic.example.yaml 批准值写入位置见 docs/budget-package-hel895.md(A 仅团队实例,§6)
预算执行包 docs/budget-package-hel895.md(含 §6 HEL-896 分账修订) A/B/C 一次批准核定稿,默认 0
HEL-896 工具 tools/verify_budget_split_hel896.py、tools/audit_sdk_offline_hel896.py、tools/release_snapshot_hel896.py、修订版 web/tests/hel895_real.mjs 分账切换验证、SDK 余缺只读审计、一致性快照/回退验证、严格浏览器检查

2. 安装命令(发布卡执行)

与 deploy/hel874-release.md §2 完全相同(服务账号 → 全新空目录 clone 本 head → uv venv --python 3.11 + uv pip install -r requirements.lock → npm ci && npm run build → 安装 service → curl /api/health),此处不重复抄写;唯一差别是 git checkout <本文件 §0 的精确 head>。发布前必过检查同样按 deploy/hel874-release.md §6 执行,另加本卡两个新工具(真实 HTTP 分页合同、真实服务浏览器)在目标机重跑。

3. 健康能力矩阵(/api/health 预期)

与 deploy/hel874-release.md §3 一致:version=R4-assembly;backend mood/reach_out/semantic 接线;semantic_backend=stub(发布初期,真实 mem0 待 §4 与 B 部分预算);capabilities.proactive=true(生活循环开启时);voice/vision/ weather/materials/backup=false。主动留言前端已并入本候选:生活循环开启且产生 真实 reach-out 后,打开的页面每 20 秒读一次新行、回来立即读,未读有标记;该行为 已在本 head 用真实服务验证(§0)。

4. 固定 SDK(3.11)准确缺项与不下载路径

HEL-896 只读审计修订(2026-10-27,tools/audit_sdk_offline_hel896.py,证据 docs/rework/hel896/sdk-audit/):此前「只缺 mem0ai/qdrant-client/fastembed 三个 cp311 wheel 及纯 Python 传递依赖」的概括不准确,勘误如下:

  • 三个顶层包固定版本(mem0ai 2.2.1 / qdrant-client 1.20.0 / fastembed 0.9.1)的 WHEEL 均为 py3-none-any 纯 Python,本身无 cp311 专用轮一说;mem0ai 的安装来源 是本地固定源码(hel857-src,deploy/mem0-stack.lock 源码提交 2c81af3、tarball SHA256 9dcef930…dda23 已在本机 hel857-data 实测一致)——从索引下载同名 2.2.1 wheel 不证明与固定源码相同,发布必须用固定 tarball/源码离线构建安装。
  • 按 3.11 Linux markers + extras 从 3.10 固定栈安装元数据求闭包共 55 项,产品 3.11 venv 缺 41 项(28 纯 Python + 13 原生扩展:grpcio/numpy/onnxruntime/ tokenizers/sqlalchemy/protobuf/greenlet/pillow 等)。这是依赖闭包清单,不是 已完成的 cp311 解析或下载结果。
  • 当前本机缓存对 41 项缺项立即可复用的只有 3 项(greenlet 3.5.6 cp311、 pillow 12.3.0 cp311、truststore 0.10.5 py3-none-any,uv wheels-v6/v7 缓存实测); 其余 37 项 + mem0ai 固定源码离线构建所需 build backend(hatchling 未在缓存)由 发布卡获授权后按 deploy/hel874-release.md §4 拉取,逐项 sha256 留证,下载清单 保持 deploy/mem0-stack.lock 与固定源码身份;缺项不阻塞其余发布工作。
  • fastembed 模型缓存实测:hel857-data/fastembed-cache 含真实模型 Qdrant/bge-small-zh-v1.5 与 Qdrant/bm25(约 92MB);发布机落位=实例数据目录 内该缓存的拷贝,真实 mem0 模式的 cache_dir 指向它;本卡零下载、不推理。
  • seq48–51 pip 事件勘误(缓存取证):HEL-895 运行中去掉 --offline 安装的 pip 26.2.2 在 uv 缓存的 wheel 条目创建于 2026-10-27 02:10:04(该运行窗口内, 来源 files.pythonhosted.org,且为窗口内唯一新增缓存条目)——该步发生了网络 获取,前卡「零下载」对此步不成立;requirements.lock 装机同期未产生新缓存条目 (全部命中既有缓存)。字节级完整下载与条件请求无法由缓存取证区分,按保守口径 记为下载。后续一切安装强制 --offline/--no-index。

产品 venv 目前 import mem0/qdrant_client/fastembed 均缺、产品代码导入不受影响; 在 wheel 落位且 co-import 通过前,不得以 stub/FTS 冒充真实 Mem0 体验就绪。

5. 停用与保留数据回退

与 deploy/hel874-release.md §5 相同:CYBERGRIL_SEMANTIC=off|stub 停语义层 (表保留、按后端区分续跑);CYBERGRIL_R2_ENABLED=0 停生活/主动联系;整实例 systemctl stop → 数据目录原样保留 → 切回上一 release/上一提交(R4 迁移全部 增量新表,旧代码可安全打开同一数据库);彻底撤销留数据档不删。

HEL-896 归档/回退修订(2026-10-27):此前「SQLite WAL 单文件可整体复制/归档」 的口径不安全——在线库只复制主 .db 会丢 WAL 里已提交的资料(总管复现件连 companion 表都不在;本卡 tools/release_snapshot_hel896.py 自测同样复现 no such table: companion,证据 docs/rework/hel896/release-snapshot/selftest.json)。 发布归档一律二选一:停服务 + PRAGMA wal_checkpoint(TRUNCATE) 后整目录归档 (推荐),或在线用 SQLite backup API 逐库一致性快照。照抄命令:

# 覆盖范围:产品库(CYBERGRIL_DB)、语义向量目录 vector_root、推导史 history_root、
# 权威嵌入账 ledger_path(按部署实例 config/semantic.yaml 实际路径逐项代入)
.venv311/bin/python tools/release_snapshot_hel896.py snapshot \
  --name <release-或阶段名> --db <产品库> [--db <权威账>] \
  --file <vector_root> --file <history_root> --out /opt/<实例>/archives/
.venv311/bin/python tools/release_snapshot_hel896.py verify --archive <产物>.tar.gz

产物含逐文件 SHA256 清单、代码精确提交(快照时刻 git rev-parse HEAD)、 逐表行数核对与回退演练结果;不删档,旧归档永久保留。回退=停服务 → 解包快照到 新数据目录 → 指回上一 release/上一提交 → 起 service → verify 通过后交付。 本节是发布归档/回退要求,不冒充 R6(CG-009 每日自动备份/手动完整导出)完成。

6. 本候选不做的事

不合并任何 PR(PR #11 保持开放待总管/白栖知决定);不部署、不交体验地址; 零真实 LLM/嵌入/下载;不触 8300–8350、共享语音口型、GPU/4080;不导入演示测试 档案为用户伴侣;不替视觉作者改稿(前端内容以原作者六文件与 CSS 可追溯为准)。 R5(HEL-878/879 语音)、R6(天气/素材/完整备份)、R7(有条件视觉观察)未接入, 界面保持诚实文案,不冒充已运行。