SIP338 Remove schema version from restart.c#341
Open
re2zero wants to merge 2 commits into
Open
Conversation
Remove RESTART_SCHEMA_VERSION and related validation code. Model version is sufficient for version checking. - Remove RESTART_SCHEMA_VERSION constant - Remove schema version validation in readRestartState - Update header format from 'SIPNET_RESTART 1.0' to 'SIPNET_RESTART' - Remove testSchemaMismatchFails test - Update documentation Fixes PecanProject#338
Contributor
There was a problem hiding this comment.
Pull request overview
Removes the dedicated restart “schema version” from SIPNET restart checkpoints, relying on the model numeric version and existing schema-layout guards for compatibility checking.
Changes:
- Simplify restart checkpoint header from
SIPNET_RESTART 1.0toSIPNET_RESTARTand remove schema-version validation. - Update restart MVP tests to reflect the new header and drop the schema-version mismatch test.
- Update restart checkpoint documentation and note the change in the Unreleased changelog.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| src/sipnet/restart.c | Removes RESTART_SCHEMA_VERSION, drops schema-version parsing/validation, updates header write format. |
| tests/sipnet/test_restart_infrastructure/testRestartMVP.c | Updates expected header and removes schema-version mismatch test coverage. |
| docs/developer-guide/restart-checkpoint.md | Updates restart checkpoint spec/docs to remove schema version references and reflect new header. |
| docs/CHANGELOG.md | Records the restart checkpoint format change under Unreleased “Removed”. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
3 tasks
- Replace sscanf-based header parsing with exact strcmp against RESTART_MAGIC, rejecting any trailing content after the magic string - Run clang-format to fix formatting issues in _Static_assert and logError lines, resolving cpp-linter check failure Signed-off-by: re2zero <yangwu@uniontech.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Remove RESTART_SCHEMA_VERSION and related validation code. Model version is sufficient for version checking.
Changes:
How was this change tested?
Related issues
Checklist
docs/CHANGELOG.mdupdated with noteworthy changesclang-format(rungit clang-formatif needed)