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
+13Lines changed: 13 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -437,6 +437,19 @@ table: see [doc/build/JdkUpgrades.md](doc/build/JdkUpgrades.md).
437
437
- All code needs to strive to be lean in terms of resources consumption and easy to follow -
438
438
do not shy away from factoring out self containing code to shorter functions with explicit name
439
439
440
+
## CI / Automation Script Changes
441
+
- Before rewriting or replacing a script invoked from `.gitlab-ci.yml`, `.gitlab/**/*.yml`, or any CI job,
442
+
run `git log -p -- <script>` (or diff against the version being replaced) and enumerate every behavior
443
+
branch it has — fallbacks, env-var-driven paths, error exits. Preserve all of them unless explicitly
444
+
asked to drop one;do not silently narrow behavior while refactoring.
445
+
- Grep the calling `.gitlab-ci.yml` / `.gitlab/**/*.yml`jobsfor how the script is invoked (env vars set,
446
+
exit codes expected) and confirm the rewrite still satisfies every caller, not just the common/local case.
447
+
- When removing an item from a default list or config (an antagonist, a test tag, a feature flag), cite
448
+
the exact file/line proving it is inert or unused in that context before removing it — never remove
449
+
based on assumption alone.
450
+
- After changing a CI-invoked script, run a syntax check (e.g. `bash -n <script>`) and trace through each
451
+
CI job that calls it before considering the change complete.
452
+
440
453
### C/C++ Code Style
441
454
- **Indentation**: Match the exact indentation style of the surrounding code in each file. Do not introduce inconsistent indentation — reviewers will flag it.
442
455
- **Minimal complexity**: Do not split inline logic into separate helper functions unless the helpers are reused or the original is genuinely hard to follow. Unnecessary splits add indirection without value.
0 commit comments