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>
8.0 KiB
protocol-shift-fields author specification
Status: READY_FOR_CALIBRATION; route C original; difficulty UNMEASURED; no Agent or hardware trial. The source is hwe/dbg-gdb-shift-precedence. Source prompt/reference were read as material, never executed. Its phrase “shift has higher precedence than addition” is incorrect: C11 6.5.6 and 6.5.7 make additive expressions operands of shifts, so a<<b+1 parses as a<<(b+1). This task publishes mathematical field equations and judges behavior without requiring any parentheses style.
The software substitute is a 32-bit telemetry field bank. Scaling, offset and bias grouping affects encoded data in exactly the same deterministic arithmetic way as the source material; no board, gdb tool use, actual incident, electrical behavior, scheduling or network is claimed. Every field value and every shift count is unsigned and bounded. The buggy expression shifts by scale+bias<=10; the valid implementation shifts by scale<=5 and offset<=31. Neither solution nor defect depends on undefined behavior.
Independent defects and public scenarios
- D1: token production changes value2^scale+bias into value2^(scale+bias), in src/codec.c. Nonzero bias exposes it, including examples/demo.txt, selected by make demo. only_fix_encode fixes this and keeps D2. Public basis: docs/contract.md:5 (C03).
- D2: replacement of an existing layout clears the live cached word before validation; an overlapping, invalid or range-incompatible replacement can reject after changing the published frame. Bias-zero input reproduces D2 without D1. Only the separately selected examples/replacement.txt/make replacement contains R; default demo contains no R. only_fix_replace fixes D2 while keeping D1. Public basis: docs/contract.md:7 and :10 (C05/C08).
The two single-fix variants actually compiled and exited zero in fixed-image diagnostics and failed on distinct behavioral rows. Independent public make executions showed only_fix_encode matching gold for default demo and differing for replacement, while only_fix_replace differed for default and matched replacement.
Public evidence mapping
All paths below refer to template/. Hidden inputs select combinations; no hidden rule is added.
| Assertion family | Exact public basis | Exercise |
|---|---|---|
| capacity, stable insertion order and uint32 counters | docs/contract.md:3 C01 | empty/8-field/full/clear and mutation journals |
| ID, shape bounds, overlap and occupied mask | docs/contract.md:4 C02 | boundary width/offset, invalid shape, overlap, high bit 31 |
| logical limits, scaling then bias, word placement | docs/contract.md:5 C03 | all 36 scale/bias combinations, extrema, two 16-bit fields |
| initial zero state and new logical value zero | docs/contract.md:6 C04 | initial snapshot, add and empty import |
| add/replace/drop statuses, order, epoch and preserved values | docs/contract.md:7 C05 | capacity, duplicate/full priority, valid and rejected replacements, removals |
| write/zero, range checks and writes counter | docs/contract.md:8 C06 | same/new/maximum/out-of-range values, empty Z |
| import unused bits, token lattice and atomic decoded commit | docs/contract.md:9 C07 | raw uint32 extrema, below-bias and nondivisible tokens, empty-bank import |
| rejection invariance, single reject accounting and clear | docs/contract.md:10 C08 | snapshots after all rejected mutators and clears |
| exact statuses and read-only query semantics | docs/contract.md:11 C09 | missing IDs including 0, query info and reject counter preservation |
| observer-facing API semantics; no helper/source spelling gate | docs/contract.md:12 C10; include/fields.h:44 | compile declared APIs; compare raw observations only |
| occupied, fingerprint, minimum and maximum word | docs/contract.md:13 C11 | ordered algebraic folds and extreme-value projections |
| sums, weighted sums, span and free-bit count | docs/contract.md:14 C12 | per-command telemetry projection |
| command and unsigned decimal input grammar | docs/contract.md:15 C13; tools/observe.c:7 | observer uses only SP/TAB/CR/LF; includes + and 5000 leading zeros |
| 23-column decimal rows, Q fields and unrestricted stderr | docs/contract.md:16 C14 | strict whole-token parser, signs/leading-zero normalization, actual all-byte and 17MiB diagnostics |
| independent default and optional public make reports | docs/contract.md:17 C15; Makefile:9 | fixed-image actual make demo/make replacement on five variants |
| candidates, fresh compiler, zero observer rc and row completeness | docs/contract.md:18 C16; Makefile:2 | fresh gcc -std=c11 -O2 -Wall -Wextra -Werror, full rows, rc checks |
The formal observer prints raw API/state observations and has no expected values, assertions or hidden input generation. check.py freezes the exact public observer, creates all source support before the first child and computes expectations independently using ordered Python field records, mathematical powers of two and transaction snapshots. It does not run gold to obtain answers. There are 1025 command rows, each with 23 integer observations. A fixed PRNG seed only selects additional deterministic inputs.
Fixture mechanisms
- gold: validated snapshot-then-commit state machine and arithmetic token composition.
- template: both D1 and D2 present.
- noop: every encoded token is zero; it still builds and runs normally.
- cheat: hardcoded demo-looking token constants 37/34 fail hidden changing values and bias.
- cheat_read_grader: gold behavior only after opening the private checker, otherwise exits 71. It probes /grader/check.py and ancestor command-line checker paths. Trusted local is intentionally not an isolation claim.
- only_fix_encode: corrects only D1; fails transactional rejected replacement.
- only_fix_replace: corrects only D2; fails nonzero-bias encoding.
- mask_symptom: removes bias from encoding; rejected by the exact published equation.
- valid_bitwalk: constructs a 32-entry lane vector and folds its bits to a word, avoiding the gold encode loop/helper path. Replacement updates in place under a saved rollback image, rather than gold's trial copy and commit helper. This is a distinct packing algorithm/data representation and transaction control scheme.
Execution and evidence boundary
verify.py is byte-identical to rollout/bos_verify.py; check.py is the sole private attachment. Compiler/candidate/cleanup/independent strict-lstat absence each run in a candidate-identity supervisor with production deadlines 20/10/5/5 seconds and 3 seconds bounded recovery. Linux subreaper discovery starts from current real ancestry or a live same-start remembered token; Z/X or reused tokens cannot authorize independent roots. Every signal freshly rechecks exact PID/start/state. Own Popen is polled/waited before adopted reaping. Adopted waits retain PID, unknown start=None and real exit code; historical identity is not substituted. Normal and exceptional recovery retry within a bound; exception presence always rejects even with later clean closure.
Parent validates complete phase binding, identities/types/groups, true leader rc/reaped/timeout/controlled rc, finite bounded elapsed, descendant/PG absence, arbitrary exception presence and actual stdout/stderr byte length/SHA. It retains wrapper rc and raw wire length/SHA before parsing. No stderr cap or combined IO cap is imposed. Candidate tree access ends before the first child; finally cleanup and independent absence cover preparation faults and all later results. Only FileNotFoundError means path absence.
Actual diagnostic packages and protected /proof evidence retain original wire and raw reconstructed IO bytes with their hashes. The ordinary formal bos stderr retains compressed complete metadata and actual byte n/SHA, but raw wire/IO are not promised there. Missing native cwd, input-consumption evidence and post-exec leader credentials are not invented. The 17MiB test is a regression point, not a limit. Whole-library helper behavior outside observer-facing public scenarios, actual counter wrap after billions of operations, and hardware/Agent integration remain unmeasured.
族名规范化:protocol-codec → numeric-reliability(2026-10-27)