amos 9d633e9e67 Batch 15 (20261023-C-hwe-scale-15): 320 HWE-derived repair tasks
One user-space repair task per eligible HWE debug-diag / compile-deploy base
ID: 320 admitted (C 218, C++ 97, build scripts 5), 1 skipped by the content
filter. Each ships a public spec with a check-to-basis table, at least two
defects with single-fix fixtures, a symptom-masking fixture and an alternative
correct implementation. Claude re-checked all 320: structure, the HWE quality
items and trace6 Docker calibration receipts against current digests
(320/320 USABLE). Difficulty is unmeasured. Known follow-up: 212 tasks use 120
ad-hoc family names; the next batch maps them to the canonical list.
The batch's 1,256-line progress log stays in its factory report and the
36-local branch batch15-hwe.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-27 01:55:56 +08:00

3.1 KiB
Raw Permalink Blame History

描述符批次合同

C01. 两个独立batch对象槽0、1。初始化phase=0、epoch=0、count=0、无table。每个非成功操作保持对象、资源统计和已发布有效字节不变。只检查有效count范围,不要求unused槽/尾部为零。 C02. begin(capacity,alignment):capacity范围1..16,alignment只能32/64/128,非法返回1。phase=1/2时返回2;epoch=UINT32_MAX时返回2。其余成功返回0,epoch加一、count=0、phase=1,新table替换并释放旧table。参数检查优先于状态检查。 C03. table由arena_allocate分配一个真实、非空、按alignment对齐的区域,恰为capacityalignment字节。软件stride与设备槽距均为alignment。第i个设备槽地址=真实base+ialignment,不是合成地址。每槽至少32字节。不做未对齐的C类型访问。 C04. append(address,length,control):仅phase=1,否则2。length在1..1048576,control在0..3,address+length不得溢出uint64,非法1。合法参数但count=capacity返回3。否则按顺序存入、count加一,返回0。状态检查先于参数和容量检查。 C05. submit:仅phase=1且count>0成功,返回0并phase=2;否则2。成功时所有有效槽编码完成。cookie=(uint64(epoch)<<32)|count,不受内存地址或另一对象影响。 C06. 设备wire为little-endian:偏移0/8/12/16/24/28分别是address u64、length u32、control u32、cookie u64、sequence u32、checksum u32。sequence从0开始;checksum是前28字节FNV-1a32:初值2166136261,每字节先xor再乘16777619模2^32。全部有效项cookie等于当前batch cookie。device只解码原始bytes,不做通过判断。 C07. complete(cookie):仅phase=2,否则2。cookie不同返回5,完全保持phase=2及内容。相同返回0并phase=3。取消、完成后重新begin时,旧通知不能完成新批次;begin每次成功都增加epoch,取消不重置epoch。 C08. cancel任意phase返回0、释放table并清空table/count,phase=0,保留epoch;重复取消安全。destroy任意phase释放所有资源并恢复初始化状态,可重新使用对象。phase=3保留table供观察,直到begin/cancel/destroy。 C09. 内存统计为arena真实追踪的全局blocks、bytes、累计creates、累计releases。每个成功begin新建一个table;释放任何已有table累计releases+1。无table释放不增加统计。所有对象销毁后blocks=bytes=0。begin替换已完成table时先建后换,分配失败返回4且保持原状态。 C10. 支持边界值、任意合法地址、1..16项、32/64/128 alignment,两个槽交错操作、长序列重复使用、迟到与重复通知。业务只保证软件memory布局和生命周期;不证明硬件DMA/cache一致性。 C11. 仅最终descriptor_table.c与batch.c进入评分。支持文件冻结为公开版本。可调整候选内部组织,但保持公开header ABI及全部行为。可使用staged记录、直接编码或其他正确实现。stderr允许任意诊断字节;stdout遵循控制台原始观测格式。正常合法控制台输入退出0,不可伪造原始地址或观测、绕开真正的table/device行为。