feature/Trim-concept-abstract · L-260918-8fba7a — trim ConceptAbstract, serialize the ref

Merged
LC
2mo ago
+156-19

ConceptAbstract keeps code, domain_code and the concept_ref property; description, structure_class_name and refines leave it, because none of them is a fact about a stuff — a concept's definition belongs to the library the method loads, and a runtime that needs one of them in memory declares it on its own subclass. StuffAbstract gains a field serializer on concept, so every dump of a stuff emits the standard's wire form, {"concept": "<domain>.<Code>", "content": …}, instead of leaving each runner to reduce the object itself.

This is the rule the MTHDS spec landed in the CLI I/O contract's "Stuffs on the Wire" section. It is a deliberate break: a stuff, a working memory or a pipe output can no longer be validated back from its own dump, and a consumer that did so resolves the concept by ref through the loaded library instead — the changelog, the docs and the serializer's docstring all say so.

Closes L-260918-8fba7a

🤖 Generated with Claude Code

https://claude.ai/code/session_018GodVX8dbGwhAZGWnuz6M3


Summary by cubic

Trims ConceptAbstract to the reference surface — code, domain_code and concept_ref — and makes StuffAbstract serialize concept as the ref string, so every dump of a stuff emits the standard wire form {"concept": "<domain>.<Code>", "content": …} instead of leaving each runner to reduce the object itself. The definition fields (description, structure_class_name, refines) no longer travel with a concept; they belong to the library the method loads, and a runtime that needs them declares them on its own subclass. The two override points reach different code: concept_ref on the concept reaches every reduction including the serializer, while serialize_concept on the stuff reaches a dump alone — DictRunResultExecute.from_pipe_output reduces by concept_ref, so a serialize_concept override is not followed there (which point it should honour is filed as L-260918-5f09d8).

Closes L-260918-8fba7a.

Breaking changes

  • A stuff, working memory, or pipe output can no longer be validated back from its own dump — a consumer that re-validated a dump resolves the concept by ref through the loaded library instead.
  • Producing a dependency-contributed concept's crate key <package_address>::<domain>.<Code> is a subclass's job: override StuffAbstract.serialize_concept under that name.