Skip to content

Aggregate children's embedding content with the database's behaviour registry #3627

Closed

Description

@mstomar125

Problem

The text, header and schema behaviours build their embedding content from their children in get_aggregated_content. To decide what each child contributes, each one builds a fresh NodeBehaviorRegistry::new() (packages/core/src/behaviors/mod.rs, in TextNodeBehavior, HeaderNodeBehavior and SchemaNodeBehavior).

That registry holds core's behaviours only. When a build registers behaviours for extends subtypes of core types (DaemonExtensions::behavior, through NodeService::new_with_extensions, ADR-082 §2.1), the node service's own registry has them, but this aggregation does not.

  • A subtype's behaviour decides the embedding of its own node.
  • When such a node is the child of a text, header or schema node, the parent asks the core-only registry for the child's contribution, so the subtype's rule is ignored there.

Core alone is unaffected: with no extension the two registries are the same.

Proposed fix

Hand the aggregation the registry the node service validates with, instead of building one. For example, pass the node service's Arc<NodeBehaviorRegistry> through get_aggregated_content, or through the NodeAccessor the aggregation already receives.

Documentation

  • ADR-082 §2.1: a subtype's behaviour decides its embedding rules. This issue implements that for aggregated parents; no new decision.
  • architecture/extension-points.md: the subtype-behaviour hook.

Acceptance criteria

  • get_aggregated_content resolves each child's contribution with the database's behaviour registry, extension behaviours included.
  • A core test registers a subtype behaviour through DataExtensions whose embedding rule differs from its base's. A text parent of a node of that subtype aggregates the child as the subtype's behaviour says.
  • With no extension, aggregation output is unchanged.

References

Activity

  1. self-assigned this
    on Oct 5, 2026
  2. added 2 commits that reference this issue on Oct 5, 2026
    53a3ac9
    0cfa42b
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions