Check inline code with the shared spelling policy (#90) - #91
Conversation
Remove the blanket inline-code ignore pattern while preserving fenced code blocks. Allow local overlays to withdraw exact shared patterns without failing when an upstream removal makes the withdrawal a no-op.
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
Summary
WalkthroughThe spelling rollout now checks inline code, retains fenced-code exclusions, supports local removal of inherited ignore patterns, and documents these rules. Tests cover configuration rendering, overlay semantics, and inline-code misspellings. ChangesSpelling policy updates
Sequence Diagram(s)sequenceDiagram
participant LocalOverlayFile
participant Dictionary
participant merge_ignore_patterns
participant GeneratedConfig
LocalOverlayFile->>Dictionary: Parse patterns.ignore and patterns.remove
Dictionary->>merge_ignore_patterns: Merge inherited and local patterns
merge_ignore_patterns->>Dictionary: Return active and removed patterns
Dictionary->>GeneratedConfig: Render the merged spelling configuration
Possibly related PRs
Suggested labels: Suggested reviewers: Poem
🚥 Pre-merge checks | ✅ 15 | ❌ 5❌ Failed checks (2 warnings, 3 inconclusive)
✅ Passed checks (15 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
Reviewer's GuideImplements local withdrawal of shared ignore patterns in the spelling rollout pipeline, removes the blanket inline-code ignore from the shared policy while keeping fenced-code ignores, and updates tests and docs to validate and explain the new behavior and configuration options. Flow diagram for ignore pattern merge with removalsflowchart TD
A[Start _merge_ignore_patterns] --> B[Load base.ignore_patterns and local.ignore_patterns]
B --> C[Compute removed set from local.removed_patterns]
C --> D[Compute contradictory = removed ∩ local.ignore_patterns]
D --> E{contradictory is empty?}
E -- No --> F[Raise ValueError with conflicting patterns]
E -- Yes --> G[Union base.ignore_patterns and local.ignore_patterns]
G --> H[Subtract removed from union]
H --> I[Sort result and return tuple]
F --> J[End]
I --> J[End]
File-Level Changes
Assessment against linked issues
Possibly linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@docs/users-guide.md`:
- Around line 93-96: The pattern configuration documentation in
docs/users-guide.md must state that an identical pattern cannot appear in both
local [patterns] ignore and [patterns] remove lists. Document that configuration
generation rejects this overlap, while preserving the existing descriptions of
additions, removals, and harmless no-op removals.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: 16416f72-0e28-40cf-a9f0-b1f4ca4788d7
📒 Files selected for processing (9)
data/typos-oxendict-base.tomldocs/developers-guide.mddocs/users-guide.mdscripts/typos_rollout.pytests/test_typos_rollout.pytests/test_typos_rollout_semantics.pytests/test_typos_spelling_gate.pytypos.local.tomltypos.toml
🔗 Linked repositories identified
CodeRabbit considers these linked repositories for cross-repo context during reviews:
leynos/cuprum(auto-detected)
💤 Files with no reviewable changes (1)
- data/typos-oxendict-base.toml
State that configuration generation rejects an identical pattern in local `ignore` and `remove` lists.
Exercise arbitrary finite pattern memberships and orderings against the set-difference oracle. Pin deterministic output, harmless absent removals, and rejection of every generated local add-remove overlap.
|
@coderabbitai Have the following failed checks now been resolved? If further work is required, please provide an AI agent prompt for the remaining work to be done to address these failures. Do not treat warnings as optional or aspirational. Where a change is out of scope for this PR, propose a GitHub issue unless one exists already. (Treat o11y, code safety, documentation and validation coverage as in scope). Testing (Property / Proof) |
|
Tip For best results, initiate chat on the files or code changes. 🧩 Analysis chain🏁 Script executed: #!/bin/bash
set -euo pipefail
printf '%s\n' '--- PR state and changed files ---'
gh pr view 91 --repo leynos/agent-helper-scripts --json headRefName,commits,files \
--jq '{headRefName, commitCount: (.commits | length), files: [.files[].path]}'
printf '%s\n' '--- Relevant file outlines ---'
ast-grep outline scripts/typos_rollout.py --items all --match 'Dictionary|merge|pattern' || true
ast-grep outline tests/test_typos_rollout_semantics.py --items all --match 'merge|pattern|hypothesis|given' || true
printf '%s\n' '--- Merge implementation and test coverage ---'
rg -n -C 8 '_merge_ignore_patterns|removed_patterns|`@given`|hypothesis|strategies|st\.' \
scripts/typos_rollout.py tests/test_typos_rollout_semantics.py \
pyproject.toml requirements*.txt setup.cfg tox.ini 2>/dev/null || true
printf '%s\n' '--- Current PR diff for affected files ---'
gh pr diff 91 --repo leynos/agent-helper-scripts -- \
scripts/typos_rollout.py tests/test_typos_rollout_semantics.py \
pyproject.toml requirements.txt requirements-dev.txt setup.cfg tox.ini 2>/dev/null || trueLength of output: 30711 🏁 Script executed: #!/bin/bash
set -euo pipefail
printf '%s\n' '--- Exact merge implementation ---'
sed -n '195,220p' scripts/typos_rollout.py
printf '%s\n' '--- Property tests ---'
cat -n tests/test_typos_rollout_policy_properties.py
printf '%s\n' '--- PR diff for the property-test file ---'
gh api repos/leynos/agent-helper-scripts/pulls/91/files \
--paginate \
--jq '.[] | select(.filename == "tests/test_typos_rollout_policy_properties.py" or .filename == "pyproject.toml") | {filename, status, patch}'
printf '%s\n' '--- Test discovery configuration ---'
sed -n '1,90p' pyproject.toml
fd -a -t f 'conftest\.py|test.*\.py' tests | sortLength of output: 15414
Do not create a follow-up issue. No further work is required for this finding. No AI agent prompt is required. I could not execute the tests in this sandbox because the available environment does not permit Python execution. You are interacting with an AI system. |
Summary
This branch removes the estate-wide exemption that hid every Markdown inline-code span from spelling checks, while retaining the fenced-code-block exemption for high-noise samples. It adds exact local exemptions for this repository's legitimate identifiers and quoted correction examples.
It also adds a
[patterns] removeoverlay key so consumers can withdraw an exact shared ignore pattern without forking the merge implementation. No-op removals remain valid when the shared base has already improved, while contradictory local additions and removals fail clearly.Closes #90.
Review walkthrough
Validation
make check-fmt: passedmake lint: passedmake typecheck: passedmake test: passed (194 tests; 3 snapshots)make spelling: passedcoderabbit review --agent: completed with no findingsgit diff --check origin/main...HEAD: passedReferences