Expand description
Substrate-complete default-scope readiness detectors (v0.31.0 Finding 8): observe whether the
default project’s BLOB + LIBSQL data is still un-re-homed, so the serve guard + boatramp migrate --finalize reach the same bar as the KV version-guard.
Substrate-complete default-scope readiness (v0.31.0 Finding 8).
The KV re-home + the serve version-guard that boatramp_core::migrate owns are KV-only. A
default project’s data also lives in BLOB (hblob/, mqp/, mqgp/) and LIBSQL ({dir}/{site}.db),
which the KV version cannot observe — so a blob-only or SQL-only default project could pass the KV
guard as Ready while its data strands (HIGH-1/2/3 of the security review). These node-level
detectors make the re-home observable across those substrates so the serve guard and
boatramp migrate --finalize can refuse/warn/sequence until ALL substrates are re-homed.
The critical asymmetry: BLOB has a runtime read-fallback during the KV dual soak (a cold object is
bridged), so an outstanding blob is a WARN while the soak is live. LIBSQL has no runtime
fallback — database("default", site) would open the non-existent {dir}/default/{site}.db and
auto-create an EMPTY database — so an un-re-homed default libsql database is a hard REFUSE.
Constants§
- BLOB_
RETIRED_ MARKER - Control-plane KV marker set by
boatramp blob rehome --finalizeonce the blob substrate is verified retired (no bare default-scoped object remains), and REQUIRED byboatramp migrate --finalizebefore it clears the KV dual soak (which disengages the runtime blob read-fallback). The explicit “I retired the blob substrate” signal — set by the command that holds the blob backend (and resolves its credentials), read by the KV finalize that does not. A node with no blob data still sets it by runningblob rehome --finalizeonce (a 0-object no-op).
Functions§
- blob_
default_ outstanding - Whether any BARE default-scoped blob object remains under
hblob//mqp//mqgp/onstorage— i.e. a key whose scope segment is neither the reserveddefault(already re-homed) nor a KNOWN project (projects, that project’s own object). Short-circuits on the first such key. Used byboatramp migrate --finalizeto REFUSE clearing the KV dual soak (which disengages the runtime blob read-fallback) until the blob substrate is drained — otherwise a cold default object would 404 after finalize. - known_
projects - Read the
projectmeta/project-name set (including the reserveddefault) from the control-plane KV — the set both detectors use to tell a bare default scope from a named project. - libsql_
bare_ default_ idents - Un-re-homed default-project libsql identities still at the bare (pre-
default/) on-disk layout underlibsql_dir. A default site’s data moves from{dir}/{site}.db(and named DBs from{dir}/{site}/{name}.db, functions from{dir}/fn/{name}.db) to under{dir}/default/…; so: - libsql_
dir_ for - The libsql data directory for a node config’s
handlers.bindings.sql(single-node), mirroringhandlers::build_sql_backends:handlers.bindings.sql.dir, else{data_dir}/handlers-sql. Only meaningful for a LOCAL (non-url) libsql binding — a remote sqld has no local directory.