[Feature] Expose hierarchy and function-type resolution for function-scoped consumers #5

Open
opened 2026-07-28 18:59:04 +02:00 by zemion · 0 comments
Owner

Outcome

Organizations exposes enough normalized structure for Postbox and other modules to address a function type across organizational units and to evaluate explicitly bounded ancestor/descendant rules without importing organization models.

Existing foundation

organizations.directory already resolves concrete units/functions and can enumerate functions below a unit. Function types and richer hierarchy queries are not yet part of the public Core capability.

Acceptance criteria

  • Add Core-owned refs and capability methods for organization unit types and function types.
  • Resolve concrete functions by function type and unit scope, and units by type/structure scope.
  • Provide tenant-safe batch ancestor/descendant/path resolution with maximum depth and cycle diagnostics.
  • Preserve structure/relation provenance where a tenant has parallel hierarchies; do not assume one universal parent chain for every purpose.
  • Return inactive/missing state explicitly so consumers can explain why an address is unavailable.
  • Emit versioned unit/function/type lifecycle events suitable for directory invalidation.
  • Do not import Postbox or IDM implementations.
  • Tests cover parallel structures, bounded ancestry, moved/deactivated units, function-type matching, and tenant isolation.

Consumer

This is a P1 foundation for function-scoped Postbox templates and bounded parent-copy routing.

## Outcome Organizations exposes enough normalized structure for Postbox and other modules to address a function type across organizational units and to evaluate explicitly bounded ancestor/descendant rules without importing organization models. ## Existing foundation `organizations.directory` already resolves concrete units/functions and can enumerate functions below a unit. Function types and richer hierarchy queries are not yet part of the public Core capability. ## Acceptance criteria - Add Core-owned refs and capability methods for organization unit types and function types. - Resolve concrete functions by function type and unit scope, and units by type/structure scope. - Provide tenant-safe batch ancestor/descendant/path resolution with maximum depth and cycle diagnostics. - Preserve structure/relation provenance where a tenant has parallel hierarchies; do not assume one universal parent chain for every purpose. - Return inactive/missing state explicitly so consumers can explain why an address is unavailable. - Emit versioned unit/function/type lifecycle events suitable for directory invalidation. - Do not import Postbox or IDM implementations. - Tests cover parallel structures, bounded ancestry, moved/deactivated units, function-type matching, and tenant isolation. ## Consumer This is a P1 foundation for function-scoped Postbox templates and bounded parent-copy routing.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: GovOPlaN/govoplan-organizations#5
No description provided.