Add GitHub Action to detect Parameter Group version increment issues #11272
+430
−0
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
User description
Summary
Add automated CI check that detects when parameter group structs are modified without incrementing the version number. This prevents settings corruption issues like the one highlighted in PR #11236.
Changes
.github/scripts/check-pg-versions.sh- Detection script that analyzes git diffs.github/workflows/pg-version-check.yml- GitHub Actions workflow.github/workflows/README.md- Documentation for all workflowsHow It Works
PG_REGISTERentriesDetection Logic
The script:
PG_REGISTERlinestypedef structdefinitionsComment Behavior
Example Scenarios
Scenario 1: Field removed without version increment ✅ Detects
Result:⚠️ Comment posted explaining the issue
Scenario 2: Field removed with proper version increment ✅ No comment
Result: ✅ No comment (correct behavior detected)
Scenario 3: Only PG_RESET_TEMPLATE defaults changed ✅ No comment
Result: ✅ No comment (struct layout unchanged)
Why This Matters
When PG struct layout changes without version increment:
pgLoad()sees matching versions (4==4) and copies old EEPROM dataWith version increment (4→5):
pgLoad()detects version mismatchReferences
Related Work
This automation follows the PG system documentation created in PR #11271.