Skip to content

Commit c37ce1b

Browse files
committed
Merge remote-tracking branch 'origin/main' into ci-merge-incremental-build-detect-dependencies
# Conflicts: # .github/workflows/pr-manual-component-test.yml
2 parents 057bc98 + 83af397 commit c37ce1b

278 files changed

Lines changed: 18838 additions & 13857 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/pr-doc-validation.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ on:
2222
- main
2323
paths:
2424
- '**.adoc'
25+
- 'docs/**/*'
2526

2627
concurrency:
2728
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}

.github/workflows/pr-manual-component-test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ jobs:
3838
sparse-checkout: components
3939
sparse-checkout-cone-mode: true
4040
- name: Check Permission
41-
uses: actions-cool/check-user-permission@7b90a27f92f3961b368376107661682c441f6103
41+
uses: actions-cool/check-user-permission@c21884f3dda18dafc2f8b402fe807ccc9ec1aa5e
4242
- name: Retrieve PR sha and ref
4343
id: pr
4444
env:

.mvn/extensions.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
<extension>
99
<groupId>eu.maveniverse.maven.nisse</groupId>
1010
<artifactId>extension</artifactId>
11-
<version>0.7.0</version>
11+
<version>0.8.1</version>
1212
</extension>
1313
<extension>
1414
<groupId>com.gradle</groupId>

AGENTS.md

Lines changed: 109 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,26 @@ These rules apply to ALL AI agents working on this codebase.
4343
Note: `fixVersions` cannot be set on an already-closed issue — set it before closing,
4444
or reopen/set/close if needed.
4545

