Skip to content

fix(catalog): state the fix in eight catalog check messages - #1284

Closed
vchamarthi wants to merge 3 commits into
intel:mainfrom
vchamarthi:issue-942-catalog-check-finding-guidance-source-2
Closed

vchamarthi wants to merge 3 commits into
intel:mainfrom
vchamarthi:issue-942-catalog-check-finding-guidance-source-2

Conversation

@vchamarthi

Copy link
Copy Markdown
Contributor

Summary

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. This is scenario 1 of #942.

Changes

  • Appended a fix clause to the eight messages in dokimi/external/validate.py, script_checks.py and bundle_paths.py.
  • Corrected the two exact-wording assertions in tests/test_catalog_path_missing.py, which asserted the old path-missing text.
  • Added test_mechanical_finding_message_states_the_fix and test_script_crlf_message_states_the_fix to tests/test_catalog_spec_checks.py.
  • Added a changelog fragment.

Risk

Only the message text gets longer. Codes, levels and JSON keys are unchanged. Anything matching the old exact wording would need updating; in the repo only the two path-missing assertions did.

Testing

tests/test_catalog_spec_checks.py, test_catalog_path_missing.py, test_catalog_validate.py, test_catalog_validate_scripts.py and test_catalog_links.py pass (552 tests), as do tests/test_growth_ratchet.py and ruff check on the changed files.

Open questions

Whether path/line fields (scenario 2) and the finding_codes fixtures (scenario 4) should follow in a second change; I left them out to keep this one small.

  • I chose Reword only the eight mechanical codes, with the fix clause appended to the existing message over Also adding path/line and 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.

  • Tests added/updated and pytest passes
  • ruff, mypy, and schema checks pass
  • Docs updated (or N/A) — see the docs-drift checklist in CONTRIBUTING.md
  • Self-reviewed per "Before opening a PR" in AGENTS.md
  • Each new raise/exit and test names the doc, contract or issue it traces to
  • No ad-hoc run artifacts committed
  • New files carry the SPDX license header (or are exempt in .github/.licenserc.yaml)

Left for a later change:

  • Scenario 2 (optional path and line on 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.
  • 2: findings have no optional path and line fields in JSON, schemas and docs: this change's test does not cover it
  • 4: no tests/fixtures/finding_codes/ with one skill per offline code and a completeness test: this change's test does not cover it
  • 6: exact-wording tests must follow the reworded messages: this change's test does not cover it
  • 3 and 5: --fail-on-code, done in feat(catalog): catalog check --fail-on CODE gates on chosen findings #1050: this change's test does not cover it
  • 7: docs naming all codes, already done on main: this change's test does not cover it
Checklist evidence
  • Tests added/updated and pytest passes: 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 change
  • ruff, 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 base
  • Docs updated (or N/A): N/A: No doc quotes the old message wording; finding-codes.md lists codes and meanings only.
  • Self-reviewed per "Before opening a PR" in AGENTS.md: nothing left open; mutation of changed lines ran
  • Each new raise/exit and test names the doc, contract or issue it traces to: every new error path and test names a doc, contract or issue
  • No ad-hoc run artifacts committed: 1 added file(s), none a run's output
  • New files carry the SPDX license header (or are exempt in .github/.licenserc.yaml): no new source file

Refs #942.

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>
@vchamarthi
vchamarthi marked this pull request as ready for review November 26, 2026 19:04
@vchamarthi
vchamarthi requested a review from a team as a code owner November 26, 2026 19:04
Copilot AI balanced review requested due to automatic review settings November 26, 2026 19:04

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟢 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

@exai-bot

exai-bot commented Nov 26, 2026 •

Copy link
Copy Markdown

✅ OpenCodeReview: Review complete: 0 finding(s) across 6 selected item(s).

CI at `a3a380e`: 2 cancelled, 19 passing, 4 skipped
Check Status
Tests (py3.14) cancelled at step Run tests
Windows smoke test (py3.13) cancelled, never started
Review details
  • Commit reviewed: a3a380e against merge base 50ea631
  • Coverage: 6 files in 1 groups
  • Engine: OpenCodeReview v1.13.5-exai.4.8f73eada, us.openai.gpt-6.1-sol
  • Usage: 79k tokens (38k from cache), 18s
  • Tool calls: 7 (6 file_read, 1 ci_status)
  • Catalog finding validation and fix clauses with regression tests and changelog: 6 files

@codecov-commenter

Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 96.13%. Comparing base (50ea631) to head (1fa6fed).
⚠️ Report is 1 commits behind head on main.
❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

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     
Files with missing lines Coverage Δ
dokimi/dokimi/external/bundle_paths.py 100.00% <ø> (ø)
dokimi/dokimi/external/script_checks.py 93.04% <ø> (ø)
dokimi/dokimi/external/validate.py 98.73% <100.00%> (ø)

... and 8 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

…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>
@xaleryb

xaleryb commented Nov 26, 2026

Copy link
Copy Markdown
Contributor

Pushed a3a380e on top of 1fa6fed. I followed each of the eight new messages on a scratch catalog and seven fixes clear their finding; name-format did not: in skills/Bad_Name/ with name: Bad_Name, "rename it to fit" gives name: bad-name, which then fails name-mismatch. Where the name must match the directory (a nested skill, not OpenCode) the message now says "rename it and its directory to fit"; at the root and under OpenCode it is unchanged. The new test follows the advice and checks no name finding is left.

@vchamarthi

Copy link
Copy Markdown
Contributor Author

Replaced by #1324, which fixes all of #942 in one pull request. Closing this one.

@vchamarthi vchamarthi closed this Nov 27, 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.

5 participants