original.py reads the merge validate level from env (MERGE_VALIDATE, e.g. one_to_one) and attempts to merge two frames with that strictness. On success it returns the merged records; on MergeError it returns ok=False with empty rows.
Your task
Port the workflow to Modal. The remote function must read MERGE_VALIDATE from its env.
Expose the workflow as a single Modal remote function: define run_case as an @app.function so the harness can invoke it with run_case.remote(case).
The solution must also use:
Secrets.
Required solution interface
Write the solution in /app/solution/modal_app.py. Define a Modal application
object named app and expose a callable named run_case that accepts one case
dictionary and returns a JSON-serializable result matching the original
workflow.
Runtime file layout
The finalized task workspace is copied into /app when the sandbox starts.
Source files from environment/workspace are available at paths such as
/app/workflow.py, /app/original_workflow.py, /app/original.py, or other
task-specific filenames.