Skip to article

Shared capabilities and composition

What should a shared package own?

Reuse is valuable when it completes a defined task. File delivery, process resources, transactions and interfaces each need a clear account of what the shared capability establishes and what remains with the caller.

Choose the boundary around a useful result

Opening an SSH session and completely uploading a batch is independently useful. Deciding when a particular product should publish and activate introduces product policy. The package rules first remove project-specific vocabulary, then ask whether a task still has explicit inputs, results, failure meaning and resource settlement.

Base, System, Remote, Telemetry and Yaostate are selected by capability, not a mandatory stack every project must traverse. Shared tools do not imply shared business meaning. A file may be an image, configuration or user content; overwrite authority and activation remain separate decisions.

A project caller selects Base, System, Remote, Telemetry and Yaostate by task. Packages return their own results while the caller retains business responsibility.
Where shared capabilities meet product ownershipProjects select packages by task and supply inputs, authority and targets. Each package delivers its declared capability; callers handle results, business decisions, external effects and unsettled obligations. Positions do not represent package dependencies.

Place a successful upload within the complete delivery task

Consider an illustrative composition: delivering completed configuration to an authorized host. Base can retain the exact file and complete content, Remote can upload or publish it atomically in the destination directory, and System can handle native service operations and resources. The project still chooses the host, replaceable path, configuration validity and activation action.

Remote’s atomic publication completes one transfer and rename; it adds no filesystem synchronization, business activation or rollback. If rename may have been sent, the caller retains the original target and uncertainty. Closing the local session does not restore old remote content. The useful boundary is the result actually supplied.

Responsibilities within one delivery task
CapabilitySupplied resultCaller responsibility
Base files and contentRetained files and complete reception or verificationProvenance, stability and overwrite authority
Remote publicationOne transfer and atomic-replacement outcomeBusiness activation and extra durability requirements
System resourcesControl and settlement of acquired native resourcesBusiness readiness and effect scope
ProjectTarget, ordering and business decisionsCompare the final result with independent expectations

A recorded transaction result does not own external effects

Yaostate supplies typed ordered transactions and results bound to the original operation, request and complete input. At most one business transaction and immutable result commit for that binding, but the handler may run several times after conflicts. One recorded result does not imply one handler execution.

Model calls, object uploads, file writes and external messages therefore stay outside the replayable handler. Projects keep external work with its actual owner and use transactions to interpret acquired results. Uncertainty retains the same request identity and input; a fresh key cannot substitute for an unresolved original.

Interpreting an original-request read
ResultMeaningUnsupported inference
RecordedA matching original result is retainedExternal systems completed automatically
AbsentNo active-operation result at that snapshotNever executed or unable to commit later
Closed / PurgedThe operation has that maintenance stateThe original request never committed

Apply the same boundary to presentation

Common exposes separate entries for pure preferences, browser observations, Svelte composition and styles. Pure values need no browser. Explicit browser initialization acquires observation ownership, while Svelte adapts the application’s existing runtime and underlying owner. Shared presentation requires no second business-state system.

Projects still decide navigation destinations, action eligibility and whether an error permits retry. Components present those established facts clearly; a similar appearance does not imply equal authority. This describes Common’s designed capability, not completion of migration across downstream applications.

Pure preferences feed the browser binding, Svelte consumes that same binding, and an independent stylesheet supplies presentation.
Explicit entries and one document bindingpreferences supplies browser-independent values. browser explicitly creates one document binding; svelte uses the same binding and application runtime. styles.css is imported separately, while projects retain routes, business state and actions.

Retain the actual owner when work fails

Cancellation can mean only that the caller stopped waiting. Acquired children, mounts, transfers and writes still need settlement or explicit responsibility transfer. Shared packages concentrate that native handling. Projects need not reproduce internal mechanisms, but must retain any residual duty returned to them.

Error meaning determines the next step. Definite non-application, uncertain effects, business rejection and unavailable observation cannot collapse into one automatically retryable error. Preserving the distinction lets projects continue within the original effect scope.

  • Reuse a completed capability

    Consume the public result while its input, platform and responsibility premises hold.

  • Do not enlarge the supplied guarantee

    Local closure is not remote rollback; a transaction result is not external-effect proof.

Verify the consequential bindings left by composition

Consumer verification targets the remaining link between a public capability and the business result: the selected target, original input, result interpretation and ownership transfer. Applicable public guarantees need not be reconstructed in every project.

  1. State the required result

    Start with the caller’s task and identify inputs, effects and completion.

  2. Check supplied guarantees

    Identify what the public entry establishes and which premises remain caller-owned.

  3. Observe the remaining binding

    Use independent target and result observations to expose wrong destinations, repeated effects and lost ownership.