Skip to content

🔒 Health — Internal / Authority

📦 Folder Overview

This folder contains internal authority-resolution helpers used by the Health system.

These types support authority lookup and cache invalidation, but they are not public extension seams.


🎯 Purpose

Internal authority helpers exist to:

  • Resolve component-based IHealthAuthority implementations
  • Cache resolved authority per scene
  • Keep HealthSystem free from direct resolution plumbing

🧩 What Lives Here

This folder contains:

  • Internal lookup and caching support
  • Runtime plumbing for authority resolution

It does not contain:

  • Public authority contracts
  • Supported extension points
  • Networking systems

🧩 Components

HealthAuthority

Internal resolver for IHealthAuthority.

Responsibilities:

  • Resolves authority using a context object
  • Caches resolved authority per scene
  • Searches using a fixed precedence
  • Returns only active, enabled binders for runtime use

Resolution model:

  1. Scene cache
  2. Local binder on the context object
  3. Parent hierarchy
  4. Same-scene roots
  5. Global scan (last resort)

Notes:

  • Used when requireAuthority is enabled and no injected resolver is present
  • Inactive binders may be discovered for diagnostics but are not used as active authority
  • Cache entries are invalidated when local binders enable or disable

This is an internal resolver, not an abstraction.


HealthAuthorityCache

Internal gateway for invalidating cached authority state.

Purpose:

  • Avoids exposing resolver implementation details
  • Centralises scene and global invalidation

Behaviour:

  • Invalidates one scene cache entry
  • Or invalidates all cached entries

⚠️ Important Notes

Boundaries

Do not:

  • Depend on these types from gameplay code
  • Build networking logic on top of them
  • Treat them as supported extension points
  • Bypass IHealthAuthority or SetAuthorityResolver using internal helpers

For authority integration, use:

  • IHealthAuthority
  • HealthAuthorityBinder
  • HealthSystem.SetAuthorityResolver(...)

🧠 Usage Guidance

  • Treat this folder as implementation detail
  • Prefer public contracts and injection seams for all integrations
  • Expect internal lookup behaviour to change over time

🚫 Not for Production Use

This folder is not intended as a gameplay integration surface.


  • Health Authority
  • Health Abstractions
  • Health System