strawberry/CLAUDE.md
trvon 648457802a
Some checks failed
Build and Test / build (debug, clang) (push) Has been cancelled
Build and Test / build (debug, gcc) (push) Has been cancelled
Build and Test / build (release, clang) (push) Has been cancelled
Build and Test / build (release, gcc) (push) Has been cancelled
Build and Test / docker (push) Has been cancelled
Forbid empty catch blocks
Every catch now handles the exception or records it with
STRAWBERRY_NOTE_SWALLOWED() (strawberry/swallowed.hpp): an atomic count,
exported in status as resources.swallowed_exceptions, plus a file:line
log line written with write(2), so it is safe out of memory and in
destructors. The 16 empty catches (store error fallbacks, destructors,
YARA compiler callback, thread entry logging) now use it. Status also
reports thread_errors, which was counted but never exported.

Enforced by source invariant R7 (with a self-test fixture) and by
clang-tidy bugprone-empty-catch in a new .clang-tidy (errors; inherits
parent config). AGENTS.md and CLAUDE.md state the rule.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-25 18:52:45 -06:00

24 lines
1.4 KiB
Markdown

# CLAUDE.md
Read [AGENTS.md](AGENTS.md) first: it holds this repository's rules, current
reality, guardrails and the per-change check table. This file only points at
the shared workflow.
- **Memory and retrieval**: YAMS-first loop in
[docs/prompts/PROMPT-eng-codex.md](docs/prompts/PROMPT-eng-codex.md)
(claim → checkpoints → handoff; plans, decisions and evidence live in YAMS,
hydrated by hash before use).
- **Audits**: [docs/prompts/PROMPT-strawberry-audit.md](docs/prompts/PROMPT-strawberry-audit.md):
brick (structure), fold (`scripts/fold_changed.sh`, bounded symbolic SAST),
pipe (`enum class` state flow).
- **Before calling a change done**: the "Per-change checks" table in AGENTS.md
(meson tests incl. source invariants and fault injection, clang-tidy on
changed files, `make fuzz`, fold on changed TUs, live Docker tests,
`make perf-kpi`).
- **Never leave a `catch` empty**: handle it, or record it with
`STRAWBERRY_NOTE_SWALLOWED()` (`include/strawberry/swallowed.hpp`). Enforced
by source invariant R7 and clang-tidy `bugprone-empty-catch` (`.clang-tidy`).
- **This machine**: builds and tools run niced and capped (`nice -n 19`,
`-j2`, Docker `--cpus=2`); an uncapped fold build has frozen it before.
- **Plans in flight**: YAMS `task=strawberry-data-engine` (staged data engine +
online learning), `task=strawberry-settings-ux`, `task=strawberry-encoder`.