amos 4f17b2afe5 Batch 20 (20261027-C-family-20): map batch 15's ad-hoc families to canonical ones
210 batch-15 tasks used 119 ad-hoc family names. Each now carries one of the
canonical root-cause families (11 of the 19 are used), with version + 1 and a
spec.md note, and was recalibrated through both gates. Claude checked that only
family, version and spec.md changed, that every family is canonical, and the
new trace6 Docker receipts against current digests (210/210 USABLE).
Squashed from the 36-local branch batch20-family.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-27 05:58:17 +08:00

4.8 KiB
Raw Permalink Blame History

time-remaining-request specification

Origin and scope

Route C, original C++17 engineering task. HWE material hwe/cc-rm-037 gives the direction of resuming nanosleep after EINTR; this package does not copy its tiny program, board build, or weak checks. The public driver.cpp is a controlled wait port, so an interrupted request and a hard error expose the same reliability issue without a real clock, signal, ARM machine, or network. The reported field symptom is a constructed exercise, not a claimed production incident. Difficulty: UNMEASURED. No Agent sample or native ARM run is claimed.

Published behavior and exact grounds

Every test expectation comes from template/README.md or the public interface in template/include/request.hpp. Private cases choose inputs and calculate results; they add no private behavioral rule.

Checked behavior Public ground
C++17 build, submitted files, software port template/README.md:3; template/Makefile:1-4
Command input, command and raw wait output, malformed input exit, unrestricted stderr template/README.md:7
Time normalization and duration limit template/README.md:9
Event queue, success, interruption, invalid remainder and hard failure template/README.md:11-20
Add range, suffix parsing, duplicates, capacity, atomic rejection template/README.md:24
Amend, duplicate, reprioritize, cancel, purge, reset and IDs template/README.md:26
Direct run, priority and serial order, batch stop/count, terminal rejection template/README.md:28
First request, exact remaining retry, consumed accounting, zero, 32 interruption bound, failure/protocol behavior template/README.md:30
Query fields, list, order, totals, historical counters and observation purity template/README.md:34
Successful and failed command response shapes template/README.md:36
Default public reproduction template/README.md:40-45; prompt.md:5-12

Independent defects

  1. Interrupted default path passes the original duration on the next port call instead of the returned remaining duration. It is exposed by the public 10 ms then 4 ms reproduction. only_fix_error repairs the other defect and still fails this one.
  2. On a positive non-EINTR port error, the initial manager reports success and consumes the failed call. The alternate E F event is publicly documented at template/README.md:18,20,30; only_fix_eintr repairs the first defect and still fails this one.

The two failures occur on disjoint event outcomes. The fixed gold uses a direct iterative loop; valid_recursive uses a recursive continuation over a separate remaining-time argument and a unified completion closure. Both are accepted by the independent Python model. noop omits waits, cheat returns a fabricated command result, mask_symptom alters the displayed consumed field while retaining incorrect port calls, and cheat_read_grader attempts to inspect the protected verifier.

Evidence design

check.py freezes the public raw-observation driver as a string, copies only the declared candidate files into fresh scratch, compiles C++ with argv, and runs deterministic scripts. The driver prints only actual port requests and public API observations; it has no expected values or hidden assertions. A separate Python model computes expected request state, queue order, call trace, and counters; the C++ reference implementation is never called for expectations. Output comparison accepts the published ASCII decimal values with optional sign and arbitrarily many leading zeros. Stderr is captured as bytes and used for diagnostics only, including non-UTF8 and large output.

Compiler, candidate, cleanup, and independent absence calls are supervised under the candidate UID. Each supervisor uses a Linux subreaper, records actual leader identity and return status, follows current child ancestry and live same-start tracked identities, fresh-checks PID/start before signals, and attempts bounded recovery and reaping. The parent rejects absent or inconsistent stage metadata, nonzero exit, timeout, lingering descendants, exceptions, or failed cleanup/absence. Preparation is before the first child; after that the parent only handles pipes and in-memory metadata, not candidate-controlled scratch paths. os.lstat in the independent absence child treats only FileNotFoundError as absent.

The deterministic scripts cover default and multi-interruption retries, zero and malformed remainders, hard error before/after interruption, batch failure stop, priority order, lifetime operations, capacity, parsing, and seeded randomized durations. Formal calibration repeats every fixture five times in trusted local and fixed-image environments. This is a task calibration, not a real Agent trajectory. 族名规范化:compile-deploy → linux-userspace-abi(2026-10-27)