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>
70 lines
2.4 KiB
C
70 lines
2.4 KiB
C
#include "dispatch.h"
|
|
#include <inttypes.h>
|
|
#include <stdio.h>
|
|
#include <string.h>
|
|
|
|
static void print_state(const Service *service, int rc)
|
|
{
|
|
unsigned index;
|
|
printf("S %d %d %u %" PRIu64 " %" PRIu64 " %" PRIu64 " %" PRIu64 "\n",
|
|
rc, service->mode, service->cursor, service->ticks,
|
|
service->published, service->blocked, service->invalid);
|
|
for (index = 0; index < LANE_COUNT; ++index) {
|
|
const Lane *lane = &service->lanes[index];
|
|
unsigned ordinal;
|
|
printf("L %u %d %d %u %" PRIu64 " %" PRIu64 " %" PRIu64
|
|
" %" PRIu64 " %" PRIu64 " %" PRIu64 " %" PRIu64 "\n", index, lane->enabled,
|
|
lane->credit, lane->queue.count, lane->pulses, lane->expired,
|
|
lane->delivered, lane->refused, lane->cancelled,
|
|
lane->moved_in, lane->moved_out);
|
|
for (ordinal = 0; ordinal < lane->queue.count; ++ordinal) {
|
|
const Message *message = queue_at(&lane->queue, ordinal);
|
|
printf("Q %u %u %d %d %d\n", index, ordinal, message->id,
|
|
message->value, message->lease);
|
|
}
|
|
}
|
|
for (index = 0; index < LANE_COUNT; ++index) {
|
|
const Receiver *receiver = &service->receivers[index];
|
|
printf("V %u %d %" PRIu64 " %" PRIu64 " %" PRIu64 " %" PRId64
|
|
" %" PRIu64 " %d %d\n", index, receiver->period,
|
|
receiver->attempts, receiver->accepted, receiver->rejected,
|
|
receiver->sum, receiver->digest, receiver->last_id,
|
|
receiver->last_value);
|
|
}
|
|
}
|
|
|
|
int main(void)
|
|
{
|
|
Service service;
|
|
char line[4098];
|
|
service_init(&service);
|
|
while (fgets(line, sizeof line, stdin) != NULL) {
|
|
Command command;
|
|
int parsed;
|
|
int rc;
|
|
size_t length = strlen(line);
|
|
int overlong = length > 4096;
|
|
if (strchr(line, '\n') == NULL && !feof(stdin)) {
|
|
int next = getchar();
|
|
if (next != EOF) {
|
|
overlong = 1;
|
|
while (next != '\n' && next != EOF) {
|
|
next = getchar();
|
|
}
|
|
}
|
|
}
|
|
parsed = command_parse(line, &command);
|
|
if (parsed == 0 && !overlong) {
|
|
continue;
|
|
}
|
|
if (parsed < 0 || overlong) {
|
|
service.invalid += 1;
|
|
rc = -1;
|
|
} else {
|
|
rc = service_command(&service, &command);
|
|
}
|
|
print_state(&service, rc);
|
|
}
|
|
return ferror(stdin) ? 2 : 0;
|
|
}
|