Skip to content

test: pin 13 checks the reviews of #323, #326, #334 and #363 asked for - #389

Merged
napetrov merged 1 commit into
intel:mainfrom
antonwolfy:test/leftovers-2026-11-04
Nov 4, 2026
Merged

napetrov merged 1 commit into
intel:mainfrom
antonwolfy:test/leftovers-2026-11-04

Conversation

@antonwolfy

Copy link
Copy Markdown
Contributor

Summary

Follow-up to four merged PRs whose reviews named checks that no test held. On main, each of the lines
below 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.

Point Code on main Mutant that passed the suite New case (passes on main, fails on the mutant)
#334 prefilter.py _REDIRECT drop < from the write target's class cat >notes.txt<<docs/guide.md …: acted 0 (the mutant gives 1)
#334 prefilter.py _file_named key in name an Edit of /repo/Makefile.bak or /repo/GNUMakefile is no action for rule Makefile
#334 prefilter.py _file_named drop _slashes(...) an Edit of C:\r\Makefile acts on rule Makefile
#334 prefilter.py _prints drop strip_wrappers sudo echo changelog.d/x.md: acted 0
#326 rule_frontmatter.py _names_pattern if part == "": paths: [null and paths: [~ (the key does not parse) load at start
#326 budget.py _import_text drop the RULE_GLOB.match(_target(...)) half a rule reached through docs/alias.md does not import the @../extra.md in its frontmatter
#326 budget.py _counted_import reduce to RULE_GLOB.match(t) @.claude/rules/r.md, a link to a plain shared.md: the rule entry keeps its 5-char body count (the mutant makes it an 18-char import)
#363 repo_skill_reach.py run handler drop OSError a directory at out/skill-discovery.json: exit 1 and a ✗ message, no traceback
#363 repo_skill_reach.py bin_path=None --bin naming a wrapper that runs the fake harness in crash mode: the run reports its exit 2
#363 repo_skill_reach.py keep=False --keep: the fixture stays under --work-dir and the artifact's workspace names it
#323 repo_claims.py _match states = {0} shared: ['**/Makefile'] claims a changed root Makefile
#323 repo_config.py _own_path drop glob.escape on the hops a change to the link c[1] on the way to the config is shared, c1 is not
#323 utils.py link_text "/".join(rest) sub/l -> <root>/../t/x reads as ../x, not x
#323 utils.py link_text key.startswith(key_anchor) alone root <tmp>/t, link to <tmp>/t2/q.json: kept absolute, not 2/q.json
#323 utils.py _tracked_modes drop --literal-pathspecs a tracked :x.sh takes its mode from the index, not the disk

The #334 review gave echo hi >out.txt<docs/guide.md as the case, with acted False on main. At this
head it gives acted 1 on main and on the mutant alike: <docs/guide.md is a read redirection, which the
prefilter 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: a sudo echo case for the printed-path test, and
    test_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 for
    test_a_heredoc_delimiter_word_is_not_a_path_the_command_touched.
  • tests/test_repo_budget_rules.py: three unparsed-key cases for
    test_only_a_paths_value_that_names_a_pattern_scopes_a_rule, and two symlink tests next to
    test_an_alias_of_a_rule_is_followed_as_an_import.
  • tests/test_skill_reach.py: three CLI run tests (artifact save OSError, --bin, --keep).
  • tests/test_repo_config_globs.py, tests/test_repo_config_links.py, tests/test_tree_digest.py: one test
    for each feat(repo): dokimi_config.v1 schema and repo_config loader #323 point.
  • No changelog fragment: nothing under dokimi/dokimi/ changes.

Risk

None: tests only, and the output is unchanged. The symlink tests skip where symlink_to raises. The :x.sh
test skips on Windows and without git. The --bin wrapper test skips on Windows (it is a POSIX shell
script).

Testing

On a Linux review host, at 9e07365 (on main 51bbc4d):

  • make ci-local: 29 passed, 1 failed, 7 skipped. Skipped: external-catalog-smoke (needs docker),
    test-latest, docs.yml:deploy and pip-audit.yml:report (job conditions false on a PR), the
    cli-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 on main too:
    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 added
    docs/rule-ledger.md without raising max_docs in benchmarks/spec.v1.yaml. This PR adds no doc and
    leaves that alone.
  • The seven touched test files with test_docs_code_refs.py, test_growth_ratchet.py,
    test_audit_test_quality.py and test_import_architecture.py: 851 passed, 2 skipped (existing tests).
    ruff check tests is clean.
  • Mutants: each of the 15 changes in the table, applied to a copy of the committed tree, makes its new
    test fail; the same tests pass on the unchanged code.
  • Merged together with the other follow-up branch (fix/tree-digest-nested-ignores) on main 51bbc4d: pytest -q -n auto 15614 passed, 9 skipped; mypy and ruff check . clean.

Revert

git revert of the one commit; it removes tests only.

Checklist

  • 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
  • No ad-hoc run artifacts committed
  • New files carry the SPDX license header (or are exempt in .github/.licenserc.yaml)

@antonwolfy
antonwolfy requested a review from a team as a code owner November 4, 2026 18:08
Copilot AI balanced review requested due to automatic review settings November 4, 2026 18:08
@antonwolfy antonwolfy self-assigned this Nov 4, 2026

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 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

@exai-bot

exai-bot commented Nov 4, 2026 •

Copy link
Copy Markdown

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

Review details
  • Commit reviewed: 2a65a40 against merge base 5ce3207
  • Coverage: 7 files in 4 groups
  • Engine: OpenCodeReview v1.13.3, us.openai.gpt-6.1-sol
  • Usage: 187k tokens (130k from cache), 17s
  • Tool calls: 12 (11 file_read, 1 code_search)
  • Context prefilter tests: 2 files
  • Repository configuration and budget rules tests: 3 files
  • Skill reach tests: 1 file
  • Tree digest tests: 1 file

@codecov-commenter

codecov-commenter commented Nov 4, 2026 •

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 94.76%. Comparing base (5ce3207) to head (2a65a40).
❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

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     

see 3 files with indirect coverage changes

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

…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
antonwolfy force-pushed the test/leftovers-2026-11-04 branch from 9e07365 to 2a65a40 Compare November 4, 2026 19:04
@napetrov
napetrov merged commit b087c40 into intel:main Nov 4, 2026
14 checks passed
@antonwolfy
antonwolfy deleted the test/leftovers-2026-11-04 branch November 4, 2026 20:49
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