Repository navigation
test: pin 13 checks the reviews of #323, #326, #334 and #363 asked for - #389
Merged
Merged
Conversation
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues block approval of this tests-only regression-coverage change.
No open issues 🎉
What changed in this PR
0 new findings; nothing to fix.
This tests-only PR adds regression coverage requested in reviews of #323, #326, #334 and #363, protecting existing dokimi behavior without changing production code.
Changes:
- Covers context-prefilter filename matching, command wrappers and heredoc handling.
- Pins rule-budget behavior for malformed frontmatter and symlinked imports.
- Adds skill-reach CLI error and option checks, plus config-path and tree-digest edge cases.
| File | Description |
|---|---|
dokimi/tests/test_tree_digest.py |
Checks symlink normalization and index modes for colon-prefixed filenames. |
dokimi/tests/test_skill_reach.py |
Tests artifact-write failures, --bin forwarding and --keep. |
dokimi/tests/test_repo_config_links.py |
Checks literal matching of bracketed config-link paths. |
dokimi/tests/test_repo_config_globs.py |
Verifies leading **/ matches root files. |
dokimi/tests/test_repo_budget_rules.py |
Covers malformed paths values and symlinked-rule counting. |
dokimi/tests/test_context_prefilter.py |
Tests wrapped printing commands and exact filenames across separators. |
dokimi/tests/test_context_prefilter_shell.py |
Checks that glued heredoc delimiters are not counted as touched paths. |
Review effort: Balanced
|
✅ OpenCodeReview: Review complete: 0 finding(s) across 7 selected item(s). Review details
|
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #389 +/- ##
=======================================
Coverage 94.75% 94.76%
=======================================
Files 352 352
Lines 46498 46498
Branches 7969 7969
=======================================
+ Hits 44061 44063 +2
+ Misses 1544 1543 -1
+ Partials 893 892 -1 🚀 New features to boost your workflow:
|
…intel#363 asked for Each new test fails on a one-line mutant that passed the whole suite; no code under dokimi/dokimi/ changes. intel#334 (context prefilter): - a write target glued to a heredoc sign (cat >notes.txt<<docs/guide.md) ends at the `<`: the delimiter is no path (_REDIRECT's `<` exclusion); - a bare-name rule `Makefile` counts an edit of Makefile only, not Makefile.bak or GNUMakefile, and counts C:\r\Makefile (_file_named); - `sudo echo changelog.d/x.md` prints the path, it does not act on it (strip_wrappers in _prints). intel#326 (repo budget): - an unclosed `paths: [null` or `paths: [~` reads as unscoped (_names_pattern's null and ~); - a rule reached through docs/alias.md drops its frontmatter before its @paths are followed (_import_text's _target half); - an import of a rule path linked to a plain file keeps the rule's body count (_counted_import's RULE_GLOB.match(f)). intel#363 (repo skill-reach): an OSError while saving the artifact exits 1 with a message; --bin reaches the harness run; --keep keeps the fixture and names it in the artifact. intel#323 (repo config): shared '**/Makefile' claims a root Makefile; a link c[1] on the way to the config is claimed as written; link_text keeps the `..` prefix of a subdirectory link that leaves the tree and comes back, and reads a sibling t2/ of root t as outside; a tracked `:x.sh` takes its mode from the index (--literal-pathspecs). Signed-off-by: Anton Volkov <antonwolfy@gmail.com>
antonwolfy
force-pushed
the
test/leftovers-2026-11-04
branch
from
November 4, 2026 19:04
9e07365 to
2a65a40
Compare
napetrov
approved these changes
Nov 4, 2026
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
Follow-up to four merged PRs whose reviews named checks that no test held. On
main, each of the linesbelow can be changed in one place (the mutant in the table) and the whole suite still passes; the code is
right, the tests did not notice. This PR adds one test or parametrized case per point and changes no code.
the redirect target's
<exclusion, the exact-name match and the\handling in_file_named, andstrip_wrappersin_prints. No author reply.(
null/~in_names_pattern, no author reply) andthread (the
docs/alias.mdvariantthe reply left out, and the
RULE_GLOB.match(f)half of_counted_import).the reply covered
--timeout,--saltand--budget. This PR adds the run path'sOSErrorclause,--binand--keep.(
**/Makefileagainst a root file) andreview B2 (
glob.escapeon theconfig's link hops, the
..prefix and the commonpath guard inlink_text,--literal-pathspecs). Theauthor left B2 as is because it named no specific tests; this PR names them.
mainmain, fails on the mutant)prefilter.py_REDIRECT<from the write target's classcat >notes.txt<<docs/guide.md…: acted 0 (the mutant gives 1)prefilter.py_file_namedkey in name/repo/Makefile.bakor/repo/GNUMakefileis no action for ruleMakefileprefilter.py_file_named_slashes(...)C:\r\Makefileacts on ruleMakefileprefilter.py_printsstrip_wrapperssudo echo changelog.d/x.md: acted 0rule_frontmatter.py_names_patternif part == "":paths: [nullandpaths: [~(the key does not parse) load at startbudget.py_import_textRULE_GLOB.match(_target(...))halfdocs/alias.mddoes not import the@../extra.mdin its frontmatterbudget.py_counted_importRULE_GLOB.match(t)@.claude/rules/r.md, a link to a plainshared.md: the rule entry keeps its 5-char body count (the mutant makes it an 18-char import)repo_skill_reach.pyrun handlerOSErrorout/skill-discovery.json: exit 1 and a✗message, no tracebackrepo_skill_reach.pybin_path=None--binnaming a wrapper that runs the fake harness in crash mode: the run reports its exit 2repo_skill_reach.pykeep=False--keep: the fixture stays under--work-dirand the artifact'sworkspacenames itrepo_claims.py_matchstates = {0}shared: ['**/Makefile']claims a changed rootMakefilerepo_config.py_own_pathglob.escapeon the hopsc[1]on the way to the config is shared,c1is notutils.pylink_text"/".join(rest)sub/l -> <root>/../t/xreads as../x, notxutils.pylink_textkey.startswith(key_anchor)alone<tmp>/t, link to<tmp>/t2/q.json: kept absolute, not2/q.jsonutils.py_tracked_modes--literal-pathspecs:x.shtakes its mode from the index, not the diskThe #334 review gave
echo hi >out.txt<docs/guide.mdas the case, with acted False onmain. At thishead it gives acted 1 on
mainand on the mutant alike:<docs/guide.mdis a read redirection, which theprefilter counts as touching the file. A heredoc sign glued to the write target (
>notes.txt<<docs/guide.md)is where the two differ, so that case pins the line.
Changes
tests/test_context_prefilter.py: asudo echocase for the printed-path test, andtest_a_bare_file_name_claim_counts_an_edit_of_that_name_only_on_any_separator.tests/test_context_prefilter_shell.py: a glued heredoc case fortest_a_heredoc_delimiter_word_is_not_a_path_the_command_touched.tests/test_repo_budget_rules.py: three unparsed-key cases fortest_only_a_paths_value_that_names_a_pattern_scopes_a_rule, and two symlink tests next totest_an_alias_of_a_rule_is_followed_as_an_import.tests/test_skill_reach.py: three CLI run tests (artifact saveOSError,--bin,--keep).tests/test_repo_config_globs.py,tests/test_repo_config_links.py,tests/test_tree_digest.py: one testfor each feat(repo): dokimi_config.v1 schema and repo_config loader #323 point.
dokimi/dokimi/changes.Risk
None: tests only, and the output is unchanged. The symlink tests skip where
symlink_toraises. The:x.shtest skips on Windows and without git. The
--binwrapper test skips on Windows (it is a POSIX shellscript).
Testing
On a Linux review host, at
9e07365(onmain51bbc4d):make ci-local: 29 passed, 1 failed, 7 skipped. Skipped:external-catalog-smoke(needs docker),test-latest,docs.yml:deployandpip-audit.yml:report(job conditions false on a PR), thecli-surface "Package the result" step,
conda-forge-deps(no micromamba) and semgrep (offline).15610 tests passed, 9 skipped; changed-line coverage has no measurable lines (tests only).
The failed step is
agent-quality.yml:benchmark / Run benchmark, and it fails onmaintoo:golden_manifest violation: matched 40 document(s) ... more than max_docs=39. feat(repo): rule ledger: repo compare --ledger with per-rule keep/review/insufficient-evidence verdicts #336 addeddocs/rule-ledger.mdwithout raisingmax_docsinbenchmarks/spec.v1.yaml. This PR adds no doc andleaves that alone.
test_docs_code_refs.py,test_growth_ratchet.py,test_audit_test_quality.pyandtest_import_architecture.py: 851 passed, 2 skipped (existing tests).ruff check testsis clean.test fail; the same tests pass on the unchanged code.
fix/tree-digest-nested-ignores) onmain51bbc4d:pytest -q -n auto15614 passed, 9 skipped;mypyandruff check .clean.Revert
git revertof the one commit; it removes tests only.Checklist
pytestpassesruff,mypy, and schema checks passAGENTS.md.github/.licenserc.yaml)