Source: ~/.unfirehose/unfirehose.db (project_id=81, 4 sessions covering
2026-03-29 through 2026-04-05). Reconstructed via chronological replay
of Write/Edit tool_input on file_paths under /home/fox/zebra-report/.
stats:
files reconstructed: 20
writes baselined: all (zero missing)
edits applied: 68
edits unapplied: 8 (1 SKIP pre-baseline, 6 FAIL old_string drift, 1 AMBIGUOUS)
unapplied edits represent small drift in 6 files; baseline content for
each is intact. quality verification deferred to phase 2.
recovered tree:
CLAUDE.md, Makefile
src/{tx,rx,pulse,carrier,chat,bt}.c
include/{modem,zebra}.h
test/{functional,integration,unit}.c, test/test.h
web/{index,kernel}.html, web/blog/style.css
blog/build.py, blog/posts/{001-volume-modem,002-sse-chatroom}.md
report: /tmp/zebra_recover_report.txt
script: /tmp/zebra_recover.py
37 lines
996 B
C
37 lines
996 B
C
#pragma once
|
|
#include <stdio.h>
|
|
#include <stdlib.h>
|
|
|
|
static int _t_pass = 0, _t_fail = 0;
|
|
static const char *_t_current = "";
|
|
|
|
#define T_RUN(fn) do { \
|
|
_t_current = #fn; \
|
|
int _before = _t_fail; \
|
|
fn(); \
|
|
fprintf(stderr, " %-48s %s\n", #fn, (_t_fail == _before) ? "ok" : "FAIL"); \
|
|
} while(0)
|
|
|
|
#define T_CHECK(expr) do { \
|
|
if (expr) { _t_pass++; } \
|
|
else { _t_fail++; \
|
|
fprintf(stderr, " check failed: %s (%s:%d)\n", #expr, __FILE__, __LINE__); } \
|
|
} while(0)
|
|
|
|
#define T_EQ(a,b) T_CHECK((a) == (b))
|
|
#define T_NEQ(a,b) T_CHECK((a) != (b))
|
|
#define T_GE(a,b) T_CHECK((a) >= (b))
|
|
#define T_LE(a,b) T_CHECK((a) <= (b))
|
|
#define T_GT(a,b) T_CHECK((a) > (b))
|
|
|
|
#define T_SUMMARY() do { \
|
|
fprintf(stderr, "\n%d passed %d failed\n", _t_pass, _t_fail); \
|
|
return _t_fail ? 1 : 0; \
|
|
} while(0)
|
|
|
|
#define T_SECTION(name) fprintf(stderr, "\n%s\n", name)
|
|
|
|
#define T_SKIP(reason) do { \
|
|
fprintf(stderr, " SKIP: %s\n", reason); \
|
|
return 0; \
|
|
} while(0)
|