Issue
Title: [v2] Implement LazyInitEmitter for deferred plugin-loading
Description
Issue #, if available:
- Contributes to
Description of changes:
- Implemented
LazyInitEmitter: an alternative event emitter that lazily loads plugins when events that they depend on are emitted. Whenbuilding-command-table.mainis emitted, if the plugin only adds/removes to the command table, we wrap the command in aLazyCommandwrapper to defer loading the plugin module until the command is invoked or the help docs are generated. - Implemented unit tests for the new
LazyInitEmitter.
Description of tests:
- Successfully ran pre-production build workflow (see Build Internal GH Action).
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
Task
Modify the repository so that the issue described above is resolved. The repository is checked out at base commit b151d1243199. Edit files in place; the verifier captures your changes via git diff and scores them against an oracle patch using SWE-RL-style diff-similarity reward.