Repository navigation
Review follow up: Map missing STIX rules and let the field set the category - #111
Open
Lespernater wants to merge 5 commits into
Open
Lespernater wants to merge 5 commits into
Lespernater wants to merge 5 commits into
Conversation
This branch has not been deployed
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
This follows up on the review comments on #85 and goes into
feat/phix-issue-types,mainis already merged into that branch.What changes
other.POSTAL_CODE_US_ZIPandPO_BOX_NUMBER_FORMATare nowaddress, andXML_PARSE_OR_NAMESPACEisfile-structure.<FIELD>_ALLOWED_VALUErules and three rules without a label. A new rule that is in none of those lists still falls toother.CATEGORY_LABELSinstead of a copied list, and a second test checks that every category exceptotheris used.REQUIRED_FIELD,FIELD_LENGTH,FREE_TEXT_*,PHIX_REQUIRED_FIELDandPHIX_FIELD_LENGTH. Each finding still has exactly one category.Nothing reads
categoryyet, so the page looks the same. Thoughfeat/phixwas used for guiding the header-based category matching.How the field sets the category
addressProvincecontactmetadataSchoolNumber,SchoolNameidentityOENdateBirthDatevaccineClassand coded fieldsCoded fields have no group on purpose: an empty code is
requiredand an unlisted code iscoded-value.Provincefollows that rule too, becausePROVINCE_ALLOWED_VALUEis alreadycoded-value.Effect on subtotals
REQUIRED_FIELDrows forFirstName,LastNameandGenderstayrequired, and so do the guardian rules. A missingBirthDatemoves todate.addressgains info-levelFREE_TEXT_*findings, for example an accent in a street name. Severity and fixes are unchanged, so dashboard should not present those as errors.Questions:
feat/phixat4488d5e. The PHIX part is unit-tested only, because there is no PHIX workflow on this branch.Commit-wise for flexibility to be reverted
7377fde7377fde 829ca2d7377fde 829ca2d 093566dRevert newest first, in the order shown. Reverting an earlier commit on its own conflicts.
npm run lint,npm run typecheckand the unit tests pass on the code each row leaves. Preferable to merge without squashing, so that these commits stay separate.Related issue
Follow-up to #85.
Testing
npm run checkmkdocs build --strict(when documentation changes)Run on a clean copy of
7377fdewith Node 24: lint has 0 errors, 400 unit tests pass and the build passes. I also broke the code on purpose to confirm that the new tests fail, for example by removing a mapping or movingProvince. However, Playwright e2e tests were not run locally.Documentation and visuals
docs/validation-rules.mdhas the new category rules. There are no visible UI changes.Checklist