Skip to content

Service shape policy: data by default, internal explicit #1289

Closed

Description

@eric8810

Context

The current catalog has 118 names: 25 data, 91 internal(reason) and 2 shared-no-dispatcher. A name is a data face only when it is shared in the catalog and has a HostDispatch at host_key(name). Shared alone is not enough; loaderService and pluginMounter are shared by rutis-loader without a dispatcher.

internal is a contract statement, not a note. It means the service face cannot be replaced across a language or process boundary: it cannot be provided by a leaf, injected by a leaf, or injected across a scope. The reason explains what prevents a data face (state machine, lock callback, OS object, secret, hot path); it is a review input, not runtime behaviour. It does not mean the functionality cannot be reimplemented: that would be a new data service. Scope is unrelated: instance-scoped timeline is data, process-scoped hostPlatform is internal.

Scope

  • Every provided process/Session/branch service name declares a face: data (shared + dispatcher) or internal(reason).
  • The generated catalog reports face: data | internal(reason) | shared-no-dispatcher instead of Crosses languages.
  • xtask check checks both directions: a dispatcher without shared fails; a shared name without a dispatcher fails; a shared name with a reason fails.
  • managementMethods is a code item: register_shared currently runs before the typed registration and is overwritten. Register shared after it, or preserve it in register_names.
  • localId now has a get dispatcher. loaderService and pluginMounter stay shared-no-dispatcher: they are external rutis-loader names, a leaf cannot call them, and removing or dispatching them needs an upstream change.
  • A leaf's inject and provides names are refused unless their face is data.
  • Names::copy_with_faces(catalog, build, faces) carries the reason table; Names::copy keeps its signature with an empty table.
  • Reason set is closed: object, hot-path, lock-callback, secret, owner-api, control, host-resource, legacy-no-consumer.
  • The document template and PR checklist ask: public service methods carry data only; where do handles stay internal?

Acceptance

  • xtask check fails on a new unmarked service name, a dispatcher without shared, and a shared name without a dispatcher.
  • The catalog shows data, internal(reason) or shared-no-dispatcher for every provided name; the three shared-without-dispatcher names are resolved, not waived.
  • A name marked internal is refused as a leaf dependency or leaf provider.
  • Local calls still use the typed method; the data face delegates to the same implementation.
  • The authoring guide shows the six rules (data methods, ids, operations, events, data errors, cancellation).

Activity

  1. added
    core
    design
    on Nov 8, 2026
  2. self-assigned this
    on Nov 8, 2026
  3. 1 remaining item

  4. eric8810 commented on Nov 10, 2026

    @eric8810
    CollaboratorAuthor

    Design merged in #1301 (docs/design/service-faces.md, commit cca96b1b6). This issue can proceed against the merged document.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

coredesign

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions