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>
8.1 KiB
resource-command-stream author specification
Status: CALIBRATED, difficulty UNMEASURED. No real Agent/Pi/Qwen sampling or hardware verification. Root independent review remains required.
Route C original, source hwe/gi-fd-leak-popen-pclose, family resource-lifecycle, language C11, split/root-cause group gi-fd-leak-popen-pclose. Authorized project-local source copy. Read source prompt and reference solution as background, executed no source scripts. The source describes popen/fclose/pclose pairing; this package is independently authored and is not claimed as a real field incident.
The software port substitutes deterministic output and child-completion records for shell processes. It retains the original reliability distinction: endpoint closure and child reaping release different resources, and each remains mandatory after read failure. No OS shell, real child workload, network, board, timing or device behavior is needed for business acceptance. Execution-supervisor stress diagnostics create trusted temporary child processes separately from the task's business model. Native POSIX popen/pclose behavior and actual kernel fd/zombie accumulation are outside the business coverage; the lifecycle knowledge point is preserved through distinct capacity exhaustion and recovery observations.
The full engineering context is newly written: command port with generation-safe resource records and event journal; binary wire codec; raw observation frontend; service; public contract, plans and Makefile. Candidate is only runner.c; support is frozen from context.json before execution and is not sourced from candidate files. Each non-template fixture contains exactly that candidate file.
Two independent defects:
- Normal EOF path closes the stream but omits completion wait. Default public demo fails subsequent capacity-one request and shows children_live=1.
only_fix_waitfixes this and still fails error recovery. Public basis C04/C08/C10. - Read-error path consumes child completion but omits stream closure. This requires error.plan or another documented read_fault_at scenario, outside the normal demo.
only_fix_error_closefixes this but retains normal completion leakage. Public basis C04/C05/C10.
Fixtures: gold PASS uses block reads (97 bytes) and linear cleanup helpers; valid_state_machine PASS uses an explicit ACQUIRE/RECEIVE/CLOSE_STREAM/WAIT_CHILD/COMPLETE machine and one-byte accumulation. Valid differs in control organization, read grouping and accumulation; expected assertions allow any valid segmentation and close/wait ordering. template, noop, demo-tag-only cheat, cheat_read_grader, only_fix_wait, only_fix_error_close and mask_symptom all expect FAIL. Reader runs gold behavior only if it can open the protected check; trusted local may read it and is explicitly no isolation proof. mask_symptom clears public live counters but leaves independent opens/closes/waits and records inconsistent. Every fixture is compiled, never rejected for intentional syntax/link errors.
Ordinary independent engineering lines: 591; 562 after also excluding preprocessing. Per-file counts and exact counting method are in the author line-counts.json. This total includes only template C/header and necessary Makefile once, excludes docs/data, all fixture copies, private check and Python tooling. Candidate-only threshold is not imposed.
The independent Python oracle builds 688 expected raw observation rows (413 collection requests) with fixed seed 810024. It computes successful-byte prefixes, capture limits, hash, status precedence, independent port counts and turnover; it does not call gold for expectations. Empty and maximum input, all byte values, initial/repeated interruptions, read failure at all boundaries, both failure statuses, independent zero capacities and deterministic randomized combinations are covered. No unused capture tail is compared. Event/read counts and opaque token choices are intentionally not exact-scored, allowing alternate buffer strategies. Null port/request/result C02 branches are implemented by both positive fixtures but are not directly exercised by the public frontend. Event output E is public observability and not exact-scored.
| Criterion | Scored behavior | Exact public basis |
|---|---|---|
| C01 | Return/status, fresh per-call scalar state and used capture prefix only | template/docs/collection.md:2 |
| C02 | Invalid capture limits 2049 and 4096 do not touch port | template/docs/collection.md:3 |
| C03 | One open, tag, explicit fail and independent zero capacities | template/docs/collection.md:4 |
| C04 | Close and child wait obligations after EOF and read errors | template/docs/collection.md:5 |
| C05 | Interrupted reads, error at zero/interior/end, successful-prefix preservation | template/docs/collection.md:6 |
| C06 | Binary data, capture 0/1/exact/2048, draining and truncation | template/docs/collection.md:7 |
| C07 | Independent Python FNV-1a modulo arithmetic for all successful bytes | template/docs/collection.md:8 |
| C08 | Interrupted waits, nonzero exit, signal, read-error precedence | template/docs/collection.md:9 |
| C09 | Empty/max payload, chunk 1/2/97/128, read/wait interrupts 0..16 | template/docs/collection.md:10 |
| C10 | Exact cumulative open/close/wait/failure accounting, peaks and repeated capacity-one turnover | template/docs/collection.md:11 |
| C11 | Raw JSON row schema; stdout ASCII JSON, stderr unrestricted bytes | template/docs/collection.md:12 |
| C12 | Frozen public sources and C11 rebuild; alternate one-byte state-machine accepted | template/docs/collection.md:13 |
Execution details: verify.py is byte-for-byte rollout/bos_verify.py. Grader_files are check.py and context.json. All source/support/input preparation is complete before first child. Parent never touches candidate tree afterward. Each compiler/candidate/cleanup/strict-lstat-absence stage runs through a candidate-identity Linux subreaper supervisor with production deadlines 20/12/5/5 seconds and bounded recovery. Same UID/GID/groups, supervisor and leader PID/start, real leader rc/reaped, controlled rc/timeout, descendant and PG absence, errors and actual IO lengths/SHA are validated. Own Popen poll precedes explicit adopted-child waits; adopted waits exclude the own leader. Old tracked Z/X or reused identities cannot seed discovery. Strict absence treats only FileNotFoundError as absent. Preparation, success-assignment and cleanup/absence-assignment exceptions are fatal because final success checks the independent exception list.
Captured stderr has no size or byte-value limit introduced by the checker; it remains bytes. Raw stdout must decode as the documented ASCII JSON protocol. Supervisor wire is parsed only after recording actual wrapper rc and wire length/SHA; malformed metadata never receives invented successful inner facts. Compressed RCSTREAM_Z terminal metadata is fully decoded from the actual bos 4000-character tail during evidence audit. Full inner raw IO/wire bytes are not archived; only actual captured byte lengths/SHA (and outer raw logs) are retained.
Fixed runtime digest: ccr-29eug8s3-pub.cnc.bj.baidubce.com/algo/bench-runtime@sha256:1519f8daa403998e5401eeb70b973e8aac8346e25a937033bc502dc5de1641a1. Actual tools and public make/demo/error.plan were verified in that image, see author tool-probe.json/public-build.json. Production matrix and final calibration evidence are summarized in report.json after completion. Final review, real model sampling and difficulty measurement remain outstanding.
Final author evidence: task digest fdb884645e478c333f41d075e33e7ab66e4517c7629a2d0cc0ca37dea6bf53a2; current check SHA256 9cc5e8dbe389bdd2bc19e16c0be9955a8c31932cb09f7cda560fcfed94fef156. Final local45 has only five allowed reader exceptions; final Docker45 PASS, cleanup confirmed; all360 current phase metadata decoded and checked. New26 real production diagnostics pass their expected outcomes after the SUP-only fresh-signal identity correction. Prior27 diagnostics (one invalid construction) and oldlocal45 remain separate. Author report and evidence-audit.json contain actual receipt/package/log bindings, cleanup facts and limits. Root independent review is pending.