docs(readme): correct three transform claims - #36
Conversation
Anchoring was attributed to the directory the ignore file sits in. Both implementations match an anchored pattern from the first component of the candidate path as it was given, and nothing relativizes a candidate to where the ignore file was read from -- so the row was wrong for any `--ignore-file` held elsewhere, and had no referent at all for an anchored `--exclude` glob, where there is no ignore file. Checked by putting an anchored pattern in a subdirectory's ignore file: it excluded the top-level path and spared the one beside it, which is the reverse of what the row promised. The corpus already called this the root, so the row now agrees with the case that specifies it. The design spec carried the same sentence and moves with it. The bullets said two of them are about shape rather than about every line, under a heading promising every one is left exactly as written. A label row and an inline speaker turn also join a value wrapped underneath, so four are, and a wrapped label value does not survive. Checked on a three-row label block: the wrapped row came back as one line and its siblings kept their breaks. A file that reads as a whole transcript is skipped untouched, which is a different claim and stays. A bare pipe was said to block unwrapping for its paragraph. It blocks the line. Two prose lines above such a line and two below it join into one each and the pipe line is emitted verbatim, in both implementations -- two breaks removed where the paragraph reading predicts none. The trailing clause about declining to unwrap a paragraph goes with it, since a line is what is declined. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Code Review by Qodo🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (0)
Great, no issues found!Qodo reviewed your code and found no material issues that require reviewTip of the day💡 Did you know, you can add REVIEW.md to your repo root and Qodo follows it on every PR |
PR Summary by QodoCorrect documentation for anchoring and unwrap boundaries
AI Description
Diagram
High-Level Assessment
Files changed (2)
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #36 +/- ##
=======================================
Coverage 87.37% 87.37%
=======================================
Files 3 3
Lines 689 689
=======================================
Hits 602 602
Misses 87 87 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
🟢 Approval recommended
The changes are documentation-only corrections that are internally consistent and match the described implementation behavior without altering code or corpus-defined behavior.
Pull request overview
This PR corrects three README/design-document claims to match the transform and ignore semantics already implemented (and already pinned by the corpus), aligning user-facing documentation with observed behavior across both Python and Rust implementations.
Changes:
- Fixes the meaning of a leading
/in ignore patterns to reflect anchoring to the top level of the candidate path as provided (not the ignore file’s directory). - Updates the “shape vs. verbatim line breaks” explanation to include label rows and speaker turns as shape-preserving cases.
- Clarifies that a bare
|in running prose blocks joining for the line containing it, with surrounding prose joining separately.
File summaries
| File | Description |
|---|---|
| README.md | Corrects three user-facing behavioral descriptions (anchoring, shape-only cases, bare pipe behavior) to match actual transform behavior. |
| docs/rust-port-design.md | Mirrors the corrected anchored-/ semantics in the Rust port design narrative for consistency with the implementation and CLI semantics. |
Review details
- Files reviewed: 2/2 changed files
- Comments generated: 0
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
What changes, and why
Three claims about what the transform does, each recomputed by running both implementations.
Anchoring (
README.md:234, and the same sentence atdocs/rust-port-design.md:68). The table said a leading/"Anchors the pattern to the directory the ignore file sits in." Both implementations match an anchored pattern from component 0 of the candidate path as it was given —_pattern_matchessetsstarts = (0,)over_split_components(raw_path)inunwrap.py,pattern_matchesdoes the same insrc/ignore.rs, and bothbuild_ignore_rulesread the ignore file's text and never its directory. Demonstrated with the ignore file in a subdirectory:The anchored pattern excluded the top-level file and spared the one sitting beside the ignore file — the reverse of the row. It also had no referent for an anchored
--excludeglob, where no ignore file exists.corpus/cli/a-leading-slash-anchors-to-the-rootalready calls this the root, so the row now agrees with the case that specifies it."Two of those are about shape" (
README.md:304), under a list of twelve bullets introduced by "Every one of these is left exactly as written". A label row and an inline speaker turn are shape-only too — each keeps its own line while a value wrapped underneath joins onto it:So four are, and a reader relying on a wrapped
**Status:**value surviving verbatim loses its break. A file that reads as a whole transcript is skipped untouched — a different claim, and it stays.The bare pipe (
README.md:308). "blocks unwrapping for that paragraph" — it blocks the line. With two prose lines above such a line and two below:Two breaks removed, where the paragraph reading predicts none. Byte-identical from the Rust binary. The trailing clause in the same sentence ("declining to unwrap a paragraph") moves with it, since a line is what is declined.
Corpus
The corpus is the specification, and both implementations answer to it. Tick what applies.
corpus/pins the new behavior. The case was written first and failed first.All three behaviours were already what the corpus pins; only the descriptions were wrong. The remaining finding on this section — that the
*row of the same table is the one rowcorpus/cli/does not pin, against a sentence claiming every row is — is a corpus change and follows separately.Checks
make checkpasses, ormake testdoes and this touches no Rust.make tidy, plusunwrap-markdown-prose-py --fail-on-changeover both files sincetidyskips this repository's own hook. Markdown only.