Repository navigation
fix(catalog): fewer false alarms on vendor skill repositories - #1657
vchamarthi wants to merge 4 commits into
Conversation
Governance and benchmark documents, generated paths, TypeScript configs and command-only activation are no longer flagged as broken guidance. Prohibited commands, path notation, archives and VCS sources are no longer read as install instructions. CI test runners and runners declared in test modules are recognised. Markdown link targets are checked when the label shows a path, and named sibling-skill inputs resolve. Skills with the same name in different packages keep separate evaluation counts. The lexer is declared in packaging and the conda lock inputs. Signed-off-by: vchamarthi <123653452+vchamarthi@users.noreply.github.com>
Tests for sibling-skill ownership (name shape and length, folder with its own SKILL.md, the owner phrase, bare files), a local path before a sibling reference, parent spans, JSON sentence cuts and the JSON-only negative-assertion exemption, VCS sources, JavaScript bindings in every script kind, URL labels, blank code spans, project roots, and the CI and test-module runner reader. Lines whose mutants cannot change behaviour are marked mutation-ok with the reason. Signed-off-by: vchamarthi <123653452+vchamarthi@users.noreply.github.com>
There was a problem hiding this comment.
🟡 Changes recommended
Active findings identify missed per-project test checks and false negatives in broken-link, model-ID, and unreferenced-file detection.
4 open issues
What changed in this PR
4 new findings.
This PR reduces false alarms in Dokimi’s free repository and skill-catalog checks while improving test-runner detection and evaluation counts.
Changes:
- Refines command, Markdown, path, and content checks.
- Recognizes TypeScript projects and standalone test runners; preserves counts for same-named skills.
- Adds regression tests, documentation, changelog fragments, and the Pygments dependency.
| File | Description |
|---|---|
dokimi/tests/test_repo_l0_markdown_lines.py |
Tests hypothetical path notation. |
dokimi/tests/test_repo_inspect_workflow_tests.py |
Tests workflow and standalone runners. |
dokimi/tests/test_repo_inspect_cli.py |
Tests TypeScript project detection. |
dokimi/tests/test_project_markers.py |
Tests project roots and runner precedence. |
dokimi/tests/test_description_when_cues.py |
Tests additional activation cues. |
dokimi/tests/test_content_checks.py |
Tests variable and Unicode exemptions. |
dokimi/tests/test_code_spans.py |
Tests path-like link labels. |
dokimi/tests/test_catalog_path_missing.py |
Tests output and sibling-owned paths. |
dokimi/tests/test_catalog_links.py |
Tests definitions and parent notation. |
dokimi/tests/test_catalog_eval_cli.py |
Tests same-named skill counts. |
dokimi/tests/test_catalog_command_prohibited.py |
Tests prohibited interactive commands. |
dokimi/tests/test_catalog_command_checks_operands.py |
Tests command operand exemptions. |
dokimi/tests/test_catalog_bundle_unreferenced.py |
Tests publication-document exclusions. |
dokimi/requirements.txt |
Adds Pygments. |
dokimi/pyproject.toml |
Declares Pygments dependency. |
dokimi/dokimi/repos/l0/markdown.py |
Exempts hypothetical prefix examples. |
dokimi/dokimi/repos/environment/workflow_tests.py |
Detects additional test runners. |
dokimi/dokimi/repos/environment/checks.py |
Integrates runners and TypeScript projects. |
dokimi/dokimi/external/when_cues.py |
Expands activation recognition. |
dokimi/dokimi/external/validate.py |
Clarifies trigger warning. |
dokimi/dokimi/external/skill_markdown.py |
Refines definitions and descriptive labels. |
dokimi/dokimi/external/finding_lines.py |
Supports filtered source-line lookup. |
dokimi/dokimi/external/content_checks.py |
Refines model-ID and Unicode checks. |
dokimi/dokimi/external/command_words.py |
Handles placeholder path prefixes. |
dokimi/dokimi/external/command_json.py |
Excludes negative assertion patterns. |
dokimi/dokimi/external/command_checks.py |
Refines install and pipe detection. |
dokimi/dokimi/external/bundle_refs.py |
Excludes root publication paperwork. |
dokimi/dokimi/external/bundle_paths.py |
Resolves outputs and sibling references. |
dokimi/dokimi/external/bundle_findings.py |
Integrates filtered path checks. |
dokimi/dokimi/commands/catalog_eval.py |
Counts every skill path. |
dokimi/docs/repo-evaluation-contract.md |
Documents paths and runner detection. |
dokimi/docs/finding-codes.md |
Updates trigger-warning description. |
dokimi/docs/external-content.md |
Documents revised catalog behavior. |
dokimi/changelog.d/20261202_173000_catalog_negative_assertion_patterns.md |
Records assertion-pattern exemption. |
dokimi/changelog.d/20261202_160800_sibling-files-standalone-runners.md |
Records sibling paths and runners. |
dokimi/changelog.d/20261202_160000_inspect-workflow-test-runners.md |
Records workflow runner detection. |
dokimi/changelog.d/20261202_160000_catalog_parent_relative_labels.md |
Records descriptive-label handling. |
dokimi/changelog.d/20261202_155800_path-notation-pip-sources.md |
Records notation and source exemptions. |
dokimi/changelog.d/20261202_150000_catalog-publication-reports.md |
Records publication exclusions. |
dokimi/changelog.d/20261202_150000_catalog_output_paths.md |
Records output-path exemptions. |
dokimi/changelog.d/20261202_144900_inspect-typescript-config.md |
Records TypeScript detection. |
dokimi/changelog.d/20261202_143600_skill-content-checks.md |
Records content and counting fixes. |
conda-recipe/meta.yaml |
Adds Pygments dependency. |
ci/conda-lock/linux-64-py3.14.txt |
Updates lock-input comment only. |
ci/conda-lock/linux-64-py3.13.txt |
Updates lock-input comment only. |
ci/conda-lock/linux-64-py3.12.txt |
Updates lock-input comment only. |
ci/conda-lock/linux-64-py3.11.txt |
Updates lock-input comment only. |
Review effort: Balanced
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1657 +/- ##
==========================================
- Coverage 96.43% 96.43% -0.01%
==========================================
Files 585 588 +3
Lines 76572 76880 +308
Branches 13174 13249 +75
==========================================
+ Hits 73844 74136 +292
- Misses 1674 1680 +6
- Partials 1054 1064 +10
🚀 New features to boost your workflow:
|
Mutation of changed linesAt e5e7343: 72 caught · 6 missed · 2 waived Each row is a small deliberate break (a mutant) of a line this PR changes that every test reaching that line still passes. Add a test that fails on it or, if it cannot change behaviour, put
Not checked:
Marked harmless with
Warning only: a missed break does not fail the job. Updated on every push; the full report is in the ci run summary. |
|
🔍 OpenCodeReview found 5 issue(s) in this PR. CI at By label: 1 must fix, 3 should fix, 1 not shown by a run
Test notes (1)
Review details
|
napetrov
left a comment
There was a problem hiding this comment.
Change class: CONTRACT (head 73791ea)
- Contract: changed. errors dokimi/dokimi/external/command_json.py:46; errors dokimi/dokimi/repos/environment/workflow_tests.py:29
- Responsibility: candidate. move _cut_sentences from dokimi/dokimi/external/command_checks.py to dokimi/dokimi/external/command_json.py
- Dependency: candidate (count signal only, no file:line)
- Review depth: check the changed surface: callers, docs, tests pin new behaviour
- Coverage gaps: none
Existing blockers reproduced.
I reproduced the Markdown reference regression: the merge base returns the missing destination after ===== or --, and this head drops it. The multi-root test discovery finding also reproduces: two packages with standalone unittest checks yield only the first package. C3 and C4 remain open. This PR also conflicts with #1524 in content_checks.py when paired.
CI on head 73791ea: 0 failing Actions jobs; merge base 5225c2a is behind base tip 60948d0.
Checked the catalog and runner-discovery changes, the previous review threads, and required CI. Probes used local Markdown and test-runner fixtures. Vendor measurements were reviewed as recorded in the PR. Focused suite: 541 passed in 8.07s.
Signed-off-by: vchamarthi <123653452+vchamarthi@users.noreply.github.com>
- Read the owner and path of a sibling skill reference across a wrapped line, and skip a span in the label of a URL link. - Treat every JS declarator and destructured name as a variable, and keep a property or key such as `models.o1` as a model-ID mention. - Read a reference definition after a setext heading underline. - Emit a standalone test check for each project root, not the first only. - Skip a workflow whose YAML raises ValueError (an impossible date). - Keep the path-notation back-reference case-sensitive. - Ignore a fenced report heading when classifying BENCHMARK.md. Signed-off-by: vchamarthi <123653452+vchamarthi@users.noreply.github.com>
|
@napetrov, this is ready for another look: 2 commits on Your comment:
Threads:
Not caused by this PR:
What I checked on the new commit: all 8 new tests fail before the fix and pass after it; the full test suite passes with main merged in (62,372 tests), apart from 1 failure main has too. What each test shows
|
| return replace_code_spans(line, mask, not_after="\\") | ||
|
|
||
| # mutation-ok[take-branch]: a line without a backtick has no code span to mask; the test only skips the work | ||
| return "".join(mask_line(line) if "`" in line else line for line in text.splitlines(keepends=True)) |
There was a problem hiding this comment.
Impact: valid generated-output or absent-file guidance still produces false path-missing warnings when Markdown is wrapped.
Trigger: The runner emits\nresources/plan.json. (likewise This skill does not ship\nscripts/run.py.), with the named file absent.
Evidence: this function matches each physical line independently, _NON_INPUT permits only spaces/tabs before the span, and bundle_findings calls it before building the paragraph view; consequently neither line is masked and the normal missing-path check reports the output. Match cues and spans within Markdown paragraphs while retaining source newlines, and add wrapped-output/absent-file regression cases.
Workaround: keep the cue and path on the same physical line.
Must fix: A run shows it, this change introduced it, and it is met in ordinary use.
Shown by running: exit 1 (at the head) · exit 1 (at the merge base, which cannot run it) · exit 0 (at the head with the fix)
python proof_c1.py
What the proof does: Calls mask_non_input_paths on a cue and a path split over two lines and checks the path is blanked.
The problem shows as the output WRAPPED_OUTPUT_NOT_MASKED.
dokimi/proof_c1.py
from dokimi.external.bundle_paths import mask_non_input_paths
same = mask_non_input_paths('The runner emits `resources/plan.json`.\n')
assert 'resources/plan.json' not in same, 'same-line control failed'
wrapped = mask_non_input_paths('The runner emits\n`resources/plan.json`.\n')
assert 'resources/plan.json' not in wrapped, 'WRAPPED_OUTPUT_NOT_MASKED'Traceback (most recent call last):
File "/tmp/tmp.eFQluhMLID/dokimi/proof_c1.py", line 6, in <module>
assert 'resources/plan.json' not in wrapped, 'WRAPPED_OUTPUT_NOT_MASKED'
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: WRAPPED_OUTPUT_NOT_MASKED
| elif token in Name and default_at is None and (j + 1 >= len(sig) or sig[j + 1][2] != ":"): | ||
| names.append(value) |
There was a problem hiding this comment.
Impact: computed destructuring keys can silently suppress genuine legacy-model-id findings.
Trigger: const {[o1]: value} = settings; consume(o1);, with no declaration of o1.
Evidence: this branch collects o1 because its next token is ], although only value is bound. js_bindings then exempts both bare o1 occurrences, and _legacy_hits reports neither, contrary to the declared-variable-only exemption.
Fix: Skip computed-key expressions while still collecting the binding target after the colon; add coverage contrasting computed object keys with nested array binding patterns.
Workaround: avoid computed destructuring in scanned examples or move the key expression outside the pattern.
Should fix: A run shows it; it was not judged to be met in ordinary use.
Shown by running: exit 1 (at the head) · exit 1 (at the merge base, which cannot run it) · exit 0 (at the head with the fix)
python proof_c4.py
What the proof does: Calls js_bindings on a destructuring with a computed key and checks the undeclared o1 yields no exempt offsets.
The problem shows as the output COMPUTED_KEY_TREATED_AS_BINDING.
dokimi/proof_c4.py
import re
from dokimi.external.js_bindings import js_bindings
text = 'const {[o1]: value} = settings; consume(o1);'
ms = list(re.finditer(r'o1', text))
got = js_bindings('a.js', text, ms)
assert got == set(), 'COMPUTED_KEY_TREATED_AS_BINDING %r' % (got,)Traceback (most recent call last):
File "/tmp/tmp.NdvRDDBXzz/dokimi/proof_c4.py", line 7, in <module>
assert got == set(), 'COMPUTED_KEY_TREATED_AS_BINDING %r' % (got,)
^^^^^^^^^^^^
AssertionError: COMPUTED_KEY_TREATED_AS_BINDING {8, 40}
| if value in (";", "of", "in"): | ||
| return True | ||
| previous = sig[j - 1] | ||
| return "\n" in text[previous[0] : start] and previous[2] not in (",", "=") and previous[1] not in Operator \ | ||
| and value not in _OPEN + ".," |
There was a problem hiding this comment.
Impact: valid JavaScript bindings still generate false legacy-model-id warnings.
Trigger: const first = "x" in settings, o1 = first; consume(o1);.
Evidence: _statement_ends treats the initializer's binary in as a loop boundary, so _declarators stops before o1; _legacy_hits consequently reports it. Similarly, const first = 1\n + 2, o1 = first; stops at the leading continuation operator. These initializer-boundary cases are not covered by the existing simple multiple-declarator regression. Distinguish loop separators from initializer expressions and allow operator-led continuations, with regression tests for both.
Workaround: declare o1 in a separate statement.
Should fix: A run shows it; it was not judged to be met in ordinary use.
Shown by running: exit 1 (at the head) · exit 1 (at the merge base, which cannot run it) · exit 0 (at the head with the fix)
python proof_c3.py
What the proof does: Calls js_bindings on a multi-declarator const whose first initializer uses in and checks both o1 offsets are declared bindings.
The problem shows as the output IN_OPERATOR_ENDS_DECLARATION.
dokimi/proof_c3.py
import re
from dokimi.external.js_bindings import js_bindings
text = 'const first = "x" in settings, o1 = first; consume(o1);'
ms = list(re.finditer(r'o1', text))
got = js_bindings('a.js', text, ms)
assert got == {m.start() for m in ms}, 'IN_OPERATOR_ENDS_DECLARATION %r' % (got,)Traceback (most recent call last):
File "/tmp/tmp.0gOrLlX723/dokimi/proof_c3.py", line 7, in <module>
assert got == {m.start() for m in ms}, 'IN_OPERATOR_ENDS_DECLARATION %r' % (got,)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: IN_OPERATOR_ENDS_DECLARATION set()
| labels = _merged(_external_labels(paragraph, masked, definitions)) | ||
| definitions: dict[str, str] = {} | ||
| # mutation-ok[flip-bool]: both lists are built from ``paragraphs``, so the zips never see unequal lengths | ||
| block_targets = [_reference_definitions(p, m, definitions) for p, m in zip(paragraphs, maskeds, strict=True)] |
There was a problem hiding this comment.
Impact: catalog validation silently misses broken reference links with valid angle-bracketed destinations containing unmatched parentheses.
Trigger: [guide]: <references/missing(1.md>\n\nRead [guide].
Evidence: block_targets now gets destinations exclusively from _reference_definitions, whose unconditional _balanced(m.group(2)) rejects this target; the previous splitter accepted it. CommonMark allows unmatched parentheses inside <...>, and the inline-link reader already handles that case.
Workaround: percent-encode the parenthesis or use an inline link. Skip the balance check for angle-bracketed destinations and add a reference-link regression test.
Not shown by a run: A check of this claim did not show the problem.
| return any(value in ("import", "require") and (token in Keyword or token in Name) | ||
| and _NODE_TEST_IMPORT.match(text, offset) is not None | ||
| for offset, token, value in JavascriptLexer().get_tokens_unprocessed(text)) |
There was a problem hiding this comment.
Reject property calls even when whitespace follows the dot. Trigger: with no manifest/workflow test runner, put const client = { require: x => x }; client . require('node:test'); in client.test.js. Evidence: require is a name token and the regex's immediate lookbehind sees a space, so this qualifies despite never loading Node's test module. The existing negative test covers only obj.require(...). Impact: inspection declares node:test and suppresses checks.test.runner-unknown. Check the preceding significant token (including across whitespace/comments) before accepting a bare require, and add this negative regression. Workaround: spelling the call client.require(...) avoids the false declaration.
Should fix: A run shows it; it was not judged to be met in ordinary use.
Shown by running: exit 1 (at the head) · exit 1 (at the merge base, which cannot run it) · exit 0 (at the head with the fix)
python proof_c2.py
What the proof does: Calls _node_test_script on a spaced property call of require and checks it is not accepted.
The problem shows as the output PROPERTY_REQUIRE_ACCEPTED.
dokimi/proof_c2.py
from dokimi.repos.environment.workflow_tests import _node_test_script
text = "const client = { require: x => x };\nclient . require('node:test');\n"
assert not _node_test_script(text), 'PROPERTY_REQUIRE_ACCEPTED'Traceback (most recent call last):
File "/tmp/tmp.mB7KihNT6U/dokimi/proof_c2.py", line 4, in <module>
assert not _node_test_script(text), 'PROPERTY_REQUIRE_ACCEPTED'
^^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: PROPERTY_REQUIRE_ACCEPTED

Why
repo scan,repo inspect,repo budget,catalog check) were run on 14 public vendor skill repositories (NVIDIA, AMD, Anthropic, OpenAI, Google, Vercel, Cursor, Microsoft, Hugging Face, Cloudflare, Stripe, Supabase and others): 1,623 skill files, 84 commands, no model calls.What changes
do not run bare …),<placeholder>/path notation, local archives and VCS sources (git+,hg+,svn+,bzr+) are no longer read as install instructions. A pattern a JSON eval forbids (not_contains_pattern) is comparison data, not a command (new moduleexternal/command_json.py).python -I -creading a piped download is an inline program, aspython -calready was.node --test,python -m unittest, a unittest script run byuv run) and runners declared in test modules (node:test,unittest.main()) are recognised (new modulerepos/environment/workflow_tests.py). They are read only when no other test check is declared.the `engine` skill's `references/types.md`) is checked in that sibling, not in the current skill.external-content.md,repo-evaluation-contract.md,finding-codes.md, and a changelog fragment per change.Evidence
Replaying the same files at the same vendor commits (measured on the branch at
4dcb4d341, before it was rebased onto currentmain; the rebase re-applied the install-reading changes on top ofmain's split ofcommand_checks.py, with the same tests passing):The unused-bundle-file rule alone accounts for 468 of the 534 fewer.
Real problems still found after the change: 30 broken links in Vercel's compiled guides, invalid YAML in a Cursor skill, a retired default model in Anthropic's MCP evaluator.
How to test
cd dokimi python -m pytest -q tests/test_catalog_path_missing.py tests/test_catalog_links.py tests/test_catalog_command_checks_operands.py \ tests/test_content_checks.py tests/test_code_spans.py tests/test_project_markers.py tests/test_repo_inspect_workflow_tests.py \ tests/test_repo_l0_markdown_lines.pyFull suite, Linux, on this branch at current
main:Every failure also fails, the same way, on unmodified
mainin the same environment (test_repo_compare_intervalon all three;test_repo_typecheck_graderon 3.11 and 3.14; seven more on 3.11 only).make ci-local CI_LOCAL_ARGS='--offline': static, typecheck, docs, CLI surface, coverage of changed lines and changed-test repeats pass; its test job fails only on that sametest_repo_compare_intervaltest.Reproduce on any skill catalog checkout (free, no model calls):
Mutation
scripts/mutate_changed.py --base origin/mainwith the cap raised to cover every changed line: 411 of 411 mutants, 394 killed, 0 survived, 17 waived. Each waiver is a# mutation-ok[<operator>]: <reason>on a line whose mutants cannot change behaviour (a fast path, a batch size, a guard on a lookup that always succeeds,zip(strict=True)over lists built from one source).Open questions
None.
Revert
A plain revert. No stored records or schema versions change.
Checklist
pytestpassesruff,mypy, and schema checks passAGENTS.mdraiseor exit)References