Skip to content

test: add backwards compatibility test for step handlers without Context parameter#82

Merged
blindzero merged 2 commits intoissues/77-architecture-provider-authentication-session-brokerfrom
copilot/sub-pr-81
Jan 17, 2026
Merged

test: add backwards compatibility test for step handlers without Context parameter#82
blindzero merged 2 commits intoissues/77-architecture-provider-authentication-session-brokerfrom
copilot/sub-pr-81

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Jan 16, 2026

Summary

Adds test coverage for the backwards compatibility logic that allows step handlers to omit the Context parameter.

Motivation

The backwards compatibility implementation in Invoke-IdlePlanObject.ps1 (lines 376-379) conditionally passes the Context parameter only when handlers support it, but no test validated this with a handler that actually omits Context.

Type of Change

  • Bug fix
  • New feature
  • Breaking change
  • Documentation update
  • Refactoring / internal improvement

Changes

  • Added Invoke-IdleTestLegacyStep test handler that only accepts $Step (no $Context)
  • Added test "supports step handlers without Context parameter (backwards compatibility)" that validates execution with legacy handler signature
  • Added cleanup for new test handler in AfterAll block

Testing

  • Unit tests
  • Contract tests
  • Manual testing

How to test & review

Run Invoke-Pester -Path ./tests/Invoke-IdlePlan.Tests.ps1 and verify the new test passes. The test validates that:

  1. Legacy handlers without Context parameter can be invoked
  2. The engine completes successfully without attempting to pass Context
  3. Step result is returned with expected status

Checklist

  • Code follows STYLEGUIDE.md
  • Tests added or updated
  • Documentation updated
  • No UI/auth logic added to IdLE.Core
  • No breaking changes without discussion

Related Issues

Addresses feedback on PR #81: #81 (comment)


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

…ext parameter

Co-authored-by: blindzero <13959569+blindzero@users.noreply.github.com>
@blindzero blindzero marked this pull request as ready for review January 16, 2026 23:59
Copilot AI changed the title [WIP] Update AuthSessionBroker acquisition in ExecutionContext PR test: add backwards compatibility test for step handlers without Context parameter Jan 16, 2026
Copilot AI requested a review from blindzero January 16, 2026 23:59
@blindzero blindzero merged commit 42cbcc7 into issues/77-architecture-provider-authentication-session-broker Jan 17, 2026
5 checks passed
@blindzero blindzero deleted the copilot/sub-pr-81 branch January 18, 2026 11:01
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.

2 participants