HEL-895 release candidate: the approved kernel 152479b + the HEL-881-passed proactive-inbox frontend bf234570 assembled into one auditable head, with the full post-synthesis battery, the release package and the one-approval budget execution package - integration is a clean merge (the mainline 31970c4..152479b never touched web/, so the merge brings exactly the visual director's six frontend files plus handoff-HEL-875/880.json; web/ is verbatim bf234570 and src/tests/tools/config are verbatim 152479b, all HEL-874..894 backend fixes preserved, no redesign, no visual decision, the unpushed b48d28b test merge superseded); verification rerun on the merged head: 299 python tests pass on the 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 (visual untouched), pinned-SDK regressions on hel857-venv (3.10.12, deterministic 512-dim stand-in, loopback-only, temp ledgers): verify_close_ownership_hel894.py 16/16, verify_shutdown_queued_hel889.py 12/12, verify_inflight_lifecycle_hel886.py 6/6, verify_semantic_recovery_hel885.py 7/7, verify_mem0_real_hel874.py 12/12, check_release_offline_hel882.py R1-R7 15/15 (R6 honestly records the 3.11 mem0 gap); NEW real-HTTP pagination contract 7/7 (tools/verify_http_pagination_hel895.py: the real product service seeded with 327 rows proves the reverse-page + limit+1 probe + next_before + epoch contract the approved frontend depends on, the public field allowlist with proactive exactly on reach-out rows, and a mechanical port of inbox.ts fetchAfter proving the HEL-880 gap semantics against the real backend - 5-page cap leaves the gap, the next call closes it and hands the two new reach-outs exactly once); NEW real-server browser 7/7 (web/tests/hel895_real.mjs: Chromium CDP against the real API + built dist - real boot, reach card arriving over real HTTP, stage playback, the 260-row long-absence gap regression, SIGTERM restart epoch+1 with no duplicate rows, zero permission requests; evidence docs/rework/hel895/); deliverables: deploy/hel895-release-candidate.md (exact head, manifest, install reference, health matrix, disable/rollback, the exact 3.11 fixed-SDK gap verified offline - product venv imports fine, no mem0/qdrant/fastembed wheels in any local cache, hel857-venv 3.10 fixed stack untouched and un-mixed, zero downloads, resolution path unchanged per hel874-release.md §4) and docs/budget-package-hel895.md (the A/B/C tables as one approvable package: per-send four-gate stacking semantics, the cross/duplicate/missed accounting verdict - A totals stack on daily category caps by design, B extraction LLMs are dual-counted in llm_ops cumulative AND the semantic daily gate by design, embeds count only as items, all four request categories plus the global token pool cover every outbound site, failures/cancels conservatively billed with no refunds, cap-hit stop semantics and evidence - all still cap=0 defaults, the 39/60 and 498/500 freezes and the HEL-835 gate untouched); requirement checks 6/6 (origin/main, origin/agent/agent/de8874a3803b and the actual mainline 152479b, each with and without handoff-HEL-895.json); zero real LLM, zero real embeddings, zero downloads, authoritative ledgers and freezes unwritten, not deployed, PR#11 appended-not-merged, no visual changes, R5/R6/R7 honestly deferred
Co-authored-by: multica-agent <github@multica.ai>
This commit is contained in:
co-authored by
multica-agent
parent
68f3eefeca
commit
04eff611e7
@@ -0,0 +1,73 @@
|
||||
# HEL-895 · 真实全链一次批准执行包(A/B/C 合并核定稿;仍全部待授权,默认 0 不变)
|
||||
|
||||
本文件把 `docs/budget-plan-hel874.md` 的 A/B/C 三表收拢成**一次可批准的具体执行包**:
|
||||
每一步的请求/嵌入/失败-取消-重试上限、累计与日顶的叠加口径、一次性团队检查与用户
|
||||
日常使用的分账、碰顶停机语义与留证方式。技术核对基于本卡实际代码与配置
|
||||
(`src/cybergril/life/model.py` 的 `PersistentBudget`、`src/cybergril/think/budget.py`、
|
||||
`config/models.yaml`、`config/semantic.example.yaml`、299 pytest 含
|
||||
`tests/test_hard_gates_hel882.py`)。
|
||||
|
||||
**批准状态:三部分均未批准。随包 `models.yaml` 全部上限为 0(未批准即发送前拒绝),
|
||||
`semantic.example.yaml` 缺省全 0。本卡零真实调用、零真实嵌入、零权威账写入。**
|
||||
旧账 39/60(真实请求)与 498/500(嵌入,冻结 2 条)及 HEL-835 闸原样保全,
|
||||
不挪用、不重置、不并入。真实数值只有白栖知批准后由总管写入。
|
||||
|
||||
## 1. 批准项(一个包,三个独立账)
|
||||
|
||||
| 部分 | 用途 | 硬顶(批准后由总管写入) | 账本 |
|
||||
| --- | --- | --- | --- |
|
||||
| A · 一次性团队整体检查 | 8360 隔离实例按体验链 1–7 全链走一遍(stub 语义,零嵌入) | 总量 55 次请求 / 500,000 tokens / 0 嵌入(`budget.total_requests`/`total_tokens`,跨日累计) | `budget_total`/`request_usage`/`token_usage` |
|
||||
| B · 首周语义激活 | `CYBERGRIL_SEMANTIC=mem0` 真实激活观察 | 提取 LLM ≤60 次(`llm_cap`);嵌入 ≤180 条新批 → 按算式写 `embed_cap=680`、`embed_reserve=2`(权威账已用 498/原批 500) | `llm_ops`(新表)/`embed_ops`(权威账续账,`authority` 冻结前缀必填) |
|
||||
| C · 用户日常使用 | 体验地址交付后每日 | dialogue ≤60/日、life ≤8/日、background ≤40/日、semantic ≤40/日(`daily_requests`);嵌入 ≤60 条/日(`embed_daily`);tokens ≤2,000,000/日(`daily_tokens`,全类别共池) | 同 A 的持久表 + 日顶列 |
|
||||
|
||||
A 当天同时受 C 类日顶约束(叠加见 §2);B 期间的对话/生活/判定请求并入 C 日账,
|
||||
不占 B 的 60 次。三部分独立授权来源保持:A 需总管新批(产品环境网关用量不属于
|
||||
HEL-857 的 60 次实验授权);B/C 需白栖知明确批准。
|
||||
|
||||
## 2. 叠加口径(逐笔发送前原子预占;总管核定值写入后自动生效)
|
||||
|
||||
一次真实 provider 发送(创建/对话/生活/gist/判定/成长/主动措辞/Mem0 内部提取)
|
||||
在 `PersistentBudget.acquire` 同时过四道闸,任一到顶即 `BudgetStop` 拒绝,**不降档续调**:
|
||||
|
||||
1. 类别日顶(该调用所属 `daily_requests` 类别:dialogue/life/background/semantic);
|
||||
2. 日 token 池(`daily_tokens`,全类别共池;70% 警告、95% 非关键场景 structured 预检先停);
|
||||
3. A 部分一次性总量(`total_requests`/`total_tokens`,跨日累计,重启不归零);
|
||||
4. B 部分类别账:Mem0 内部提取 LLM 另过 `llm_cap` 累计 + `llm_daily`;嵌入过
|
||||
`embed_cap` 累计(含冻结 `embed_reserve`)+ `embed_daily`。
|
||||
|
||||
**交叉核对结论(本卡逐项核过代码与测试):**
|
||||
- **交叉(有意叠加,非重复计费)**:A 的每次请求同时计入 A 总量与当天类别日顶;
|
||||
B 的每次提取 LLM 同时计入 `llm_ops` 累计与 semantic 日顶 + 日 token 池。两处计数
|
||||
用途不同(一个限一次性总量/首周观察,一个限每天),不会互相退款或放宽。
|
||||
- **不重复**:嵌入只记 `embed_ops`(条数),不进请求计数;提取 LLM 只在
|
||||
`llm_ops`+统一请求闸各记一次;主对话与语义层各自独立闸(`tests/` 双实例同库复现)。
|
||||
- **不漏记**:四个请求类别(dialogue/life/background/semantic)+ 嵌入 + 全池 token
|
||||
已覆盖全部产品出站点;SDK 隐藏重试已禁用(`max_retries=0`),每次实际发送都过闸。
|
||||
|
||||
## 3. 失败、取消与重试(保守入账,不退款)
|
||||
|
||||
- 发送前预占(请求次数 + 保守 token 估算:输入字符 1:1 + 声明 max_tokens 全额);
|
||||
provider 返回真实 usage 按实际修正(多补少退)。
|
||||
- 未知 usage/断流/失败/取消保守保留全部预占;已发送的成本不当未发生。唯一释放
|
||||
路径是可证明未连接(`httpx.ConnectError` 级)的显式 `release()`。
|
||||
- 真实错误重试 ≤3 次/批;预算拒绝不耗重试次数——作业回 `queued`
|
||||
(reason=`semantic_*_budget_*`),总管调 cap 后同批续跑,已完成行不重发。
|
||||
- 嵌入:单条失败释放;批次中途失败整批保守落账。
|
||||
|
||||
## 4. 碰顶停机语义与留证
|
||||
|
||||
- **全部硬闸在发送前**拒绝(`budget_*_exhausted` / `semantic_*_budget_*`),拒绝如实
|
||||
记录,不补发、不换渠道。
|
||||
- 语义层到顶只停语义(检索回落词面 FTS,主对话不中断);日 token 到顶停当日全部
|
||||
真实调用;A 总量到顶即团队检查收尾。
|
||||
- 留证:`budget_total`/`request_usage`/`token_usage`/`embed_ops`/`llm_ops` 表 +
|
||||
服务日志 + 隔离实例数据目录(SQLite WAL 单文件可整体归档);碰顶当时的拒绝
|
||||
reason 与计数快照截图/导出一并归档到交付评论。
|
||||
|
||||
## 5. 本包默认状态(本卡随包可执行)
|
||||
|
||||
`config/models.yaml`:`daily_tokens: 2000000`(结构性默认值,非授权)、
|
||||
`daily_requests.*` 全 0、A 部分总量两行保持注释(待批);`config/semantic.example.yaml`
|
||||
全部 cap/daily 为 0、`authority` 必填结构就位。**未写入批准值前,任何创建/对话/
|
||||
生活/gist/判定/成长/主动措辞/提取调用都在发送前被硬闸拒绝(`budget_*_exhausted`),
|
||||
这是设计行为;已由 `tools/check_release_offline_hel882.py` R3 与 299 pytest 复现。**
|
||||
@@ -0,0 +1,65 @@
|
||||
{
|
||||
"baseline_version": "1.11",
|
||||
"read_commit": "152479b3503c3d1ab27681170e6bfd592c54380a",
|
||||
"task": "HEL-895 发布准备:把 HEL-894 已过独立复审的统一内核(152479b)与 HEL-881 已审核的主动留言前端原稿(bf234570,原作者六文件逐字、CSS 零改动)机械装成同一可审核可执行的统一发布候选。先核对包含关系(bf234570 不是 152479b 的祖先;母线 31970c4..152479b 从未触碰 web/),以正常合并带入恰两个提交共 9 个文件,src/tests/tools/config 相对 152479b 逐字不变,全部 HEL-874..894 后端修复保留;不重设计、不做视觉决定、不覆盖视觉分支,旧 b48d28b 测试合并未推送由本候选取代。零真实 LLM、零真实嵌入、零新增下载、不部署、不合并 PR、不交体验地址、不触 8300–8350 与共享语音口型、不访问 4080、不导入演示测试档案为用户伴侣、不写权威账、不变真实 cap、不改运行时/模型/认证",
|
||||
"requirement_ids": [
|
||||
"CG-006",
|
||||
"CG-008",
|
||||
"CG-009",
|
||||
"CG-010",
|
||||
"CG-011",
|
||||
"CG-012",
|
||||
"CG-013",
|
||||
"CG-014",
|
||||
"CG-015",
|
||||
"CG-016",
|
||||
"CG-018",
|
||||
"CG-021",
|
||||
"CG-023",
|
||||
"CG-029",
|
||||
"CG-030",
|
||||
"CG-031",
|
||||
"VIS-013",
|
||||
"AM-001",
|
||||
"AM-002",
|
||||
"AM-003",
|
||||
"UX-001",
|
||||
"UX-005",
|
||||
"UX-006",
|
||||
"GOV-001",
|
||||
"GOV-002",
|
||||
"GOV-003",
|
||||
"GOV-004",
|
||||
"GOV-005",
|
||||
"GOV-006",
|
||||
"DEL-001"
|
||||
],
|
||||
"deliverable": "统一发布候选(分支 hel-870-assembly 正常追加,精确 head 见交付评论,PR#11 只追加不强推不合并):1) 机械整合合并提交——第一父 152479b、合入 bf234570,仅新增原作者前端六文件(web/src/adapters/inbox.ts、real.ts、app/RealApp.tsx、chat/ChatPanel.tsx 与三个测试)+ handoff-HEL-875/880.json,web/ 逐字等于 bf234570、src/tests/tools/config 逐字等于 152479b;2) 合成后全量验证在本 head 实跑:python 3.11.16 venv + requirements.lock 离线 299 pytest 全过、ruff 0 错;web typecheck 0 错、lint 0 错(1 条既有警告非本卡)、vitest 55/55、build 通过且 CSS 仍 index-DdDYzR5S.css(视觉零改动);固定 SDK(hel857-venv 3.10.12,未混 site-packages)确定性 512 维替身 + 仅回环实跑:关闭所有权 16/16、关闭排队 12/12、处理中生命周期 6/6、语义恢复 7/7、真实接线 12/12、发布离线检查 15/15;3) 新增并实跑两项本卡验证:真实 HTTP 分页合同 7/7(tools/verify_http_pagination_hel895.py——真实产品服务、327 行播种、倒序+limit+1 探测+next_before+epoch 合同、公开字段允许清单与 proactive 标记恰在播种行、inbox.ts fetchAfter 缺口游标的机械移植对真实后端复验:一次调用最多 5 页缺口保留、下次补齐按 id 序恰好交出两条新留言不跳不重);真实服务浏览器 7/7(web/tests/hel895_real.mjs——Chromium CDP 对真实 API + web/dist:真实启动、留言卡过真实 HTTP 到达、舞台播放、260 行在其上的长缺口语义(HEL-880 回归)真实服务复验不跳留言且无重复、服务重启 epoch+1 后同批行不加第二次、零权限申请),证据 docs/rework/hel895/;4) 发布包与清单 deploy/hel895-release-candidate.md(精确 head、交付物清单、安装引用、健康矩阵、停用回退、固定 SDK 3.11 准确缺项);5) 一次可批准预算执行包 docs/budget-package-hel895.md(A 55 请求/500000 tokens/0 嵌入一次性、B 60 提取 LLM/180 嵌入按 500+180 算式、C 逐类日顶;逐笔发送前四道闸叠加口径、交叉=有意叠加、无重复、无漏记、失败取消保守入账不退款、碰顶停机与留证;默认全 0 不变,冻结 39/60 与 498/500 及 HEL-835 闸原样保全);6) 本地离线核实 3.11 固定 SDK 现状:产品 venv 无 mem0/qdrant_client/fastembed,本机 uv/pip 缓存无其任何 wheel,hel857-venv(3.10.12 固定栈)存在且全部 SDK 回归在其上实跑;缺项=mem0ai 2.2.1/qdrant-client 1.20.0/fastembed 0.9.1 的 cp311 manylinux2014_x86_64 wheel,落位命令照 deploy/hel874-release.md §4 不变,本卡零下载",
|
||||
"acceptance": [
|
||||
"包含关系与机械性:合并前核实 bf234570 不是 152479b 祖先、git diff 31970c4 152479b -- web/ 为空;合并后 git diff bf234570 HEAD -- web/ 为空、git diff 152479b HEAD -- src tests tools config 为空(仅 9 个前端/治理文件变化),无重设计无视觉决定,原作者六文件与 CSS 可追溯",
|
||||
"合成后工程检查在本 head 全过:299 pytest(3.11.16 venv + requirements.lock 离线)、ruff 0 错(src/tests/tools)、web typecheck 0 错/lint 0 错 1 既有警告/vitest 55/55/build 通过且 CSS 哈希 index-DdDYzR5S.css 不变",
|
||||
"HEL-894/889/886/885/874/882 回归全绿(固定 SDK 确定性替身 + 仅回环):verify_close_ownership_hel894.py 16/16、verify_shutdown_queued_hel889.py 12/12、verify_inflight_lifecycle_hel886.py 6/6、verify_semantic_recovery_hel885.py 7/7、verify_mem0_real_hel874.py 12/12、check_release_offline_hel882.py R1–R7 15/15",
|
||||
"真实 HTTP 分页合同 7/7(tools/verify_http_pagination_hel895.py 对真实服务):无档案 404 负例;首页恰 50 行升序 next_before=本页最小 id;沿 next_before 整走 327 行无重无缺页边界正确;公开允许清单字段恰为 id/ts/role/text/turn_id/status/lifeIds(+proactive) 且 proactive 恰在播种留言行;fetchAfter 缺口游标(HEL-880)真实服务复验:5 页封顶缺口保留→下次补齐→两条新留言按 id 序恰好交出一次;epoch 分页稳定、未知路径 404",
|
||||
"真实服务浏览器 7/7(web/tests/hel895_real.mjs,Chromium CDP 对真实 API):真实启动无服务未接通卡;新留言行写入后 20 秒内/可见性触发读到达并出现留言卡;进交谈舞台播放;260 行长缺口在其下的新留言经补读到达且无重复;SIGTERM 重启(epoch+1)后同批行不加第二次;麦克风/相机权限保持 prompt 零申请",
|
||||
"发布候选文档 deploy/hel895-release-candidate.md 给出精确 head、交付物清单(requirements.lock 19 项固定依赖、前端产物 CSS 哈希一致、systemd/配置模板、独立数据空间、健康矩阵 R4-assembly/stub/诚实未接项、停用与保留数据回退)与 3.11 固定 SDK 准确缺项(零下载,落位路径不变)",
|
||||
"预算执行包 docs/budget-package-hel895.md:A/B/C 数值、四道闸叠加口径与交叉/重复/漏记核对结论(交叉=总量+日顶有意叠加;嵌入只记条数不进请求计数;四类别+嵌入+全池 token 覆盖全部出站点)、失败取消保守入账、碰顶停机与留证;随包默认全 0、权威账与冻结余额零写入(check_release_offline R3 复现未批即拒)",
|
||||
"双目标及实际母线需求检查各含/不含本 handoff 共 6/6 通过(origin/main、origin/agent/agent/de8874a3803b、实际母线 152479b)"
|
||||
],
|
||||
"deferred": [
|
||||
"真实预算授权:A/B/C 全部待白栖知经总管批准;批准前 cap 全 0=发送前拒绝;旧 39/60、498/500(冻结 2 条)与 HEL-835 闸不挪用不重置;真实调用、真实嵌入、权威账写入本卡零执行",
|
||||
"3.11 固定 SDK wheel 落位:本机缓存无 cp311 wheel,发布卡按 deploy/hel874-release.md §4 用 pip download(mem0-stack.lock)落 wheel 后离线并入并 co-import 验证;落位前 stub/FTS 不冒充真实 Mem0 体验就绪",
|
||||
"部署与体验地址:待总管复核通过 + 预算/部署授权后由发布卡按 deploy/hel895-release-candidate.md §2 执行(8360 隔离实例);本卡未部署、未合并 PR#11、未交体验地址;8300–8350 与共享语音口型未触碰",
|
||||
"R5 语音:HEL-878(原作者会话额度受限,已有定时唤醒)/HEL-879(待前端完成)继续接续;R6 天气/素材包/完整备份、R7 有条件视觉观察(默认关,需白栖知授权 + 4080 决策)均未接入,界面保持诚实文案,不冒充已运行",
|
||||
"真机与 Safari 未验证(等效视口与桌面 Chromium 已过);跨设备已读仍为本浏览器口径;即时到达需后端推送/正向分页属合同变更未做——沿用 HEL-881 承接口径",
|
||||
"整体沉浸体验方向:用户 2026-10-23 认可动效质感但整体沉浸感未满意、新方向未定;本卡为发布准备不接管视觉作者、不触其运行时/模型/认证;界面小样认可前不替换正式界面"
|
||||
],
|
||||
"requirement_changes": [],
|
||||
"verification": [
|
||||
"分支 hel-870-assembly 正常追加(精确 head 见交付评论,第一父 152479b、合入 bf234570),PR#11 只追加不强推不合并;视觉总监分支未覆盖",
|
||||
"python 3.11.16 venv + requirements.lock 离线:299 pytest 全过;ruff 0 错(src/tests/tools);web typecheck/lint(1 既有警告)/vitest 55/55/build 全过,CSS 仍 index-DdDYzR5S.css",
|
||||
"固定 SDK(hel857-venv 3.10.12 + mem0ai 2.2.1/qdrant-client 1.20.0/fastembed 0.9.1,确定性 512 维替身、仅回环、临时账库):verify_close_ownership_hel894.py 16/16(docs/rework/hel895/close-ownership-hel895.json)、verify_shutdown_queued_hel889.py 12/12、verify_inflight_lifecycle_hel886.py 6/6、verify_semantic_recovery_hel885.py 7/7、verify_mem0_real_hel874.py 12/12(同目录证据 JSON);check_release_offline_hel882.py R1–R7 15/15(release-offline-hel895.json,R6 如实记录 3.11 缺 mem0)",
|
||||
"新增 tools/verify_http_pagination_hel895.py:真实服务 7/7(docs/rework/hel895/http-pagination.json);新增 web/tests/hel895_real.mjs:真实服务 + Chromium CDP 7/7(docs/rework/hel895/real-browser.json 与 real-*.png 截图)",
|
||||
"python3 scripts/check_requirements.py --base-ref {origin/main | origin/agent/agent/de8874a3803b | 152479b} 各含/不含 --handoff docs/requirements/handoff-HEL-895.json 共 6/6 通过",
|
||||
"零真实 LLM、零真实嵌入、零非回环出站、零下载;权威三账与冻结余额未写;8300–8350、共享语音口型、GPU/4080 未触碰;未部署、未合并 PR、未交体验地址"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
{
|
||||
"checks": [
|
||||
{
|
||||
"name": "H0_service_up",
|
||||
"ok": true,
|
||||
"detail": "port 8395"
|
||||
},
|
||||
{
|
||||
"name": "H1_404_before_companion",
|
||||
"ok": true,
|
||||
"detail": "status=404"
|
||||
},
|
||||
{
|
||||
"name": "H2_first_page_contract",
|
||||
"ok": true,
|
||||
"detail": "len=50 ascending=True next_before=278 epoch=1"
|
||||
},
|
||||
{
|
||||
"name": "H3_full_backward_walk",
|
||||
"ok": true,
|
||||
"detail": "rows=327 unique=327 pages=2 backward_pages=True last_next_before=None"
|
||||
},
|
||||
{
|
||||
"name": "H4_public_allowlist_proactive_flag",
|
||||
"ok": true,
|
||||
"detail": "rows=327 proactive=[3, 326, 327] expected=[3, 326, 327] bad_keys=[]"
|
||||
},
|
||||
{
|
||||
"name": "H5_fetchafter_gap_semantics",
|
||||
"ok": true,
|
||||
"detail": "call1: gap=True pages=5 handed=0; call2: gap=False through=327/327 handed_ids=[326, 327]"
|
||||
},
|
||||
{
|
||||
"name": "H6_epoch_stable_404_shape",
|
||||
"ok": true,
|
||||
"detail": "epoch=1/1 unknown=404"
|
||||
}
|
||||
],
|
||||
"failures": [],
|
||||
"service_stderr_tail": "INFO: Started server process [1535952]\nINFO: Waiting for application startup.\nINFO: Application startup complete.\nINFO: Uvicorn running on http://127.0.0.1:8395 (Press CTRL+C to quit)\nINFO: Shutting down\nINFO: Waiting for application shutdown.\nINFO: Application shutdown complete.\nINFO: Finished server process [1535952]\n"
|
||||
}
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 434 KiB |
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"ok": true,
|
||||
"checks": 7,
|
||||
"fail_count": 0
|
||||
}
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 437 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 231 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 231 KiB |
Reference in New Issue
Block a user