Commit Graph

8 Commits

Author SHA1 Message Date
Riccardo Schirone 7a50b234a6 patcher: small improvements to find_test logic (#912)
* patcher: fix type hints

* patcher: save custom test instructions in redis

* patcher: small improvement to patch_strategy prompt
2025-06-22 16:40:57 +02:00
Riccardo Schirone 49b3fc0824 Make patcher use multiple PoVs (#842)
* patcher: remove cleaned_stacktrace because there's more than one

* patcher: handle multiple PoVs across the various agents
2025-06-13 18:19:54 +02:00
Riccardo Schirone 089adca82d patcher: correctly run povs against the right built challenge (#832)
* CrashDir: store povs in <crash-token>/<sanitizer>

In Redis we were already differentiating between different sanitizers,
however we were storing all PoVs with the same crash-token in the same
directory, indipendently of the sanitizer that triggered the bug.

However, this information is necessary for the patcher that has to
reproduce the PoVs.

* patcher: builds the patch for multiple sanitizers

* tested

* fix Tuple

* Use original challenge only if same san

* fix lint
2025-06-12 15:05:26 -04:00
Riccardo Schirone 81e5950c92 Patcher refactoring (#603)
* patcher: update langgraph dependencies

* patcher: remove 'messages' from State because not used

* patcher: change CodeSnippetKey to use lines instead of IDs

* patcher: improve ContextRetrieverAgent

- use RunnableConfig and PatcherConfig to pass configuration options
  more easily
- make the state serializable, so that we can use CheckPointer to save
  and restore an agent state and get code snippets more easily in case
  of failures
- add tests
- use prebuilt React agent for simplicity
- allow to track lines from a file

* patcher: move all agents to new CodeSnippetKey

* patcher: group patch attempts in a single class

* patcher: remove diff_analysis from state because unused

* patcher: make more use of PatcherConfig

* patcher: add patch description

* patcher: use renamed patch_attempts

* patcher: go back to identifier (random) for CodeSnippets

* patcher: parse stacktrace for initial context

* common: fix parse_stacktrace return type

* patcher: introduce reflection agenta and remove reviewer

* patcher: use structured rootcause analysis

* patcher: paralellize ctx requests

* patcher: have some best-effort json parser for rootcause

* tmp comit

* fix tests

* a few other fixes

* fix lint

* add libxml2 script

* patcher: remove some dead code

* ctx-retriever: use smaller models

* fix tests

* improve initial context

* add comment

* patcher: remove dead code

* fix none access

* other random fixes
2025-05-19 15:13:12 -04:00
Riccardo Schirone 2e11fc5624 common: adapt to new get_rw_copy semantic (#507)
Make sure we do not copy the Challenge Task if --rw is set.
2025-04-30 15:56:14 +02:00
Riccardo Schirone 2475b8e507 Move to use in-container paths (e.g. /src/) (#395)
* disable kythe/graphdb in tests
* fix integration CI
2025-04-16 11:05:44 +02:00
Riccardo Schirone 093e26ec0a common: fallback to delete challenge task dir inside docker (#385)
* common/ChallengeTask: add exec_docker_cmd and use it to clean tmp dirs

* fix typo

* fix run-docker-cmd

* fix tests
2025-04-15 09:47:49 +02:00
Riccardo Schirone 658f9c64c4 patcher: improve context retriever agent (#357) 2025-04-07 12:39:47 +02:00