amos 9d633e9e67 Batch 15 (20261023-C-hwe-scale-15): 320 HWE-derived repair tasks
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>
2026-10-27 01:55:56 +08:00

6.1 KiB

resource-shared-value specification

Route C, original C++17 software task. Source hwe/cc-rm-010 supplied only the shared-reference topic. The original sample used raw allocation and a single counter; this task was independently designed with bounded handle and object slots, multiple owners, batch operations, shared values, and observable final-release events. It neither reproduces a real incident nor claims ARM or hardware validation. Replacing a device with the in-memory store leaves the ownership and last-release reliability problem intact. No network, board, real-time clock, or allocator fault injection is needed. Difficulty is UNMEASURED until real Agent sampling; local and Docker calibration alone do not assign difficulty.

Deliverables and behavior evidence

The prompt asks for conformance to every clause in template/docs/resource-contract.md. The table maps each checker behavior to its exact public location. The checker Model computes expected observations independently from the candidate; the public observer.cpp only calls run_console and prints raw results. It has no hidden expected values or assertions. The checker uses fixed seed 0xCC010, fresh compilation, and 500+ command observations per candidate.

Row Checked behavior Public evidence
01 Deterministic software handle model template/docs/resource-contract.md:3
02 Reset, empty state, epoch/event restart template/docs/resource-contract.md:4
03 Owner, object, handle bounds template/docs/resource-contract.md:5
04 Shared object value and live reference count template/docs/resource-contract.md:6
05 Create allocation and unchanged output on error template/docs/resource-contract.md:7
06 Retain allocation, ownership and count template/docs/resource-contract.md:8
07 Release, surviving holder and final event template/docs/resource-contract.md:9
08 Slot reuse and creation epoch template/docs/resource-contract.md:10
09 Transfer of one handle template/docs/resource-contract.md:11
10 Shared value set and bounded addition template/docs/resource-contract.md:12
11 View fields and unchanged failure output template/docs/resource-contract.md:13
12 Owner value sum by handle template/docs/resource-contract.md:14
13 Atomic owner retain batch and ordering template/docs/resource-contract.md:15
14 Owner release batch, final events, empty owner template/docs/resource-contract.md:16
15 Owner transfer batch and self transfer template/docs/resource-contract.md:17
16 Distinct-object owner addition and atomic failure template/docs/resource-contract.md:18
17 Totals and event history template/docs/resource-contract.md:19
18 Return codes and validation precedence template/docs/resource-contract.md:20
19 Atomic failed calls and initialized placeholders template/docs/resource-contract.md:21
20 Input lines, ASCII separators, integer lexical rules template/docs/resource-contract.md:22
21 Create, retain, release, transfer, set, add wire records template/docs/resource-contract.md:23
22 View, owner sum, retain/release batch wire records template/docs/resource-contract.md:24
23 Move/add batch, totals, history, reset wire records template/docs/resource-contract.md:25
24 Output decimal tokens, horizontal whitespace, stderr template/docs/resource-contract.md:26
25 Public native build and run template/docs/resource-contract.md:27
26 Clone independent object and same-object query template/docs/resource-contract.md:28
27 Owner aggregate summary template/docs/resource-contract.md:29
28 Compare/exchange of shared value template/docs/resource-contract.md:30
29 Owner rotation template/docs/resource-contract.md:31
30 Release all handles for one object template/docs/resource-contract.md:32

The numeric checker accepts the public output domain, including arbitrarily many leading zeroes, optional plus or minus signs, and horizontal separators. It does not compare stderr content. For a successful observation it compares only the defined fields; no unused structure tail is compared.

Initial defects and sample mechanisms

  1. retain in the initial state creates a second handle without increasing the object's reference count. The first release can therefore erase a shared value too early. Public basis: rows 04, 06, 07, 11. only_fix_transfer repairs only the other defect and remains FAIL here.
  2. transfer in the initial state changes the handle owner but does not update the destination owner count. An owner handoff and owner-wide operation after it can skip a live handle. Public basis: rows 09, 14, 17. This is outside the simple default one-holder workflow. only_fix_retain repairs only the first defect and remains FAIL here.

gold stores and updates explicit reference and owner counts. valid_derived derives live reference and owner counts from handle slots when queried or released, and scans all live slots for owner operations. This is a different control and data derivation strategy rather than a renamed patch. noop emits no observations; cheat repeats a public-looking create record; mask_symptom hides a release record without preserving the live value. cheat_read_grader requires private checker access to execute the correct service and fails under isolated grading.

Execution and limitations

The grader runs a candidate-identity subprocess supervisor for compilation, candidate execution, deletion, and independent absence. It captures raw byte lengths and SHA-256 hashes, checks PID/start identity and descendants, and records controlled timeouts and actual leader return codes. Candidate and compiler receive only argv, stdin, and the clean scratch tree. Every input and support file is prepared before the first child process; afterward the parent grader only consumes pipes and runs candidate-identity cleanup/absence. Formal fixed-image diagnostics and two calibration gates are required before admission. This work does not include Agent sampling or hardware verification.