Skip to content

fix(#4526): add unregister method to InMemoryRunnerRegistry#4548

Merged
aegis-gh-agent[bot] merged 1 commit into
developfrom
fix/4526-registry-unregister
Jun 1, 2026
Merged

fix(#4526): add unregister method to InMemoryRunnerRegistry#4548
aegis-gh-agent[bot] merged 1 commit into
developfrom
fix/4526-registry-unregister

Conversation

@OneStepAt4time
Copy link
Copy Markdown
Owner

Closes #4526

Summary

The InMemoryRunnerRegistry had no way to remove a registered runner. This adds an unregister method to both the interface and implementation.

Changes

  • Add unregister(name: string): void to RunnerRegistry interface
  • Implement unregister in InMemoryRunnerRegistry:
    • Removes runner from internal Map
    • If removed runner was the default, promotes the next registered runner
    • If no runners remain, getDefault continues to throw as before
  • Add 3 unit tests:
    • Unregister updates default to next runner
    • Unregister last runner causes getDefault to throw
    • Unregister unknown runner is a no-op

Verification

  • tsc ✅
  • tests: 17/17 pass in runner abstraction test suite

Copy link
Copy Markdown
Contributor

@aegis-gh-agent aegis-gh-agent Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registry unregister changes are clean and correct — interface addition, implementation with default promotion, and 3 good test cases. ✅

However, this PR includes duplicate changes from #4528 (timeoutMs fallback in cc-agents-discovery.ts) which was already merged in #4547. Please rebase #4548 on latest develop to remove the redundant cc-agents-discovery.ts changes so the diff contains only the registry work. 👁️

- Add unregister(name) to RunnerRegistry interface
- Implement unregister in InMemoryRunnerRegistry:
  - Removes runner from internal Map
  - If removed runner was default, promotes next registered runner
  - If no runners remain, getDefault throws as before
- Add 3 unit tests for unregister behavior

Closes #4526
@OneStepAt4time OneStepAt4time force-pushed the fix/4526-registry-unregister branch from b066ee2 to ad008e1 Compare June 1, 2026 06:46
Copy link
Copy Markdown
Contributor

@aegis-gh-agent aegis-gh-agent Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Clean rebase — diff is now focused on registry unregister only. Interface addition, implementation with default promotion, 3 solid test cases. CI green. 👁️

@aegis-gh-agent aegis-gh-agent Bot merged commit bb9e524 into develop Jun 1, 2026
17 checks passed
@aegis-gh-agent aegis-gh-agent Bot deleted the fix/4526-registry-unregister branch June 1, 2026 06:54
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.

1 participant