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

34 lines
1.2 KiB
C

#include "audit.h"
int audit_before(const Job *job, const Port *port)
{
if (job == NULL || port == NULL) return -1;
if (job->budget < 1 || job->budget > 256) return -1;
if (job->hold < 1 || job->hold > job->budget) return -1;
if (job->mask == 0) return -1;
if (job->count != job->budget) return -1;
if (port->job != job) return -1;
if (port->cursor != 0) return -1;
if (port->reads != 0) return -1;
if (port->checkpoints != 0) return -1;
return 0;
}
int audit_after(const Job *job, const Port *port, const Observation *out)
{
if (job == NULL || port == NULL || out == NULL) return -1;
if (port->job != job) return -1;
if (out->id != job->id) return -1;
if (out->outcome > 1) return -1;
if (out->reads == 0 || out->reads > job->budget) return -1;
if (out->reads != port->reads) return -1;
if (out->checkpoints != port->checkpoints) return -1;
if (port->checkpoints >= job->budget) return -1;
if (port->cursor != port->checkpoints) return -1;
if (out->checkpoints + 1 != out->reads) return -1;
if (out->streak > out->reads) return -1;
if (out->outcome && out->streak < job->hold) return -1;
if (!out->outcome && out->reads != job->budget) return -1;
return 0;
}