feat(ci,config): add comment coverage gate for reference.conf#32
feat(ci,config): add comment coverage gate for reference.conf#32bladehan1 wants to merge 1 commit into
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
2 issues found across 3 files
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name=".github/scripts/check_reference_comments.py">
<violation number="1" location=".github/scripts/check_reference_comments.py:20">
P2: The key-line regex is too narrow for valid HOCON key syntax (e.g., hyphenated/quoted keys and `+=`), which can create false negatives in the coverage gate.</violation>
<violation number="2" location=".github/scripts/check_reference_comments.py:107">
P2: The genesis exemption misses equivalent nested HOCON syntax (`genesis { block { ... } }`), causing false comment-coverage failures for exempt keys.</violation>
</file>
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
cf4f06b to
74d4ceb
Compare
668bf63 to
55696dc
Compare
Add check_reference_comments.py, a line-oriented Python script that enforces every key in reference.conf carries an inline or immediately- preceding comment. Wire it into pr-check.yml as a new CI step directly after the existing key-format gate. Annotate all previously undocumented keys in reference.conf with inline # / // comments. The committee block now includes the /wallet/getchainparameters API key name and ProposalType ID for each governance parameter. genesis.block array elements (assets, witnesses) carry field-level inline comments derived from the existing block descriptions; there is no genesis.block exemption.
55696dc to
0b9c4ca
Compare
What does this PR do?
Adds a comment-coverage CI gate for `reference.conf` and annotates all previously undocumented configuration keys.
Changes
`.github/scripts/check_reference_comments.py` (new, 358 lines, zero runtime dependencies)
`.github/workflows/pr-check.yml` (+6 lines)
`common/src/main/resources/reference.conf`
Why are these changes required?
`reference.conf` is the primary configuration reference for node operators. Before this change most keys had no explanation, forcing operators to read source code. There was no CI enforcement either, so new keys could be merged without documentation.
This PR has been tested by:
Extra details