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>
16 KiB
Task specification: dev-minor-buffer-routing
Identity, provenance and scope
- ID/version: dev-minor-buffer-routing / 1. Family: linux-device-abi. Source is exactly
hwe/ldd3-scull-multi-dev. - Author: batch18 single-task Codex author. Independent reviewer: root, pending. Status: CALIBRATED, independent root review pending; not ADMITTED.
- Route C, original software-only material adaptation. Base/split group: ldd3-scull-multi-dev. Direction: minor dispatch and per-object buffers from the public hard HWE source.
- Read-only inputs:
factory/20261026-C-hwe-codegen-18/hwe/arm-linux/code-gen/ldd3-scull-multi-dev/{metadata.yaml,prompt.md,reference/ldd3-scull-multi-dev.c}. Existing local batch copy; internal project authorization under AGENTS.md. Reference inspected, never executed. No reference Linux code copied: the C++ session/route model, defects, fixtures and independent grader are original. - The material described four scull minors with private buffers. This task deliberately specifies eight minors, configurable capacities, shared duplicate descriptors, independent opens, unlink/recreate generations and explicit positional/append writes. It does not claim to reproduce Linux scull's complete ABI or implementation.
- No real user data, private endpoints or credentials. No kernel, privileges, hardware, network, external services, clocks, dependencies or downloads. Ordinary user-space buffers preserve the relevant software failure mechanism.
- Validation: deterministic byte storage, resource accounting and routing only. Hardware, kernel loading, electrical behavior, concurrency, allocation failure and performance are outside scope. Difficulty UNMEASURED; no Qwen/real Agent/hardware execution.
Complete public workspace and environment
The template contains four candidate files, minor_console.cpp raw observer, Makefile, README.md, docs/api.md, and smoke.in. Only minor_router.hpp, minor_directory.cpp, minor_io.cpp, minor_query.cpp are frozen. Every non-template fixture contains exactly these four files. Public prompt describes symptoms and build/repro only, names no defective function or root-cause category, and requires every clause of docs/api.md. All root causes are outside the console where the symptom appears.
Build argv: c++ -std=c++17 -O2 -Wall -Wextra -pedantic minor_directory.cpp minor_io.cpp minor_query.cpp minor_console.cpp -o observer. Run argv: the fresh observer binary, with a generated well-formed stdin stream. Build must exit 0; ordinary candidate runs must exit 0, have exact stdout records and empty stderr. API behavior and validation precedence are completely public. Malformed transport is explicitly outside scope; the raw observer uses from_chars with full token consumption for int32/int64/uint64 and does not discard command arguments.
Environment: standard C++17/Linux software runtime. Formal image is ccr-29eug8s3-pub.cnc.bj.baidubce.com/algo/bench-runtime@sha256:1519f8daa403998e5401eeb70b973e8aac8346e25a937033bc502dc5de1641a1 (fixed trace6). Actual image ID is recorded in the Docker receipt. Task timeout 120s; compiler timeout 35s, child run 20s; bos wrapper total check timeout 100s. No production isolation claim from trusted-host runs.
Defects, independent witnesses and fixtures
Fault A: open selects the first linked route's shared Device rather than the requested minor after validating the requested route. This crosses the console, directory binding and I/O/query modules. Public smoke creates minor 0 and 3, writes ABC only to minor 0, and reads exactly three bytes from a new minor-3 read session. Expected empty, template emits ABC. Read request equals the first buffer size, so smoke does not exhibit fault B.
Fault B: sequential read adds the requested count (clamped to capacity room) rather than completed bytes. Assigned exact-contract-boundary type: short completion/cursor progress. The docs R11 explicitly require actual completion and later appended data visibility; smoke does not show it. Independent witness uses only minor 7, capacity 32: append bytes 13 00 ff; open a second reader; read 10 returns three bytes; append 4d 58; read 2 must return 4d 58. The template and fix_routing skip those bytes. Huge-count EOF followed by append is also checked. This is a separate I/O-module fault, not repaired by correct route binding.
| Fixture | Expected | Mechanism and first intended rejection |
|---|---|---|
| gold | PASS | shared_ptr object/session authority, correct routing and actual read completion |
| template | FAIL | both independent faults; smoke-routing |
| noop | FAIL | complete linked API stubs, no stored state; smoke-routing |
| cheat | FAIL | returns empty sequential reads; short-completion rejects canned empty-channel behavior |
| cheat_read_grader | FAIL | uses gold behavior only if /grader/check.py or parent-cwd grader/check.py readable; otherwise stderr and exit 7; host accidental PASS permitted and retained |
| fix_routing | FAIL | only fault A corrected; short-completion still wrong |
| fix_completion | FAIL | only fault B corrected; smoke-routing still wrong |
| mask_symptom | FAIL | suppresses count=3 initial reads, masking public smoke; independent short-completion still fails |
| valid_ids | PASS | separate integer object/stream/descriptor maps, explicit reachability collection and per-byte storage transitions; no shared_ptr identity authority |
| stderr_only | FAIL | gold state behavior, but emits a diagnostic on counts; dedicated empty-stderr boundary rejection |
Every ordinary negative compiles/links against the official raw observer and runs to exit 0 before behavior rejection; only read-grader may deliberately exit on isolation refusal. Fixture reports retain actual compiler/run exit codes, expected record count and concrete rejection case. A single smoke special-case cannot pass the independent corpus. Alternative containers, helpers and algorithms are allowed; exact public behavior, not source matching, is required.
Independent grader, safety and full coverage audit
verify.py is byte-for-byte rollout/bos_verify.py. Private assets consist only of check.py. No isolation-blocked marker. The observer embedded in check.py is verbatim public minor_console.cpp, with raw command parsing and printing only: no expected outputs, test generation, assertions or candidate verdicts. All generated sequences, labels, prior-output seeds, and expected states stay in the Python check process. Fixed random seed 0xD3C011. No reference candidate is run to obtain expected values.
Scratch uses tempfile.mkdtemp(dir=Path.cwd()) inside the wrapper's exclusive temporary tree. Before the first compiler invocation the trusted check reads all candidate bytes, writes all source/observer assets and constructs stdin/expected values. Compiler and candidate are subprocesses; in Docker the unchanged wrapper drops both to UID/GID 65534 with no supplementary groups. After compilation begins the check never reads/writes/stats/chmods/deletes anything in scratch; after candidate execution it compares only memory. The wrapper owns and reclaims the whole tree. No global /tmp scratch is created by check.py. The unchanged wrapper supplies the active protected-grader refusal probe.
coverage-audit.json in the single-task factory directory records a concentrated pre-freeze review of all 20 public API methods through distinct direct observer commands, both Routers, all promised integer and byte-vector endpoints, state/output atomicity, generation/reclamation, ordering and stdout/stderr. Individual I/Q/P/K methods are called directly; V/N snapshots never substitute for another API. Empty and prefilled output containers, all byte values, exact/short/zero completion, maximum offsets/counts, signed overflow boundaries, read/write permission priority, full fd table, fd reuse, two-instance reset isolation and seeded combinations are covered.
| Rule/check class | Actual public basis | Cases and mechanism | Comparison |
|---|---|---|---|
| R01 | template/docs/api.md:3 |
empty-direct-apis, cross-instance, cross-instance-first-unchanged, cross-instance-second-unchanged; full API command coverage | exact independent model comparison |
| R02 | template/docs/api.md:4 |
minor-domain-errors, all-minors-capacities, write-size-endpoints, retained-generations, generation-after-failed-create | exact independent model comparison |
| R03 | template/docs/api.md:5 |
error-atomicity, full-table-atomicity, permissions-direct; every stdout record and empty stderr check; stderr_only fixture | exact independent model comparison |
| R04 | template/docs/api.md:6 |
minor-domain-errors, fd-domain-errors, open-priority-domain-table, permissions-priority-atomicity | exact independent model comparison |
| R05 | template/docs/api.md:10 |
all-minors-capacities, create-priority-generation, eight-routes-direct | exact independent model comparison |
| R06 | template/docs/api.md:11 |
retained-generations-state, detached-local-io, retired-last-close-state | exact independent model comparison |
| R07 | template/docs/api.md:12 |
smoke-routing, all-minors-capacities, open-priority-domain-table, fd-reuse, cursor-alias | exact independent model comparison |
| R08 | template/docs/api.md:13 |
full-table-valid-duplicate, full-table-invalid-duplicate, fd-reuse, cursor-alias-direct, retired-last-close | exact independent model comparison |
| R09 | template/docs/api.md:14 |
append-int-endpoints, permissions-priority-atomicity, cursor-alias-direct, detached-local-io | exact independent model comparison |
| R10 | template/docs/api.md:18 |
write-size-endpoints, pread-peek-endpoints, output-vector-seed-endpoints; W/T echo original const input bytes | exact independent model comparison |
| R11 | template/docs/api.md:19 |
short-completion, short-completion-state, read-beyond-shrunken-end, cursor-alias, permissions-priority-atomicity | exact independent model comparison |
| R12 | template/docs/api.md:20 |
write-size-endpoints, gap-and-clamped-write, cursor-alias-direct, gap-clamp-append-state, append-interleaving-zero-room, append-empty-full-cursor | exact independent model comparison |
| R13 | template/docs/api.md:21 |
pread-peek-endpoints, positional-no-cursor-effects, permissions-priority-atomicity | exact independent model comparison |
| R14 | template/docs/api.md:22 |
positional-write-size, pwrite-offset-endpoints, empty-positional-no-extension, positional-no-cursor-effects, permissions-priority-atomicity | exact independent model comparison |
| R15 | template/docs/api.md:23 |
seek-overflow-domain, permissions-priority-atomicity, detached-local-io | exact independent model comparison |
| R16 | template/docs/api.md:24 |
resize-endpoints, clear-repeat, clear-cursor-retention, gap-and-clamped-write | exact independent model comparison |
| R17 | template/docs/api.md:28 |
I directly in every audit, output-field-seed-endpoints, eight-routes-direct, peek-without-descriptor | exact independent model comparison |
| R18 | template/docs/api.md:29 |
Q directly in every audit, output-field-seed-endpoints, cursor-alias-direct, retained-generations-state | exact independent model comparison |
| R19 | template/docs/api.md:30 |
K directly in peek-endpoints, pread-peek-endpoints, peek-without-descriptor, minor-domain-errors | exact independent model comparison |
| R20 | template/docs/api.md:31 |
V and N directly in every audit, output-field-seed-endpoints, full-table-atomicity, final-empty-state | exact independent model comparison |
| R21 | template/docs/api.md:32 |
H directly in every audit, retained-generations-state, retired-last-close-state, instance-local-reset, final-empty-state | exact independent model comparison |
| R22 | template/docs/api.md:36 |
compile all four frozen candidate files plus verbatim raw observer, explicit C++17 argv; build exit 0 for each fixture required | exact independent model comparison |
| R23 | template/docs/api.md:37 |
transport prelude/end comments and blank lines, padded whitespace, leading-zero fd, uppercase hex; signed/unsigned endpoints in domain labels; cross-instance B commands | exact independent model comparison |
| R24 | template/docs/api.md:38 |
direct command counts in coverage-audit.json: C/D/O/U/X/A/W/T/S/L/E/Z/H | exact independent model comparison |
| R25 | template/docs/api.md:39 |
R/P/K use prior seeded vectors, W/T input echoes; exact lowercase hex and empty - expected by independent Python model | exact independent model comparison |
| R26 | template/docs/api.md:40 |
I/Q/V/N seeded fields including int32 endpoints; exact record count/fields/order; empty stderr check and stderr_only fixture | exact independent model comparison |
Each table row is a check class, not a new hidden requirement. Protected inputs only combine these published rules. Every row uses the final public file's actual line number. Stdout is captured in text mode and compared as splitlines() records (with exact contents within each record); universal newline conversion means CRLF is not rejected byte-for-byte because no LF-only rule is public. Empty stderr is checked process-wide; stderr_only is independently rejected with an explicit reason.
Size and engineering line accounting
Candidate business code: 543 unique nonblank, noncomment lines across the four template files; ordinary standalone brace lines are included. Excluding standalone {, } and }; gives 406. Breakdown: header 94/87, directory 158/108, I/O 165/120, queries 126/91 (with/without standalone braces). No fixture copies, blanks, comments, generated branches or repetitions are counted. Unique public engineering code including raw console and Makefile: 714 nonblank/noncomment lines. No claim that formatting itself adds behavioral complexity; the code implements distinct route/session lifecycle, I/O transitions and resource observations.
Calibration, evidence and limitations
Gate 1: trusted local calibration, all ten fixtures five times. Gate 2: fixed trace6 Docker calibration, all ten fixtures five times. Real argv, PID, stdout/stderr, start/end, exit code and receipt paths are persisted in unique run directories; no history is overwritten. gate_runner.py maintains single-task state.json so interrupted work can be resumed. Host read-grader PASS is an authorized expected isolation limitation, never relabeled or changed to expected PASS. Docker must overall PASS with cleanup confirmed and current matching task digest.
Final task digest: b2ea7a12d282d56f190acdbf017dc017573a0adc6579a95be7e075b448cac04f. Final host receipt runs/20261026-C-hwe-codegen-18/ldd3-scull-multi-dev/host-20261026T225814-dd17d1f2/calibration-1749b4085c414e46978f83406e277c43/receipt.json: original FAIL/exit1 only authorized read-grader visibility exception, cleanup confirmed. Formal Docker receipt runs/20261026-C-hwe-codegen-18/ldd3-scull-multi-dev/docker-20261026T230026-f58a3fad/calibration-a81f1239e0524ee79e9425ddf87f8bea/receipt.json: PASS/exit0, 50/50 expected, cleanup confirmed. Every fixture is repeated five times; both receipts match the current digest. Full build/run/rejection evidence, PID/argv/logs are in the single-task factory report.json and report.md. Real Agent, model difficulty and hardware remain UNVERIFIED/UNMEASURED. No model calls, credentials, Git changes, global unittest discovery, cold storage, pruning or other authors' resources are used. Root independent review is required before acceptance. No ADMITTED claim.
Pre-Docker concentrated self-review added interleaved append/full-buffer zero completion, empty positional gap writes and read after shrinking past cursor. The initial host-only run is retained as historical evidence and superseded by the final current-digest host gate; no Docker gate ran on the superseded digest.