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

61 lines
2.0 KiB
C

#include "render_api.h"
#include "buffer_port.h"
#include <stdio.h>
#include <string.h>
static void output_hex(const unsigned char *data, size_t length)
{
if (length == 0) {
putchar('-');
return;
}
for (size_t index = 0; index < length; index++) {
printf("%02x", (unsigned)data[index]);
}
}
static void print_observation(unsigned row, int parsed,
const struct render_result *result,
const struct session *session)
{
struct port_observation observed = port_observe();
printf("%u %d %d %zu %zu ", row, parsed, result->status,
result->required, result->emitted);
printf("%u %u %u %u %u %u %u %u ", observed.live,
observed.allocated, observed.released, observed.published,
observed.invalid, observed.allocation_attempts,
observed.sink_attempts, observed.live_digest);
printf("%u %u %u %u %u %u %zu ", session->accepted,
session->rejected, session->last_sequence, session->successful,
session->failed, session->digest, observed.output_length);
output_hex(observed.output, observed.output_length);
putchar('\n');
}
int main(void)
{
char line[1024];
unsigned row = 0;
struct session session;
session_init(&session);
while (fgets(line, sizeof(line), stdin) != NULL) {
struct command command;
struct render_result result;
int parsed;
if (strchr(line, '\n') == NULL && !feof(stdin)) {
return 65;
}
row++;
parsed = session_parse(line, &command);
result.status = RENDER_INVALID;
result.required = 0;
result.emitted = 0;
port_begin(parsed ? command.allocation_failure : 0,
parsed ? command.sink_failure : 0);
if (parsed) {
result = session_apply(&session, &command);
} else {
session.rejected++;
}
print_observation(row, parsed, &result, &session);
}
return ferror(stdin) ? 66 : 0;
}