harbor run -t openthoughts/tasktrove-exp-flat25-subtle-debug-v3-5k-subtle-3259harbor download openthoughts/tasktrove-exp-flat25-subtle-debug-v3-5k-subtle-3259Note: The workspace contains a partially broken implementation at /app/starter_code.py. The agent must fix the bugs and complete the implementation.
Task: Implement the cookiecutter.prompt module to render and collect configuration data according to the provided tests.
What to implement (functionality and behavior)
render_variable(env, raw_var, context)
prompt_for_config(context, no_input=False)
prompt_choice_for_config(cookiecutter_dict, env, key, options, no_input)
read_user_variable(var, default)
read_user_choice(var, options)
read_user_dict(var, default)
Contextual requirements the implementation must satisfy (mapped to tests)
render_variable must produce:
prompt_for_config must:
prompt_choice_for_config must:
Undefined variable handling: Rendering a template that references an undefined variable should raise exceptions.UndefinedVariableInTemplate with message "Unable to render variable 'foo'" and context equal to the provided context.
Self-contained deliverable
Notes
Deliverable: A corrected and complete implementation of the cookiecutter.prompt module (located in /app/starter_code.py or integrated accordingly) that passes the described tests.