amos 4f17b2afe5 Batch 20 (20261027-C-family-20): map batch 15's ad-hoc families to canonical ones
210 batch-15 tasks used 119 ad-hoc family names. Each now carries one of the
canonical root-cause families (11 of the 19 are used), with version + 1 and a
spec.md note, and was recalibrated through both gates. Claude checked that only
family, version and spec.md changed, that every family is canonical, and the
new trace6 Docker receipts against current digests (210/210 USABLE).
Squashed from the 36-local branch batch20-family.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-27 05:58:17 +08:00

3.1 KiB
Raw Permalink Blame History

layout-dma-buffer-contract v1 specification

Route C, original software task. Source group hwe/cc-cmake-dma-align; split key cc-cmake-dma-align. The HWE prompt and reference only suggest C11 requested alignment. Its aarch64 ELF, disassembly and board execution claims are neither reused nor tested. There is no claim of a real incident. The software substitute retains the reliability problem: an aligned arena must reserve a full bounded span for each request, honor caller offsets, and show actual address residue and data without touching outside the arena. Native gcc/make in the fixed image were probed; cmake was absent. No hardware, DMA physical contiguity, cache coherency, cross compilation, or timing is asserted. Difficulty UNMEASURED.

Contract and independent checks

The public template/docs/layout-contract.md and template/include/dma_layout.h are authoritative. Hidden cases vary only their documented parameter ranges. check.py derives expected slot starts, aligned occupied spans, cursor, returned statuses, and byte changes from Python integer arithmetic and the public definitions. It does not run gold to obtain answers. The C harness reports address residues, integer offsets, spans, and memory snapshots; it contains no expected value or hidden assertion.

Behavior check Public basis
C11 build and public ABI template/Makefile:1-11, template/include/dma_layout.h:7-67
Initial data and cursor template/docs/layout-contract.md:5-7
Absolute 32-byte alignment of each returned data pointer template/docs/layout-contract.md:9-11; C11 6.7.5 alignment specifier
Occupied span rounds nonzero payload upward to 32, preserves buffer bounds template/docs/layout-contract.md:11
Invalid requests leave all observable state unchanged template/docs/layout-contract.md:7,11,15
Read, write, checksum, and summary touch only successful payload ranges template/docs/layout-contract.md:13-19
Copy, swap, compare, find, and tag updates with status/output on failure template/docs/layout-contract.md:21-25
Resource-free, deterministic native probe output template/docs/layout-contract.md:27-29

Planned defect separation

  1. Initial alignment defect: a 16-byte assumption makes 32-byte residue wrong for some prefix and allocation locations. only_fix_align repairs only this.
  2. Capacity/span defect: initial code accounts for payload length but not full occupied span, observable only for a public near-capacity setup. only_fix_span repairs only this.

mask_symptom suppresses an error report while preserving the underlying state error. cheat special-cases a single prefix but leaves the near-capacity defect. valid_independent reconstructs a byte availability map and searches aligned windows rather than computing the start/span with arithmetic.

Evidence gates

Task remains DRAFT until complete package is loadable. Required local and fixed-image calibrations repeat each fixture five times. Only CALIBRATED/UNMEASURED may be reported after both gates; no Agent sampling is authorized. 族名规范化:native-buffer-layout → memory-buffers(2026-10-27)