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.0 KiB
3.0 KiB
Controlled lock port contract
- This is a deterministic single-threaded simulation of an exclusive lock port. Owners are the integers 1 through 4. Lock IDs are 0 through 5, with respective levels 10, 20, 35, 50, 80, and 120. A lock is free when its port owner is 0.
- Each owner has an ordered held stack, initially empty. A successful
T owner lockacquires a free lock only when its level is strictly greater than the level of every lock already held by that same owner. It appends the lock to that owner's stack and sets the port owner to that owner. Owners can interleave commands independently. - A successful
D owner lockrequires that the lock be the top of that owner's held stack. It releases the port lock and removes exactly that top item. The next permitted level is determined by the actual remaining stack, including when levels are skipped. A different owner may hold a lock of any level, subject only to exclusive port occupancy. B owner lock...takes a nonempty list of one to six locks in the given order as one transaction. It has the same per-lock rules as consecutiveTcommands. If any acquisition would fail, it returns that failure code and leaves both all owner stacks and all port owners exactly as before theBcommand. A successful batch appends all of its locks.A ownerreleases that owner's entire stack from top to bottom. A successful release changes no other owner's stack or port ownership.Zresets every stack and every port owner to the initial empty state.T,D,B, andAreturn 0 on success. A bad owner or lock ID returns -22. Taking a level at or below the requesting owner's current top returns -35. Taking an otherwise admissible level whose port lock is held returns -16. Dropping a lock that is not the requesting owner's top returns -35 if it is deeper in that stack; it returns -1 if another owner holds it; it returns -2 if free. A failed command changes no stack or port owner.- When several failures are possible for
Tor eachBstep, evaluate invalid IDs first, then order, then port occupancy. ForD, evaluate invalid IDs first, then a lock deeper in the requesting owner's stack, then the port's owner/free state.Breports the first failing step after undoing earlier steps. V ownerreports that owner's stack in acquisition order and its top level, or 0 for an empty stack. For an invalid owner, it reports an empty stack and level -22.P lockreports the actual port owner, or -22 for an invalid lock.Creports the number of occupied port locks.Sreports all port owners and all owner stacks. The observations are read-only and must reflect real state; a failed operation must not be hidden from them.Iaudits port ownership against stacks, stack order, and duplicates.FandGpreview the per-owner acquire gate using the same status priority asT;Epreviews releases withDpriority. These read-only observations andJcounters are defined precisely in the protocol. They cannot change ownership or a stack.