Skip to content

Event types: IdLE.<Area>.<Event> naming and Level field (#325) - #345

Merged
blindzero merged 5 commits into
mainfrom
feature/325-event-types
Oct 31, 2026
Merged

blindzero merged 5 commits into
mainfrom
feature/325-event-types

Conversation

@blindzero

Copy link
Copy Markdown
Owner

Closes #325

Summary

Event types now say what happened; the new Level field says how severe it is.

  • Naming: IdLE.<Area>.<Event> for first-party events, <Owner>.IdLE.<Area>.<Event> for extensions (convention). Workflow-defined types (PreconditionEvent.Type, EmitEvent With.Type) are free but must not start with IdLE. (ReservedNamespace).
  • Level: IdLE.Event.Level = Information | Warning | Error. Context.EventSink.WriteEvent(Type, Message, StepName, Data[, Level]): the fifth argument is optional (default Information), so existing callers keep working.
  • Outcome-dependent levels: IdLE.Step.Failed / IdLE.OnFailure.StepFailed -> Error; IdLE.Step.Blocked / IdLE.Step.PreconditionFailed / IdLE.Step.Retrying -> Warning; IdLE.Run.Completed -> Error (Failed), Warning (Blocked); IdLE.OnFailure.Completed -> Warning (PartiallyFailed).
  • Rejected types: Information, Warning, Error, Custom (InvalidEventType), listed in ReservedNamespaces.psd1.
  • PreconditionEvent: type validated at planning time; new optional Level.
  • IdLE.Step.EmitEvent: optional With.Type and With.Level; default type IdLE.Step.EmitEvent.Emitted. An invalid With.Type fails the step at execution (no step-specific plan-time validation of With values exists).

Old -> new

Old New
RunStarted, RunCompleted IdLE.Run.Started, IdLE.Run.Completed
StepStarted, StepCompleted, StepFailed, StepBlocked, StepNotApplicable, StepPreconditionFailed, StepRetrying IdLE.Step.Started, .Completed, .Failed, .Blocked, .NotApplicable, .PreconditionFailed, .Retrying
OnFailureStarted, OnFailureCompleted IdLE.OnFailure.Started, IdLE.OnFailure.Completed
OnFailureStep{Started,Completed,Failed,NotApplicable} IdLE.OnFailure.Step{Started,Completed,Failed,NotApplicable}
DirectorySync{Triggered,Waiting,Poll,Completed,Failed} IdLE.Step.DirectorySync.{Triggered,Waiting,Polled,Completed,Failed}
Information / Warning (PruneEntitlements) IdLE.Step.PruneEntitlements.{Planned,EntitlementRevoked,EntitlementSkipped,KeepGranted,KeepGrantFailed}
Custom (EmitEvent) IdLE.Step.EmitEvent.Emitted or With.Type
Provider.AD.CreateIdentity.AttributesRequested, Provider.AD.EnsureAttribute.AttributeChanged IdLE.Provider.AD.AttributesRequested, IdLE.Provider.AD.AttributeChanged
Provider.ExchangeOnline.Permissions.{Evaluated,Applying,Result} IdLE.Provider.ExchangeOnline.{PermissionsEvaluated,PermissionChanging,PermissionsEnsured}

Breaking changes

  • Event sinks filtering on the old types no longer match (direct cut, no aliases).
  • Code emitting Information, Warning, Error or Custom as event type now throws.
  • Workflow PreconditionEvent.Type values starting with IdLE. fail planning.

Commits

  1. providers: AD / Exchange Online event renames
  2. steps: DirectorySync event renames (+ Error level)
  3. core: Level field, engine renames, validation, EmitEvent/PruneEntitlements, docs/extend/events.md inventory
  4. docs: remaining docs and AGENTS.md 4.3
  5. examples: demo runner

Tests

  • New tests/Core/EventTypes.Tests.ps1 (26 cases): Level defaults, rejected types, WriteEvent with 4 and 5 arguments, engine levels for success/failure/blocked, PreconditionEvent Type/Level validation, EmitEvent With.Type/With.Level, and a sync test that every IdLE.* type emitted in src/ is documented in docs/extend/events.md.
  • Existing tests updated to the new names.

Results: Pester 958 passed / 0 failed; PSScriptAnalyzer no findings; step reference regenerated (only EmitEvent changed).

🤖 Generated with Claude Code

blindzero and others added 5 commits November 1, 2026 00:42
….* (#325)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…325)

Failure events use Level 'Error'.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- IdLE.Event gets a Level field (Information, Warning, Error);
  Context.EventSink.WriteEvent takes an optional fifth Level argument
- Engine events renamed to IdLE.Run.*, IdLE.Step.*, IdLE.OnFailure.*;
  levels follow the outcome (failed -> Error, blocked -> Warning)
- Information, Warning, Error and Custom are rejected as event types
- Workflow-defined event types (PreconditionEvent.Type, EmitEvent With.Type)
  must not use the reserved IdLE. prefix; PreconditionEvent gains Level
- EmitEvent: optional With.Type/With.Level, default IdLE.Step.EmitEvent.Emitted
- PruneEntitlements emits IdLE.Step.PruneEntitlements.* instead of Information/Warning
- docs/extend/events.md lists all event types (type, level, data) and the
  old -> new mapping; a test keeps it in sync with src

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Preconditions, steps, extensibility, DirectorySync provider reference and AGENTS.md 4.3.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 31, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-31T23:44:46.068109Z 2ff911f PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@claude

claude Bot commented Oct 31, 2026

Copy link
Copy Markdown
Contributor

Verdict: PASS — Event renaming and the new Level field are implemented consistently, with validation, docs and tests. No leftover old event types turned up in src, examples or docs.

Findings: no CRITICAL, MAJOR or MINOR findings.

I reviewed the diff and grepped for stale event types. I did not run the Pester tests or the generated-reference check.

@github-actions

Copy link
Copy Markdown

Code Coverage Report

Overall Project 74.95% 🍏

There is no coverage information present for the Files changed

@blindzero
blindzero merged commit 377b426 into main Oct 31, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Event types: naming scheme IdLE.{Area}.{Event} and separate Level field

1 participant