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>
68 lines
1.8 KiB
C
68 lines
1.8 KiB
C
#include "console.h"
|
|
#include <stdio.h>
|
|
|
|
CodeResult dispatch(CodeWorkbench *work, const Command *command)
|
|
{
|
|
CodeResult result = {CW_SYNTAX, 0, 0};
|
|
switch (command->kind) {
|
|
case CMD_RESET:
|
|
store_reset(work);
|
|
result.rc = CW_OK;
|
|
break;
|
|
case CMD_INSTALL:
|
|
result = window_install(work, command->slot, command->words,
|
|
command->count);
|
|
break;
|
|
case CMD_PATCH:
|
|
result = window_patch(work, command->slot, command->expected,
|
|
command->first, command->words, command->count);
|
|
break;
|
|
case CMD_DROP:
|
|
result = window_drop(work, command->slot, command->expected);
|
|
break;
|
|
case CMD_EXECUTE:
|
|
result = window_execute(work, command->slot, command->input);
|
|
break;
|
|
default:
|
|
break;
|
|
}
|
|
if (result.rc != CW_OK) {
|
|
work->counts.rejected += 1;
|
|
}
|
|
return result;
|
|
}
|
|
|
|
int main(void)
|
|
{
|
|
CodeWorkbench work;
|
|
char line[CW_LINE_LIMIT + 1];
|
|
uint64_t sequence = 0;
|
|
store_reset(&work);
|
|
for (;;) {
|
|
LineStatus status = console_line(stdin, line, sizeof(line));
|
|
if (status == LINE_END) {
|
|
return 0;
|
|
}
|
|
if (status == LINE_IO) {
|
|
fputs("input read failed\n", stderr);
|
|
return 2;
|
|
}
|
|
if (status == LINE_TEXT && console_ignored(line)) {
|
|
continue;
|
|
}
|
|
++sequence;
|
|
CodeResult result;
|
|
if (status == LINE_LONG) {
|
|
result.rc = CW_SYNTAX;
|
|
result.value = 0;
|
|
result.retired = 0;
|
|
work.counts.rejected += 1;
|
|
} else {
|
|
Command command = console_parse(line);
|
|
result = dispatch(&work, &command);
|
|
}
|
|
observe_result(sequence, result);
|
|
observe_state(sequence, &work);
|
|
}
|
|
}
|