100 tasks from the HWE arm-linux code-gen pool (outside the lk/man/pth range given to batch 22), each with at least one independent contract-edge defect and plain public docs. Claude reviewed 100/100 USABLE against current digests; no ID or source overlap with main or batch 22. Difficulty is unmeasured. progress.md records the wrap-up: all Codex sessions and Qwen schedulers stopped for the user's rollout, Qwen results so far (57 HARD of 373), and what is left on each batch branch. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
15 KiB
mem-inline-record-layout author specification
Identity and provenance
- task-id mem-inline-record-layout; version 3; family memory-buffers; language C++17.
- Route C, original software-only adaptation; source hwe/ldd3-flex-array-probe; split group ldd3-flex-array-probe.
- Read-only material: factory/20261026-C-hwe-codegen-18/hwe/arm-linux/code-gen/ldd3-flex-array-probe/{metadata.yaml,prompt.md,reference/ldd3-flex-array-probe.c}. The material supplies the header-plus-elements, replacement and one-release direction. All public APIs, ledger, byte format, CLI, implementations and tests here are original, not claims about the source implementation or a real incident.
- User-authorized batch18 production, no private user data, no external services, hardware, credentials or model sampling. The substitute is a deterministic integer/byte record and a logical allocation ledger. No actual allocator address, kernel module, board or overflow experiment is graded.
- Root-authorized design/implementation scope is recorded in the single-task BRIEF. Author: Codex single-task subagent; independent review and gate results live in factory reports. This frozen specification does not claim ADMITTED. Difficulty UNMEASURED; no Qwen/real Agent/HIL evidence.
Assets and environment
Public workspace: record.hpp, internal.hpp, layout.cpp, store.cpp, cli.cpp, README.md, Makefile, docs/contract.md, smoke.in, smoke.expected. Only the five source/header candidate files are frozen as a candidate. Additional files are not collected. All source is original and standard-library-only. Build argv is g++ -std=c++17 -O2 layout.cpp store.cpp cli.cpp -o records. The direct observer also links these sources with -DINLINE_LIBRARY and observer.cpp. Both compiler and candidate execute only as subprocesses.
Private assets: verify.py is copied byte-for-byte from rollout/bos_verify.py; check.py contains the independent Python state model, input generation and raw C++ observer source. No hidden expectations or assertions are compiled into the observer. Input comes from stdin. The observer prints the called API's own Result fields, including error byte length plus its marker and all six numeric fields. Empty error and nonempty error=OK remain distinct. It does not substitute info results. API and CLI stdout are compared as bytes; stderr must be empty and exit must be zero, each with its own reason. The compiler has 20 seconds per build, each of seven runtime scenes has 12 seconds, wrapper has 100 seconds, task has 120 seconds.
Formal Docker image is ccr-29eug8s3-pub.cnc.bj.baidubce.com/algo/bench-runtime@sha256:1519f8daa403998e5401eeb70b973e8aac8346e25a937033bc502dc5de1641a1 (trace6). Actual image identity and cleanup come from calibration receipts, not this specification. Host execution is only trusted fixture development/calibration. The wrapper supplies Docker candidate UID/GID 65534 and protected grader checks. check.py performs every trusted candidate/source read, scratch write and input/expected construction before its first compiler. It uses mkdtemp(dir=Path.cwd()) inside the wrapper's unique cwd. After that boundary it only starts argv subprocesses and compares in-memory bytes, without visiting scratch. The wrapper removes its whole owned tree.
Defects and independent repairs
A: layout.cpp Record::fill stops before the last requested element. The symptom is in a CLI query after a successful FILL, requiring traversal from CLI dispatch through Store validation to layout mutation. The only public smoke uses n=3, start=1, count=2 and value=9 and displays A. It never uses n=0.
B: Store::replace treats a successful zero-element replacement as clearing the slot. It frees the old record but does not allocate the new header or consume a token. Boundary type: zero-length resource still has a valid allocation/header identity, including replacement accounting. This is explicitly documented in the same ordinary paragraph as all replacement behavior and is absent from the smoke. Fixing A does not repair B; fixing B does not repair A.
Gold stores logical token/tag/elements and an incrementally maintained checksum, serializing byte requests. valid_wire keeps only a canonical byte vector as record authority: metadata and signed elements are decoded on demand; fill edits element bytes and recomputes checksum; copy snapshots raw source element bytes. It does not keep the logical vector or a parallel metadata cache. Distinct internal representations are allowed by the public contract.
Behavior basis matrix
All line references below are to public template files. Each item is exercised by exact raw outputs against the independent model. API failures are followed by totals, info for all actual IDs 0..7, every extant element and every exported byte, including the other simultaneously live object with different state. Runtime fixtures execute every scene even after an earlier behavior failure.
| Check | Public basis | Scenarios / observation |
|---|---|---|
| Collected files and offline build | docs/contract.md:3; record.hpp:29 | Both real compilations, no reuse of artifacts |
| Fresh construction and defaults | docs/contract.md:5; record.hpp:7 | Two live Stores and repeated RESET/new in one observer process |
| Per-object identity/counters | docs/contract.md:5 | Same IDs in both live objects with different tags/data and interleaved direct reads |
| Result numeric defaults on success | docs/contract.md:5 | Observer prints error byte length/marker and all six numeric fields after every mutation/read |
| Result numeric defaults on failure | docs/contract.md:5 | Every failed method prints error byte length/marker and all six numeric Result fields |
| Read operations do not mutate | docs/contract.md:5 | Full repeated observation sequences and ledger comparisons |
| ID domain and native bounds | docs/contract.md:6 | Every ID parameter tests -1,8,INT64_MIN,INT64_MAX; success at 0 and 7 |
| Size domain | docs/contract.md:6 | replace n=0 and 64 success; -1,65,native extremes rejected |
| Tag domain | docs/contract.md:6 | tag=0 and 65535 success with byte reads; -1,65536,native extremes |
| Budget domain | docs/contract.md:6 | budget=16 and 272 succeed; 15,273,native extremes rejected |
| Fill start/count domains | docs/contract.md:6 | start 0/64 and count 0/64 success; domain neighbors and native extremes separately |
| Fill value domain | docs/contract.md:6 | positive-count writes -1000000,1000000 and 0; domain neighbors and native extremes |
| Copy domains | docs/contract.md:6 | Both endpoints of all five arguments in successful calls; neighbors and native extremes per argument |
| Get index domain | docs/contract.md:6 | Direct get indices 0/63 succeed on 64-element records; invalid neighbors/native extremes |
| Byte offset domain | docs/contract.md:6 | Direct byte offsets 0/271 succeed on full records; invalid neighbors/native extremes |
| Replace ordered validation | docs/contract.md:7 | Each parameter invalid alone and each first-invalid position with later invalid parameters |
| Allocation budget calculation | docs/contract.md:7 | Required bytes succeed; required-1 fails while nonzero old record remains |
| Zeroed replacement contents | docs/contract.md:7 | Every element and byte read after replacement |
| Existing-record replacement accounting | docs/contract.md:7 | Repeated ID replacement, frees/allocations/bytes/token independently compared |
| Zero-element header and identity | docs/contract.md:7 | n=0 on populated/empty slot, repeated replacement, all 16 bytes and tags/tokens observed |
| Budget excludes other allocations | docs/contract.md:7 | Exact new-record budget with all IDs and other object live |
| Fill ordered validation | docs/contract.md:8 | Per-argument invalids, simultaneous-invalid suffixes and absent-record/range combinations |
| Fill absent and ranges | docs/contract.md:8 | Absent ID, start above capacity, count beyond remaining, positive-count zero write and direct readback |
| Fill zero count | docs/contract.md:8 | start=capacity on full and zero-element records, no field/counter change |
| Copy validation/presence | docs/contract.md:9 | Invalid suffixes, absent destination, absent source, domains before presence with simultaneous presence/range errors |
| Copy ranges | docs/contract.md:9 | Source/destination starts above capacity or one-element excess; zero count at both ends |
| Snapshot overlap | docs/contract.md:9 | Same-record forward/backward 63-element copies and cross-record 64-element copy |
| Fill/copy preserve metadata | docs/contract.md:9 | Tokens, tags, counts, ledger and full exported layout compared |
| Drop/repeated drop | docs/contract.md:10 | IDs 0/7 success, repeat ABSENT, totals and all remaining records |
| Info independent return | docs/contract.md:10; record.hpp:36 | Direct INFO calls for each ID, present/absent/bad ID, every returned field |
| Get independent return | docs/contract.md:10; record.hpp:37 | Every actual element directly read, zero/signed/extreme valid values; absent/range/default fields |
| Byte independent return | docs/contract.md:10; record.hpp:38 | Every actual byte directly read, zero/last/header/data; absent/range/default fields |
| Totals independent return | docs/contract.md:10; record.hpp:39 | Constructor/replacement/fill/copy/drop/error/reconstruction ledger observations |
| Failure atomicity | docs/contract.md:10 | All actual used IDs and nonzero backgrounds fully re-read after every API failure |
| Header order/width | docs/contract.md:11 | All header bytes over varied tokens/tags/counts; n=0 and n=64 |
| Signed encoding/checksum | docs/contract.md:11 | Negative/positive/zero values, wraparound sums and little endian full byte comparison |
| CLI verb dispatch | docs/contract.md:13 | Every verb succeeds; ordinary errors use documented error format |
| CLI arity | docs/contract.md:12 | Every fixed verb missing/extra arguments; TOTAL missing verb is empty line |
| CLI bad number per parameter | docs/contract.md:12 | Each numeric position receives x in main CLI and plus/suffix/sign-only/overflow/native extremes/domain neighbors/CR/NUL/VT/FF/DEL/high bytes in reuse; complete nonzero state reads follow each |
| CLI numeric grammar | docs/contract.md:12 | Plus, suffix, CR, sign-only, signed-64 overflow rejected; leading zeros and -0 accepted |
| CLI separators/line length | docs/contract.md:12 | Space/tab leading/trailing accepted; 256-byte valid and 257-byte invalid lines |
| CLI empty/unknown | docs/contract.md:12 | Empty stdin, blank/space lines and unknown verb |
| CLI command limit | docs/contract.md:12 | 4096th line is a successful mutation; 4097th and later return LIMIT, both with all-valid prefixes and a mixed prefix containing empty/unknown/arity/bad-number/257-byte/NUL errors plus API domain/presence/range/NOMEM errors; malformed post-limit lines also return LIMIT |
| CLI final line/fresh lifecycle | docs/contract.md:12 | noLF scene and same-process run_cli reuse: 4097 commands, fresh TOTAL/same-ID records, empty input and noLF, with raw return/output/diagnostic framing |
| Output framing and bytes | docs/contract.md:13 | Exact bytes including LF, canonical integers/spaces, dedicated stdout_extra fixture |
| Empty stderr | docs/contract.md:13 | Independent stderr_nonempty reason; stderr_extra has correct stdout and exit0 |
| Exit0 independent check | docs/contract.md:13 | Factory-only exit_nonzero variant preserves stdout and fails only exit; ordinary fixed negative fixtures run0 |
Fixtures and expected outcomes
| Fixture | Expected | Purpose |
|---|---|---|
| gold | PASS | Logical record authority, all behavior |
| template | FAIL | A and B |
| noop | FAIL | Complete build/run but no fill effect |
| cheat | FAIL | Hardcodes the complete public smoke stdout, cannot answer other CLI inputs |
| cheat_read_grader | FAIL | Uses gold behavior only if /grader/check.py is readable; otherwise exits42 with grader unreadable; the intentional refusal exception |
| fix_fill | FAIL | Repairs A alone; B remains |
| fix_zero | FAIL | Repairs B alone; A remains |
| mask_symptom | FAIL | Makes every public smoke command/output correct for its requested fill but retains other failures |
| valid_wire | PASS | Bytes are the sole authority; independent transition algorithm |
| stdout_extra | FAIL | Gold behavior plus one unexpected stdout space |
| stderr_extra | FAIL | Gold behavior plus stderr diagnostic, exit0 |
Every ordinary negative fixture must compile/link and run all seven scenes with exit0. The read-grader refusal exception is recorded separately. Gold and valid must pass five host and five fixed-image Docker trials. Host read-grader may PASS if a grader path becomes readable; such a result is retained as an allowed host exception and does not prevent Docker calibration.
Evidence and freeze procedure
Revision 1 replaces the original identity after a counting-coverage audit. Version 1 task, full freeze/state, both actual PASS gate receipts and logs are retained in the author revision0 directory/index and original run directories, all EXCLUDED from current admission. The only changes are task version, private mixed-error limit coverage, and this specification; candidate and public files remain byte-identical. A factory-only mutant that counts only syntactically valid lines must build0/run0 and fail the added mixed-limit behavior. Version 2 was subsequently excluded as described below.
Revision 2 repairs a raw-observation collision: the original observer replaced empty error by OK, which also represented a nonempty error=OK. Version 2 task/full freeze/state, both actual PASS gate receipts and logs are retained in author revision1 and their original run directories, all EXCLUDED. Version 3 adds error byte length beside the marker and keeps all six numeric Result fields. A factory-only INLINE_LIBRARY mutant returning nonempty OK on otherwise successful Results must build0/run0 and fail the API scene; ordinary CLI compilation remains gold. The current full-tree identity is freeze-003 with both gates rerun. No candidate or public asset changes.
Before formal freeze: complete all public assets and this specification, run narrow core.load_task, fixture development, smoke/single-repair observations and factory-only exit-code detection. Root performs one concentrated read. Then record SHA256/size/mode for every task file including spec.md in the author directory. Platform task_digest excludes spec.md; the separate full-tree manifest binds it. Any task byte change after that freeze requires a new identity and both formal gates with old evidence retained. No task files are updated with gate results.
Each trial's private grade.stderr retains one compact JSON containing actual build PID/argv/exit/timeout/stdin and stdout/stderr length+SHA256 prefix (16 hex digits), then every actual scene PID/argv/exit/timeout/stdin/expected/actual/stderr digest and independent reasons; reuse is one actual process containing separately framed run_cli invocations. A runtime size guard requires the summary to stay below 3900 bytes and the wrapper retains its last 4000 bytes. Runtime raw stdout is compared in memory and is not retained in the trial record; this limitation is explicit. Development smoke stdout is separately saved in the own-task run evidence. Formal results, actual task_digest, Docker image ID, cleanup, line counts and final issues are written only into factory report.json and report.md.
No real model trajectory, SDK/tool-native rollout, hardware verification, training, Salty upload or difficulty measurement is performed. Root owns shared regression/catalog/Git and final admission.