Skip to content

docs: scope agent validation commands#2247

Open
pawelchcki wants to merge 2 commits into
mainfrom
optimize_agents.md
Open

docs: scope agent validation commands#2247
pawelchcki wants to merge 2 commits into
mainfrom
optimize_agents.md

Conversation

@pawelchcki

@pawelchcki pawelchcki commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

Basically the default AGENTS.md cause a lot of full rebuilds on every checkpoint. The updated AGENTS.md teaches the agents to only rerun validations to actualy modified creates.

At a risk of skipping some downstream crates. Which in either way will still be caught by the CI

Summary

  • scope the default Clippy and nextest commands to affected crates
  • reserve workspace-wide build and test commands for repo-wide changes
  • make doc tests conditional on documentation, example, or public API changes

Why

The previous guidance required several exhaustive workspace checks for routine crate-level changes. This keeps validation proportional to the change while retaining workspace coverage for repo-wide work.

Validation

  • git diff --check

@pawelchcki
pawelchcki requested a review from a team as a code owner July 17, 2026 00:04
@pr-commenter

pr-commenter Bot commented Jul 17, 2026

Copy link
Copy Markdown

Benchmarks

Comparison

Candidate

Candidate benchmark details

Baseline

Baseline benchmark details

@datadog-prod-us1-6

datadog-prod-us1-6 Bot commented Jul 17, 2026

Copy link
Copy Markdown

🎯 Code Coverage (details)
Patch Coverage: 100.00%
Overall Coverage: 74.60% (-0.02%)

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: 63cba10 | Docs | Datadog PR Page | Give us feedback!

@pawelchcki pawelchcki added documentation Improvements or additions to documentation AI Generated PR largely written by AI tools labels Jul 17, 2026
@pawelchcki

Copy link
Copy Markdown
Contributor Author

Hey @codex will this changes improve iteration speed with local agents?

@chatgpt-codex-connector

Copy link
Copy Markdown

Yes — these AGENTS.md changes should improve iteration speed for local agents.

Why

  • The guidance now tells agents to use cargo check -p <crate> during editing instead of defaulting to workspace-wide builds, which should avoid many unnecessary rebuilds for crate-local changes. AGENTS.mdL9-L15
  • Clippy and nextest are now scoped to the touched crate via cargo +stable clippy -p <crate> and cargo nextest run -p <crate>, so routine validation should be proportional to the modified crate rather than the full workspace. AGENTS.mdL17-L27
  • Workspace-wide nextest is still retained, but only for repo-wide changes, so broader coverage is not removed entirely; it is just no longer the default for every checkpoint. AGENTS.mdL30-L33
  • Doc tests are now conditional on documentation, examples, or public API changes, which should avoid extra validation for purely internal implementation edits. AGENTS.mdL28-L28

Tradeoff

  • The PR body’s stated risk is real: local agents may skip downstream crates that depend on the changed crate. But for local iteration this is usually a good speed/signal tradeoff, assuming CI still runs broader validation before merge.

No code changes made

  • I did not create a follow-up PR because the trigger was a question, and I did not need to modify the codebase.
  • I also did not touch the existing unrelated working tree change in libdd-trace-normalization/fuzz/Cargo.lock.

Testing / Checks

  • cat AGENTS.md
  • nl -ba AGENTS.md | sed -n '8,38p'
  • git diff --check d7980db..03fa2f2
  • git status --short

View task →

@dd-octo-sts

dd-octo-sts Bot commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

Artifact Size Benchmark Report

aarch64-alpine-linux-musl
Artifact Baseline Commit Change
/aarch64-alpine-linux-musl/lib/libdatadog_profiling.a 86.47 MB 86.47 MB 0% (0 B) 👌
/aarch64-alpine-linux-musl/lib/libdatadog_profiling.so 7.95 MB 7.95 MB 0% (0 B) 👌
aarch64-unknown-linux-gnu
Artifact Baseline Commit Change
/aarch64-unknown-linux-gnu/lib/libdatadog_profiling.so 10.69 MB 10.69 MB 0% (0 B) 👌
/aarch64-unknown-linux-gnu/lib/libdatadog_profiling.a 97.68 MB 97.68 MB 0% (0 B) 👌
libdatadog-x64-windows
Artifact Baseline Commit Change
/libdatadog-x64-windows/debug/dynamic/datadog_profiling_ffi.dll 25.62 MB 25.62 MB 0% (0 B) 👌
/libdatadog-x64-windows/debug/dynamic/datadog_profiling_ffi.lib 89.18 KB 89.18 KB 0% (0 B) 👌
/libdatadog-x64-windows/debug/dynamic/datadog_profiling_ffi.pdb 186.36 MB 186.34 MB -0% (-16.00 KB) 👌
/libdatadog-x64-windows/debug/static/datadog_profiling_ffi.lib 962.77 MB 962.77 MB 0% (0 B) 👌
/libdatadog-x64-windows/release/dynamic/datadog_profiling_ffi.dll 8.38 MB 8.38 MB 0% (0 B) 👌
/libdatadog-x64-windows/release/dynamic/datadog_profiling_ffi.lib 89.18 KB 89.18 KB 0% (0 B) 👌
/libdatadog-x64-windows/release/dynamic/datadog_profiling_ffi.pdb 24.80 MB 24.80 MB 0% (0 B) 👌
/libdatadog-x64-windows/release/static/datadog_profiling_ffi.lib 49.36 MB 49.36 MB 0% (0 B) 👌
libdatadog-x86-windows
Artifact Baseline Commit Change
/libdatadog-x86-windows/debug/dynamic/datadog_profiling_ffi.dll 22.27 MB 22.27 MB 0% (0 B) 👌
/libdatadog-x86-windows/debug/dynamic/datadog_profiling_ffi.lib 90.58 KB 90.58 KB 0% (0 B) 👌
/libdatadog-x86-windows/debug/dynamic/datadog_profiling_ffi.pdb 190.82 MB 190.80 MB -0% (-16.00 KB) 👌
/libdatadog-x86-windows/debug/static/datadog_profiling_ffi.lib 950.99 MB 950.99 MB 0% (0 B) 👌
/libdatadog-x86-windows/release/dynamic/datadog_profiling_ffi.dll 6.48 MB 6.48 MB 0% (0 B) 👌
/libdatadog-x86-windows/release/dynamic/datadog_profiling_ffi.lib 90.58 KB 90.58 KB 0% (0 B) 👌
/libdatadog-x86-windows/release/dynamic/datadog_profiling_ffi.pdb 26.62 MB 26.63 MB +.02% (+8.00 KB) 🔍
/libdatadog-x86-windows/release/static/datadog_profiling_ffi.lib 46.97 MB 46.97 MB 0% (0 B) 👌
x86_64-alpine-linux-musl
Artifact Baseline Commit Change
/x86_64-alpine-linux-musl/lib/libdatadog_profiling.a 77.21 MB 77.21 MB 0% (0 B) 👌
/x86_64-alpine-linux-musl/lib/libdatadog_profiling.so 8.84 MB 8.84 MB 0% (0 B) 👌
x86_64-unknown-linux-gnu
Artifact Baseline Commit Change
/x86_64-unknown-linux-gnu/lib/libdatadog_profiling.a 92.63 MB 92.63 MB 0% (0 B) 👌
/x86_64-unknown-linux-gnu/lib/libdatadog_profiling.so 10.75 MB 10.75 MB 0% (0 B) 👌

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

AI Generated PR largely written by AI tools documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant