Skip to content

Conversation

@arthurscchan
Copy link
Contributor

@arthurscchan arthurscchan commented Apr 10, 2025

This PR initialis the LLM approach for automatic build script generation of C/C++ projects. This is done by adding a separate path for the new LLM agent. Adding an extra flag --agent could trigger the new LLM agent flow for automatic build script generation.

@arthurscchan arthurscchan marked this pull request as ready for review April 10, 2025 19:44
@arthurscchan arthurscchan marked this pull request as draft April 11, 2025 19:16
@arthurscchan arthurscchan marked this pull request as ready for review April 11, 2025 20:15
@arthurscchan arthurscchan marked this pull request as draft April 14, 2025 10:21
@arthurscchan arthurscchan force-pushed the llm-build-script-generation branch from b06fe30 to 9c24a86 Compare April 14, 2025 20:22
@arthurscchan arthurscchan marked this pull request as ready for review April 15, 2025 23:07
@arthurscchan arthurscchan force-pushed the llm-build-script-generation branch from de9f9af to 6c2a665 Compare April 16, 2025 11:26
Signed-off-by: Arthur Chan <arthur.chan@adalogics.com>
Signed-off-by: Arthur Chan <arthur.chan@adalogics.com>
Signed-off-by: Arthur Chan <arthur.chan@adalogics.com>
Signed-off-by: Arthur Chan <arthur.chan@adalogics.com>
@arthurscchan arthurscchan force-pushed the llm-build-script-generation branch from 50509b3 to ee5c775 Compare April 17, 2025 10:47
Signed-off-by: Arthur Chan <arthur.chan@adalogics.com>
Signed-off-by: Arthur Chan <arthur.chan@adalogics.com>
Signed-off-by: Arthur Chan <arthur.chan@adalogics.com>
Signed-off-by: Arthur Chan <arthur.chan@adalogics.com>
@arthurscchan
Copy link
Contributor Author

/gcbrun skip

Signed-off-by: Arthur Chan <arthur.chan@adalogics.com>
@arthurscchan arthurscchan force-pushed the llm-build-script-generation branch from f22ec69 to 509835c Compare April 17, 2025 20:14
@arthurscchan
Copy link
Contributor Author

/gcbrun skip

Copy link
Contributor

@DavidKorczynski DavidKorczynski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks great for a start. I think we should make sure to give the agent more control of the environment in the near future.

@DavidKorczynski DavidKorczynski merged commit 9347810 into main Apr 18, 2025
6 checks passed
@DavidKorczynski DavidKorczynski deleted the llm-build-script-generation branch April 18, 2025 22:37
DavidKorczynski added a commit that referenced this pull request Apr 21, 2025
#979 caused issues when using
`oss-fuzz-generator` from the installed package, because
`requirements.txt` is not found in the package. Fixing this by avoiding
to copy it in, and just install the library we need.

Signed-off-by: David Korczynski <david@adalogics.com>
AdamKorcz pushed a commit that referenced this pull request Apr 21, 2025
#979 caused issues when using
`oss-fuzz-generator` from the installed package, because
`requirements.txt` is not found in the package. Fixing this by avoiding
to copy it in, and just install the library we need.

Signed-off-by: David Korczynski <david@adalogics.com>
DavidKorczynski pushed a commit that referenced this pull request Apr 23, 2025
Following #979, it was observed that the container tools execute the
generated build script within the Docker image using a single command.
If the **final** command in that script succeeds, the Docker execution
will return an exit code of `0`—even if earlier commands have failed.
This leads to false positives in interpreting the build result.

This PR addresses the issue by prepending `set -e` to the command
sequence passed to the container tool. This ensures the script exits
immediately upon any command failure, preserving the non-zero exit code
to correctly indicate build script failures.

Additionally, this PR improves parts of the prompt templates and refines
the retry-wait logic, resulting in more reliable LLM-driven build script
generation.

---------

Signed-off-by: Arthur Chan <arthur.chan@adalogics.com>
gabe-sherman pushed a commit to FuturesLab/oss-fuzz-gen-plain that referenced this pull request Jan 6, 2026
This PR initialis the LLM approach for automatic build script generation
of C/C++ projects. This is done by adding a separate path for the new
LLM agent. Adding an extra flag --agent could trigger the new LLM agent
flow for automatic build script generation.

---------

Signed-off-by: Arthur Chan <arthur.chan@adalogics.com>
gabe-sherman pushed a commit to FuturesLab/oss-fuzz-gen-plain that referenced this pull request Jan 6, 2026
google#979 caused issues when using
`oss-fuzz-generator` from the installed package, because
`requirements.txt` is not found in the package. Fixing this by avoiding
to copy it in, and just install the library we need.

Signed-off-by: David Korczynski <david@adalogics.com>
gabe-sherman pushed a commit to FuturesLab/oss-fuzz-gen-plain that referenced this pull request Jan 6, 2026
Following google#979, it was observed that the container tools execute the
generated build script within the Docker image using a single command.
If the **final** command in that script succeeds, the Docker execution
will return an exit code of `0`—even if earlier commands have failed.
This leads to false positives in interpreting the build result.

This PR addresses the issue by prepending `set -e` to the command
sequence passed to the container tool. This ensures the script exits
immediately upon any command failure, preserving the non-zero exit code
to correctly indicate build script failures.

Additionally, this PR improves parts of the prompt templates and refines
the retry-wait logic, resulting in more reliable LLM-driven build script
generation.

---------

Signed-off-by: Arthur Chan <arthur.chan@adalogics.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants