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>
12 lines
3.7 KiB
Markdown
12 lines
3.7 KiB
Markdown
# Window publication contract
|
|
|
|
W1. There are four slots numbered 0..3. Each contains independent data and execution word arrays of capacity 12, plus active, length and generation metadata. Reset sets all arrays, metadata and counters to zero. Only array elements 0..length-1 of active slots are observable contractual content; unused tails are unspecified.
|
|
W2. A publication is a successful install, patch or drop. Each publication increments that slot's generation by one and the global serial by one. Generations belong to slots; activity in a different slot cannot invalidate a slot's expected generation. Reset starts a new workbench, with generations and serial zero.
|
|
W3. Install `I slot count words...` accepts 1..12 words forming a valid whole program as defined in instructions.md. It may replace an active slot. Before publication it writes exactly count data words at offset 0 and synchronizes exactly the half-open range [0,count) once. It then publishes active=1, length=count. Install does not require an expected generation.
|
|
W4. Patch `P slot expected first count words...` accepts 1..12 replacement words. Inactive slot returns -2. Otherwise an expected generation differing from this slot's generation returns -1. These checks precede range/program checks. For an active matching slot, first+count must be <=length and the resulting whole program must be valid, or return -3. Successful patch changes only that data slice, synchronizes exactly [first,first+count) once, then publishes the same active length. Counted writes equal count. Existing data outside the slice is preserved.
|
|
W5. Drop `D slot expected` returns -2 for inactive slots, then -1 for mismatching slot generation. Success publishes active=0,length=0, increments the drop count and performs no data writes or synchronization. Per-slot generation survives drop. A later install reuses the slot and increments its surviving generation.
|
|
W6. Any declined publication operation has no slot, serial, store-counter or interpreter-counter effects. Inactive execution and invalid input syntax also have no such effects; execution-view faults follow W7. The console rejected counter does increment. This includes invalid whole programs, optimistic conflicts and inactive operations. Invalid input syntax never enters a window operation.
|
|
W7. Execute `E slot input` returns -2 on inactive slots. Otherwise it evaluates the execution view, never the data view, with the interpreter specified in instructions.md. An active execution increments executions once. It changes no slot metadata, word array, publication or synchronization counters. Value and retired are raw interpreter observations. Normal execution returns 0; malformed execution-view programs return -5 with value 0 and retired equal to instructions consumed before the first invalid word, including that word. Such malformed views can expose publication faults.
|
|
W8. Store adapter calls are observable. `store_write` writes an in-bounds slice and adds its count to writes. `store_sync` copies the half-open data slice to the execution slice, adds one to sync_calls and its width to sync_words; it does not publish. `store_publish` changes only metadata, increments generation/serial and the appropriate installs/patches/drops counter. Invalid adapter calls return -6 and have no effects. Window operations must fulfill W3-W7 without extra adapter operations.
|
|
W9. A successful mutating command returns rc=0,value=0,retired=0. Declined commands return the specified rc and zero value/retired. All counters and generations are unsigned 64-bit; tested streams stay below overflow. The API receives only syntactically valid bounded fields from the console, but whole-program validity and active/range/generation decisions are window responsibilities.
|