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

98 lines
15 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# dev-code-window — author specification
Version 1; route C original C11 engineering task; source `hwe/gi-cache-jit-code-flush`; family `code-publication`; difficulty UNMEASURED. The root screened source authorization, heldout exclusion and cold/local byte identity before assigning this sole base ID. Source scripts were not executed. Source material supplies only the direction; this is not a replayed incident.
Admission: ACCEPTED as a deterministic software substitute. An offline interpreter consumes an execution view of integer instruction words, while publication writes a separate data view. Missing synchronization reproduces stale instructions without machine code, executable mappings, architecture-specific behavior, real time, devices, or network. Exact half-open synchronization ranges and per-slot publication generations remain observable reliability requirements. The task does not claim CPU cache/barrier or hardware validation.
Scope: only `tasks/dev-code-window/`, this base's subagent directory, and its run directory. Candidate file `window.c`; public engine, store, interpreter, command reader and driver are frozen grader context. No platform edits or global test runs. Status DRAFT until local and Docker formal gates each repeat all fixtures five times; then CALIBRATED only. No Pi/Qwen sampling.
Two independent initial defects are planned: full installation writes the data view but skips synchronizing the execution view; patch optimistic concurrency compares a global publication serial to a slot generation, rejecting a valid patch after another slot publishes. The latter is outside the default one-slot replay. Separate only-fix fixtures will prove independence. All rejected state transitions, range behavior, generation behavior and interpreter results must be specified publicly before implementation.
Acceptance and evidence matrix will be completed against exact public line references after the contract is frozen. The Python oracle will generate fixed-seed command sequences and calculate expected observations independently; neither gold nor candidate C will calculate grader expectations. The child driver will only emit raw observations. All files and input must exist before starting any untrusted child; afterward parent check will use only captured pipes. Cleanup, if present, runs as candidate child and its return code is checked.
Environment: fixed runtime `ccr-29eug8s3-pub.cnc.bj.baidubce.com/algo/bench-runtime@sha256:1519f8daa403998e5401eeb70b973e8aac8346e25a937033bc502dc5de1641a1`; image identity confirmed equal to this digest. A read-only tool probe confirmed gcc, g++ and make. Initial `/home` free space 88 GiB. Public reproduction will use gcc/make only. Scratch root is owned by UID65534 via wrapper hook and will never be chmodded by check; new support subdirectories receive their permissions before the first child.
## Public evidence matrix
All paths below are relative to `template/`. Each row is a separate checked behavior; test combinations and fixed random values are private, while all expected behavior is public. The oracle uses only these clauses. It compares active valid ranges and permits stderr.
| # | Checked behavior | Exact public basis | Evidence mechanism |
| --- | --- | --- | --- |
| 1 | Four slots, capacity twelve, zero reset | `docs/window.md:3` W1 | Reset and all-slot state rows |
| 2 | Only active valid-range word elements are compared; tails unspecified | `docs/window.md:3` W1; `docs/console.md:6` C4 | Variable-width D/X rows; valid fixture poisons tails |
| 3 | Every publication advances only its slot generation and global serial | `docs/window.md:4` W2 | Per-command B/S rows |
| 4 | Other slots do not invalidate expected generation | `docs/window.md:4` W2; `docs/window.md:6` W4 | Cross-slot directed prefix and interleaving |
| 5 | Install accepts 1..12 words and replaces existing slots | `docs/window.md:5` W3 | Minimum/maximum and long-to-short installs |
| 6 | Install validates the whole program before effects | `docs/window.md:5` W3; `docs/window.md:8` W6 | Invalid final, early HALT, opcode and rotation |
| 7 | Install writes count words at zero and synchronizes [0,count) exactly once | `docs/window.md:5` W3; `docs/window.md:10` W8 | Data/execution rows and write/sync counters |
| 8 | Install sets active and length and needs no generation token | `docs/window.md:5` W3 | Metadata rows and replacements after drops |
| 9 | Patch inactive error has precedence over token/range/program checks | `docs/window.md:6` W4 | Inactive slot with conflicting token and invalid edit |
| 10 | Patch token compares the selected slot generation, returns -1 on conflict | `docs/window.md:6` W4 | Matching, stale, future and uint64 maximum tokens |
| 11 | Patch matching active slot checks first+count <=length | `docs/window.md:6` W4 | Last-word, nonzero-offset and out-of-live-range slices |
| 12 | Patch validates the whole resulting program, including unmodified regions | `docs/window.md:6` W4; `docs/instructions.md:3` L1 | Early HALT and terminal replacement edits |
| 13 | Patch preserves all words outside its slice and active length | `docs/window.md:6` W4 | Complete valid data rows after each operation |
| 14 | Patch writes count words and synchronizes [first,first+count) exactly once | `docs/window.md:6` W4; `docs/window.md:10` W8 | Execution rows and exact store counters |
| 15 | Drop checks active before expected, publishes inactive length zero | `docs/window.md:7` W5 | Repeated drop, conflicts and all-slot metadata |
| 16 | Drop writes/synchronizes nothing and preserves generation for reuse | `docs/window.md:7` W5 | Drop/reinstall sequence and cumulative counters |
| 17 | Declined publications and inactive execution have no state effects | `docs/window.md:8` W6 | Full before/after state except rejected count |
| 18 | Active execution uses execution view, increments executions once | `docs/window.md:9` W7 | O rows, executions counter, mask_symptom rejection |
| 19 | Execution leaves publication metadata and word arrays unchanged | `docs/window.md:9` W7 | Full state observations after repeated execution |
| 20 | Normal mutators and declined commands have zero value/retired | `docs/window.md:11` W9 | O rows on every command |
| 21 | Whole program length, terminal zero HALT, no early HALT | `docs/instructions.md:3` L1 | Whole installs and merged edits |
| 22 | uint32 modulo arithmetic, signed byte conversion and retired count | `docs/instructions.md:4` L2 | Zero, UINT32_MAX, high bit and random inputs |
| 23 | ADD uses signed byte, XOR uses unsigned byte | `docs/instructions.md:5` L3 | Fixed boundaries plus fixed-seed instruction combinations |
| 24 | MUL wraps and zero is allowed | `docs/instructions.md:5` L3 | Boundary instructions and random combinations |
| 25 | ROT accepts 0..31, rotates left, zero unchanged | `docs/instructions.md:5` L3 | ROT0/ROT31, invalid32 and fixed-seed operands |
| 26 | SET uses signed byte and AND uses unsigned byte | `docs/instructions.md:5` L3 | Positive/negative byte extremes and combinations |
| 27 | Opcodes7..255 and nonzero HALT operands rejected | `docs/instructions.md:5` L3 | Invalid install/edit program rows |
| 28 | Malformed view faults are reported by public interpreter; correct publications avoid faults | `docs/window.md:9` W7; `docs/instructions.md:6` L4 | Raw public interpreter output; expected correct views always valid |
| 29 | Blank/comment lines ignored; sequence advances only for processed lines | `docs/console.md:3` C1; `docs/console.md:5` C3 | Directed blank/comment prefix and per-line sequence |
| 30 | Whitespace, CRLF and final line without LF accepted | `docs/console.md:3` C1 | Tabs, CR and no-LF final command |
| 31 | Overlong line rejected once then drain and continue | `docs/console.md:3` C1 | 1024-byte line followed by valid reset |
| 32 | Decimal-only bounded fields and exact arities; no extra tokens | `docs/console.md:4` C2 | Signed/prefixed/overflow/missing/excess tokens |
| 33 | Leading zeroes allowed; expected full uint64 allowed | `docs/console.md:4` C2 | Zero-padded install and maximum token |
| 34 | Nonzero rc increments rejected once; R resets counters without resetting sequence | `docs/console.md:5` C3 | S rows after rejects and phase resets |
| 35 | Exact observation field order, slot order, numbers and active-range arrays | `docs/console.md:6` C4 | Every O/S/B/D/X row compared to model |
| 36 | stderr diagnostics allowed and normal EOF exits zero even after rejection | `README.md:5`; `docs/console.md:5` C3; `docs/console.md:6` C4 | Return code check, no stderr gate, valid fixture emits diagnostics |
| 37 | Build submitted window.c with frozen public C11 support | `README.md:5`; `README.md:7`; `docs/console.md:7` C5 | Fresh make invocation, no reused products |
Invalid adapter calls and corrupted metadata beyond the console/window contract are not hidden test inputs. The adapter is frozen public support; no arbitrary internal calls or out-of-contract API pointers are injected. All test operations come through documented console streams.
## Original engineering and fixtures
The original engineering consists of `window.c` (publication orchestration), `store.c` (separate views and counted adapters), `instruction.c` (bounded integer language), `console.c` (bounded streaming parser), `observe.c` (raw observation), `driver.c` (dispatch/EOF lifecycle), public type headers, and a necessary Makefile. No other new batch task was read or reused. Source HWE reference was only read; no reference machine-code placeholder was copied. Unique code is counted once from the initial template, excluding blank lines, comments, fixture copies, pure example data and documentation.
| Fixture | Expected | Mechanism |
| --- | --- | --- |
| gold | PASS | Whole merged-array validation and separate imperative install/patch paths; both defects corrected |
| template | FAIL | Missing install sync and patch using global serial as expected token |
| noop | FAIL | Install returns success without any install or publication effects |
| cheat | FAIL | Always synchronizes four words, matching only the public demo width; other lengths expose stale views or wrong counts |
| cheat_read_grader | FAIL formally | Tries direct grader paths and parent's cmdline grader path; proceeds correctly only if grader readable, otherwise exits71. Local unreadable/readable behavior recorded separately |
| only_fix_sync | FAIL | Fixes installation synchronization; retains erroneous global-token patch check |
| only_fix_generation | FAIL | Fixes per-slot patch token; retains missing installation synchronization |
| mask_symptom | FAIL | Executes data instead of execution view, masking one stale execution symptom; execution view and synchronization counters still wrong |
| valid_segmented | PASS | Segmented virtual-program cursor validates without a merged array; table-driven opcode bounds and a transaction descriptor unite commit phases. Distinct data organization and control from gold. Deliberately nonzero unspecified tails and legal stderr test permissiveness |
Initial business code: 635 nonblank noncomment C/header/necessary-Makefile lines, measured once in template (no sample multiplication). Per-file count and exact counting script are recorded in report.json and the local code-count evidence. A second conservative count removing brace-only lines is retained as auxiliary information, not used to multiply fixture copies.
## Verification architecture and stages
Private files are check.py and context.json. Public support is frozen as strings in context.json. verify.py is byte-for-byte rollout/bos_verify.py. No isolation-blocked marker exists. All input and expected rows are generated by Python before candidate compilation. Candidate bytes are copied into a new scratch build; compilation and execution are argv subprocesses, UID65534 under the formal wrapper. Driver contains no hidden assertions or expected results. The parent does not access candidate-controlled filesystem paths after the first child. Scratch root is never chmodded. Only newly created owned subdirectories receive mode0777 before any child. Cleanup runs as a candidate-identity Python child, and its return code is required before PASS.
Fixed seed 0xC0DE710 combines directed public and alternate prefixes, program/range/parser boundaries, and ten phases of four initial installs plus ninety random interleaved commands. Python model computes all expected uint32 values, generations, counters and active-range views. Six independent model behavior unit tests cover arithmetic constants, validation, cross-slot tokens, atomic edit failure, drop/reuse, and parser/ignored-line semantics. These local tests are not a replacement for the two formal calibrations.
State: CALIBRATED (difficulty UNMEASURED). The exact formal gate facts are recorded below; all digest-covered assets stayed frozen. No real Agent, native tool trajectory, hardware or measured task difficulty is claimed. No global unittest, commit or push performed.
## Completed formal calibration
Current task digest `1d2f8eb1490f3ceeb6d3425a0577655bc79839e0531f34a64afef6f79aeef95b` is identical in both formal receipts. Image ID `sha256:1519f8daa403998e5401eeb70b973e8aac8346e25a937033bc502dc5de1641a1` matches the fixed image. No calibration retry or environmental failure occurred.
Local attempt: `runs/20261023-C-hwe-scale-15/gi-cache-jit-code-flush/local/calibration-7a7722618d4243139b19a3119a3eefd5/receipt.json`. Actual overall FAIL, cleanup confirmed. All 45 trials completed: gold and valid_segmented each five PASS; each ordinary negative five FAIL; cheat_read_grader five PASS because the trusted local identity can read the copied grader. These are exactly the five explicitly permitted local mismatches; the receipt was not altered.
Docker attempt: `runs/20261023-C-hwe-scale-15/gi-cache-jit-code-flush/docker/calibration-e22fe9e55ca84ea4be3d42c333d0f3b1/receipt.json`. Overall PASS, 45/45 expected outcomes and cleanup confirmed for the attempt and every trial. Gold and valid_segmented each five PASS; all seven negative fixture classes each five FAIL. Ordinary negatives build and execute, then fail raw observations. cheat_read_grader also builds; its designed unreadable-grader exit71 is separately recorded as a controlled negative behavior, not infrastructure failure or observation mismatch.
Final count excluding public headers is 537 original nonblank noncomment C plus necessary Makefile lines. Header definitions add 98, giving 635 original code/header/build lines. No fixture copies are multiplied. Complete per-file counts, 37-row evidence matrix, 1,025 input lines / 1,018 processed commands / 14,252 raw observation rows, six model test results, exact commands and receipt summaries are in this base's report.json. Read-only self-review found no substantive issue. Final /home free space 87 GiB. No real Agent sampling, full-suite run, hardware evidence, commit or push was performed by this subagent.
族名规范化:code-publication → linux-concurrency(2026-10-27)