Skip to content

Add foundational Authority spec model and enums#167

Merged
aidankhogg merged 1 commit into
dev/alphafrom
codex/create-foundational-authority-model-in-spec/core
Jun 30, 2026
Merged

Add foundational Authority spec model and enums#167
aidankhogg merged 1 commit into
dev/alphafrom
codex/create-foundational-authority-model-in-spec/core

Conversation

@aidankhogg

Copy link
Copy Markdown
Contributor

Motivation

  • Introduce a foundational authority primitive to represent who controls spec surfaces and where they originate, enabling later wiring of registry/identity/trust interactions in the spec domain.

Description

  • Add netengine/spec/authority.py defining AuthorityKind, AuthorityScope, and AuthoritySource enums with the requested values and an immutable Pydantic Authority model (fields: id, kind, scope, operator, controls, description: str | None, source defaulting to AuthoritySource.LOCAL).
  • Export Authority, AuthorityKind, AuthorityScope, and AuthoritySource from netengine/spec/__init__.py for package-level access.
  • Add tests/test_authority_spec.py with unit tests validating default source, string-to-enum coercion, and model immutability.

Testing

  • Ran the new unit tests with poetry run pytest tests/test_authority_spec.py and they passed.
  • Ran the spec parsing tests poetry run pytest tests/test_spec_parsing.py tests/test_authority_spec.py and they passed.
  • Ran the full test suite with poetry run pytest and all tests passed (existing tests + new ones: passed, with some tests skipped as in CI).

Codex Task

@aidankhogg aidankhogg self-assigned this Jun 30, 2026
@aidankhogg aidankhogg added the enhancement New feature or request label Jun 30, 2026
@aidankhogg aidankhogg merged commit bb08efc into dev/alpha Jun 30, 2026
@aidankhogg aidankhogg deleted the codex/create-foundational-authority-model-in-spec/core branch June 30, 2026 15:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

codex enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant