After fixing the concurrency issues, I started working on the features I mentioned initially. I began with the random-consistent-unique mode. I noticed the need for this in my manual review, and as discussed previously, this is definitely something that I think should be available. At the same time, this is implemented as a new mode to preserve previous functionality and runtime behavior.
Before working on this, I set the code agent to write Doxygen comments in a separate PR. This is a common recommendation to allow the agent to work more effectively on the code. This seems to be true, as working with the code agent was a good experience. It dealt well with the structure of the existing code. Basic tasks like defining new parameters were very easy, though admittedly I don’t know if this is also in part due to a good Agents.md configuration present in rsyslog.
Overall, this allowed me to write things faster and was definitely a productivity improvement. It was especially helpful as it reduced the time I would usually take to get familiar with existing code before actually starting work. Documentation was also easy to generate, given that the documentation for previous modes was there as a reference regarding structure and tone.
In the review, the AI also gave a helpful comment. As random-consistent-unique retries until a unique IP is found, this can slow down operation significantly, whether through a deliberate denial of service attack or just by chance. Therefore, Gemini suggested implmenting a retry limit. This seems like a really good plan. I had previously thought about runtime implications, but not about allowing users to manage this trade-off themselves through configuration. However, I don’t want to put too much into one PR for now, so I will leave this as future work for now.