Files
RedBear-OS/local
vasilito d2954afe5b local/recipes: repair SAFETY-comment corruption from 222d5186eb (mid-token injection)
Commit 222d5186eb ('add minimal # Safety comments to 70 files') injected
'// SAFETY: caller must verify the safety contract for this operation' at wrong
byte offsets — INSIDE tokens — splitting identifiers/keywords across a spurious
newline (e.g. unsafe->'unsaf'+comment, PTES_PER_PAGE->'PTES_P'+comment+'ER_PAGE').
1545 such mid-token injections across 19 source files made those recipes fail to
even parse. Surfaced by build-redbear.sh --check-sweep.

Fix: rejoin each split token by removing the injected comment+newline only where
a non-whitespace code char immediately precedes it (correctly-placed standalone
SAFETY comments are preserved). Validated: iommu/ehcid/ohcid now compile clean.
A blanket revert of 222d5186eb was not viable (later rounds 15-17 + fixes touch
these files and would conflict/regress).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-28 11:38:59 +09:00
..