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

81 lines
1.9 KiB
C

#ifndef MIST_H
#define MIST_H
#include <stddef.h>
#include <stdint.h>
#define MIST_BAYS 6
#define MIST_HISTORY 8
#define MIST_LIMIT 1000000
#define MIST_TOKENS 32
typedef enum {
MIST_IDLE = 0,
MIST_SOAK = 3,
MIST_DRAIN = 8,
MIST_SERVICE = 12
} MistMode;
typedef struct {
MistMode mode;
int quota;
int delivered;
unsigned changes;
} MistBay;
typedef struct {
unsigned revision;
int kind;
int index;
int before;
int after;
int amount;
} MistEvent;
typedef struct {
MistBay bays[MIST_BAYS];
int count;
int cursor;
unsigned revision;
unsigned accepted;
unsigned rejected;
MistEvent history[MIST_HISTORY];
unsigned history_start;
unsigned history_count;
} MistBank;
typedef struct {
int count;
int cursor;
unsigned revision;
unsigned accepted;
unsigned rejected;
int mode_counts[4];
int unknown_modes;
int total_quota;
int total_delivered;
int pending;
unsigned changes;
} MistSummary;
typedef struct {
char opcode;
int values[MIST_TOKENS];
size_t count;
} MistCommand;
int mist_mode(int raw, MistMode *out);
const char *mist_label(MistMode mode);
int mist_mode_slot(MistMode mode);
void mist_init(MistBank *bank, int count);
int mist_request(MistBank *bank, int index, int raw, int quota);
int mist_credit(MistBank *bank, int index, int amount);
int mist_tick(MistBank *bank, int units);
int mist_move(MistBank *bank, int source, int target, int amount);
int mist_reset(MistBank *bank, int index);
int mist_restore(MistBank *bank, const int *triples, size_t count);
int mist_view(const MistBank *bank, int index, MistBay *out);
void mist_summary(const MistBank *bank, MistSummary *out);
size_t mist_events(const MistBank *bank, MistEvent *out, size_t capacity);
int mist_decode(const char *text, MistCommand *out);
int mist_execute(MistBank *bank, const MistCommand *command);
#endif