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>
17 KiB
Task specification: dev-mask-write-interlock
1. Identity and source
- Version 1; family device-io; source hwe/syn-hard-volatile-mmio-rmw; split group syn-hard-volatile-mmio-rmw. Author is the dedicated batch18 mask_write_interlock agent; independent reviewer is the root coordinator. Status at the immutable first freeze: AUTHOR_SELF_REVIEWED, awaiting root acceptance.
- Route C, original authored software repair task derived from the public, non-held-out HWE code-generation material. Source files were read only from factory/20261026-C-hwe-codegen-18/hwe/arm-linux/code-gen/syn-hard-volatile-mmio-rmw/{metadata.yaml,prompt.md,reference/main.c}. No source scripts or predicates were executed. The batch GO and usage authorization are recorded in the dedicated author BRIEF.
- The source asks for mutex-protected volatile 32 bit MMIO updates. Its reference passes bit ordinals (base+i) into set_bits(mask), so its implementation does not produce the stated all-ones word. This new task publishes its own consistent mask semantics instead of treating that reference as an oracle.
- New mechanism: exclusive ownership across explicitly scheduled begin/stage/capture/commit/abort phases, with a FIFO of set/clear/replace operations and publication across four registers. There is no CAS optimistic retry, W1C acknowledgement, kernel MMIO, memory mapping, real race or timing dependence. The source is conceptual provenance; all business implementation, public protocol, fixtures and independent model are newly authored.
- No user conversation or private credentials are present. Validation is software-only on ordinary Linux C++17; no Agent/Qwen/LLM rollout or hardware test has run. Difficulty is UNMEASURED. No training or weight updates are performed.
2. Initial state, defects and environment
The public workspace contains interlock.hpp, interlock.cpp, console.cpp, main.cpp, README.md, docs/contract.md, smoke.in and smoke.expected. Only the four C++ candidate files are collected. The private assets are check.py, observer.cc, verify.py, this specification and the fixtures. verify.py is copied byte for byte from rollout/bos_verify.py.
F1 is the smoke defect. In template begin() the busy condition exempts CAPTURED transactions. A second actor can discard a captured operation queue, claim the instance and prevent the first actor from publishing. The console report crosses the console/library boundary; the prompt describes only the observed lost request. The public smoke uses SET with value zero and never exercises replace. fix_interlock corrects only F1.
F2 is the non-smoke precise contract boundary: replacement must ignore bits outside mask, preserve all unselected old bits and apply only value&mask. Template replay() ORs the entire value. Dedicated private cases include zero mask with nonzero value, partial masks with value outside bits set, and an existing high bit with a different unselected value bit. fix_replace corrects only F2. Fixing F1 does not modify replacement, and fixing F2 does not modify ownership. This is the assigned bit-selection boundary type, not a hidden requirement.
The normal runtime environment is the fixed trace6 image ccr-29eug8s3-pub.cnc.bj.baidubce.com/algo/bench-runtime@sha256:1519f8daa403998e5401eeb70b973e8aac8346e25a937033bc502dc5de1641a1, with Python 3, g++ and the C++17 standard library. There are no downloaded dependencies, external services or board requirements. The check uses argv, 35 seconds per compiler and 12 seconds per candidate scene; the wrapper deadline is 100 seconds and task timeout is 120 seconds. The actual image ID and exact gate paths are preserved in the immutable calibration receipts and final factory report rather than patched into this frozen task.
Candidate code has 581 nonblank, noncomment lines (430 after excluding standalone braces). Unique engineering code totals 1030 such lines (872 after excluding braces): count the candidate once plus check.py and observer.cc, exclude duplicate fixtures, copied verify.py, author scripts and documentation.
3. Public contract and entry points
The prompt gives the observed report, build argv and smoke replay. It requires all clauses of docs/contract.md and lists the candidate files. README gives the same build and contract obligation without labeling either defect. All rules use ordinary contract sentences; the replace rule is presented in the same form as SET and CLEAR and has no separate example or warning.
Build argv: [g++, -std=c++17, -O2, interlock.cpp, console.cpp, main.cpp, -o, interlock]. Run argv: [./interlock], byte input on stdin. The program always completes normal protocol handling with exit zero, emits the exact per-command ASCII stream and leaves stderr empty. The API is declared in interlock.hpp:42–55 and run_console in interlock.hpp:76. The raw observer is a separate main compiled with interlock.cpp and console.cpp, so it calls library methods without going through candidate CLI parsing or formatting. The CLI binary separately compiles and executes candidate main.cpp.
4. Checks and public grounds
Every row below is an independent Python comparison against raw subprocess output. Public grounds refer to template/docs/contract.md unless another public file is stated. The private observer only reads numeric requests, calls APIs and prints observations; it contains no expected answers, generated cases, assertions or verdict logic. Comparisons are strict stdout bytes, empty stderr and exit zero for every executed scene.
| Check | Public grounds | Input/scene and observation |
|---|---|---|
| Initial words, owner, phase, queue and generation | docs/contract.md:3 | api-ends starts by directly observing both new instances before reset |
| Separate live instance state | docs/contract.md:3 | api-ends interleaves same actor, distinct initial words and phases, then publishes separately |
| Numeric enum and struct observations | docs/contract.md:5; interlock.hpp:9 | All raw statuses, state fields, Operation fields and CLI tags |
| Every public method directly linked and invoked | docs/contract.md:29; interlock.hpp:42 | Two builds, raw dispatch codes 0–11 and CLI dispatch |
| Domains for load reg/value | docs/contract.md:7 | api-ends successful reg0/3, value0/U32, api-domain and cli-domain invalid endpoints and int64 extremes |
| Domains for begin actor | docs/contract.md:7 | actors0/7 success and all0–7 phases; invalid -1/8/MIN/MAX |
| Domains for stage actor/reg/kind/mask/value | docs/contract.md:7 | Cartesian successful endpoints and SET/CLEAR/REPLACE, each parameter invalid independently and together |
| Domains for capture/commit/abort actors | docs/contract.md:7 | Successful actor0/7, all actors in phase scenario; independent invalid native extremes |
| Domains for word register | docs/contract.md:7 | Each register directly read, endpoints0/3 success; invalid -1/4/MIN/MAX |
| Domains for prepared/changed actors and registers | docs/contract.md:7 | Successful endpoints in CAPTURED and every register; independent invalid arguments in all phases |
| Domains for operation indices | docs/contract.md:7 | Successful queued entries0/7; every0–7 and -1/8/MIN/MAX |
| Failed mutations preserve words/state/queue | docs/contract.md:9 | Raw row includes state, four word calls and all eight operation calls after every method |
| Failed mutations preserve sample and prospective words | docs/contract.md:9 | Raw row also calls prepared and changed for owner and each of four registers after every method |
| Failed output references remain unchanged | docs/contract.md:9 | Explicit getters start with published sentinels; failure results are compared directly |
| Read methods preserve all observable state | docs/contract.md:9 | Repeated getters interleaved with transactions and subsequent publications |
| Domains before owner/phase/full | docs/contract.md:9 | api-domain phases0/1/2; api-phases invalid each stage parameter on a full queue |
| Ownership before phase/full | docs/contract.md:9 | Wrong actors in all phases and on full queue; next owner getters and commit still work |
| reset discards BUILD/CAPTURED and zeroes words/generation | docs/contract.md:11 | api-phases reset captured nonzero pending data, then direct word/operation/state calls |
| load changes selected register and preserves generation | docs/contract.md:11 | api-ends nonzero seed followed by load0 and direct read; all reg/value endpoints |
| load is busy throughout ownership | docs/contract.md:11 | api-phases load each register in CAPTURED; raw endpoint/domain cases in BUILD |
| begin creates empty BUILD and is busy for same/other actor | docs/contract.md:13 | smoke, api-phases all owner/requester pairs, repeated begin |
| Ownership retained after capture | docs/contract.md:13 | F1 smoke and all actor pairs; failed begin followed by direct prepared/changed/commit |
| stage queue order, capacity8 and zero mask occupancy | docs/contract.md:15 | api-phases fills exactly8, inspects entry0–7 and attempts a ninth, then publishes |
| stage requires owner and BUILD | docs/contract.md:15 | IDLE/no owner, wrong actor, CAPTURED owner, valid BUILD and full queue |
| SET and CLEAR use mask and ignore value | docs/contract.md:17 | Success endpoint matrix plus deterministic mixed full-width random words and masks |
| REPLACE ignores value outside mask | docs/contract.md:17 | api-ends dedicated mask0/valueU32, partial-mask and preserved high-bit cases, plus mixed |
| Same-register FIFO composition and cross-register independence | docs/contract.md:17 | Ordered eight-operation queues across all registers and seeded mixed sequences |
| capture empty BUILD and repeated CAPTURED responses | docs/contract.md:19 | api-phases empty capture, stage retry, captured repetition, and later successful commit/abort |
| capture retains committed words, queue and owner | docs/contract.md:19 | Per-row direct word, operation, state, prepared and changed comparisons |
| commit atomic publication, release and generation | docs/contract.md:21 | Compare entire set of words after one method; generation advances once even for zero mask |
| commit requires CAPTURED and leaves BUILD available | docs/contract.md:21 | BUILD commit PHASE followed by stage/capture/publication |
| Explicit positive-count replacement to zero | docs/contract.md:17; docs/contract.md:21 | api-ends seeds U32, queues full-mask value0, directly reads prepared0, changedU32 and committed word0 |
| abort BUILD/CAPTURED preserves words/generation and empties queue | docs/contract.md:23 | api-phases abort in both phases, begin again, capture empty and later commit |
| word, prepared and changed are distinct API observations | docs/contract.md:25 | Explicit method dispatch plus automatic owner/4reg prepared+changed after every raw row |
| operation preserves ignored values and selected indices | docs/contract.md:27 | Queue inspection in BUILD/CAPTURED, zero masks and nonzero ignored values; EMPTY preserves output |
| state owner/phase/count/generation across success and failure | docs/contract.md:27 | Every raw row and explicit CLI state; all three phases and generation increments |
| Both declared build surfaces | docs/contract.md:29 | CLI compiles all4 candidate files; API compiles candidate header/core/console with observer.cc |
| Line grammar, separators and decimal numeric syntax | docs/contract.md:31 | cli-dispatch accepts tabs/CR/leading zero/-0/noLF; cli-malformed rejects plus, bad suffix, overflow, NUL/nonASCII |
| 256-byte successful line and 257-byte rejection | docs/contract.md:31 | cli-malformed padded state at256 and257, followed by both instances' observations |
| Every verb success dispatch and fixed arity | docs/contract.md:33 | cli-dispatch all12 verbs; cli-malformed missing/extra tokens for every verb |
| Bad instance, unknown/case-mismatched verb, empty line | docs/contract.md:33 | Each malformed line followed by both state/all words, queue0 and all owner pending/delta reads |
| All numeric parameter parse failures and valid out-of-domain calls | docs/contract.md:33 | cli-malformed each numeric position; cli-domain each native extreme/domain outside followed by full observations |
| CLI tag, decimal field order, sentinels, spaces and LF | docs/contract.md:35 | Byte equality for all CLI scenes; stdout-only mutation is rejected |
| Empty stderr and normal process exit | docs/contract.md:35; docs/contract.md:37 | Every scene checks stderr and rc independently; stderr fixture and unregistered exit9 developer probe |
| Empty stdin | docs/contract.md:37 | cli-empty expects zero stdout bytes and successful exit |
| 4096 and 4097th command behavior | docs/contract.md:37 | cli-4096 processes4096; cli-limit gets4098 lines and emits LIMIT once without reset/output from later lines |
| Last line without LF | docs/contract.md:37 | cli-dispatch ends with valid state command lacking LF |
| Candidate collection scope and full-contract obligation | docs/contract.md:39; prompt.md | task.json lists exactly4 files; fresh scratch builds use only those plus raw observer |
Legal alternative: valid_bit_tables composes 32 per-bit two-input truth tables per register during stage. At capture it maps each sampled input bit through its accumulated table. The operation queue is retained only for operation() observation and count, and is not replayed to obtain prospective words. Gold keeps only the ordered operations until capture and then replays whole-word updates. The alternative changes both when composition happens and what authoritative pending representation is used.
5. Fixtures and gates
| Fixture | Expected | Purpose |
|---|---|---|
| gold | PASS | Queue replay implementation |
| template | FAIL | F1 and F2 |
| noop | FAIL | Commit does not publish any pending word |
| cheat | FAIL | CLI always prints the complete public smoke stdout; API library otherwise correct |
| cheat_read_grader | FAIL | Isolated read probe; readable grader is required to retain correct behavior, otherwise deliberate exit7 |
| fix_interlock | FAIL | Corrects only F1, rejected by dedicated masked replace scene |
| fix_replace | FAIL | Corrects only F2, rejected by smoke |
| mask_symptom | FAIL | Blocks only public actor0/actor1 captured contention, satisfies full smoke, rejected by other actor pairs |
| valid_bit_tables | PASS | Composed bit truth-table authority |
| cheat_stdout | FAIL | Correct behavior plus extra stdout bytes |
| cheat_stderr | FAIL | Correct stdout plus stderr diagnostic |
All ordinary formal negative fixtures compile and run to exit0; their FAIL comes from output behavior. The read probe alone may deliberately exit7 on denied access. A separate factory-only main returning9 validates rejection of nonzero exit and is not registered. The Linux trusted-local probe is allowed to PASS because that backend has no grader isolation; record the real overall FAIL and exit1 instead of rewriting fixture expectations. Docker must reject the probe and have all55 trials match expectations with cleanup confirmed.
The two gates each use python3 -m rollout calibrate tasks/dev-mask-write-interlock, first with --trusted-local then with --image and the fixed trace6 digest above, under unique runs/20261026-C-hwe-codegen-18/syn-hard-volatile-mmio-rmw outputs. Each fixture is repeated five times. First freeze includes this spec and all task bytes. Gate results, real controller exits, receipt paths, fixture reasons, current task digest, full task-tree manifest and report SHA are written outside the frozen task into the dedicated factory author directory. Task bytes are not changed to fill in gate results.
6. Isolation, evidence and limits
check.py generates all inputs/independent expectations and reads all candidate/observer bytes before starting the first compiler. It creates scratch with tempfile.mkdtemp(dir=Path.cwd()), writes every source once, then only starts argv subprocesses and compares in-memory bytes; it never reads or writes scratch after compilation starts and does not chmod/chown. The unchanged wrapper owns the exclusive cwd and removes its whole temporary tree at exit. Candidate children never execute inside the check process, and expectations never enter the raw observer.
Each trial emits one compact JSON fact record within the wrapper's preserved last4000 stderr characters: both compiler PIDs/return codes/output lengths, then each actually executed scene's PID/return code/stdout length/stderr length/stdout SHA256, followed by a concrete first rejection reason. Negative fixtures stop at first rejection. The original complete candidate stdout is not retained by the wrapper; these hashes, lengths and first-difference excerpts are the actual retained evidence. Do not claim that every negative fixture executed all11 scenes or that this is native LLM tool evidence.
No platform changes, whole-repository unittest invocation, Git operation, credentials, model service, hardware, other task business source or other worktree was used by this author. Full-repository regression is reserved for the root coordinator's separate environment agent. Software fixture calibration does not measure task difficulty or prove hardware behavior.
7. Review and acceptance
The author checks byte-identical verifier, candidate/fixture scope, source/code statistics, isolated raw-observer design, public grounds for all checks, full smoke masking, two independent single-fix fixtures, alternative authority and real build/run facts before first freeze. The root performs the independent read-only review and binds the finalized factory report SHA after the two gates. Final admission is pending that independent acceptance; no Agent sampling or archival claim is made here.