Skip to content

test: judge the memory gate on live heap (ADR-338) and record the clean-state comparison - #275

Merged
wangzhizhou merged 2 commits into
mainfrom
dev
Nov 12, 2026
Merged

wangzhizhou merged 2 commits into
mainfrom
dev

Conversation

@wangzhizhou

Copy link
Copy Markdown
Contributor

内容

只含文档、探针工具与一处证据脚本关键词,不动产品代码(不触发验收包重建)。

  • 报告 265 §4.3:重启后(swap 0、负载 1–4)新旧包各 5 轮——「私有已提交」稳态中位数 新 37.4 / 37.3、旧(1.2.1 发布版)37.5 / 37.3,两者都 5 轮全超 34 MiB;存活堆都是 20.1–20.2 MiB。本批无内存回归,旧口径随系统内存压力反向漂移。
  • ADR-338:memory-gate.sh 改以稳态存活堆(DefaultMallocZone 已分配字节)判定,门槛 24 MiB,不再按学习区分档;「私有已提交」与 footprint 只作参考;读不到存活堆按 FAIL;新增 ANALYZE_ONLY=1 只重判已有快照。取代 ADR-263/292/312 的口径与门槛。
  • MVP 验收标准里「≤30MB」一处加注;HANDOFF / 积压同步。

验证

  • ANALYZE_ONLY=1 重判报告 265 的 5 组快照(共 23 轮):全部 PASS,稳态存活堆 20.1–21.2 MiB
  • make verify PASS;make macos-offline-tests 62 文件 / 328 例 PASS

…me; the gate metric is unsound

With zero swap both packages sit at about 37.4 MiB private committed across five rounds each and both fail the 34 MiB limit, while live heap is about 20 MiB in both. The metric moves inversely with memory pressure, so the released 1.2.1 fails on a clean system too.

Signed-off-by: wangzhizhou <824219521@qq.com>
Private committed memory moves inversely with system memory pressure, so the released 1.2.1 fails the old 34 MiB limit on a clean system while its live heap stays near 20 MiB. The gate now judges DefaultMallocZone allocated bytes at the steady samples, keeps the old figures as reference, and can re-judge saved snapshots with ANALYZE_ONLY=1.

Signed-off-by: wangzhizhou <824219521@qq.com>
@wangzhizhou
wangzhizhou merged commit b581cf3 into main Nov 12, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant