Repository navigation
ICODE v2.46.0
ICODE v2.46.0 — 候选清单侧库化与出生输入加固
小版本。控制面首次把完整候选 manifest 移出事件正文,改为工单内内容寻址侧库;同时修复 Windows 中文入参、debug 出生全仓扫描与 init 契约错位,并补充跨工程 init 文档。
- 候选 manifest 内容寻址侧库(
.ico_storage/):manifest/index_manifest/untracked_manifest的首次定义写入.ico_storage/definitions/<kind>/<sha256>.json,事件行、journal 与 metadata 只保留$icode_manifest_ref。大仓首个ticket_created事件不再内联整份清单:400 文件夹具从超过 100 KB 降到 100 KB 以下,此前实测 3,434 行清单的单事件为 1.27 MB。读取按内容摘要逐次复验,侧文件缺失或损坏一律 fail-closed;旧 inline 工单保持可读,不迁移、不重写历史前缀;不认识侧库的旧版 ICODE 读取新工单会明确失败,不会静默当成空清单。 - 归档与事务恢复:
archive-manifest逐文件要求并记录侧库文件,归档复制必须带上.ico_storage/;关闭交接会镜像关闭期新增定义并刷新 manifest;事务回滚只留下未被引用的内容寻址孤儿文件,不影响校验。 - debug 出生跳过全仓候选扫描:debug 工单不进入 code/patch,不再为没有消费者的快照扫描整仓,出生事件为 729 B;debug 出生显式拒绝
--exclude/--candidate-limits-json。 - 正常出生可观测:
create在 stderr 输出candidate scan: N files, M index rows, X ms,debug 与非 Git 出生输出 skipped。 - Windows UTF-8 文件入参:新增
create --requirement-file、metadata-update --set-json-file/--append-json-file,避免非 ASCII 需求经 argv 按 ANSI 代码页乱码;文件与内联参数互斥。 - init 契约对齐:init/debug 出生 seed
semantic_decisions: [],与requirement_deltas: []一致,validate与lint_workflow_contract --strict直接通过。 - 文档:多仓 init 范围表与「工程」列、首轮理解核对清单、
requirement_points≤8 语义;debug 模式跳过历史工单结论并对 memory 采用同规则;reference-only/stale 轻量表与网络盘git ls-tree/git show策略;L2 降级 trace 模板与思考块落点。
验证边界
新增 tests/test_definition_store_side_files.py 7 项:首事件体积、侧文件摘要、缺失/损坏 fail-closed、candidate capture 新定义、legacy inline 可读、归档必须复制侧库。test_candidate_storage*(含 faults/stage/readers/doc)277 passed / 10 skipped / 54 subtests;test_stage_acceptance.py 41 passed / 2 skipped / 28 subtests;test_storage_compaction.py 5/5;test_control_plane_birth_optimization_contract.sh 11/11、metadata 8/8、transition 13/13、regression 26/26、close 23/23、handoff matrix 通过。真实旧票回归:3,434 行清单、无 .ico_storage 的 debug 工单读取与事件链校验正常。本机 Windows 上 test_crosscheck_freshness.py 6 项因测试自身默认 gbk 解码失败,属既有环境问题,不在本次改动范围内。
English summary
Minor release moving complete candidate manifests out of ledger event bodies into a content-addressed side store (.ico_storage/definitions/<kind>/<sha256>.json). Events, journals and metadata keep only $icode_manifest_ref; every read re-verifies the digest and fails closed on missing or corrupt side files. Concretely, the 400-file fixture's first event drops below 100 KB, while the previously measured 3,434-row manifest produced a 1.27 MB event. Legacy inline tickets stay readable without migration, and archives must carry the side store so the compacted ledger remains self-contained. The release also skips the full-repository candidate scan for debug births, prints a bounded scan summary for normal births, seeds semantic_decisions at birth, and adds UTF-8 file inputs for Windows command lines. Documentation covers multi-repository init, debug independence from historical conclusions, and reference-only retrieval.