UKGovernmentBEIS / inspect_ai

Inspect: A framework for large language model evaluations
https://inspect.ai-safety-institute.org.uk/
MIT License
627 stars 118 forks source link

Add a test for overwriting a file with write_file #858

Closed art-dsit closed 4 days ago

art-dsit commented 4 days ago

This PR contains:

What is the current behavior? (You can also link to an open issue here)

It wasn't clear whether write_file should allow an existing file to be overwritten.

What is the new behavior?

It should be allowed, as long as the sandbox user would be allowed to. I've added a test to clarify.

Does this PR introduce a breaking change? (What changes might users need to make in their application due to this PR?)

Other information:

Original discussion https://inspectcommunity.slack.com/archives/C0805HJTK8U/p1731645089944059