You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: AGENTS.md
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -106,6 +106,7 @@ The native extension is in `ext/` directory and compiled for each Ruby version.
106
106
107
107
- We use Ruby 2.7 syntax
108
108
- Use exceptions for exceptional cases, not for control flow.
109
+
- Instrumentation must never raise its own errors into customer test processes. Log internal failures at warn or error level and degrade gracefully instead.
109
110
- Implement proper error logging and user-friendly messages.
110
111
- Do not use `instance_variable_set` or `instance_variable_get`; add explicit APIs instead.
111
112
@@ -130,6 +131,7 @@ The native extension is in `ext/` directory and compiled for each Ruby version.
130
131
131
132
- All changes should be covered by corresponding tests
132
133
- Place tests in the `spec/datadog/ci` folder
134
+
- Never monkey-patch production code in tests. Do not use techniques such as `prepend`, reopening production classes or modules, or replacing production singleton methods; exercise production code through its normal interfaces instead.
133
135
- Do not use `instance_variable_set` or `instance_variable_get` in tests; use mocking or explicit APIs when needed
134
136
- Do not make changes to `release_gem_spec.rb` if not asked
135
137
- Do not use focused tests feature (fit, fdescribe)
0 commit comments