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>
11 KiB
dev-live-status 任务规格
身份与边界
路线 C 原创;基础来源 dbg-cache-volatile-mmio,task dev-live-status,version 1,source hwe/dbg-cache-volatile-mmio,family linux-device-abi,C11,难度 UNMEASURED。本题不称真实事故。
只读原料 prompt/reference 提供“状态必须从端口每次重新读取,不能复用旧观察”的方向;原题只有固定 status=1 和 volatile/acquire 示例,不能作为有效行为题。本题独立新写可重置发布脚本、端口审计、轮询会话、CLI和统计工程。软件替身每次 status callback 才推进发布项;缓存观察会确定性无法看到后续项,因此保留同一可靠性知识。只验证项目端口软件访问合同,不证明真实 MMIO、CPU/cache屏障、DMA、ARM实板或线程时序。公开 README/合同/observer 足以理解和复现,无网络、板卡、新依赖。
负责文件与公开工程
唯一candidate为 src/live_status.c。公开支撑 include/live_status.h、src/script_port.c、src/report.c、src/main.c、Makefile、三条示例、tools/observer.c、README及docs/port-contract.md。公开CLI支持ready/fault/budget、增量驱动、重复回放、访问审计及统计。公开复现采用固定镜像实际存在的gcc/make,已探针确认;不使用原料的CMake。
普通独有有意义工程按单份template统计:541行C/头+13行必要Makefile=554;排除空行、注释、observer、纯示例数据、文档及所有fixture复制倍数,保留正常语法括号行。逐文件统计与SHA见本题subagents/line-count.json;不引入额外candidate-only或去括号500门。
两处独立缺陷
A(读值保留):首次step读端口后后续step复用保留值,samples继续增加但审计没有新访问。触发:mask1、脚本0→0→1,默认参数即可;公开依据port-contract:29-32。only_fix_refresh单修复A,仍被B拒绝。
B(部分mask误就绪):用任一ready位而非全部位做就绪判断。默认ready_mask1不暴露;公开允许的ready_mask3、首值1即触发提前payload/ack,依据port-contract:14-17,34-35。only_fix_mask单修复B,仍被A拒绝。
独立性:mask1的0→1只需A;首值1/mask3只需B。mask_symptom把多次状态OR到累计字,1、2两次可伪造3;完整原始审计及最后观察模型拒绝该掩盖。
样例机制
| fixture | 预期 | 机制 |
|---|---|---|
| gold | PASS | 每step读一次、fault优先、allbits就绪、直接分支完成 |
| template | FAIL | A+B |
| noop | FAIL | begin后直接EXHAUSTED,没有端口行为 |
| cheat | FAIL | 读hook后忽略实际值,第3次合成ready1 |
| cheat_read_grader | FAIL | 只在读到/grader或祖父cwd/grader/check.py后执行gold,否则INVALID;Docker必须拒绝,本地可允许PASS例外 |
| only_fix_refresh | FAIL | 只A正确,B仍错 |
| only_fix_mask | FAIL | 只B正确,A仍错 |
| mask_symptom | FAIL | OR累计历史状态冒充当前观察 |
| valid_state_machine | PASS | missing-bit分类+8项动作表,局部next结果事务提交;与gold逐条直接更新控制方式不同 |
全部样例仅candidate_files,全部用相同编译链,可构建;负例依据真实行为拒绝,非语法/链接故障。
独立判据与依据表
先写纯Python oracle和原始observer再实现工程;check内固定种子0xE156A11,87组请求×wait/step两模式=174个原始记录。期望仅由Python逐发布模型计算,不调用gold。C observer只打印结果及端口原始访问;不包含期待或隐藏断言。公开固定材料冻结在check SUPPORT字符串,首child之前一次准备输入/源码;首child之后父只访问管道/内存,避免跟随候选树。
| 判据行为 | 公开确切依据 | 覆盖 |
|---|---|---|
| outcome numerical types and full word range | template/docs/port-contract.md:9-11 | all cases, high-bit and UINT32_MAX publications |
| nonzero ready mask, disjoint fault, budget1..64; fault0 valid | template/docs/port-contract.md:12-17 | invalid0/overlap/0/65 cases and randomized fault0 |
| invalid request result and no callback | template/docs/port-contract.md:20-23 | invalid result [4,0,0,0], no audit events |
| initialize each session fields and independent state | template/docs/port-contract.md:20-25 | each observer case starts fresh; payload stays0 on non-ready |
| exactly one fresh status call per pending step | template/docs/port-contract.md:29-32 | complete raw status audit equals Python model |
| samples increments; last status is current observation | template/docs/port-contract.md:29-32 | result samples/status for every case |
| all requested ready bits required in same observation | template/docs/port-contract.md:14-17,34-35 | multibit mask, partial and toggling publications |
| unrelated bits do not prevent ready | template/docs/port-contract.md:14-16 | 0x101 with ready1 and random unused bits |
| fault takes precedence even with readiness | template/docs/port-contract.md:15-16,33-34 | 129 ready1/fault128 and UINT32_MAX |
| fault gives payload0 with no data/ack | template/docs/port-contract.md:33-34 | result and complete audit |
| ready reads payload then ack once; no further status | template/docs/port-contract.md:35-36 | full ordered event list equality |
| payload matches current publication | template/docs/port-contract.md:35,54 | per-publication distinct payloads and nonce-like fixed-seed32bit data |
| budget exhaustion exactly, no payload; waiting belowbudget | template/docs/port-contract.md:37-40 | budget1/2/3/8/16/64; late publication after allowedwindow |
| final sample ready/fault wins over exhaustion | template/docs/port-contract.md:37-39 | 64th sample ready and lastsample fault |
| no combining previous bits or extra retry accesses | template/docs/port-contract.md:31-32,39-40 | 1,2,0 under ready3; exact full audit |
| terminal step preserves result and audit | template/docs/port-contract.md:42-44,74-75 | mode1 terminal_unchanged1 |
| wait and incremental modes equivalent | template/docs/port-contract.md:43-44,66-67 | every request duplicated for mode0 and mode1 |
| script tail holds and ack contains publication index | template/docs/port-contract.md:51-57 | singleentry64poll; finalentry held; modeledackindex |
| audit order, event capacity and no dropped valid events | template/docs/port-contract.md:56-58 | complete event pairs; eventcount len; dropped0 |
| one raw record per input case and exact published fields | template/docs/port-contract.md:64-80 | 174 parsed R records against independent expectation |
| ASCII decimal tokens and public horizontal/CRLF domain | template/docs/port-contract.md:76-80 | parser fullregex, leading sign/zeros normalized; 12helpertests include5000zeros |
| stderr arbitrary diagnostic bytes do not affect business | template/docs/port-contract.md:80 | production0..255 and17MiB diagnostics; bytecapture no cap |
共22项逐项依据。只比较4个公开结果字段和有效审计事件,不要求padding/unused字节清零。stderr按bytes捕获,不拒绝合法诊断字节,不设大小上限;17MiB只是实际回归点。十进制先完整ASCII token验证,再归一化sign/任意leading0,避免Python4300位限制;stdout仅公开space/TAB/CRLF域,未放宽VT/FF。只验修复API/observer协议,不把CLI展示风格加为隐藏要求。
执行隔离与证据
verify.py与平台bos_verify.py逐字节相同;grader_files仅check.py。candidate与compiler都经argv子进程执行,正式降UID/GID65534、groups空;本地可信样例不宣称隔离。复用本题root审阅的纯执行参考(绑定见reviewed-execution-reference-binding.json),无其他新题业务复用。
compiler25秒、candidate10秒、cleanup/independent absence各5秒,监督器recovery3秒。Linux subreaper跟踪本监督器真实亲缘或仍活同start旧根;Z/X及复用PID不能当旧根,每次signal freshstat核PID/start/非Z/X。own Popen先poll/wait再收adopted;adopted wait仅保存实际PID、None start、实际waitstatus,不借旧token补身份。正常/异常均限时fresh闭包回收,空OSError也留异常并继续实际回收。
父严格验证nonce/argv、精确int身份、组列表、deadline/elapsed有限范围、真实leader rc/reaped、controlledrc/timeout一致性、PG/后代absence、所有异常presence、实际捕获IO长度/SHA。finally覆盖准备错误、编译和运行故障、行为差异与timeout;cleanup和独立strict lstat absence分别检查。路径不存在不能抵销cleanup非零或timeout;任意异常即使成功标志已True也拒绝。scratch根由bos交给候选身份,不chmod根;仅在首child前对root新建支撑子目录设0777以允许候选身份删树。
每次诊断copy保留完整loadable actual-package、check/context/candidate及raw grade日志SHA。普通stage原wire/IO仅内存捕获,持久证据保actual长度/SHA/完整metadata;不冒称持久保存原始IO字节。缺wire/字段及supervisor非零诊断额外保存实际wrapper rc和wire bytes再解析。最终独立重构确定性正常observer输出与0..255/17MiB stderr核SHA;未知IO排除而非补造。压缩证据须从bos4000字符tail真实解码成功后才宣称完整。
验收计划与限制
12项本题helper测试已实际PASS:独立oracle手算、输出词法/长leading0、synthetic proc闭包/Z/X/PID复用、signal鲜查、空OSError和metadata类型。未做真实PID耗尽/复用压力。正式core._grade固定镜像生产deadline矩阵见本题runs诊断,首轮权限故障原件保留;修正后验证正常gold、任意字节/17MiB stderr、leader0+setsid闭stdio,compilerFIFO、fork/持pipe timeout、cleanup删后非零/timeout、noopcleanup但absence1、absence生产timeout/OSError、准备/成功flag之后空OSError、实际wire缺字段/类型和supervisor非零、freshsignal空OSError后限时回收。
最终以当前digest的正式入口local与Docker各9类×5次为闸门;本地reader允许的5次PASS例外如实记回执,正式必须45/45符合预期,cleanup confirmed。无Qwen/Pi采样、无硬件测试、无全库suite;完成仅标CALIBRATED/UNMEASURED,交root全文只读独审。
最终实际回执
CALIBRATED / UNMEASURED,尚待root独立审阅,未做真实Agent采样。
最终task digest 9b24c2d719d68874a36f67c1795706e37559cc5a85907c9af1a7e658bddd6737。
本地45次实际整体FAIL,仅reader5次允许隔离例外;其余40符合预期。
固定镜像45/45符合预期,整体PASS、cleanup confirmed。
当前24项生产诊断全符合预期;首轮22项权限故障证据保留排除。
本题subagents/report.json记录唯一回执、逐类结果和限制;evidence-proof.json一次复核90条metadata,92精确容器名和46本地scratch路径均不存在。