Testing with agent shows that they are creative and sometimes ignoring instructions.
We had these cases:
- Cursor running
ramenctl validate application for 2 application in parallel. This overload the server and make it hard to present test results.
- Bob running
ramenctl test run and ramenctl test clean in parallel after timeout. This creates lot of mess and may lead to 2 processes writing to the same files.
We cannot ensure this does not happen with both agents (ignore instructions) and humans (do not read instructions). The safe way is to ensure that one command is using the output directory at the same time with a lock file.
Locking the output directory
Right after crating the output directory, the command can take an exclusive lock on the directory. Starting second command will fail with a clear message without modifying any file.
Safe commands (e.g. test progress #459) do not ned to take a lock since they do not modify the output directory.
Implementation
lima-vm lockutil uses lock on a directory in a portable way:
Testing with agent shows that they are creative and sometimes ignoring instructions.
We had these cases:
ramenctl validate applicationfor 2 application in parallel. This overload the server and make it hard to present test results.ramenctl test runandramenctl test cleanin parallel after timeout. This creates lot of mess and may lead to 2 processes writing to the same files.We cannot ensure this does not happen with both agents (ignore instructions) and humans (do not read instructions). The safe way is to ensure that one command is using the output directory at the same time with a lock file.
Locking the output directory
Right after crating the output directory, the command can take an exclusive lock on the directory. Starting second command will fail with a clear message without modifying any file.
Safe commands (e.g. test progress #459) do not ned to take a lock since they do not modify the output directory.
Implementation
lima-vm lockutil uses lock on a directory in a portable way: