Skip to content

Consolidate architecture docs#124

Merged
leynos merged 4 commits intomainfrom
codex/combine-architecture-documents-into-one-file
Jul 23, 2025
Merged

Consolidate architecture docs#124
leynos merged 4 commits intomainfrom
codex/combine-architecture-documents-into-one-file

Conversation

@leynos
Copy link
Copy Markdown
Owner

@leynos leynos commented Jul 22, 2025

Summary

  • centralize architecture docs into docs/architecture.md
  • update links in README to new locations
  • reference new document in table module
  • fix intra-doc links in markdown-stream processor

Testing

  • make fmt
  • make lint
  • make test
  • make markdownlint
  • make nixie

https://chatgpt.com/codex/tasks/task_e_687ed23b14c4832289d79a74a82102d3

Summary by Sourcery

Consolidate architecture documentation into a single file and update all references accordingly

Documentation:

  • Centralize multiple architecture-related markdown files into docs/architecture.md
  • Update README and module docs to reference the new architecture.md sections for HTML table support, footnote conversion, and module relationships
  • Fix intra-doc anchor links in markdown-stream-processor.md to point to the consolidated document

@sourcery-ai
Copy link
Copy Markdown
Contributor

sourcery-ai Bot commented Jul 22, 2025

Reviewer's Guide

This PR consolidates several standalone architecture docs into a single centralized docs/architecture.md file and updates all references across documentation and code to point to the new consolidated document.

Class diagram for updated module relationships in architecture.md

classDiagram
    class lib {
        <<module>>
    }
    class html {
        <<module>>
        +convert_html_tables()
        +html_table_to_markdown()
    }
    class table {
        <<module>>
        +reflow_table()
        +split_cells()
        +SEP_RE
    }
    class wrap {
        <<module>>
        +wrap_text()
        +is_fence()
    }
    class lists {
        <<module>>
        +renumber_lists()
    }
    class breaks {
        <<module>>
        +format_breaks()
        +THEMATIC_BREAK_LEN
    }
    class ellipsis {
        <<module>>
        +replace_ellipsis()
    }
    class fences {
        <<module>>
        +compress_fences()
        +attach_orphan_specifiers()
    }
    class footnotes {
        <<module>>
        +convert_footnotes()
    }
    class process {
        <<module>>
        +process_stream()
        +process_stream_no_wrap()
    }
    class io {
        <<module>>
        +rewrite()
        +rewrite_no_wrap()
    }
    lib --> html
    lib --> table
    lib --> wrap
    lib --> lists
    lib --> breaks
    lib --> ellipsis
    lib --> fences
    lib --> process
    lib --> io
    html ..> wrap : uses is_fence
    table ..> reflow : uses parse_rows, etc.
    lists ..> wrap : uses is_fence
    breaks ..> wrap : uses is_fence
    ellipsis ..> wrap : uses tokenize_markdown
    process ..> html : uses convert_html_tables
    process ..> table : uses reflow_table
    process ..> wrap : uses wrap_text, is_fence
    process ..> fences : uses compress_fences, attach_orphan_specifiers
    process ..> ellipsis : uses replace_ellipsis
    process ..> footnotes : uses convert_footnotes
    io ..> process : uses process_stream, process_stream_no_wrap
Loading

File-Level Changes

Change Details Files
Create consolidated architecture document
  • Add comprehensive docs/architecture.md merging processor, footnote conversion, HTML table support, module relationships, concurrency, and Unicode handling sections
  • Include diagrams and code examples for clarity
docs/architecture.md
Update internal markdown links to the new doc
  • Adjust HTML table support link in markdown-stream-processor to point at the new anchor
  • Update footnote conversion link to reference the consolidated document
docs/markdown-stream-processor.md
Update README links to consolidated architecture doc
  • Change HTML table support link to docs/architecture.md#html-table-support-in-mdtablefix
  • Replace module relationships link with docs/architecture.md#module-relationships
README.md
Reference architecture doc in table module
  • Add or update link in src/table.rs to point readers to the new architecture document
src/table.rs

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Jul 22, 2025

Summary by CodeRabbit

  • Documentation
    • Introduced a comprehensive architecture document consolidating information on HTML table support, module structure, concurrency, Unicode width handling, and footnote conversion.
    • Updated README links to point to relevant sections within the new architecture document.
    • Removed several standalone documentation files now covered by the consolidated architecture document.
    • Refreshed internal documentation comments to reference the new architecture document.

Walkthrough

Update all documentation links referencing HTML table support and module relationships to point to consolidated sections within docs/architecture.md. Add a comprehensive architecture document detailing internal workings, module relationships, and processing flow. Adjust references in code comments and other documentation files accordingly. No functional or public API changes are introduced.

Changes

File(s) Change Summary
README.md, docs/markdown-stream-processor.md Updated documentation links for HTML table support and module relationships to consolidated anchors.
docs/architecture.md Added comprehensive architecture documentation covering module relationships, processing flow, concurrency, and Unicode width handling.
docs/footnote-conversion.md, docs/html-table-support.md, docs/module-relationships.md, docs/rayon-concurrency.md, docs/unicode-width.md Removed individual documentation files now consolidated into the architecture document.
src/table.rs, src/wrap.rs Updated top-of-file comments to reference the new architecture documentation instead of removed docs.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant CLI
    participant process_stream_inner
    participant Modules
    participant Rayon
    participant Output

    User->>CLI: Invoke mdtablefix with files
    CLI->>Rayon: Dispatch files for parallel processing
    Rayon->>process_stream_inner: Process each file stream
    process_stream_inner->>Modules: Handle tables, HTML, code fences, footnotes
    Modules-->>process_stream_inner: Return processed content
    process_stream_inner->>Output: Send aligned Markdown
    Output-->>User: Print ordered results
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~15 minutes

Possibly related PRs

Poem

In docs we trust, with links anew,
Architecture revealed, in markdown view.
Tables aligned, relationships clear,
The code unchanged, but guidance near.
So raise your pens, let knowledge flow—
The docs now show us where to go!
📝✨

✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch codex/combine-architecture-documents-into-one-file

🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai generate unit tests to generate unit tests for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Copy Markdown
Contributor

@sourcery-ai sourcery-ai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @leynos - I've reviewed your changes - here's some feedback:

  • Consider adding a table of contents or quick navigation at the top of docs/architecture.md to help readers find sections in this very long document.
  • Double-check that all intra-doc links (e.g. to HTML table support and footnote conversion) match the actual heading IDs and won’t result in broken anchors.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- Consider adding a table of contents or quick navigation at the top of docs/architecture.md to help readers find sections in this very long document.
- Double-check that all intra-doc links (e.g. to HTML table support and footnote conversion) match the actual heading IDs and won’t result in broken anchors.

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 8

📜 Review details

Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 7da91e2 and ce05010.

📒 Files selected for processing (4)
  • README.md (1 hunks)
  • docs/architecture.md (1 hunks)
  • docs/markdown-stream-processor.md (2 hunks)
  • src/table.rs (1 hunks)
📓 Path-based instructions (3)
**/*.rs

📄 CodeRabbit Inference Engine (AGENTS.md)

**/*.rs: Comments must use en-GB-oxendict spelling and grammar.
Function documentation must include clear examples.
Every module must begin with a module level (//!) comment explaining the module's purpose and utility.
Document public APIs using Rustdoc comments (///) so documentation can be generated with cargo doc.
Place function attributes after doc comments.
Do not use return in single-line functions.
Prefer immutable data and avoid unnecessary mut bindings.
Handle errors with the Result type instead of panicking where feasible.
Avoid unsafe code unless absolutely necessary and document any usage clearly.
Clippy warnings MUST be disallowed.
Lints must not be silenced except as a last resort.
Lint rule suppressions must be tightly scoped and include a clear reason.
Prefer expect over allow.
Prefer .expect() over .unwrap().
Use concat!() to combine long string literals rather than escaping newlines with a backslash.
Use predicate functions for conditional criteria with more than two branches.
Fix any warnings emitted during tests in the code itself rather than silencing them.
Where a function is too long, extract meaningfully named helper functions adhering to separation of concerns and CQRS.
Where a function has too many parameters, group related parameters in meaningfully named structs.
Where a function is returning a large error consider using Arc to reduce the amount of data returned.
Comment why, not what. Explain assumptions, edge cases, trade-offs, or complexity. Don't echo the obvious.
Use functions and composition. Avoid repetition by extracting reusable logic. Prefer generators or comprehensions, and declarative code to imperative repetition when readable.
Small, meaningful functions. Functions must be small, clear in purpose, single responsibility, and obey command/query segregation.
Name things precisely. Use clear, descriptive variable and function names. For booleans, prefer names with is, has, or should.
Structure log...

Files:

  • src/table.rs

⚙️ CodeRabbit Configuration File

**/*.rs: * Seek to keep the cyclomatic complexity of functions no more than 12.

  • Adhere to single responsibility and CQRS

  • Place function attributes after doc comments.

  • Do not use return in single-line functions.

  • Move conditionals with >2 branches into a predicate function.

  • Avoid unsafe unless absolutely necessary.

  • Every module must begin with a //! doc comment that explains the module's purpose and utility.

  • Comments and docs must follow en-GB-oxendict (-ize / -our) spelling and grammar

  • Lints must not be silenced except as a last resort.

    • #[allow] is forbidden.
    • Only narrowly scoped #[expect(lint, reason = "...")] is allowed.
    • No lint groups, no blanket or file-wide suppression.
    • Include FIXME: with link if a fix is expected.
  • Use rstest fixtures for shared setup and to avoid repetition between tests.

  • Replace duplicated tests with #[rstest(...)] parameterised cases.

  • Prefer mockall for mocks/stubs.

  • Prefer .expect() over .unwrap()

  • Ensure that any API or behavioural changes are reflected in the documentation in docs/

  • Ensure that any completed roadmap steps are recorded in the appropriate roadmap in docs/

  • Files must not exceed 400 lines in length

    • Large modules must be decomposed
    • Long match statements or dispatch tables should be decomposed by domain and collocated with targets
    • Large blocks of inline data (e.g., test fixtures, constants or templates) must be moved to external files and inlined at compile-time or loaded at run-time.

Files:

  • src/table.rs
docs/**/*.md

📄 CodeRabbit Inference Engine (AGENTS.md)

docs/**/*.md: Reference: Use the markdown files within the docs/ directory as a knowledge base and source of truth for project requirements, dependency choices, and architectural decisions.
Update: When new decisions are made, requirements change, libraries are added/removed, or architectural patterns evolve, proactively update the relevant file(s) in the docs/ directory to reflect the latest state.
Documentation must use en-GB-oxendict spelling and grammar (with the exception of "license" which is to be left unchanged for community consistency).

Files:

  • docs/markdown-stream-processor.md
  • docs/architecture.md
**/*.md

📄 CodeRabbit Inference Engine (AGENTS.md)

**/*.md: Validate Markdown files using make markdownlint.
Run make fmt after any documentation changes to format all Markdown files and fix table markup.
Validate Mermaid diagrams in Markdown files by running make nixie.
Markdown paragraphs and bullet points must be wrapped at 80 columns.
Code blocks must be wrapped at 120 columns.
Tables and headings must not be wrapped.
Use dashes (-) for list bullets.
Use GitHub-flavoured Markdown footnotes ([^1]) for references.

Files:

  • docs/markdown-stream-processor.md
  • README.md
  • docs/architecture.md

⚙️ CodeRabbit Configuration File

**/*.md: * Avoid 2nd person or 1st person pronouns ("I", "you", "we")

  • Use en-GB-oxendict (-ize / -our) spelling and grammar
  • Paragraphs and bullets must be wrapped to 80 columns, except where a long URL would prevent this (in which case, silence MD013 for that line)
  • Code blocks should be wrapped to 120 columns.
  • Headings must not be wrapped.
  • Documents must start with a level 1 heading
  • Headings must correctly increase or decrease by no more than one level at a time
  • Use GitHub-flavoured Markdown style for footnotes and endnotes.
  • Numbered footnotes must be numbered by order of appearance in the document.

Files:

  • docs/markdown-stream-processor.md
  • README.md
  • docs/architecture.md
🪛 LanguageTool
docs/architecture.md

[style] ~72-~72: You have used the passive voice repeatedly in nearby sentences. To make your writing clearer and easier to read, consider using active voice.
Context: ... | 1 | 22 | | 3 | 4 | Code fences are passed through verbatim: rust | not | a | ...

(REP_PASSIVE_VOICE)


[typographical] ~88-~88: Two consecutive dots
Context: ...level process_stream_opts helper. Set Options { footnotes: true, ..Default::default() } when calling `proc...

(DOUBLE_PUNCTUATION)


[typographical] ~121-~121: Consider inserting a comma for improved readability.
Context: ... When the final lines of a document form a numbered list they are replaced with fo...

(INITIAL_ADVP_COMMA)


[uncategorized] ~121-~121: Possible missing comma found.
Context: ...nal lines of a document form a numbered list they are replaced with footnote definit...

(AI_HYDRA_LEO_MISSING_COMMA)


[style] ~152-~152: You have used the passive voice repeatedly in nearby sentences. To make your writing clearer and easier to read, consider using active voice.
Context: ...ed, and complex nested or styled tables are not supported. After conversion each HTML table is re...

(REP_PASSIVE_VOICE)


[uncategorized] ~153-~153: Possible missing comma found.
Context: ... styled tables are not supported. After conversion each HTML table is represented as a Mar...

(AI_HYDRA_LEO_MISSING_COMMA)


[style] ~153-~153: You have used the passive voice repeatedly in nearby sentences. To make your writing clearer and easier to read, consider using active voice.
Context: ...orted. After conversion each HTML table is represented as a Markdown table so the usual reflow...

(REP_PASSIVE_VOICE)


[uncategorized] ~154-~154: Use a comma before ‘so’ if it connects two independent clauses (unless they are closely connected and short).
Context: ...table is represented as a Markdown table so the usual reflow algorithm can align it...

(COMMA_COMPOUND_SENTENCE_2)


[uncategorized] ~265-~265: Use a comma before ‘so’ if it connects two independent clauses (unless they are closely connected and short).
Context: ...orker gathers its output before printing so results appear in the original order. T...

(COMMA_COMPOUND_SENTENCE_2)

🧰 Additional context used
📓 Path-based instructions (3)
**/*.rs

📄 CodeRabbit Inference Engine (AGENTS.md)

**/*.rs: Comments must use en-GB-oxendict spelling and grammar.
Function documentation must include clear examples.
Every module must begin with a module level (//!) comment explaining the module's purpose and utility.
Document public APIs using Rustdoc comments (///) so documentation can be generated with cargo doc.
Place function attributes after doc comments.
Do not use return in single-line functions.
Prefer immutable data and avoid unnecessary mut bindings.
Handle errors with the Result type instead of panicking where feasible.
Avoid unsafe code unless absolutely necessary and document any usage clearly.
Clippy warnings MUST be disallowed.
Lints must not be silenced except as a last resort.
Lint rule suppressions must be tightly scoped and include a clear reason.
Prefer expect over allow.
Prefer .expect() over .unwrap().
Use concat!() to combine long string literals rather than escaping newlines with a backslash.
Use predicate functions for conditional criteria with more than two branches.
Fix any warnings emitted during tests in the code itself rather than silencing them.
Where a function is too long, extract meaningfully named helper functions adhering to separation of concerns and CQRS.
Where a function has too many parameters, group related parameters in meaningfully named structs.
Where a function is returning a large error consider using Arc to reduce the amount of data returned.
Comment why, not what. Explain assumptions, edge cases, trade-offs, or complexity. Don't echo the obvious.
Use functions and composition. Avoid repetition by extracting reusable logic. Prefer generators or comprehensions, and declarative code to imperative repetition when readable.
Small, meaningful functions. Functions must be small, clear in purpose, single responsibility, and obey command/query segregation.
Name things precisely. Use clear, descriptive variable and function names. For booleans, prefer names with is, has, or should.
Structure log...

Files:

  • src/table.rs

⚙️ CodeRabbit Configuration File

**/*.rs: * Seek to keep the cyclomatic complexity of functions no more than 12.

  • Adhere to single responsibility and CQRS

  • Place function attributes after doc comments.

  • Do not use return in single-line functions.

  • Move conditionals with >2 branches into a predicate function.

  • Avoid unsafe unless absolutely necessary.

  • Every module must begin with a //! doc comment that explains the module's purpose and utility.

  • Comments and docs must follow en-GB-oxendict (-ize / -our) spelling and grammar

  • Lints must not be silenced except as a last resort.

    • #[allow] is forbidden.
    • Only narrowly scoped #[expect(lint, reason = "...")] is allowed.
    • No lint groups, no blanket or file-wide suppression.
    • Include FIXME: with link if a fix is expected.
  • Use rstest fixtures for shared setup and to avoid repetition between tests.

  • Replace duplicated tests with #[rstest(...)] parameterised cases.

  • Prefer mockall for mocks/stubs.

  • Prefer .expect() over .unwrap()

  • Ensure that any API or behavioural changes are reflected in the documentation in docs/

  • Ensure that any completed roadmap steps are recorded in the appropriate roadmap in docs/

  • Files must not exceed 400 lines in length

    • Large modules must be decomposed
    • Long match statements or dispatch tables should be decomposed by domain and collocated with targets
    • Large blocks of inline data (e.g., test fixtures, constants or templates) must be moved to external files and inlined at compile-time or loaded at run-time.

Files:

  • src/table.rs
docs/**/*.md

📄 CodeRabbit Inference Engine (AGENTS.md)

docs/**/*.md: Reference: Use the markdown files within the docs/ directory as a knowledge base and source of truth for project requirements, dependency choices, and architectural decisions.
Update: When new decisions are made, requirements change, libraries are added/removed, or architectural patterns evolve, proactively update the relevant file(s) in the docs/ directory to reflect the latest state.
Documentation must use en-GB-oxendict spelling and grammar (with the exception of "license" which is to be left unchanged for community consistency).

Files:

  • docs/markdown-stream-processor.md
  • docs/architecture.md
**/*.md

📄 CodeRabbit Inference Engine (AGENTS.md)

**/*.md: Validate Markdown files using make markdownlint.
Run make fmt after any documentation changes to format all Markdown files and fix table markup.
Validate Mermaid diagrams in Markdown files by running make nixie.
Markdown paragraphs and bullet points must be wrapped at 80 columns.
Code blocks must be wrapped at 120 columns.
Tables and headings must not be wrapped.
Use dashes (-) for list bullets.
Use GitHub-flavoured Markdown footnotes ([^1]) for references.

Files:

  • docs/markdown-stream-processor.md
  • README.md
  • docs/architecture.md

⚙️ CodeRabbit Configuration File

**/*.md: * Avoid 2nd person or 1st person pronouns ("I", "you", "we")

  • Use en-GB-oxendict (-ize / -our) spelling and grammar
  • Paragraphs and bullets must be wrapped to 80 columns, except where a long URL would prevent this (in which case, silence MD013 for that line)
  • Code blocks should be wrapped to 120 columns.
  • Headings must not be wrapped.
  • Documents must start with a level 1 heading
  • Headings must correctly increase or decrease by no more than one level at a time
  • Use GitHub-flavoured Markdown style for footnotes and endnotes.
  • Numbered footnotes must be numbered by order of appearance in the document.

Files:

  • docs/markdown-stream-processor.md
  • README.md
  • docs/architecture.md
🪛 LanguageTool
docs/architecture.md

[style] ~72-~72: You have used the passive voice repeatedly in nearby sentences. To make your writing clearer and easier to read, consider using active voice.
Context: ... | 1 | 22 | | 3 | 4 | Code fences are passed through verbatim: rust | not | a | ...

(REP_PASSIVE_VOICE)


[typographical] ~88-~88: Two consecutive dots
Context: ...level process_stream_opts helper. Set Options { footnotes: true, ..Default::default() } when calling `proc...

(DOUBLE_PUNCTUATION)


[typographical] ~121-~121: Consider inserting a comma for improved readability.
Context: ... When the final lines of a document form a numbered list they are replaced with fo...

(INITIAL_ADVP_COMMA)


[uncategorized] ~121-~121: Possible missing comma found.
Context: ...nal lines of a document form a numbered list they are replaced with footnote definit...

(AI_HYDRA_LEO_MISSING_COMMA)


[style] ~152-~152: You have used the passive voice repeatedly in nearby sentences. To make your writing clearer and easier to read, consider using active voice.
Context: ...ed, and complex nested or styled tables are not supported. After conversion each HTML table is re...

(REP_PASSIVE_VOICE)


[uncategorized] ~153-~153: Possible missing comma found.
Context: ... styled tables are not supported. After conversion each HTML table is represented as a Mar...

(AI_HYDRA_LEO_MISSING_COMMA)


[style] ~153-~153: You have used the passive voice repeatedly in nearby sentences. To make your writing clearer and easier to read, consider using active voice.
Context: ...orted. After conversion each HTML table is represented as a Markdown table so the usual reflow...

(REP_PASSIVE_VOICE)


[uncategorized] ~154-~154: Use a comma before ‘so’ if it connects two independent clauses (unless they are closely connected and short).
Context: ...table is represented as a Markdown table so the usual reflow algorithm can align it...

(COMMA_COMPOUND_SENTENCE_2)


[uncategorized] ~265-~265: Use a comma before ‘so’ if it connects two independent clauses (unless they are closely connected and short).
Context: ...orker gathers its output before printing so results appear in the original order. T...

(COMMA_COMPOUND_SENTENCE_2)

⏰ Context from checks skipped due to timeout of 240000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: build-test

Comment thread docs/architecture.md Outdated
Comment thread docs/architecture.md Outdated
Comment thread docs/architecture.md Outdated
Comment thread docs/markdown-stream-processor.md Outdated
Comment on lines 14 to 17
- `html::convert_html_tables` transforms basic HTML tables into Markdown so they
can be reflowed like regular tables. See
[HTML table support](html-table-support.md).
[HTML table support](architecture.md#html-table-support-in-mdtablefix).
- `wrap::wrap_text` applies optional line wrapping. It relies on the
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick (assertive)

Collapse the ‘See’ stub into the preceding sentence.

Avoids an unnecessary paragraph break and an orphaned word.

-  can be reflowed like regular tables. See
-  [HTML table support](architecture.md#html-table-support-in-mdtablefix).
+  can be reflowed like regular tables. See \
+  [HTML table support](architecture.md#html-table-support-in-mdtablefix).
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
- `html::convert_html_tables` transforms basic HTML tables into Markdown so they
can be reflowed like regular tables. See
[HTML table support](html-table-support.md).
[HTML table support](architecture.md#html-table-support-in-mdtablefix).
- `wrap::wrap_text` applies optional line wrapping. It relies on the
- `html::convert_html_tables` transforms basic HTML tables into Markdown so they
can be reflowed like regular tables. See \
[HTML table support](architecture.md#html-table-support-in-mdtablefix).
- `wrap::wrap_text` applies optional line wrapping. It relies on the
🤖 Prompt for AI Agents
In docs/markdown-stream-processor.md around lines 14 to 17, the phrase "See
[HTML table support](architecture.md#html-table-support-in-mdtablefix)" should
be merged into the previous sentence to avoid an unnecessary paragraph break and
orphaned word. Combine the sentences so that the reference is part of the same
sentence describing the function of `html::convert_html_tables`.

Comment thread docs/markdown-stream-processor.md Outdated
Comment on lines +76 to +80
After scanning all lines, the processor performs optional post-processing steps
such as ellipsis replacement and footnote conversion. See
[footnote conversion](footnote-conversion.md) for details. The function then
returns the updated stream for writing to disk or further manipulation.
[footnote conversion](architecture.md#footnote-conversion) for details. The
function then returns the updated stream for writing to disk or further
manipulation.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick (assertive)

Inline the footnote-conversion reference to remove the dangling ‘See’.

-such as ellipsis replacement and footnote conversion. See
-[footnote conversion](architecture.md#footnote-conversion) for details. The
-function then returns the updated stream for writing to disk or further
-manipulation.
+such as ellipsis replacement and footnote conversion. See \
+[footnote conversion](architecture.md#footnote-conversion) for details. The
+function then returns the updated stream for writing to disk or further
+manipulation.
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
After scanning all lines, the processor performs optional post-processing steps
such as ellipsis replacement and footnote conversion. See
[footnote conversion](footnote-conversion.md) for details. The function then
returns the updated stream for writing to disk or further manipulation.
[footnote conversion](architecture.md#footnote-conversion) for details. The
function then returns the updated stream for writing to disk or further
manipulation.
After scanning all lines, the processor performs optional post-processing steps
such as ellipsis replacement and footnote conversion. See \
[footnote conversion](architecture.md#footnote-conversion) for details. The
function then returns the updated stream for writing to disk or further
manipulation.
🤖 Prompt for AI Agents
In docs/markdown-stream-processor.md around lines 76 to 80, the phrase "See
[footnote conversion](architecture.md#footnote-conversion)" creates a dangling
reference. Inline the footnote conversion explanation directly in the sentence
to remove the dangling 'See', making the text flow naturally without requiring
the reader to look elsewhere.

Comment thread README.md
Comment on lines +162 to +164
See
[HTML table support for more details](docs/architecture.md#html-table-support-in-mdtablefix)
.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick (assertive)

Join the split sentence and remove the orphan full stop.

The current layout renders an isolated “See” line and a dangling “.” on its own
line, tripping markdownlint (MD010/MD032).

-See
-[HTML table support for more details](docs/architecture.md#html-table-support-in-mdtablefix)
-.
+See [HTML&nbsp;table&nbsp;support&nbsp;for&nbsp;more&nbsp;details](docs/architecture.md#html-table-support-in-mdtablefix).
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
See
[HTML table support for more details](docs/architecture.md#html-table-support-in-mdtablefix)
.
See [HTML&nbsp;table&nbsp;support&nbsp;for&nbsp;more&nbsp;details](docs/architecture.md#html-table-support-in-mdtablefix).
🤖 Prompt for AI Agents
In README.md around lines 162 to 164, the sentence is split causing an isolated
"See" line and a dangling period on the next line, which triggers markdownlint
warnings. Join the split sentence into a single line by moving the link and the
period to the same line as "See" to form a complete sentence without orphan
punctuation.

Comment thread README.md Outdated
Comment thread src/table.rs Outdated
@leynos
Copy link
Copy Markdown
Owner Author

leynos commented Jul 23, 2025

@coderabbitai review

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Jul 23, 2025

✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

♻️ Duplicate comments (1)
README.md (1)

162-164: Join the split sentence once and for all.

The orphan “See” and full stop still violate MD010/MD032.

-See
-[HTML&nbsp;table&nbsp;support&nbsp;for&nbsp;more&nbsp;details](docs/architecture.md#html-table-support-in-mdtablefix)
-.
+See&nbsp;[HTML&nbsp;table&nbsp;support&nbsp;for&nbsp;more&nbsp;details](docs/architecture.md#html-table-support-in-mdtablefix).
📜 Review details

Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between ce05010 and 28c3bb0.

📒 Files selected for processing (10)
  • README.md (1 hunks)
  • docs/architecture.md (1 hunks)
  • docs/footnote-conversion.md (0 hunks)
  • docs/html-table-support.md (0 hunks)
  • docs/markdown-stream-processor.md (0 hunks)
  • docs/module-relationships.md (0 hunks)
  • docs/rayon-concurrency.md (0 hunks)
  • docs/unicode-width.md (0 hunks)
  • src/table.rs (1 hunks)
  • src/wrap.rs (1 hunks)
💤 Files with no reviewable changes (6)
  • docs/unicode-width.md
  • docs/markdown-stream-processor.md
  • docs/footnote-conversion.md
  • docs/rayon-concurrency.md
  • docs/module-relationships.md
  • docs/html-table-support.md
🧰 Additional context used
📓 Path-based instructions (2)
**/*.rs

⚙️ CodeRabbit Configuration File

**/*.rs: * Seek to keep the cyclomatic complexity of functions no more than 12.

  • Adhere to single responsibility and CQRS

  • Place function attributes after doc comments.

  • Do not use return in single-line functions.

  • Move conditionals with >2 branches into a predicate function.

  • Avoid unsafe unless absolutely necessary.

  • Every module must begin with a //! doc comment that explains the module's purpose and utility.

  • Comments and docs must follow en-GB-oxendict (-ize / -our) spelling and grammar

  • Lints must not be silenced except as a last resort.

    • #[allow] is forbidden.
    • Only narrowly scoped #[expect(lint, reason = "...")] is allowed.
    • No lint groups, no blanket or file-wide suppression.
    • Include FIXME: with link if a fix is expected.
  • Use rstest fixtures for shared setup and to avoid repetition between tests.

  • Replace duplicated tests with #[rstest(...)] parameterised cases.

  • Prefer mockall for mocks/stubs.

  • Prefer .expect() over .unwrap()

  • Ensure that any API or behavioural changes are reflected in the documentation in docs/

  • Ensure that any completed roadmap steps are recorded in the appropriate roadmap in docs/

  • Files must not exceed 400 lines in length

    • Large modules must be decomposed
    • Long match statements or dispatch tables should be decomposed by domain and collocated with targets
    • Large blocks of inline data (e.g., test fixtures, constants or templates) must be moved to external files and inlined at compile-time or loaded at run-time.

Files:

  • src/table.rs
  • src/wrap.rs
**/*.md

⚙️ CodeRabbit Configuration File

**/*.md: * Avoid 2nd person or 1st person pronouns ("I", "you", "we")

  • Use en-GB-oxendict (-ize / -our) spelling and grammar
  • Paragraphs and bullets must be wrapped to 80 columns, except where a long URL would prevent this (in which case, silence MD013 for that line)
  • Code blocks should be wrapped to 120 columns.
  • Headings must not be wrapped.
  • Documents must start with a level 1 heading
  • Headings must correctly increase or decrease by no more than one level at a time
  • Use GitHub-flavoured Markdown style for footnotes and endnotes.
  • Numbered footnotes must be numbered by order of appearance in the document.

Files:

  • README.md
  • docs/architecture.md
🪛 LanguageTool
docs/architecture.md

[style] ~81-~81: You have used the passive voice repeatedly in nearby sentences. To make your writing clearer and easier to read, consider using active voice.
Context: ... | 1 | 22 | | 3 | 4 | Code fences are passed through verbatim: rust | not | a | ...

(REP_PASSIVE_VOICE)


[typographical] ~97-~97: Two consecutive dots
Context: ...level process_stream_opts helper. Set Options { footnotes: true, ..Default::default() } when calling `proc...

(DOUBLE_PUNCTUATION)


[typographical] ~130-~130: Consider inserting a comma for improved readability.
Context: ... When the final lines of a document form a numbered list, they are replaced with f...

(INITIAL_ADVP_COMMA)


[style] ~161-~161: You have used the passive voice repeatedly in nearby sentences. To make your writing clearer and easier to read, consider using active voice.
Context: ...ed, and complex nested or styled tables are not supported. After conversion, each HTML table is r...

(REP_PASSIVE_VOICE)


[style] ~162-~162: You have used the passive voice repeatedly in nearby sentences. To make your writing clearer and easier to read, consider using active voice.
Context: ...rted. After conversion, each HTML table is represented as a Markdown table, so the usual reflo...

(REP_PASSIVE_VOICE)

🔇 Additional comments (1)
src/table.rs (1)

3-4: Link is now rustdoc-friendly – good fix.
The clickable reference resolves the previous nit.

Comment thread docs/architecture.md
Comment on lines +24 to +31
delimiters.
- `html::convert_html_tables` transforms basic HTML tables into Markdown so \
they can be reflowed like regular tables. See \
[HTML table support](#html-table-support-in-mdtablefix).
- `wrap::wrap_text` applies optional line wrapping. It relies on the
`unicode-width` crate for accurate character widths.

The function maintains a small state machine that tracks whether it is inside a
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick (assertive)

Wrap long list items to ≤ 80 columns.

Lines in this range overshoot the style limit for prose files. Hard-wrap to maintain consistency with the project’s Markdown guidelines.

🤖 Prompt for AI Agents
In docs/architecture.md around lines 24 to 31, the lines describing the
functions exceed the 80-column limit for prose files. Reformat these lines by
hard-wrapping the text so that no line is longer than 80 characters, ensuring
the content remains clear and consistent with the project's Markdown style
guidelines.

Comment thread src/wrap.rs
Comment on lines +3 to +5
//! Unicode width handling follows the "Unicode Width Handling" section in
//! `docs/architecture.md` and uses the `unicode-width` crate for accurate
//! display calculations.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick (assertive)

Turn the plain file path into a clickable Rustdoc link.

Make the reference navigable and keep it on one logical line to avoid MD013 warnings.

-//! Unicode width handling follows the "Unicode Width Handling" section in
-//! `docs/architecture.md` and uses the `unicode-width` crate for accurate
-//! display calculations.
+//! Unicode width handling follows the \
+//! ["Unicode Width Handling"](../../docs/architecture.md#unicode-width-handling) \
+//! section and uses the `unicode-width` crate for accurate display calculations.
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
//! Unicode width handling follows the "Unicode Width Handling" section in
//! `docs/architecture.md` and uses the `unicode-width` crate for accurate
//! display calculations.
//! Unicode width handling follows the \
//! ["Unicode Width Handling"](../../docs/architecture.md#unicode-width-handling) \
//! section and uses the `unicode-width` crate for accurate display calculations.
🤖 Prompt for AI Agents
In src/wrap.rs around lines 3 to 5, the file path `docs/architecture.md` in the
Rustdoc comment should be converted into a clickable link. Replace the plain
text path with a Markdown link format using backticks and square brackets,
keeping the entire reference on a single line to avoid MD013 lint warnings.

@leynos leynos merged commit cd6dfd2 into main Jul 23, 2025
2 checks passed
@leynos leynos deleted the codex/combine-architecture-documents-into-one-file branch July 23, 2025 19:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant