On this page

AetherConfigurationBuilder๏ƒ

Use md.AetherConfigurationBuilder from the public package namespace.

Implementation source

class AetherConfigurationBuilder[source]๏ƒ

One-shot builder for Aether root configuration assembly.

Purpose:

Mirror the repo's mutable-then-finalize configuration style while making ownership explicit for the wrapped AetherConfiguration.

Registration:

MELDER KERNEL - guarded. Obtained through Aether.create_configuration_builder().

Subsystem Context:

The fluent front for AetherConfiguration, matching the builder pairing used by every other configuration lane in the system.

System Context:

ONE-SHOT MEANS OWNERSHIP TRANSFERS. The builder owns one mutable configuration during assembly and hands it off exactly once; after build() / finalize() / activate() it has surrendered it and is not a factory that stamps out more. That is what makes ownership unambiguous - at every moment exactly one object is responsible for the configuration, and there is never a window where both the builder and the caller could mutate it.

AGENT_ACCESS: public

AGENT_PURPOSE:

access: public. Fluent one-shot builder for AetherConfiguration. Assemble, then build()/finalize()/activate() - ownership transfers on that call and the builder is spent. Obtain via Aether.create_configuration_builder().

cleanup() → None[source]๏ƒ

Idempotently cleanup the builder and any still-owned configuration.

Contract:

  • IDEMPOTENT and OWNERSHIP-AWARE: it cleans the wrapped configuration ONLY IF build() has not already handed it to a caller. Cleaning a builder you never built therefore DESTROYS the configuration; cleaning one you did build leaves the caller's configuration intact.

Threading:

State transitions are applied under the configuration lock.

Lifecycle / Cleanup:

Guarded by check_cleaned().

Raises:

RuntimeError -- If the configuration has been cleaned.

Returns:

None.

with_defaults() → AetherConfigurationBuilder[source]๏ƒ

Apply the default Aether logger policy.

Contract:

  • Delegates to the wrapped configuration and returns the BUILDER, not the configuration - the chain stays at the builder layer.

  • Overwrites anything set earlier, so call it first.

Threading:

State transitions are applied under the configuration lock.

Lifecycle / Cleanup:

Guarded by check_cleaned().

Raises:

RuntimeError -- If the configuration has been cleaned.

Returns:

This builder.

Return type:

AetherConfigurationBuilder

with_channel_logger_activation_enabled(enabled: bool) → AetherConfigurationBuilder[source]๏ƒ

Set the automatic channel logger activation flag.

Contract:

  • Delegates to the wrapped configuration and returns the BUILDER.

  • Refused once the wrapped configuration is frozen.

Threading:

State transitions are applied under the configuration lock.

Lifecycle / Cleanup:

Guarded by check_cleaned().

Raises:

RuntimeError -- If the configuration has been cleaned.

Returns:

This builder.

Return type:

AetherConfigurationBuilder

Parameters:

enabled -- True to let the utility system activate provider-backed channel loggers. Disabled by default so importing melder never activates logging.

with_channel_logger_resolver(resolver: Callable[[...], Any] | None) → AetherConfigurationBuilder[source]๏ƒ

Set the channel logger resolver.

Contract:

  • Delegates to the wrapped configuration and returns the BUILDER.

  • None clears the resolver.

Threading:

State transitions are applied under the configuration lock.

Lifecycle / Cleanup:

Guarded by check_cleaned().

Raises:

RuntimeError -- If the configuration has been cleaned.

Returns:

This builder.

Return type:

AetherConfigurationBuilder

Parameters:

resolver -- Callable the utility system will use to obtain channel loggers. Recorded as a presence flag only - the record never carries code.

with_default_logger(logger: Logger | None) → AetherConfigurationBuilder[source]๏ƒ

Set the stdlib fallback logger.

Contract:

  • Delegates to the wrapped configuration and returns the BUILDER.

  • None clears the default logger.

Threading:

State transitions are applied under the configuration lock.

Lifecycle / Cleanup:

Guarded by check_cleaned().

Raises:

RuntimeError -- If the configuration has been cleaned.

Returns:

This builder.

Return type:

AetherConfigurationBuilder

Parameters:

logger -- Fallback logger object used when no channel resolver answers.

build() → AetherConfiguration[source]๏ƒ

Finalize and transfer ownership of the wrapped configuration.

Contract:

  • ONE-SHOT AND CONSUMING. It finalizes the configuration, transfers ownership to the caller, and then CLEANS THIS BUILDER. The builder is dead afterwards and a second build() raises.

  • Ownership transfer is the point: after a successful build the caller owns the configuration and the builder will never clean it.

  • Returns a FROZEN configuration, not an activated one - call activate() on the result if it is going live.

Threading:

State transitions are applied under the configuration lock.

Lifecycle / Cleanup:

Guarded by check_cleaned().

Raises:

RuntimeError -- If the configuration has been cleaned.

Returns:

Finalized configuration instance.

Return type:

AetherConfiguration

Topic reference ยท Full contents