* fix(export): promoted no-history wisps survive import round-trip (bd-r9uce)
A promoted no-history wisp is a durable issues-table row that still
carried no_history=true (PromoteFromEphemeralInTx cleared only
Ephemeral), and both import routes inferred the storage plane from row
flags (issueops.IsWisp: Ephemeral || NoHistory). Importing an export
stream containing such a row silently re-planed it into the wisps table,
dropping its cross-plane relations as cross-bucket dependencies on the
way — classic-mode data loss across export->import->export.
Belt and braces, per triage + the #5351 review endorsement:
1. Promote clears NoHistory too (and normalizes an explicit ephemeral
StorageClass to empty, the NormalizePersistenceMode promotion rule):
a promoted wisp is fully durable and the flag has no post-promotion
meaning.
2. Import routes the plane by an explicit marker, never by no_history.
Export stamps "wisp": true on rows that live in the WISPS table and
whose flags alone cannot prove it (the no_history shape; ephemeral
rows self-describe), classified by table membership via a new
PartitionWispIDs store capability (classic: batched wisps-membership
query behind an Unwrap walk through the telemetry/hook decorators;
proxied: the plane-pinned GetWispsByIDs read). Both parse loops
(bd import in both storage modes, bootstrap/init/auto-import) resolve
the plane through one shared helper, applyImportWispPlane, which pins
marker-less no_history records to the durable plane via a new
non-serialized Issue.WispPlaneOverride consulted by IsWisp. The
no_history flag itself is preserved on the row, keeping the
export->import->export byte-identity for wild data; the legacy
v0.35-v0.37 "wisp"-as-ephemeral alias behavior is unchanged.
Tests: the promoted shape now lives IN the proxied round-trip fixture
(cross_mode_byte_identical covers it, with relations); a classic-mode
round-trip test (fails on base: cross-bucket dependency drop + missing
plane marker); a proxied import plane-routing subtest; embeddeddolt pins
for promote clearing NoHistory and PartitionWispIDs membership
classification.
* docs(schema): document the export stream's explicit wisp plane marker (bd-r9uce)
* fix(export): fresh wisp_plane marker key — legacy-alias reuse was lossy under rollout skew (bd-r9uce)
Adopts lion's #5368 review recommendation: pre-fix v0.38+ binaries' alias
branch (hasWisp && !Ephemeral => Ephemeral=true) would import a marked
genuine no-history wisp as ephemeral — purge-eligible and excluded from
that rig's next export — making the common skew case lossy. A fresh key
degrades to flag routing on older readers, data-safe in both directions.
Legacy 'wisp' read alias preserved verbatim.
* fix(storage): clone WispPlaneOverride in cloneIssueForHook (bd-r9uce)
The hook snapshot guard (TestCloneIssueForHookCoversReferenceFields)
correctly flagged the new *bool field as uncloned: a hook mutating the
snapshot could alias the live issue's plane pin. Deep-copy it and add
it to the guard's covered-fields manifest.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FZXjihTayFcngYzo6xPd3p
---------
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>