Hwaro::Utils::DevMarker
Constants
What the file says to whoever finds it in a directory listing or a
deploy artifact. The first line is the greppable contract — it is what
hwaro itself matches on (see present?), so CI can grep for it too.
The greppable contract from CONTENT's first line, and the ONLY thing
that makes a .hwaro-dev file a marker.
Instance methods
Content check, not just existence: static/.hwaro-dev is a legitimate
(if unusual) file for a user to keep, and the build publishes it like
any other hidden static file. Identifying the marker by FILENAME alone
meant the published copy made hwaro deploy refuse the whole tree
blaming a serve session that never ran, and the next build deleted the
user's file right after the static copy put it there.
Only the FIRST line is compared: it is the documented contract, so a
marker written by an older (or newer) hwaro whose explanatory body has
drifted still counts. A user file whose first line happens to be
exactly that sentence is treated as a marker — it is announcing itself
as one, and that is the deliberate trade for not hashing whole bodies.
fail_closed is the deploy/build-warn default: an unreadable file
keeps its old existence-only meaning so we never ship (or silently
treat as production) output we cannot rule out as serve output.
Callers that would DELETE on a true result must pass false —
the same true would invert into "clearable".
Guarded by present? for the same reason it now checks content: the
build reads the marker BEFORE the static copy runs, so by the time it
removes one the file standing there may be the user's own
static/.hwaro-dev, freshly published over a genuine leftover.