One user-space repair task per eligible HWE debug-diag / compile-deploy base ID: 320 admitted (C 218, C++ 97, build scripts 5), 1 skipped by the content filter. Each ships a public spec with a check-to-basis table, at least two defects with single-fix fixtures, a symptom-masking fixture and an alternative correct implementation. Claude re-checked all 320: structure, the HWE quality items and trace6 Docker calibration receipts against current digests (320/320 USABLE). Difficulty is unmeasured. Known follow-up: 212 tasks use 120 ad-hoc family names; the next batch maps them to the canonical list. The batch's 1,256-line progress log stays in its factory report and the 36-local branch batch15-hwe. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
9.8 KiB
Task specification: concur-wakeup-queue
1. Identity and source
- Version 1; family concurrency-lifecycle; source hwe/dbg-gdb-thread-bt-wakeup.
- Route C, original engineering task. HWE public/hard material supplies only the knowledge theme: monitor predicate changes must release condition waiters. This is not a claim about a historical field incident.
- Source group/split key dbg-gdb-thread-bt-wakeup. The parent independently checked public/hard metadata, heldout exclusion and unused source before authoring.
- No user data or credentials. All project code, cases and fixtures are newly authored; no HWE scripts are run and HWE checks are not used.
- Software substitute: explicit worker turns and an instrumented monitor preserve state publication, predicate rechecking and terminal wakeup reliability while eliminating CPU scheduling races. This validates software state transitions only; no board, pthread implementation, GDB usage or timing claim.
- Independent project: bounded telemetry FIFO, cancellable pending work, deterministic worker accounting and drain/discard lifecycle. No new-batch task code is read or reused.
- Status CALIBRATED; difficulty UNMEASURED; no Qwen/Pi sampling is authorized for this batch.
2. Initial state and environment
The complete workspace is template/. Public headers, CLI, monitor, build recipe, docs and examples are fixed and frozen into the grader; candidate_files are queue.c and service.c. Existing code builds but omits the submission handoff and releases only one terminal waiter. At least two actual changes are required. The default pool has one worker; the shutdown defect only manifests with the other documented worker-count values 2..6.
C11, standard C library and make only. Formal runtime manifest is sha256:1519f8daa403998e5401eeb70b973e8aac8346e25a937033bc502dc5de1641a1, repository ccr-29eug8s3-pub.cnc.bj.baidubce.com/algo/bench-runtime. Actual image ID: sha256:1519f8daa403998e5401eeb70b973e8aac8346e25a937033bc502dc5de1641a1. It is bound in the adopted Docker receipt. Score timeout 120s, individual subprocess timeout leaves ample margin; no hardware or external services.
3. Public task
The prompt reports replay symptoms, build/replay commands, submitted files and compliance with docs/service.md. It does not locate a faulty function/file/category. The public document supplies every tested convention and the full parameter range. The CLI's initial state is I 1 4; all test data arrive by stdin.
4. Evidence mapping
All locations below refer to the Agent-visible template/ directory. The grader compares every integer exactly; inputs are hidden but all behavior is public. Each subprocess gets 20s, compilation gets 30s, verifier gets 120s. The deterministic seed is 72419031. There are 4008 service observation rows plus 1689 direct FIFO observation rows = 5697 independently computed evidence rows per passing evaluation.
| Independent criterion | Exact public authority | Covered observations |
|---|---|---|
| Offline explicit scheduling, EOF, no extra output, blank lines | docs/service.md:5 | Process rc=0, output line count; T/A only execute jobs |
| Startup and initialization; 1/6 workers and 1/16 capacity; invalid I preserved | docs/service.md:7 | Full reset including previous close/wait/accounting; invalid bounds |
| Phase/state numbers and unused worker slots | docs/service.md:11 | Every state in all six worker slots |
| Job ranges; pending FIFO; duplicate lifetime and reuse | docs/service.md:11 | Signed extremes, ids 1/65535, all lanes, wraparound, reuse |
| Failure atomicity and rejection exactly once | docs/service.md:11 and :13 | Every negative result leaves work and successful metrics intact |
| Submission validation precedence: INVALID/CLOSED/DUPLICATE/FULL | docs/service.md:13 and :17 | Invalid job under phase, duplicate at capacity, closure submission |
| Submission publishes then readies exactly lowest waiter without consumption | docs/service.md:17 | Fully parked pools, consecutive jobs, no-waiter submissions |
| One turn consumes at most one FIFO job; WAITING/EXITED no-op | docs/service.md:19 | Individual turns, uneven worker turns, after close |
| Empty predicate leads to wait or exit; completion remains READY | docs/service.md:19 | Spurious wake rewait, drain tail, close-empty |
| Sweeps and 0/128 boundaries | docs/service.md:21 | Worker ascending order, partial sweeps, zero round, max round |
| Stable cancellation, missing code, closed-phase cancellation | docs/service.md:23 | Front/middle/tail removal, drain cancellation, absent id |
| First close releases every waiter for both modes | docs/service.md:25 | Pools 1..6; empty/full and partially parked pools |
| Drain preserves work; discard counts removals; close idempotence | docs/service.md:25 | Pending job at close, repeated alternate close, accepted conservation |
| Spurious notifications change only selected waiting worker | docs/service.md:27 | WAITING/READY/EXITED worker N; no fake jobs |
| Q, arities, decimal syntax, integer bounds, unknown commands | docs/service.md:29; fixed cli.c:25 | Missing/extra fields, overflow, floats/hex, sign, unknown letter |
| Per-worker and global completion values and wraparound hashes | docs/service.md:33 | Positive/negative/zero value, all lanes, long streams |
| Monitor ownership and returned wake mask behavior | docs/service.md:37; monitor.h:16 | Faults=0 throughout the instrumented actual monitor |
| FIFO init/count/capacity/empty/full/contains/validation | docs/service.md:39; queue.h:21 | Capacities 1..16, populated/empty, invalid init unchanged |
| FIFO append/front/pop/indexed copy | docs/service.md:39; queue.h:28 | Raw returned job, limits, stable order, untouched failed output |
| FIFO stable removal and clear return count | docs/service.md:39; queue.h:32 | Head/middle/tail removal, absent id, clear empty/full |
| Snapshot shape, padding, metric immutability and exact formatting | docs/service.md:43; service.h:62 | All 83 integer fields on every service command |
| Fresh compilation against fixed headers/frontends and public API | docs/service.md:47 | Two fresh C11 executable builds, no stale artifacts |
Expected values are computed in an independent Python list/state model, never from gold. The frozen FIFO harness and public CLI contain no expected values or assertions; they print raw observations only. The check prepares all source/input/model data before the first child; after children start it uses pipes only and never reads/writes candidate-controlled scratch. Compilation and execution exclusively use subprocess argv and are UID65534 under the unchanged platform wrapper. Only check.py and support.json are private grader_files.
5. Fixtures and mechanisms
Required fixtures: gold/valid_alternative PASS; template/noop/cheat/cheat_read_grader/only_fix_publish/only_fix_shutdown/mask_symptom FAIL. only_fix_publish repairs only S eligibility; only_fix_shutdown repairs only closing eligibility. mask_symptom forces shutdown exit but discards accepted drain work. cheat provides a public-example-only imitation. cheat_read_grader behaves correctly only if it can read a private check.py and fails under formal isolation. valid_alternative will use a different FIFO representation and control organization, not a cosmetic rewrite.
6. Calibration and evidence
Final task digest: b97dada89e75411df7bae1422f376f3ee05dc4aee16cc1b71209ed316575a19d.
- Trusted-local adopted attempt:
runs/20261023-C-hwe-scale-15/dbg-gdb-thread-bt-wakeup/local/calibration-ede062b5863740fe95a94e8479d27cd5; actual status FAIL, cleanup confirmed, 45 trials. Gold and valid alternative PASS 5/5 each, six ordinary negative classes FAIL 5/5 each. Only cheat_read_grader PASS 5/5 is the explicitly allowed no-isolation host exception; the receipt is not rewritten. - Docker adopted attempt:
runs/20261023-C-hwe-scale-15/dbg-gdb-thread-bt-wakeup/docker/calibration-9de607a6d0284870bb6bf927bf570555; actual status PASS, cleanup confirmed. All nine classes repeated five times: both legal solutions PASS every time and all seven negative classes FAIL every time. Image IDsha256:1519f8daa403998e5401eeb70b973e8aac8346e25a937033bc502dc5de1641a1. - Both adopted receipts bind the final digest. Two earlier calibration attempts used a default-two snapshot and are retained as superseded history. Default-one final startup makes the shutdown fault a distinct nondefault multiworker case.
- Every fixture compiled; negative rejection is a concrete service observation mismatch. There are no syntax/link failures used as negative evidence.
- Exact host scratch cleanup: 100 directories derived from this task's development/local stderr were removed by a separate child under candidate UID/GID 1006; all absent afterward. Parent did not traverse the candidate-controlled trees. Container scratch disappeared with containers. Ninety exact container names across historical and adopted Docker attempts were independently checked absent. No networks were created.
- Full unittest result and all class results/receipt SHA-256 values are in
factory/20261023-C-hwe-scale-15/subagents/dbg-gdb-thread-bt-wakeup/report.json, with raw logs and structured calibration-summary.json/scratch-cleanup.json in the same directory. - No real Agent sampling, native trajectory, GDB or hardware run was performed. Difficulty is UNMEASURED; this is CALIBRATED, not ADMITTED. No archive or upload is claimed.
7. Review and limitations
Author self-review inspected clean rebuild, subprocess-only execution, frozen support, absence of expected values in harness, fixed random seed, prior material preparation, no parent read/write of candidate-controlled scratch after candidate execution, and diverse valid/negative fixtures. Self-review found and corrected the default-pool ambiguity before final calibration; all earlier receipts remain immutable. Parent independent review is pending. No further task package changes are planned. Calibration alone does not establish ADMITTED status.