amos 9d633e9e67 Batch 15 (20261023-C-hwe-scale-15): 320 HWE-derived repair tasks
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>
2026-10-27 01:55:56 +08:00

54 lines
1.7 KiB
C

#include "scanner.h"
#include <inttypes.h>
static void print_snapshot(FILE *output, int result, const sp_scanner *scanner)
{
fprintf(output, "%d %d %d %d", result, (int)scanner->stop,
(int)scanner->phase, scanner->cursor);
fprintf(output, " %" PRIu64, scanner->steps);
fprintf(output, " %" PRIu64, scanner->visited);
fprintf(output, " %" PRIu64, scanner->kept);
fprintf(output, " %" PRId64, scanner->sum);
fprintf(output, " %" PRIu32, scanner->digest);
}
static void print_event(FILE *output, const sp_event *event)
{
fprintf(output, " %d", event->kind);
fprintf(output, " %d", event->index);
fprintf(output, " %d", event->value);
fprintf(output, " %d", event->selected);
fprintf(output, " %" PRIu64, event->visited);
fprintf(output, " %" PRIu64, event->kept);
fprintf(output, " %" PRId64, event->sum);
fprintf(output, " %" PRIu32, event->digest);
}
void sp_print(FILE *output, int result, const sp_scanner *scanner, const sp_journal *journal)
{
size_t index;
print_snapshot(output, result, scanner);
fprintf(output, " %zu", journal->count);
for (index = 0; index < journal->count; ++index) {
print_event(output, &journal->entries[index]);
}
fputc('\n', output);
}
int sp_dispatch(sp_scanner *scanner, const sp_command *command, sp_journal *journal)
{
sp_journal_clear(journal);
switch (command->kind) {
case SP_CMD_PLAN:
return sp_install(scanner, &command->plan);
case SP_CMD_TICK:
return sp_tick(scanner, command->budget, journal);
case SP_CMD_SNAPSHOT:
return 0;
case SP_CMD_RESTART:
return sp_restart(scanner);
default:
return -1;
}
}