Skip to content

Comments

MSP spec versioning#11343

Open
xznhj8129 wants to merge 10 commits intoiNavFlight:maintenance-10.xfrom
xznhj8129:msp_versioning
Open

MSP spec versioning#11343
xznhj8129 wants to merge 10 commits intoiNavFlight:maintenance-10.xfrom
xznhj8129:msp_versioning

Conversation

@xznhj8129
Copy link
Contributor

Small (but breaking) change to the MSP spec to include in-file versioning and git rev info elsewhere to get rid of the old, badly thought out checksum/manual rev versioning and reduce conflicts. Also renamed msp_ref.md to README.md (wiki will have to be updated).
msp_messages.json (always manual) now has:

{
  "version": {
      "major": 2,
      "minor": 0,
      "patch": 0
  },
  "messages": { 
      "MSP_API_VERSION": {...

inav_enums.json (auto-generated) now has:

  "build": {
      "fc_version": {
          "major": 9,
          "minor": 0,
          "patch": 0
      },
      "git_revision": "86dc81ba"
  },
  "enums": {
      "accelerationSensor_e": {...

next step after this would probably be to include the scripts in the actual build process for automatic generation, ensuring it always gets the correct enums and defines

sensei-hacker and others added 10 commits January 17, 2026 09:51
…-to-authors

Add Ray Morris (Sensei) to AUTHORS
Create automated check that runs on PRs to detect when parameter group
structs are modified without incrementing the version number. This
prevents settings corruption issues like those seen in PR iNavFlight#11236.

Detection logic:
- Scans changed C/H files for PG_REGISTER entries
- Detects struct typedef modifications in git diff
- Verifies version parameter was incremented
- Posts helpful comment if version not incremented

Files added:
- .github/scripts/check-pg-versions.sh - Detection script
- .github/workflows/pg-version-check.yml - Workflow definition
- .github/workflows/README.md - Workflow documentation

The check is non-blocking (comment only) to avoid false positive build
failures, but provides clear guidance on when versions must be incremented.
Improve PG version check robustness and efficiency per Qodo feedback:

1. Struct detection: Use sed/grep pipeline to better filter comments and
   whitespace, reducing false positives. Isolates struct body boundaries
   more reliably before checking for modifications.

2. File iteration: Use while/read loop instead of for loop to correctly
   handle filenames that contain spaces.

3. Workflow efficiency: Capture script output once and pass between steps
   using GITHUB_OUTPUT multiline strings, eliminating redundant execution.

Changes reduce false positives and improve compatibility while maintaining
the same detection logic.
…check-action

Add GitHub Action to detect Parameter Group version increment issues
Merge Maintenance 9.x to master, mostly for the github workflow
Replace JavaScript template literals with string concatenation to avoid
YAML parser confusion with template literal interpolation syntax.
GitHub Actions YAML parser can misinterpret template literal dollar-brace
syntax as expression delimiters.
…check-action

Fix YAML syntax error in workflow file
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants