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>
54 lines
1.4 KiB
C
54 lines
1.4 KiB
C
#ifndef SLICED_NOTES_H
|
|
#define SLICED_NOTES_H
|
|
#include <stddef.h>
|
|
#include <stdint.h>
|
|
#define SN_BANKS 8
|
|
#define SN_BYTES 64
|
|
#define SN_NOTES 16
|
|
#define SN_OK 0
|
|
#define SN_BAD 1
|
|
#define SN_FULL 2
|
|
#define SN_MISSING 3
|
|
#define SN_NOMEM 4
|
|
struct sn_bank {
|
|
unsigned char bytes[SN_BYTES];
|
|
size_t length;
|
|
int present;
|
|
};
|
|
struct sn_note {
|
|
unsigned id;
|
|
unsigned priority;
|
|
unsigned serial;
|
|
size_t length;
|
|
unsigned char text[SN_BYTES];
|
|
uint32_t checksum;
|
|
int present;
|
|
};
|
|
struct sn_catalog {
|
|
struct sn_bank banks[SN_BANKS];
|
|
struct sn_note notes[SN_NOTES];
|
|
unsigned next_serial;
|
|
unsigned revision;
|
|
};
|
|
struct sn_view {
|
|
size_t count;
|
|
const struct sn_note *ordered[SN_NOTES];
|
|
size_t selected_count;
|
|
unsigned selected[SN_NOTES];
|
|
size_t selected_bytes;
|
|
uint32_t digest;
|
|
};
|
|
void sn_init(struct sn_catalog *catalog);
|
|
int sn_bank_set(struct sn_catalog *catalog, unsigned bank,
|
|
const unsigned char *bytes, size_t length);
|
|
int sn_put(struct sn_catalog *catalog, unsigned id, unsigned bank,
|
|
size_t start, size_t extent, size_t maximum,
|
|
unsigned flags, unsigned priority);
|
|
int sn_drop(struct sn_catalog *catalog, unsigned id);
|
|
void sn_clear(struct sn_catalog *catalog);
|
|
void sn_view(const struct sn_catalog *catalog, size_t budget,
|
|
struct sn_view *view);
|
|
int sn_run(void);
|
|
void sn_observe(const struct sn_catalog *catalog, int status, size_t budget);
|
|
#endif
|