Repository navigation
fix(catalog): state the fix in eight catalog check messages - #1284
vchamarthi wants to merge 3 commits into
Conversation
The messages of name-mismatch, name-format, name-missing, description-too-long, script-crlf, link-missing, path-missing and frontmatter-unknown-key said what was wrong and stopped. Each now ends in an imperative fix clause. Codes, levels and JSON keys are unchanged. Refs intel#942 Signed-off-by: vchamarthi <123653452+vchamarthi@users.noreply.github.com>
Signed-off-by: vchamarthi <123653452+vchamarthi@users.noreply.github.com>
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues require changes to the remediation-guidance update.
No open issues 🎉
What changed in this PR
0 new findings; nothing to fix.
This PR improves remediation guidance in catalog check, addressing the message-text portion of issue #942 without changing codes, levels, JSON keys, or exit behavior.
Changes:
- Adds imperative fix clauses to eight mechanical finding messages.
- Adds fix-clause tests and updates two exact-message assertions.
- Records the wording changes in a changelog fragment.
| File | Description |
|---|---|
dokimi/tests/test_catalog_spec_checks.py |
Adds fix-clause checks for all eight affected codes. |
dokimi/tests/test_catalog_path_missing.py |
Updates two assertions to match the expanded guidance. |
dokimi/dokimi/external/validate.py |
Adds remediation guidance for six finding codes. |
dokimi/dokimi/external/script_checks.py |
Recommends replacing CRLF line endings with LF. |
dokimi/dokimi/external/bundle_paths.py |
Recommends adding missing files or correcting paths. |
dokimi/changelog.d/20261126_120000_catalog-finding-fix-clauses.md |
Documents the message-only changes and stable structured fields. |
Review effort: Balanced
|
✅ OpenCodeReview: Review complete: 0 finding(s) across 6 selected item(s). CI at `a3a380e`: 2 cancelled, 19 passing, 4 skipped
Review details
|
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1284 +/- ##
==========================================
- Coverage 96.13% 96.13% -0.01%
==========================================
Files 498 498
Lines 66004 66028 +24
Branches 11461 11461
==========================================
+ Hits 63456 63475 +19
- Misses 1576 1577 +1
- Partials 972 976 +4
🚀 New features to boost your workflow:
|
…y too Renaming only the name, as "rename it to fit" said, turned name-format into a name-mismatch error. Where the name must match the directory the clause now says "rename it and its directory to fit". Signed-off-by: Alexander Rybkin <alexander.rybkin@intel.com>
|
Pushed a3a380e on top of 1fa6fed. I followed each of the eight new messages on a scratch catalog and seven fixes clear their finding; |
Summary
The messages of
name-mismatch,name-format,name-missing,description-too-long,script-crlf,link-missing,path-missingandfrontmatter-unknown-keysaid what was wrong and stopped. Each now ends in an imperative fix clause. This is scenario 1 of #942.Changes
dokimi/external/validate.py,script_checks.pyandbundle_paths.py.tests/test_catalog_path_missing.py, which asserted the oldpath-missingtext.test_mechanical_finding_message_states_the_fixandtest_script_crlf_message_states_the_fixtotests/test_catalog_spec_checks.py.Risk
Only the
messagetext gets longer. Codes, levels and JSON keys are unchanged. Anything matching the old exact wording would need updating; in the repo only the twopath-missingassertions did.Testing
tests/test_catalog_spec_checks.py,test_catalog_path_missing.py,test_catalog_validate.py,test_catalog_validate_scripts.pyandtest_catalog_links.pypass (552 tests), as dotests/test_growth_ratchet.pyandruff checkon the changed files.Open questions
Whether
path/linefields (scenario 2) and thefinding_codesfixtures (scenario 4) should follow in a second change; I left them out to keep this one small.path/lineand the fixtures in the same change (design A): Smallest change; the scenarios are independent. Is that the behaviour you want?Revert
Revert the commit. Nothing is stored and no schema changes.
Checklist
See the boxes below.
pytestpassesruff,mypy, and schema checks passAGENTS.mdraise/exit and test names the doc, contract or issue it traces to.github/.licenserc.yaml)Left for a later change:
pathandlineon findings), scenario 4 (tests/fixtures/finding_codes/and a completeness test) and the fix clause for the other 15 codes.: Design B takes only scenario 1 so the change stays small; these are independent.Checklist evidence
pytestpasses: 2 test file(s) changed; suite: 34020 passed; 1 failing test(s) fail on the base branch too: tests/test_repo_compare_interval.py::test_the_row_p_places_zero_where_large_deltas_round_p_at_zero_apart; 2 of 2 proof(s) fail before the changeruff,mypy, and schema checks pass: passed: ci.yml:static / ruff check, ci.yml:typecheck / mypy, ci.yml:static / schema-check, ci.yml:static / schema_compat vs the PR basefinding-codes.mdlists codes and meanings only.AGENTS.md: nothing left open; mutation of changed lines ranraise/exit and test names the doc, contract or issue it traces to: every new error path and test names a doc, contract or issue.github/.licenserc.yaml): no new source fileRefs #942.