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>
11 KiB
dev-hotplug-cohort author specification
Identity, source and scope
- task-id/version: dev-hotplug-cohort / 1; family linux-device-abi; language C++17.
- Route C: original software-only adaptation of public HWE
hwe/ldd3-cpu-notifier-hotplug, source group and split keyldd3-cpu-notifier-hotplug. - Source assets read:
factory/20261026-C-hwe-codegen-18/hwe/arm-linux/code-gen/ldd3-cpu-notifier-hotplug/{metadata.yaml,prompt.md,reference/ldd3-cpu-notifier-hotplug.c}. No source checks or scripts executed. Material direction is setup/remove pairing and existing online CPU replay; all submitted business source, oracle and defects are original. Upstream metadata points to LDD3 at https://lwn.net/Kernel/LDD3/; no upstream implementation copied. - User-authorized internal project material, public/non-held-out source, no personal data or credentials. No claims of an observed historical kernel fault.
- Substitute test: CPU labels, callback ledger and synchronous failure budgets reproduce resource/cohort lifetime behavior entirely in ordinary userspace. No kernel, board, root, network, timers or external dependencies are required by the candidate.
- Distinction: lifecycle of a registered callback cohort, ordering across priority and CPU dimensions, and teardown after partial acquisition. This is independent of existing device register/data interface tasks.
- Author: Codex subagent ldd3-cpu-notifier-hotplug; independent business review pending root review.
- Review state: CALIBRATED_PENDING_ROOT_REVIEW; exact gate receipts and host exception are in the single-task report. Difficulty UNMEASURED; no Qwen, other real Agent, or hardware run.
Complete initial workspace and defects
Public template has five candidate source files, header API, raw observer, Makefile, README, complete contract and a six-command field replay. It compiles offline with standard g++ C++17. The frozen grader rebuilds the five files against the same observer stored as private non-Python data; arbitrary extra files are ignored.
The field replay registers key 7 on six online CPUs with a failure at CPU 4, retries and removes it. The template emits rollback stops in ascending acquisition order; a correct implementation emits CPU 3,2,1,0 before retry. The second independent defect appears on offline CPU UP after multiple registered states: CPU startup rollback skips the most recently acquired lease, leaking it while retaining an offline topology. Both behaviors are specified publicly. SYNC also exercises per-state rollback over a partially populated cohort.
- D1, cohort.cpp rollback_state: reverses the specified undo order.
fix_state_unwindrepairs only this issue. - D2, cohort.cpp rollback_cpu: skips the latest successful startup.
fix_cpu_unwindrepairs only this issue.
Both defects preserve compiling, nontrivial happy paths. mask_symptom repairs only key 7's state unwind, so the visible replay behaves correctly but other documented keys and CPU failure paths still fail. Candidate source is 635 nonblank/non-comment lines: 506 C++ implementation lines plus 129 header/API lines. Distinct source files are counted once; fixture copies, generators, private Python and docs are excluded. The engineering total additionally includes the strict decimal stdin observer (see report for physical/effective counts).
Build, run and resources
- Public build:
makein current directory; executable./cohort-demoreads stdin, exits zero after all lines. Unknown/malformed commands are modeled observations, not process failure. - Grader build argv: g++ -std=c++17 -O2 -Wall -Wextra -pedantic cohort.cpp cpu_set.cpp ledger.cpp inspect.cpp observer.cpp -o cohort-demo. No -Werror policy.
- Candidate ABI, all inputs, output fields, parameter limits, errors and precedence are in
template/docs/contract.mdandtemplate/hotplug.hpp. - Single compile timeout 35 seconds, candidate timeout 25 seconds, wrapper timeout 100 seconds, task timeout 120 seconds. Formal grade 512 MiB / 1 CPU, no network. Fixed seed 271828182.
- Fixed image:
ccr-29eug8s3-pub.cnc.bj.baidubce.com/algo/bench-runtime@sha256:1519f8daa403998e5401eeb70b973e8aac8346e25a937033bc502dc5de1641a1; actual image ID retained in Docker receipt, not inferred from a tag.
Check matrix and public basis
Line references below are actual frozen public contract line numbers. The complete contract applies to the repair, explicitly required by prompt and README. Hidden cases combine these requirements and do not add policy.
| Check class | Public basis | Inputs and observed behavior | Method |
|---|---|---|---|
| Fresh state/readiness | docs/contract.md:9, docs/contract.md:52 | SNAP/REG/ARM/UP before RESET; zero state, -19 | Python state oracle |
| Count/mask boundaries | docs/contract.md:11, docs/contract.md:38 | counts 1,2,6,16; empty/sparse/full masks, invalid 0/17/negative/out-of-mask | return + full state |
| Descriptor ranges | docs/contract.md:14, docs/contract.md:44 | key 1/31, priority -100/100, tag 0/65535, replay0/1 and out-of-range | return + full state |
| Capacity and precedence | docs/contract.md:12, docs/contract.md:44 | eight states, duplicate in full registry, ninth key with armed failure | no callbacks/budget use on refusal |
| Ticket ownership | docs/contract.md:16 | retry after failed startup, remove/reuse, cross-CPU leases | every lease and monotonically issued ticket |
| Budget persistence/consumption | docs/contract.md:20, docs/contract.md:42 | count0..4, replacement, unreached callback, remove then reuse | remaining budget snapshot |
| Atomic structural failure | docs/contract.md:24, docs/contract.md:61 | failed REG/UP/SYNC | structural state restored, diagnostics retained |
| Error ordering/atomicity | docs/contract.md:31 | invalid globals before readiness, CPU outside topology after readiness, wrong arity, bad integer | return + unchanged state/events |
| Registration replay success | docs/contract.md:59 | all CPUs, sparse and empty replay, replay0 | ordered starts + descriptor commit |
| Registration failure unwind D1 | docs/contract.md:61 | failure at every CPU position, keys3/7/31 | stops exactly reverse acquired CPU sequence |
| CPU up priority and ties | docs/contract.md:64 | non-registration ordering, priority ties, CPU0/7/15 | events sorted priority then key |
| CPU up rollback D2 | docs/contract.md:66 | first/middle/last callback failure and repeated budgets | no leaked lease, offline mask, reverse stops |
| Offline teardown | docs/contract.md:69 | DOWN after full or partial cohorts | reverse state order, only held leases |
| Registration teardown | docs/contract.md:73 | remove zero/partial/full cohorts, missing/repeated removal | descending CPU stop order, unchanged topology |
| SYNC backfill | docs/contract.md:76 | replay0, preexisting single lease, later failure, retry/noop | preserve old leases, undo only new, correct sync count |
| Repeated operations | docs/contract.md:48, docs/contract.md:77 | repeated UP/DOWN/SYNC and SNAP | no callbacks/counter increments |
| Hard reset | docs/contract.md:38 | RESET with live leases and armed budgets; invalid RESET | valid resets everything with no teardown, invalid preserves |
| Diagnostics and counters | docs/contract.md:24, docs/contract.md:81 | all success/failure/noop classes | exact eight cumulative counters and event trace |
| Output completeness/order | docs/contract.md:99 | each operation's descriptor, lease and budget state | exact line comparison to independent model |
| Standard offline build | docs/contract.md:117, template/Makefile:1 | all five declared files only | fresh g++ subprocess |
The oracle covers 2722 operations / 43686 observation lines for the frozen seed, including signed-64-bit overflow after otherwise complete commands. Normal, invalid, resource exhaustion, sparse/full 16-CPU boundaries and randomized command sequences are all mandatory. The Python model uses dictionaries and generic callback transactions; it is not compiled from the gold or fed gold output.
Fixtures and legitimate alternatives
| Fixture | Expected | Purpose |
|---|---|---|
| gold | PASS | vector acquisition log, reverse iterator rollback |
| template | FAIL | D1 and D2 initial defects |
| noop | FAIL | returns success without changing state |
| cheat | FAIL | prints tiny fixed success observation |
| cheat_read_grader | FAIL | runs gold only if private check.py is readable |
| fix_state_unwind | FAIL | D1 repaired, D2 retained |
| fix_cpu_unwind | FAIL | D2 repaired, D1 retained |
| mask_symptom | FAIL | key7 field symptom repaired only |
| valid_plan | PASS | independent coordinator compiles generic descriptor/CPU plan and executes/unwinds it; insertion-sorted descriptor order |
The oracle accepts arbitrary compliant data structures and implementation organization. It does not inspect candidate source content or require one patch. Gold and valid share set/ledger/observation primitives but have structurally different transaction coordination. No fixed output can satisfy runtime command values and all model observations.
Isolation, evidence and limits
verify.py is byte-for-byte rollout/bos_verify.py; grader_files contain only check.py and cases.json. The trusted Python process computes all cases and expected state before compiling candidate C++. The raw observer contains no case generation, assertions or expectations; only stdin commands and output state cross the process boundary. All trusted scratch writes/candidate reads finish before compilation starts. After any candidate subprocess executes, the checker accesses only captured stdout/stderr; optional removal runs as the same demoted candidate UID in a separate argv subprocess, so root does not follow child-created paths. Docker wrapper probes private verifier unreadability and demotes compiler and executable to UID/GID65534. The standard wrapper's own documented generic scratch limitation remains upstream; this checker does not exercise root scratch reads after untrusted code.
Host mode is only trusted fixture execution. cheat_read_grader may read the checker via the parent command line and PASS all five times without UID separation; this expected host-only exception must remain as a real gate1 FAIL receipt, not change fixture expectations. Docker must reject it five times and pass all 45 declared fixture trials with cleanup confirmed and current fingerprint. Logs, exit codes, receipts and digests are recorded in subagent report.json/state.json. No broad tests/ or platform edits are authorized in this single-task ownership scope; behavior validation is the 2 x 45 fixture gate runs.
No Agent sampling, difficulty measurement, kernel behavior, board behavior, archive/Salty action or real timing behavior is verified. Final admission is pending root independent review; two calibration gates alone do not claim measured hard difficulty or real rollout trace completeness.