Add AGENTS.md with guidance for updating libddwaf - #205
Conversation
Documents the two-source-of-truth version pinning (submodule vs libddwafVersion in CI), the silent-failure risk of hardcoded string keys in the JNI result/diagnostics parsing, and the step-by-step checklist derived from cross-referencing prior update PRs.
|
🎯 Code Coverage (details) 🔗 Commit SHA: 2fb4917 | Docs | Datadog PR Page | Give us feedback! |
Broaden the file beyond the libddwaf-update task so it's useful as the repo's general agent entry point, and replace hardcoded line numbers with grep patterns so the checklist doesn't go stale as files change.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 05813e8c2c
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
- The -PlibddwafConfig example pointed at a .cmake file path; the property is actually a directory (build.gradle's cmakeNativeLibDebug appends /libddwaf-config-debug.cmake to it). - TestsPass does not fan in Coverage or ClangFormat; correct the actual needs chain (Test, Dev_Tests, Jmh_Build, Spotless, Jar_File_Stage_build_jar -> all Native_binaries_Stage_* incl. ASan/static analyzer).
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e816ba3f40
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Codex review on PR #205 flagged that plain ./gradlew check does not cover the GC race regression (APPSEC-62784) exercised by the Alpine JDK 21/25 CI matrix, since ReachabilityFenceTest is excluded from the standard test task and only wired into check via -PuseZGC.
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 4f5243d41e
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Codex review on PR #205 flagged that on a fresh checkout without --recurse-submodules, libddwaf/ is empty and not a git repo, so cd libddwaf + git fetch/checkout silently operate on the outer superproject instead. Add git submodule update --init first.
Summary
AGENTS.md: a general entry point for coding agents working in this repo (build/format/test commands, branch/PR conventions, doc-vs-code precedence rule), plus a detailed checklist for the recurring task of bumping the bundled libddwaf version.build.gradle,.github/workflows/actions.yml, JNI bridge) against the history of prior libddwaf update PRs (Upgrade to libddwaf 1.14.0 #74, Upgrade to libddwaf 1.16.1 #108, Use libddwaf builds #109, Update to libddwaf 1.18.0 #117, Update to libddwaf 1.19.1 #126, Update libddwaf to 1.20.0 #132-Update libddwaf to 1.21.0 #135, Bump to libddwaf 1.22.0 #144, Bump to libddwaf 1.23.0 #158, libddwaf update 1.24.1 #159, Rename classes to better reflect their counterparts in libddwaf #160, Upgrade libddwaf to 1.25.1 #175, Upgrade libddwaf to version 1.26.0 #177, Upgrading libddwaf to 1.28.0 #181, Upgrading libddwaf to 1.28.1 #182, Upgrading libddwaf to 1.29.0 #185, Upgrading libddwaf to 1.30.0 #186), to capture recurring pitfalls that aren't obvious from the code alone (e.g. the two independent version sources of truth, silent failures from hardcoded string keys in the JNI result parsing when libddwaf renames a field).grep-able patterns (e.g.grep -n "libddwafVersion:" .github/workflows/actions.yml) instead of hardcoded line numbers, so the checklist doesn't silently go stale as the referenced files change.Test plan
AGENTS.mdcontent reviewed against the current repo state (Waf.java,build.gradle,.github/workflows/actions.yml,README.md) for accuracy, including the known-PlibddwafDirvs-PlibddwafConfigdoc/code mismatch.TestsPassfan-in,ReachabilityFenceTestexclusion, submodule init) were verified against source and fixed in follow-up commits before merge.