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

10 KiB
Raw Permalink Blame History

resource-static-alignment — author specification

Status: CALIBRATED; independent root review pending. Final Docker calibration: 45/45 expected, PASS, cleanup confirmed. Final trusted-local calibration: 40/45 expected plus the five explicitly permitted reader PASS exceptions; actual receipt status FAIL. All 90 raw exchange bundles / 360 phase records were independently decoded. Difficulty: UNMEASURED. Source route C: original C11 userspace reliability task inspired by hwe/cc-da-004, not a historical incident. The reference observes the virtual address of one static 128-byte object modulo 32. This original four-slot store retains compile-time alignment of useful static payload spans and adds a separate bounded append reliability defect. No reference code, grader, or platform is copied.

The software substitute uses actual C objects and deterministic byte transformations in Linux userspace. No board, network, real timing, physical address, DMA, coherency, cache-line size, or ARM certification is involved. Fixed-image probe factory/20261023-C-hwe-scale-15/subagents/cc-da-004/tool-probe-01.json confirms gcc/g++/make and records the absence of CMake and an aarch64 cross compiler. The original source's CMake/cross-build wording is background only. The public project uses the available gcc/make tools.

Public basis and independent behavior matrix

All locations below refer to template/docs/storage-contract.md. Headers specify signatures; the public observer is frozen byte-for-byte into the private check. The harness prints raw observations only, with no assertions or expected values. The Python model computes expectations from the following public rules; it never runs gold to produce an answer.

Acceptance behavior Exact public basis Observation / independent model
Fresh C11 compilation of four library translation units line 3; template/Makefile:2 gcc argv, compiler real leader status and phase evidence
Four useful span addresses each have remainder zero; independent valid bytes line 7 every command's actual uintptr_t remainder, all four logical lengths and valid payloads
Reset, empty payload, per-slot content, invalid slot, capacity refusal without state mutation lines 7, 9 R/W/A/F/C, 0/127/128/129 lengths, 127+2 refusal and 127+1 success
Patch/erase ranges, SIZE_MAX offset, reverse/rotate/xor line 11 Python bytes slicing, reversal, modular rotation and xor; negative status and full valid-state comparison
Find, unsigned lexicographic compare, rolling 16-bit checksum line 11 independent Python search/compare/rotate-add
Framing and CCITT-FALSE, empty frame, short/malformed/bad CRC, capacity checks line 15 Python bitwise CRC and frame parser; Z/U results, emitted bytes, slot mutation
Failed unpack auxiliary scalar is unspecified lines 15, 32 explicitly excluded after a failed U; no tail bytes compared
Stream chunking, noise, malformed candidates, CRC resynchronization, pending flush and counters line 19 incremental Python byte-queue model and every raw counter
Ordered batch, swap, rollback on second operation failure, failed index and success count line 23; line 30; template/batch.h:5 independent list snapshots and operation application, B/J
FNV-1a and exact export/import/slice format with capacity/range refusal line 23; line 30 Python 32-bit FNV and byte slicing; observer signed representation is public
Decimal token grammar, horizontal whitespace, lowercase hex, complete records lines 27, 30, 32 full ASCII-token validation before normalization/conversion; arbitrary legal leading zeroes accepted
Stderr is permitted and does not decide correctness line 27 byte capture; raw hash/length bound; lossless bz2 transport; no stderr/combined-output cap

The deterministic suite contains directed boundary and rollback cases plus independent seeded (42004) transformations. Static storage duration and source-level alignment declarations are also visible to code review. Runtime observations establish useful virtual span alignment and payload behavior; they do not establish physical properties or hardware suitability.

Initial defects and fixture independence

  1. The static arena is aligned, but effective spans 1–3 are offset by four bytes. The slot-zero smoke sequence passes its address check; a documented multi-slot context fails. only_fix_alignment removes the per-slot offset but retains the append defect. only_fix_bounds restores append refusal but retains the actual address defect. Every allocated access remains within the arena; no misaligned typed dereference is introduced.
  2. Append at a documented non-default capacity boundary silently shortens the requested data and reports success. The smoke payload is four bytes and does not expose it. A 127-byte live payload followed by two appended bytes must return -2 and preserve the old payload. The buggy path stays memory-safe, so the negative fixture fails for a real status/state difference rather than a compile error or undefined access.
Fixture Expected Mechanism
gold PASS One statically aligned arena, 160-byte strides, independent length metadata, atomic staging
template FAIL Both independent defects
noop FAIL Writes report success but set logical length to zero
cheat FAIL Supports slot zero only while reporting success for other writes; public smoke alone is insufficient
cheat_read_grader FAIL in Docker Uses its immediate supervisor's /proc/<pid>/cwd/grader/check.py readability as a gate before otherwise correct behavior
only_fix_alignment FAIL Address repair alone; bounded append remains wrong
only_fix_bounds FAIL Append repair alone; nonzero slots remain actually misaligned
mask_symptom FAIL Reports an aligned prefix address while actual writes use an offset address; valid payload observations disagree
valid_separate PASS Four distinct statically aligned arrays selected through a pointer table, rather than an arena with arithmetic offsets

All fixture directories contain only the eight candidate files. Each fixture compiles against the same public observer. An expected negative must be rejected for actual runtime behavior or its explicit reader gate, never for syntax/link failure. The reader may PASS locally without isolation; that fact is retained and only Docker calibration establishes isolation.

Grader boundary and execution evidence

verify.py is an exact copy of rollout/bos_verify.py; the only private grader attachment is check.py. Candidate source is read once before the first child using a no-follow directory FD, no-follow/nonblocking file opens, fstat, regular-file and 1 MiB checks. A unique scratch directory is created. Sources, frozen public observer and all inputs are prepared before the first child. The parent never reads/writes/traverses the candidate-controlled tree afterward; all cleanup is performed by argv children.

Compiler (20s), candidate (12s), cleanup (8s), and independent strict-lstat absence (8s) each use the same candidate-identity bounded Linux subreaper. The real own Popen leader is polled/waited before explicitly reaping adopted descendants. Discovery starts from actual supervisor kinship or still-live matching PID/start tokens; Z/X and reused old tokens cannot authorize new ancestry. Every signal performs a fresh stat check. Separately, final PG absence scans all current /proc entries for the real leader PGID; it is not inferred from the tracked kinship list. Unexpected exceptions remain present and reject the attempt. FileNotFoundError and ProcessLookupError on precise proc stat reads mean normal process disappearance.

Each returned stage binds actual wrapper PID/start, supervisor PID/start, leader PID/start/PGID, UID/GID/groups, argv/cwd/nonce, production deadline, finite elapsed time, actual leader and controlled rc, strict booleans, real reaping, descendant and PG absence, adopted wait facts and all exceptions. The parent validates exact types and consistency before accepting a zero phase. Its explicit Popen.communicate outer deadline has eight seconds beyond the production deadline; outer timeout is rejected with unknown inner facts, without invoking root's unsupported implicit kill-and-wait. The enclosing production container cleanup remains independently required.

Immediately after wrapper return (or outer deadline), an E: lossless compressed stderr record persists actual wrapper rc, raw request, raw wire, raw-wire length/SHA and partial/outer-timeout facts before JSON parsing. Invalid/missing wire fields and supervisor nonzero therefore retain the returned bytes and do not acquire invented successful metadata. Actual raw IO is bound by length/SHA; stderr uses lossless bz2 transport to retain the 17 MiB regression within the platform's 4000-character private tail. Diagnostic decoding checks the retained bytes and writes full actual exchanges and IO files outside the candidate.

Finally covers preparation, compiler/candidate nonzero or timeout, mismatches and exceptions. Cleanup and strict os.lstat absence are separate candidate-identity phases. Delete-then-nonzero, delete-then-timeout, noop-delete, absence timeout, and errors after zero facts must all reject. Missing dependencies remain unverified in the outer wrapper. Any real task failure is FAIL; external execution faults are recorded separately rather than called successful behavior.

Validation and limits

Fixed-image diagnostic attempts, actual complete task copies, wire records, SHA bindings and the exact explored scope are recorded in the author report. Historical attempts are retained unchanged, including earlier successful business execution whose 17 MiB evidence was truncated before the logging repair. Synthetic proc tests exercise token/ancestry/signal predicates without PID exhaustion or manipulation of unrelated processes.

Final local and Docker gates each execute all nine fixture classes five times through rollout calibrate. The final report records the actual unique attempt paths, current digest, pinned image identity, per-class results and cleanup. No Qwen/Pi sampling, real-agent trajectory, full-repository unit run or hardware run is performed by this single-task author. Calibration is not admission and difficulty remains UNMEASURED. Root performs the independent read-only review after handoff.

族名规范化:resource-lifetime → memory-buffers(2026-10-27)