Ktanmay21's picture
Repo2RLEnv: add 15 tasks
f50dbbb verified

Issue

Title: [v2] Implement LazyCommand for deferring modules until their commands are invoked, and make PrefixTrie public

Description

Issue #, if available:

  • Contributes to #9011.

Notes:

  • This PR is part of an ongoing effort to reduce AWS CLI initialization time by lazily deferring plugins until they are needed. This PR makes an existing PrefixTrie implementation public, which will be used in a future PR to efficiently model a plugin event-dependency registry. Also, it implements LazyCommand, which will be used in a future PR to automatically defer plugin imports for plugins that add custom commands to AWS CLI.

Description of changes:

  • Switched PrefixTrie from a private interface to a public interface (i.e. rename _PrefixTrie to PrefixTrie).
  • Implemented unit tests for the PrefixTrie class.
  • Implemented new LazyCommand class, which can wrap CLICommand instances and defer importing or invoking them until the command is called.
  • Implemented unit and functional tests for the LazyCommand class.

Description of tests:

  • Successfully ran all test suites and pre-production build workflow (see GitHub CI).

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 f3bfa35d88a7. 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.