Files
CyberGril/docs/rework/hel896/budget-split/budget-split.json
T
zonggongandmultica-agent 01ff919859 HEL-879 release closure: the four HEL-896 audit findings become enforced behavior - (1) archive consistency: tools/release_snapshot_hel896.py v2 checks the wal_checkpoint(TRUNCATE) return (busy!=0 = hard failure, no deliverable tar, half-built dir removed - 'stopped service first' is a precondition, never a reason to ignore an actual failed result), aborts packaging on any source-vs-snapshot table-count mismatch instead of recording rows_match=False and shipping anyway, and verify_archive now rejects legacy packages that recorded rows_match=False while mapping a real rollback drill (unpack to an isolated dir, open every DB, check rows AND hashes against both recorded source and snapshot counts, emit a source-path rollback_plan - no more tar-internal self-attestation); selftest 9/9 reproduces every old failure shape first (naive WAL copy loses companion, held-reader checkpoint=(1,9,8) leaves the copied image malformed/missing the events row, the manager's rows_match=False legacy package verifying ok) then proves each fix (busy fails with zero artifacts, stale-snapshot mismatch fails with zero artifacts, online mode refuses --file dirs containing SQLite by magic-header scan, stop mode recursively takes embedded SQLite like history_root/mem0_public_history.db through checkpoint+per-table verification, verify maps source paths and passes); (2) early-finish seal: PersistentBudget gains sealed()/seal() writing sealed/sealed_requests/sealed_tokens/sealed_at atomically into budget_total beside the real usage (never faking 55, never zeroing), acquire checks the seal FIRST so every category and every remaining allowance rejects budget_sealed:51/55, the marker survives restart and backup-API archive/restore, reseal is idempotent, and there is deliberately no unseal path (re-test = new approval + new instance per budget-package 6.2.4); tools/seal_budget_hel879.py makes the closure an explicit auditable operator command with a post-seal rejection self-check; verify_budget_split_hel896.py gains S6 (51/55 experience chain completes -> seal keeps usage 51 -> 52nd and cross-category rejected with dialogue daily still 19/60 proving it is the seal not the caps, mistaken restart rejected, archive restore rejected, marker requests=51 intact) now 10/10, HEAD made dynamic instead of hardcoded 04eff61; budget-package-hel895.md 6.2 rewritten to the executable seal order (stop -> seal -> consistency snapshot); (3) single install entry: deploy/hel895-release-candidate.md 2 is now the only copy-paste install (uv --offline, npm --offline, cache-miss = stop and record, network only inside an authorized release window with per-item sha256) and 4 is the only fixed-SDK entry as a five-step chain (verify tarball sha256 9dcef930...dda23 against mem0-stack.lock -> build the wheel from the fixed source with hatchling honestly listed as the missing build backend -> cp311 dependency prep with greenlet/pillow/truststore confirmed cache-reusable on re-run -> local-wheels-only --no-index install where mem0ai must come from the fixed-source wheel, the lock line is version-only -> same-process co-import plus the 92MB fastembed cache placement); deploy/hel874-release.md 2/4 carry superseded banners pointing here, mem0-stack.lock no longer routes installs through the index mem0ai==2.2.1 wheel; (4) exact-commit honesty: audit_sdk_offline_hel896.py derives head from git rev-parse and accepts an output dir, fresh evidence written to docs/rework/hel879/sdk-audit/ (hel896 evidence left untouched) recording closure 55 / missing 41 (28 pure + 13 native) / cache-reusable [greenlet, pillow, truststore] / tarball-matches-lock at c121c42; regression on this head: pytest 299/299, ruff clean (src/tests/tools), release-snapshot selftest 9/9, budget-split 10/10 including the new S6 negatives; zero provider calls, zero downloads, authoritative ledgers/freezes/HEL-835 gate untouched, not deployed, PR#11 untouched
Co-authored-by: multica-agent <github@multica.ai>
2026-10-27 03:26:30 +08:00

152 lines
5.5 KiB
JSON

{
"head": "c121c42e39174e0f627f129e7f7e5700f33acf26",
"no_provider_calls": true,
"temp_only": true,
"scenes": {
"S0_single_ledger": {
"team_test_used": 55,
"B_after_A": "budget_total_requests_exhausted:55/55",
"C_after_A": "budget_total_requests_exhausted:55/55",
"table_columns": {
"budget_total": [
"key",
"value"
],
"request_usage": [
"day",
"category",
"requests"
],
"token_usage": [
"day",
"scene",
"used"
]
}
},
"S1_team_instance": {
"used": 55,
"tokens_used": 550,
"step_plan": [
[
"fact_extract",
4
],
[
"dialogue_main",
16
],
[
"life_event",
8
],
[
"memory_gist",
20
],
[
"proactive_message",
3
]
],
"after_55": {
"dialogue": "budget_total_requests_exhausted:55/55",
"life": "budget_requests_exhausted:life:8/8",
"semantic": "budget_total_requests_exhausted:55/55"
}
},
"S2_seal": {
"after_restart": "budget_total_requests_exhausted:55/55",
"archive_after_backup_api": "budget_total_requests_exhausted:55/55"
},
"S6_early_seal": {
"plan_total": 51,
"used_at_seal": 51,
"marker": {
"requests": 51,
"tokens": 510,
"sealed_at": 1793042553
},
"next_after_seal": "budget_sealed:51/55(封账于 1793042553,真实用量保留,不伪造、不清零)",
"other_scene_after_seal": "budget_sealed:51/55(封账于 1793042553,真实用量保留,不伪造、不清零)",
"after_restart": "budget_sealed:51/55(封账于 1793042553,真实用量保留,不伪造、不清零)",
"after_archive_restore": "budget_sealed:51/55(封账于 1793042553,真实用量保留,不伪造、不清零)",
"idempotent_reseal": true
},
"S3_user_instance": {
"B_after_A": "allowed",
"C_after_A": "allowed",
"dialogue_daily_reject": "budget_requests_exhausted:dialogue:60/60",
"semantic_daily_reject": "budget_requests_exhausted:semantic:40/40",
"token_pool_reject": "budget_tokens_exhausted:1000/2000000+2000000000",
"budget_total_rows": 100
},
"S4_misconfig": {
"B": "budget_total_requests_exhausted:55/55",
"C": "budget_total_requests_exhausted:55/55"
},
"S5": {
"config_sha256_before": {
"models.yaml": "baed2a8042c330823c08aba0ebcd95899e8d3a1b8446655854b24e2b62289eb7",
"semantic.example.yaml": "32173b89234abab76df0d4334fc25d4f2ad285fde001294a666ef4f6299b0199"
},
"config_sha256_after": {
"models.yaml": "baed2a8042c330823c08aba0ebcd95899e8d3a1b8446655854b24e2b62289eb7",
"semantic.example.yaml": "32173b89234abab76df0d4334fc25d4f2ad285fde001294a666ef4f6299b0199"
}
}
},
"checks": [
{
"name": "S0_single_ledger_repro_A55_blocks_B_and_C",
"ok": true,
"detail": "B=budget_total_requests_exhausted:55/55 C=budget_total_requests_exhausted:55/55"
},
{
"name": "S0_tables_have_no_stage_or_source_columns",
"ok": true,
"detail": "{\"budget_total\": [\"key\", \"value\"], \"request_usage\": [\"day\", \"category\", \"requests\"], \"token_usage\": [\"day\", \"scene\", \"used\"]}"
},
{
"name": "S1_team_instance_A_consumes_55_then_hard_stops",
"ok": true,
"detail": "used=55 dialogue=budget_total_requests_exhausted:55/55 life=budget_requests_exhausted:life:8/8 semantic=budget_total_requests_exhausted:55/55"
},
{
"name": "S2_seal_survives_restart_and_archive",
"ok": true,
"detail": "restart=budget_total_requests_exhausted:55/55 archive=budget_total_requests_exhausted:55/55 used=55"
},
{
"name": "S6a_early_finish_51_seals_real_usage_no_fake_no_zero",
"ok": true,
"detail": "used=51 dialogue_next=budget_sealed:51/55(封账于 1793042553,真实用量保留,不伪造、不清零) semantic_next=budget_sealed:51/55(封账于 1793042553,真实用量保留,不伪造、不清零) after=51 dialogue_daily=19/60"
},
{
"name": "S6b_seal_survives_restart_and_archive_restore",
"ok": true,
"detail": "restart=budget_sealed:51/55(封账于 1793042553,真实用量保留,不伪造、不清零) archive=budget_sealed:51/55(封账于 1793042553,真实用量保留,不伪造、不清零) arch_used=51 marker={'requests': 51, 'tokens': 510, 'sealed_at': 1793042553}"
},
{
"name": "S3_user_instance_B_and_C_unblocked_after_A",
"ok": true,
"detail": "B=allowed C=allowed cumulative_counter=2 (record-only, no gate)"
},
{
"name": "S3_daily_caps_stack_on_user_instance",
"ok": true,
"detail": "dialogue=budget_requests_exhausted:dialogue:60/60 semantic=budget_requests_exhausted:semantic:40/40 tokens=budget_tokens_exhausted:1000/2000000+2000000000 used d=60 s=40"
},
{
"name": "S4_misconfigured_total_on_user_instance_blocks_B_C",
"ok": true,
"detail": "B=budget_total_requests_exhausted:55/55 C=budget_total_requests_exhausted:55/55"
},
{
"name": "S5_repo_configs_unchanged_no_authoritative_writes",
"ok": true,
"detail": "{\"models.yaml\": \"baed2a8042c330823c08aba0ebcd95899e8d3a1b8446655854b24e2b62289eb7\", \"semantic.example.yaml\": \"32173b89234abab76df0d4334fc25d4f2ad285fde001294a666ef4f6299b0199\"}"
}
],
"ok": true
}