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>
3.5 KiB
Probe contract
The only submitted source is src/probe.cpp. It implements probe::run_probe(Port&, const Request&) from include/probe.hpp. Build with make and run ./probe-demo; no network or extra packages are needed. The endpoint engine and command line observer are fixed support code.
Input
Standard input starts with a decimal request count from 0 to 128, then exactly that many lines. Each line is id fault tokenhex, separated by one or more spaces or tabs; optional spaces or tabs may precede the line end. Lines end in LF or CRLF. IDs are distinct decimal integers from 0 to 100000. fault is one of N, A, S, R. tokenhex is an even length hex encoding of 1 to 64 printable ASCII bytes (33 through 126); hex letter case is immaterial. No additional input is accepted.
N means no fault; A rejects acquisition; S makes the send operation fail after acquisition; R makes receive fail after a successful send. R is a supported optional scenario even though the short public demo does not use it. Fault injection never depends on wall clock time or real sockets.
Probe behavior
For each request, run_probe acquires one endpoint. A failed acquisition transfers no handle to the caller and returns unavailable with an empty reply. After a successful acquisition the caller owns that handle and must close it exactly once before returning, including every send or receive failure. The handle cannot be reused after close.
After acquisition the probe sends the exact bytes ping: followed by the decoded token and then performs one receive. On no fault, the engine returns pong: followed by the same token; run_probe returns ok and that full reply. Send failure returns send_error with an empty reply. Receive failure returns receive_error with an empty reply. Requests in a batch are independent. At the end of each request, and therefore the batch, no caller owned endpoint remains open.
The fixed port reports raw events: A acquisition attempt; X injected rejection; O opened; S send attempt; T bytes accepted; R receive attempt; D reply delivered; C close. A normal request has AOSTRDC; acquisition failure AX; send failure AOSXC; receive failure AOSTRXC. These events, sent and received bytes, and the per-request open/close/live counts must reflect actual port operations. The observer reports the operations; candidates must not fabricate a result line or suppress the observer.
Output
For every request ./probe-demo writes exactly one line of nine pipe separated fields: id|status|replyhex|opened|closed|live|events|senthex|receivedhex. Empty byte fields use -; all hex output is lowercase. status is ok, unavailable, send_error, or receive_error. After all request lines, it writes batch|requests|opened|closed|live|ok|unavailable|send_error|receive_error. Numeric fields are nonnegative ASCII decimal tokens; an optional leading + and any number of leading zeros have the same value. A whole token is required, so separators such as _ inside a number are invalid. Pipe separators and the other fields have no surrounding whitespace. Lines may end in LF or CRLF. Valid input exits 0. Diagnostics on stderr are allowed and do not affect the result. Invalid input is rejected with a nonzero exit code and has no defined stdout.
The project checks the resulting behavior on multiple batches, including optional R requests and mixed fault orders. It makes no assertion about real file descriptors, Linux TCP, or TIME_WAIT; those states are outside this simulator.