Skip to content

fix: switch from rev4 to rev5 in test files - #2116

Merged
degenaro merged 7 commits into
oscal-compass:developfrom
LAKSHJAIN14:fix/switch-from-rev4-to-rev5-clean
Apr 17, 2026
Merged

fix: switch from rev4 to rev5 in test files#2116
degenaro merged 7 commits into
oscal-compass:developfrom
LAKSHJAIN14:fix/switch-from-rev4-to-rev5-clean

Conversation

@LAKSHJAIN14

@LAKSHJAIN14 LAKSHJAIN14 commented Mar 6, 2026

Copy link
Copy Markdown
Contributor

Types of changes

  • Hot fix (emergency fix and release)
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Documentation (change which affects the documentation site)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Release (develop -> main)

Summary

As discussed with @degenaro , this PR fixes a part of #1959

switched from rev4 to rev5 and removed some constants in the /tests/test_utils.py as they were no longer being used anywhere and their equivalent rev5 constants were already there so just wanted to know if there's no problem in that ?

Signed-off-by: LAKSHJAIN14 <jainlaksh07@gmail.com>
@LAKSHJAIN14
LAKSHJAIN14 requested a review from a team as a code owner March 6, 2026 18:22
@LAKSHJAIN14 LAKSHJAIN14 changed the title switching from rev4 to rev5 in test files fix:switching from rev4 to rev5 in test files Mar 6, 2026
@LAKSHJAIN14 LAKSHJAIN14 changed the title fix:switching from rev4 to rev5 in test files fix: switch from rev4 to rev5 in test files Mar 6, 2026
@degenaro

degenaro commented Mar 9, 2026

Copy link
Copy Markdown
Collaborator
degenaro:trestle.laksh$ grep -r rev4 *
tests/data/yaml/bad_component_dup_uuid.yaml:        source: https://github.com/usnistgov/OSCAL/blob/v1.0.0-milestone3/content/nist.gov/SP800-53/rev4/json/NIST_SP-800-53_rev4_catalog.json
tests/data/yaml/bad_component_dup_uuid.yaml:        source: https://github.com/usnistgov/OSCAL/blob/v1.0.0-milestone3/content/nist.gov/SP800-53/rev4/json/NIST_SP-800-53_rev4_catalog.json
tests/data/yaml/bad_component_no_tz.yaml:        source: https://github.com/usnistgov/OSCAL/blob/v1.0.0-milestone3/content/nist.gov/SP800-53/rev4/json/NIST_SP-800-53_rev4_catalog.json
tests/data/yaml/bad_component_no_tz.yaml:        source: https://github.com/usnistgov/OSCAL/blob/v1.0.0-milestone3/content/nist.gov/SP800-53/rev4/json/NIST_SP-800-53_rev4_catalog.json
tests/data/yaml/good_component.yaml:        source: https://github.com/usnistgov/OSCAL/blob/v1.0.0-milestone3/content/nist.gov/SP800-53/rev4/json/NIST_SP-800-53_rev4_catalog.json
tests/data/yaml/good_component.yaml:        source: https://github.com/usnistgov/OSCAL/blob/v1.0.0-milestone3/content/nist.gov/SP800-53/rev4/json/NIST_SP-800-53_rev4_catalog.json
tests/data/yaml/good_component_diff_tz.yaml:        source: https://github.com/usnistgov/OSCAL/blob/v1.0.0-milestone3/content/nist.gov/SP800-53/rev4/json/NIST_SP-800-53_rev4_catalog.json
tests/data/yaml/good_component_diff_tz.yaml:        source: https://github.com/usnistgov/OSCAL/blob/v1.0.0-milestone3/content/nist.gov/SP800-53/rev4/json/NIST_SP-800-53_rev4_catalog.jso

@LAKSHJAIN14

Copy link
Copy Markdown
Contributor Author

@degenaro Well in these files , these source links are not used to load any file or anything, it acts as metadata documenting the origin of the data, like these implemented requirements were defined against this catalog.

I don't think we need to change anything there.

@degenaro

degenaro commented Mar 9, 2026

Copy link
Copy Markdown
Collaborator

@LAKSHJAIN14 Unless there is a compelling reason to keep rev4 remnants, we should expunge. We want to present a modern and up-to-date posture. Please do check for other rev4 references I may have missed. Thx!

@LAKSHJAIN14

Copy link
Copy Markdown
Contributor Author

@degenaro for these test files, the source URL used here tells us which catalog the implemented-requirements were mapped against so if we change it to rev5 then the test data would also have to change accordingly so it maps to the rev5 catalog, Which I don't think is necessary here.

And yeah I couldn't find any other rev4 references other than these.

@degenaro

Copy link
Copy Markdown
Collaborator

@LAKSHJAIN14 As discussed at community meeting please make updates to remove these references. Thx!

@LAKSHJAIN14

Copy link
Copy Markdown
Contributor Author

I looked at the test functions in which those test files were being used and its just checking if trestle can successfully parse and validate a comp def file or not so the control ids and source URL doesn't really matter to it so we could just change the source URL to rev5 one and it wouldn't really affect the test,

but if we have to actually change the test data to be mapped against rev5 controls ,It would require a lot of manual work to convert this to that,It would rather be a good option if you have an existing test data which is already mapped according to rev5 controls then maybe we could make the changes in that accordingly.
As I can't seem to find one in the current test data which is there.

@degenaro

@degenaro

Copy link
Copy Markdown
Collaborator

@LAKSHJAIN14 Yes, there is some work involved with converting from rev4 to rev5. Do you have an example of one that you are having trouble with?

@degenaro

Copy link
Copy Markdown
Collaborator

AI should be able to help with: change the test data to be mapped against rev5 controls. Thx!

@LAKSHJAIN14

Copy link
Copy Markdown
Contributor Author

Yeah Ig I would do that, I thought you might have an existing test data that was mapped to rev5

Signed-off-by: LAKSHJAIN14 <jainlaksh07@gmail.com>
@LAKSHJAIN14

Copy link
Copy Markdown
Contributor Author

@degenaro
Have made the changes in the test data to be mapped against rev 5 controls USING AI and also changed the source URL to point at the rev5 catalog

Also the bad_component_dup_uuid.yaml file is not being used in any test or anything so its a dead data like I mentioned in #2142 so do tell me if we want that file to be removed.

@degenaro

Copy link
Copy Markdown
Collaborator

@LAKSHJAIN14 Looks mostly good. Lower case seems correct for the labels, but why are the parts dropped such as .a, .b?

image

@degenaro

Copy link
Copy Markdown
Collaborator

Also the bad_component_dup_uuid.yaml file is not being used in any test or anything so its a dead data like I mentioned in #2142 so do tell me if we want that file to be removed.

Yes, if not used it should be deleted. Thx!

@degenaro

Copy link
Copy Markdown
Collaborator

@vikas-agarwal76 Could you comment of the ac-8 vs. ac-8.a? (Are part controls?)

@degenaro degenaro mentioned this pull request Apr 16, 2026
6 tasks

@vikas-agarwal76 vikas-agarwal76 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@degenaro
degenaro merged commit 64639b0 into oscal-compass:develop Apr 17, 2026
16 checks passed
@degenaro degenaro mentioned this pull request Apr 18, 2026
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