46+
### PR Description Maintenance
47+
48+
When pushing new commits to a PR, **always update the PR description** (and title if needed) to
49+
reflect the current state of the changeset. PRs evolve across commits — the description must stay
50+
accurate and complete. Use `gh pr edit --title "..." --body "..."` after each push.
51+
52+
### PR Reviewers
53+
54+
When creating a PR, **always identify and request reviews** from the most relevant committers:
55+
56+
- Run `git log --format='%an' --since='1 year' -- <affected-files> | sort | uniq -c | sort -rn | head -10`
57+
to find who has been most active on the affected files.
58+
- Use `git blame` on key modified files to identify who wrote the code being changed.
59+
- Cross-reference with the [committer list](https://camel.apache.org/community/team/#committers)
60+
to ensure you request reviews from active committers (not just contributors).
61+
- For component-specific changes, prefer reviewers who have recently worked on that component.
62+
- For cross-cutting changes (core, API), include committers with broader project knowledge.
63+
- Request review from **at least 2 relevant committers** using `gh pr edit --add-reviewer`.
64+
- When all comments on the Pull Request are addressed (by providing a fix or providing more explanation) and the PR checks are green, re-request review on existing reviewers so that they are aware that the new changeset is ready to be reviewed.
65+
4666
### Merge Requirements
4767

4868
- An agent MUST NOT merge a PR if there are any **unresolved review conversations**.
@@ -56,6 +76,95 @@ These rules apply to ALL AI agents working on this codebase.
5676
- All code must pass formatting checks (`mvn formatter:format impsort:sort`) before pushing.
5777
- All generated files must be regenerated and committed (CI checks for uncommitted changes).
5878

79+
### Asynchronous Testing: Use Awaitility Instead of Thread.sleep
80+
81+
Do **NOT** use `Thread.sleep()` in test code. It leads to flaky, slow, and non-deterministic tests.
82+
Use the [Awaitility](https://github.com/awaitility/awaitility) library instead, which is already
83+
available as a test dependency in the project.
84+
85+
**Example — waiting for a route to be registered:**
86+
87+
```java
88+
import static org.awaitility.Awaitility.await;
89+
90+
await().atMost(20, TimeUnit.SECONDS)
91+
.untilAsserted(() -> assertEquals(1, context.getRoutes().size()));
92+
```
93+
94+
**Rules:**
95+
96+
- New test code MUST NOT introduce `Thread.sleep()` calls.
97+
- When modifying existing test code that contains `Thread.sleep()`, migrate it to Awaitility.
98+
- Always set an explicit `atMost` timeout to avoid hanging builds.
99+
- Use `untilAsserted` or `until` with a clear predicate — do not replace a sleep with a
100+
busy-wait loop.
101+
102+
### Issue Investigation (Before Implementation)
103+
104+
Before implementing a fix for a JIRA issue, **thoroughly investigate** the issue's validity and context.
105+
Camel is a large, long-lived project — code often looks "wrong" but exists for good reasons. Do NOT
106+
jump straight to implementation after reading the issue description and the current code.
107+
108+
**Required investigation steps:**
109+
110+
1. **Validate the issue**: Confirm the reported problem is real and reproducible. Question assumptions
111+
in the issue description — they may be incomplete or based on misunderstanding.
112+
2. **Check git history**: Run `git log --oneline <file>` and `git blame <file>` on the affected code.
113+
Read the commit messages and linked JIRA tickets for prior changes to understand *why* the code
114+
is written the way it is.
115+
3. **Search for related issues**: Search JIRA for related tickets (same component, similar keywords)
116+
to find prior discussions, rejected approaches, or intentional design decisions.
117+
4. **Look for design documents**: Check the `proposals/` directory for design docs (`.adoc` files)
118+
that may explain architectural decisions in the affected area.
119+
5. **Understand the broader context**: If the issue involves a module that replaced or deprecated
120+
another (e.g., `camel-opentelemetry2` replacing `camel-opentelemetry`), understand *why* the
121+
replacement was made and what was intentionally changed vs. accidentally omitted.
122+
6. **Check if the "fix" reverts prior work**: If your proposed change effectively reverts a prior
123+
intentional commit, stop and reconsider. If the revert is still justified, explicitly acknowledge
124+
it in the PR description and explain why despite the original rationale.
125+
126+
**Present your findings** to the operator before implementing. Flag any risks, ambiguities, or cases
127+
where the issue may be invalid or the proposed approach may conflict with prior decisions.
128+
129+
### Knowledge Cutoff Awareness
130+
131+
AI agents have a training data cutoff and may not know about recent releases, API changes, or
132+
deprecations in external projects. **Never make authoritative claims about external project state
133+
based solely on training knowledge.**
134+
135+
- When a JIRA issue, PR, or code references a specific version of an external dependency (e.g.,
136+
Spring Boot 4.0, JUnit 6, Jakarta EE 11), **verify it exists** by checking official sources
137+
(web search, Maven Central, release notes) before questioning or relying on it.
138+
- When implementing or reviewing changes that depend on external project behavior, verify the
139+
current state rather than assuming training data is up to date.
140+
- If uncertain about whether something exists or has changed, say so and verify — do not
141+
confidently assert something is wrong based on potentially stale knowledge.
142+
143+
### Git History Review (When Reviewing PRs)
144+
145+
When reviewing PRs, apply the same investigative rigor:
146+
147+
- Check `git log` and `git blame` on modified files to see if the change conflicts with prior
148+
intentional decisions.
149+
- Verify that "fixes" don't revert deliberate behavior without justification.
150+
- Check for design proposals (`proposals/*.adoc`) related to the affected area.
151+
- Search for related JIRA tickets that provide context on why the code was written that way.
152+
153+
### Documentation Conventions
154+
155+
When writing or modifying `.adoc` documentation:
156+
157+
- **Use `xref:` for internal links**, never external `https://camel.apache.org/...` URLs.
158+
Example: `xref:manual::camel-jbang.adoc[Camel JBang]` instead of
159+
`https://camel.apache.org/manual/camel-jbang.html[Camel JBang]`.
160+
- **Cross-version xref fragments**: When linking to a section anchor (e.g., `#_my_section`) using
161+
the `components::` prefix, verify that the target section exists in the **current released version**,
162+
not just on `main`. The `components::` prefix resolves to the latest released version, so anchors
163+
that only exist on `main` will produce broken links. Either omit the fragment or use a
164+
version-aware reference.
165+
- **When reviewing doc PRs**, check that all `xref:` links and anchors resolve correctly, especially
166+
cross-component references that may span versions.
167+
59168
## Structure
60169

61170
```

0 commit comments

Comments
 (0)