From d131ad9ecc13ecae2adb23ea875cb1342bcf7d5b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Lema=C5=84czyk?= Date: Thu, 2 Oct 2025 22:34:42 +0200 Subject: [PATCH] Instructions for Codex agents updated to cover apply_patch.cs script usage. --- AGENTS.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/AGENTS.md b/AGENTS.md index 37eab0a..402f9ec 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -16,6 +16,17 @@ dotnet build EvenPerfectScanner.sln Run only the tests related to the solution you modify. Always run tests without --no-build parameter to avoid run failures due to missing assembly files. Tests should be always written using XUnit with FluentAssertions. Before executing any tests, make sure their running time is reasonable; skip test suites that are expected to take excessively long. When running tests, always provide both an explicit timeout guard and the Category=Fast filter so that only the fast suite executes. +## Making Changes +To make any changes to the files in the repository, you should always utilize a script created for it to overcome environment / scripting issues with making changes. The script is called apply_patch.cs and has the following syntax: + +`dotnet script apply_patch.cs -- [target-directory]` + +It supports the standard `.diff` patch files as input. You should be able to run it both in the local and remote `Codex` environments. + +If you want to make any changes, create a patch file and run the script to apply it. Always run it from the root directory and reference any modified files with relative paths respectively in the patch. + +Do **not** attempt to apply the changes manually, or with `Python`, or with `PowerShell` scripts, or `cat` or any other way. If you identify any issues with `apply_patch.cs` script, you should propose fixes to resolve them and continue using the script after updates. If you spot any missing, but required features, propose enhancements and continue using the script after updates, too. + ### Test execution time policy - Always estimate runtime before launching any tests or long-running samples. If a test or ad-hoc run is likely to exceed 2 minutes, do not run it unless the user explicitly requests a longer run and provides justification.