Skip to main content

Module retype

Module retype 

Source
Expand description

memstead retype <id> --type <target> — change an entity’s type in place. The id, file path, and every incoming edge stay; the existing sections and metadata are validated against the target type with a report-all refusal, every edge touching the entity is re-checked against the target’s relationship pins, and one commit lands with its own retype provenance kind. Because the content hash moves, the response states that check records and derivation baselines on the entity are stale.

Hash handling matches memstead update: strict by default, --auto-hash refetches from the store, --force explicitly accepts the overwrite; --dry-run previews without a hash.

Structs§

Args
Change an entity’s type in place. The existing sections and metadata must satisfy the target type; --section-map old=new renames section keys on the way (a section the target does not declare refuses UNKNOWN_SECTION with the target’s declared sections and a proposed map in the details). Every incoming and outgoing edge, cross-mem included, is re-checked against the target type’s relationship pins and a violation refuses INVALID_REL_SHAPE listing the offending edges; every problem is reported together in one refusal (mixed classes carry RETYPE_REFUSED). The id, file path, and incoming edges stay; one commit lands with the retype provenance kind; check records and derivation baselines on the entity become stale because its content hash moves, and the response says so. Referrers in a lazy (unloaded) mem are probed through storage; a mem that cannot be probed refuses RETYPE_REFERRER_UNPROBEABLE naming it.

Functions§

run