Skip to content

Format docs with mdformat#36

Merged
leynos merged 8 commits intomainfrom
codex/run-mdformat-and-fix-markdownlint-errors
Jun 16, 2025
Merged

Format docs with mdformat#36
leynos merged 8 commits intomainfrom
codex/run-mdformat-and-fix-markdownlint-errors

Conversation

@leynos
Copy link
Copy Markdown
Owner

@leynos leynos commented Jun 16, 2025

Summary

  • run mdformat-all on repository markdown files
  • fix markdownlint issues in several docs
  • fix markdownlint issues in pytest-httpx guide
  • fix markdownlint errors in OpenRouter client guide
  • fix websocket testing guide lint
  • fix msgspec guide markdownlint errors

Testing

  • markdownlint docs/async-sqlalchemy-with-pg-and-falcon.md
  • markdownlint docs/design-proposals.md
  • markdownlint docs/mocking-with-pytest-httpx.md
  • markdownlint docs/openrouter-completions-api-client.md
  • markdownlint docs/testing-falcon-websocket-apis.md
  • markdownlint docs/using-falcon-with-msgspec-structs.md

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

Summary by Sourcery

Format repository documentation uniformly with mdformat-all and address markdownlint issues across guides

Documentation:

  • Apply mdformat-all formatting to all markdown files
  • Fix markdownlint errors in pytest-httpx mocking guide
  • Correct code fences and table syntax in OpenRouter completions client guide
  • Update async-sqlalchemy-with-pg-and-falcon guide formatting and parameter tables
  • Clean up design-proposals, testing-falcon-endpoints, and websocket testing docs for lint compliance
  • Normalize CLI guide, Postgres schema, embedding-with-hf-tei, and msgspec middleware docs

Summary by CodeRabbit

  • Documentation
    • Enhanced formatting and presentation in numerous documents for improved readability and consistency.
    • Standardised fenced code blocks with explicit language tags to ensure proper syntax highlighting.
    • Reformatted tables into clear, well-aligned Markdown structures and replaced complex tables with simpler bulleted lists where appropriate.
    • Refined section headings, narrative flow, and example formatting to boost clarity.
    • Maintained all technical content and instructions unchanged; updates focus solely on style and structure.

@sourcery-ai
Copy link
Copy Markdown
Contributor

sourcery-ai Bot commented Jun 16, 2025

Reviewer's Guide

This PR applies mdformat-all to reservoir markdown files to normalize whitespace, code fences, and headings, and fixes markdownlint violations across key documentation—standardizing code block languages, table syntax, link escaping, and list formatting in guides for pytest-httpx, OpenRouter, SQLAlchemy & Falcon, design proposals, async testing, WebSocket APIs, msgspec usage, CLI, and schema docs.

File-Level Changes

Change Details Files
Standardize Markdown formatting repository-wide
  • Run mdformat-all to reflow text and normalize whitespace
  • Unify code fence syntax, heading levels, and list indentations
  • Adjust line breaks and spacing for lint compliance
docs/mocking-with-pytest-httpx.md
docs/openrouter-completions-api-client.md
docs/async-sqlalchemy-with-pg-and-falcon.md
docs/design-proposals.md
docs/testing-async-falcon-endpoints.md
docs/testing-falcon-websocket-apis.md
docs/using-falcon-with-msgspec-structs.md
docs/mvp-architecture.md
docs/mid-level-design.md
docs/cli-guide.md
docs/postgresql-schema-design.md
docs/testing-sqlalchemy-with-temporary-postgresql.md
docs/embedding-with-hf-tei.md
Fix markdownlint issues in pytest-httpx guide
  • Add language tags to all code fences and normalize indentation
  • Escape angle brackets in URLs and remove trailing spaces
  • Standardize list markers and heading formatting
docs/mocking-with-pytest-httpx.md
Resolve lint violations in OpenRouter client guide
  • Correct parameter type syntax and wrap text in inline code
  • Convert embedded HTML tables to Markdown table syntax
  • Unify code block fencing and indent list items
docs/openrouter-completions-api-client.md
Correct SQLAlchemy & Falcon docs formatting
  • Wrap Python samples in fenced code blocks and indent consistently
  • Convert HTML tables into concise Markdown tables
  • Reflow parameter lists and escape backslashes appropriately
docs/async-sqlalchemy-with-pg-and-falcon.md
Standardize design proposal & architecture docs
  • Remove stray comments and placeholder text
  • Restructure tables into proper Markdown syntax
  • Normalize heading levels and list formatting
docs/design-proposals.md
docs/mvp-architecture.md
docs/mid-level-design.md
Update async Falcon endpoint & WebSocket testing guides
  • Add or correct python language markers on code fences
  • Consolidate fixture examples into single fenced blocks
  • Align indentations and escape inline special characters
docs/testing-async-falcon-endpoints.md
docs/testing-falcon-websocket-apis.md
Fix msgspec guide markdownlint issues
  • Add language identifiers to code fences and escape HTML in tables
  • Convert raw HTML table rows into concise Markdown rows
  • Simplify import blocks and remove extra blank lines
docs/using-falcon-with-msgspec-structs.md
Miscellaneous CLI, schema, testing, and embedding doc fixes
  • Convert SQL and shell examples to fenced code blocks
  • Escape environment variable mentions and fix URI links
  • Reformat lists and harmonize code fence styles
docs/cli-guide.md
docs/postgresql-schema-design.md
docs/testing-sqlalchemy-with-temporary-postgresql.md
docs/embedding-with-hf-tei.md

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 Jun 16, 2025

Important

Review skipped

Auto incremental reviews are disabled on this repository.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Walkthrough

This update standardises and improves the formatting of multiple documentation files. Changes include correcting code block delimiters with explicit language tags, reformatting tables into proper Markdown, enhancing code snippet clarity, and improving section headings. No code logic or technical content was altered; all modifications are stylistic and structural for better readability.

Changes

Files/Groups Change Summary
docs/async-sqlalchemy-with-pg-and-falcon.md Standardised code blocks with language tags, reformatted tables, improved whitespace and readability.
docs/cli-guide.md Reflowed paragraphs, improved line structure, and enhanced readability.
docs/design-proposals.md Added top-level title, demoted architecture heading, reformatted tables, replaced complex table with bullet list.
docs/embedding-with-hf-tei.md Reformatted Cypher command example for clarity.
docs/mid-level-design.md Expanded and clarified worker process narrative, reformatted code blocks, improved explanation structure.
docs/mocking-with-pytest-httpx.md Converted to Markdown headers, fenced code blocks, improved code and text formatting.
docs/mvp-architecture.md Reformatted all tables, improved section headers, and clarified code block language tags.
docs/openrouter-completions-api-client.md Simplified title, improved code block language tags, replaced HTML tables with Markdown, clarified examples.
docs/postgresql-schema-design.md Reformatted SQL condition as a multi-line code block.
docs/testing-async-falcon-endpoints.md Standardised code blocks and table formatting, improved code example clarity, updated section headings.
docs/testing-falcon-websocket-apis.md Standardised code block language tags, minor comment reformatting.
docs/testing-sqlalchemy-with-temporary-postgresql.md Simplified document title, improved link formatting in resources section.
docs/using-falcon-with-msgspec-structs.md Standardised code block language tags, improved table formatting, clarified code examples.

Sequence Diagram(s)

Not applicable: changes are solely documentation formatting and presentation improvements.

Possibly related PRs

  • Fix markdown fenced code block languages mdtablefix#52: The main PR’s changes to standardize fenced code blocks with explicit language identifiers in multiple documentation files are directly related to the retrieved PR’s focus on fixing markdown fenced code block languages for improved syntax highlighting and formatting consistency.
  • Fix markdownlint issues mxd#130: Both PRs focus exclusively on improving markdown documentation formatting and presentation without changing any code logic, control flow, or public API declarations, making their changes related in purpose but applied to different documentation files.
  • Fix markdownlint errors lille#53: The main PR and the retrieved PR both focus exclusively on fixing markdown formatting and style issues in documentation files without changing any code logic or exported entities, making their changes related in purpose and nature but applied to different documentation content.

Poem

A rabbit hopped through docs today,
Tidying tables along the way.
Code blocks fenced with language bright,
Headings clear and tables right.
Now every page is neat and keen—
The burrow’s clean, the code serene!
🐇✨

✨ Finishing Touches
🧪 Generate Unit Tests
  • Create PR with Unit Tests
  • Commit Unit Tests in branch codex/run-mdformat-and-fix-markdownlint-errors
  • Post Copyable Unit Tests in Comment

🪧 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 auto-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 and they look great!

Prompt for AI Agents
Please address the comments from this code review:
## Individual Comments

### Comment 1
<location> `docs/openrouter-completions-api-client.md:338` </location>
<code_context>
+| ChatCompletionRequest   | model: str, messages: List[ChatMessage], stream: bool = False, temperature: Optional[float], tools: Optional\]                                   | Main request body for /chat/completions                                   | model and messages are typically required. Many optional parameters for controlling generation.        |
</code_context>

<issue_to_address>
Typo: stray backslash in 'tools: Optional\]'.

Please correct 'tools: Optional\]' to 'tools: Optional[...]' or the appropriate type annotation.
</issue_to_address>

<suggested_fix>
<<<<<<< SEARCH
| ChatCompletionRequest   | model: str, messages: List[ChatMessage], stream: bool = False, temperature: Optional[float], tools: Optional\]                                   | Main request body for /chat/completions                                   | model and messages are typically required. Many optional parameters for controlling generation.        |
=======
| ChatCompletionRequest   | model: str, messages: List[ChatMessage], stream: bool = False, temperature: Optional[float], tools: Optional[...]                                | Main request body for /chat/completions                                   | model and messages are typically required. Many optional parameters for controlling generation.        |
>>>>>>> REPLACE

</suggested_fix>

### Comment 2
<location> `docs/testing-async-falcon-endpoints.md:195` </location>
<code_context>
 async with AsyncClient(\
-transport=ASGITransport(app=app), base_url="http://test"\
-) as ac:\
+transport=ASGITransport(app=app), base_url="<http://test%22%5C> ) as ac:\
 response = await ac.get("/")\
 \# Assertions follow
</code_context>

<issue_to_address>
Possible typo: base_url should be "http://test" instead of "<http://test>".

Angle brackets in the base_url are non-standard and may cause issues. Please use "http://test" without brackets.
</issue_to_address>

<suggested_fix>
<<<<<<< SEARCH
async with AsyncClient(\
transport=ASGITransport(app=app), base_url="<http://test%22%5C> ) as ac:\
response = await ac.get("/")\
=======
async with AsyncClient(
    transport=ASGITransport(app=app), base_url="http://test"
) as ac:
    response = await ac.get("/")
>>>>>>> REPLACE

</suggested_fix>

### Comment 3
<location> `docs/testing-async-falcon-endpoints.md:277` </location>
<code_context>
 async def test_get_things(client_app):\
 async with AsyncClient(transport=ASGITransport(app=client_app),
-base_url="http://test") as ac:\
+base_url="<http://test>") as ac:\
 response = await ac.get("/things")\
 assert response.status_code == falcon.HTTP_200\
</code_context>

<issue_to_address>
Possible typo: base_url should be "http://test" instead of "<http://test>".

Angle brackets in the base_url are non-standard and may cause issues. Please use "http://test" without brackets.

Suggested implementation:

```
async with AsyncClient(transport=ASGITransport(app=client_app),
base_url="http://test") as ac:\

```

```
async with AsyncClient(transport=ASGITransport(app=client_app),
base_url="http://test") as ac:\

```
</issue_to_address>

### Comment 4
<location> `docs/testing-async-falcon-endpoints.md:489` </location>
<code_context>
-async with AsyncClient(transport=ASGITransport(app=app), base_url="http://test")
-as client:\
+async with AsyncClient(transport=ASGITransport(app=app),
+base_url="<http://test>") as client:\
 yield client\
 \# The client is automatically closed here upon exiting the 'async with' block.
</code_context>

<issue_to_address>
Possible typo: base_url should be "http://test" instead of "<http://test>".

Angle brackets in the base_url are non-standard and may cause issues. Please use "http://test" without brackets.

Suggested implementation:

```
async with AsyncClient(transport=ASGITransport(app=app),
base_url="http://test") as client:\
yield client\

```

```
return AsyncClient(transport=ASGITransport(app=app_svc),
base_url="http://test>")

```
</issue_to_address>

### Comment 5
<location> `docs/testing-async-falcon-endpoints.md:733` </location>
<code_context>
 def client_svc(event_loop): # event_loop fixture from pytest-asyncio\
-return AsyncClient(transport=ASGITransport(app=app_svc), base_url="http://test")
+return AsyncClient(transport=ASGITransport(app=app_svc),
+base_url="<http://test>")

 @pytest.mark.asyncio\
</code_context>

<issue_to_address>
Possible typo: base_url should be "http://test" instead of "<http://test>".

Angle brackets in the base_url are non-standard and may cause confusion or errors. Use "http://test" without brackets.

Suggested implementation:

```
async with AsyncClient(transport=ASGITransport(app=app),
base_url="http://test") as client:\
yield client\
\# The client is automatically closed here upon exiting the 'async with' block.

```

```
@pytest.fixture\
def client_svc(event_loop): # event_loop fixture from pytest-asyncio\
return AsyncClient(transport=ASGITransport(app=app_svc),
base_url="http://test")

```

```
async def test_root_endpoint(app): # Assuming 'app' is provided by a fixture\
async with AsyncClient(\
transport=ASGITransport(app=app), base_url="http://test") as ac:\
response = await ac.get("/")\
\# Assertions follow

```

```
The base_url="http://test" is a mandatory parameter for HTTPX, serving as a

```
</issue_to_address>

### Comment 6
<location> `docs/design-proposals.md:3` </location>
<code_context>
+# Design Proposal
+
 Thanks, that's exactly the context I needed. I’ll put together a proposed
 architecture for a cloud-deployed, novelty-based knowledge graph memory system
 with retrieval-augmented generation (RAG), tuned for multiple authenticated
</code_context>

<issue_to_address>
First person pronouns ('I', 'you') are used in this line, which should be avoided per the style guide.

Consider rephrasing to avoid first and second person pronouns. For example: 'The following is a proposed architecture for a cloud-deployed, novelty-based knowledge graph memory system...'
</issue_to_address>

### Comment 7
<location> `docs/design-proposals.md:10` </location>
<code_context>

 I’ll let you know as soon as the design is ready for review.

-# Cloud-Deployable Knowledge Graph Memory & RAG System Architecture
</code_context>

<issue_to_address>
First and second person pronouns ('I', 'you') are used here, which should be avoided.

Please rephrase to avoid first and second person pronouns. For example: 'A notification will be provided when the design is ready for review.'
</issue_to_address>

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.

Comment thread docs/openrouter-completions-api-client.md Outdated
Comment thread docs/testing-async-falcon-endpoints.md Outdated
Comment thread docs/testing-async-falcon-endpoints.md Outdated
Comment thread docs/testing-async-falcon-endpoints.md Outdated
Comment thread docs/testing-async-falcon-endpoints.md Outdated
Comment thread docs/design-proposals.md Outdated
Comment thread docs/design-proposals.md Outdated
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: 16

🔭 Outside diff range comments (8)
docs/using-falcon-with-msgspec-structs.md (3)

77-87: Inconsistent closing fence specification
The code block is opened with python but closed with python. Closing fences must be just backticks (no info string) and match the count of the opener.


100-121: Incorrect code-fence pairing in MessagePack handler snippet
The handler snippet opening and closing both include the language tag. Replace the closing python with a plain to ensure proper block termination.


151-162: Closing fence should not include language tag
The MessagePack registration code block closes with python. Change it to so the block renders correctly under standard Markdown.

docs/mocking-with-pytest-httpx.md (2)

119-129: Ensure all Python examples are fenced

Make sure each code example (e.g., the synchronous and asynchronous httpx_mock tests) uses a triple-backtick fence with python for syntax highlighting:

```python
def test_sync_example(httpx_mock: HTTPXMock):
    httpx_mock.add_response(...)
    ...
This enhances readability and consistency.

---

`221-223`: **Convert numeric section to a proper heading**

The “5. Advanced Request Matching” section is missing a heading marker. Add `## ` to make it a second-level heading:
```diff
- 5\. Advanced Request Matching Beyond basic URL...
+ ## 5. Advanced Request Matching
+
+ Beyond basic URL...
docs/async-sqlalchemy-with-pg-and-falcon.md (3)

1-1: Remove bold markup from document title.

Markdown headings support styling natively; using # A Comprehensive Guide… is sufficient—drop the surrounding **.


43-59: Clean up trailing backslashes in code block.

The snippet for create_async_engine has unnecessary \ at end of several lines, which may render incorrectly. Remove those backslashes and let the fenced python block handle line breaks.


107-118: Remove escaping backslashes and ensure proper indentation.

Similarly, the async_sessionmaker example contains trailing \ and inconsistent indentation. Eliminate those escapes and align parameters under async_sessionmaker( to improve readability.

📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 4f54d87 and a6b7dad.

📒 Files selected for processing (13)
  • docs/async-sqlalchemy-with-pg-and-falcon.md (30 hunks)
  • docs/cli-guide.md (2 hunks)
  • docs/design-proposals.md (5 hunks)
  • docs/embedding-with-hf-tei.md (1 hunks)
  • docs/mid-level-design.md (3 hunks)
  • docs/mocking-with-pytest-httpx.md (22 hunks)
  • docs/mvp-architecture.md (3 hunks)
  • docs/openrouter-completions-api-client.md (17 hunks)
  • docs/postgresql-schema-design.md (1 hunks)
  • docs/testing-async-falcon-endpoints.md (16 hunks)
  • docs/testing-falcon-websocket-apis.md (26 hunks)
  • docs/testing-sqlalchemy-with-temporary-postgresql.md (2 hunks)
  • docs/using-falcon-with-msgspec-structs.md (36 hunks)
🧰 Additional context used
🪛 LanguageTool
docs/embedding-with-hf-tei.md

[style] ~443-~443: Consider using the typographical ellipsis character here instead.
Context: ...igured for that property (e.g. using CREATE VECTOR INDEX ... OPTIONS {vector.dimensions: ..., `v...

(ELLIPSIS)


[style] ~443-~443: Consider using the typographical ellipsis character here instead.
Context: ...X ... OPTIONS {vector.dimensions: ..., vector.similarity_function: ...}). 3. **Query by similarity** using d...

(ELLIPSIS)

docs/mocking-with-pytest-httpx.md

[uncategorized] ~7-~7: Although a hyphen is possible, it is not necessary in a compound modifier in which the first word is an adverb that ends in ‘ly’.
Context: ...ls, and a feature set comparable to the widely-used requests library but with significant e...

(HYPHENATED_LY_ADVERB_ADJECTIVE)


[style] ~64-~64: Consider an alternative adverb to strengthen your wording.
Context: ...g is active only during the test and is properly cleaned up afterward, contributing to t...

(PROPERLY_THOROUGHLY)


[grammar] ~67-~67: Please add a punctuation mark at the end of paragraph.
Context: ...stallation To begin using pytest-httpx, it must be installed in the Python enviro...

(PUNCTUATION_PARAGRAPH_END)


[uncategorized] ~142-~142: Possible missing comma found.
Context: ...epresenting the HTTP method; it is case-insensitive as pytest-httpx internally converts it ...

(AI_HYDRA_LEO_MISSING_COMMA)


[uncategorized] ~168-~168: Possible missing comma found.
Context: ... The Content-Type may default to text/plain or can be explicitly set via the header...

(AI_HYDRA_LEO_MISSING_COMMA)


[grammar] ~271-~271: Please add a punctuation mark at the end of paragraph.
Context: ...object. For partial matching within the JSON ```python from unittest.mock import AN...

(PUNCTUATION_PARAGRAPH_END)


[misspelling] ~301-~301: Use “a” instead of ‘an’ if the following word doesn’t start with a vowel sound, e.g. ‘a sentence’, ‘a university’.
Context: ...pts a string, a re.Pattern instance, or an httpx.URL instance, and matching is ``...

(EN_A_VS_AN)


[grammar] ~301-~301: Please add a punctuation mark at the end of paragraph.
Context: ... or an httpx.URL instance, and matching is ```python httpx_mock.add_response(prox...

(PUNCTUATION_PARAGRAPH_END)


[style] ~441-~441: Since ownership is already implied, this phrasing may be redundant.
Context: ...thod of a class instance can maintain its own state (e.g., a counter, a list of previ...

(PRP_OWN)


[grammar] ~442-~442: Please add a punctuation mark at the end of paragraph.
Context: ... import httpx from pytest_httpx import HTTPXMock ```python class StatefulAPISimulator: ...

(PUNCTUATION_PARAGRAPH_END)


[grammar] ~780-~780: Please add a punctuation mark at the end of paragraph.
Context: ...Response(200, json={"message": "Handled by ```python if os.environ.get("TESTING_W...

(PUNCTUATION_PARAGRAPH_END)


[uncategorized] ~1082-~1082: Possible missing comma found.
Context: ...y. ## 14. Migrating from Other Mocking Libraries Developers transitioning to httpx and ...

(AI_HYDRA_LEO_MISSING_COMMA)


[duplication] ~1086-~1086: Possible typo: you repeated a word.
Context: ...mparisons, which can significantly ease the The responses library is a popular choice f...

(ENGLISH_WORD_REPEAT_RULE)


[style] ~1090-~1090: Consider using the typographical ellipsis character here instead.
Context: ...-|---| | Add a response | responses.add(...) | add_response(...) | | Add a callback...

(ELLIPSIS)


[style] ~1091-~1091: Consider using the typographical ellipsis character here instead.
Context: ...nse | responses.add(...) | add_response(...) | | Add a callback | responses.add_cal...

(ELLIPSIS)


[style] ~1091-~1091: Consider using the typographical ellipsis character here instead.
Context: ...Add a callback | responses.add_callback(...) | add_callback(...) | | Retrieve reque...

(ELLIPSIS)


[style] ~1092-~1092: Consider using the typographical ellipsis character here instead.
Context: ...ponses.add_callback(...) | add_callback(...) | | Retrieve requests made | responses...

(ELLIPSIS)


[style] ~1106-~1106: Consider using the typographical ellipsis character here instead.
Context: ...method) | aioresponses_instance.get(url,...) | add_response(method="GET", url=url,....

(ELLIPSIS)


[style] ~1107-~1107: Consider using the typographical ellipsis character here instead.
Context: ....) | add_response(method="GET", url=url,...) | | Add a callback (for specific metho...

(ELLIPSIS)


[style] ~1108-~1108: Consider using the typographical ellipsis character here instead.
Context: ..._instance.get(url, callback=my_callback,...) | add_callback(my_callback, method="GE...

(ELLIPSIS)


[style] ~1109-~1109: Consider using the typographical ellipsis character here instead.
Context: ...back(my_callback, method="GET", url=url,...) | 14.3. Key Differences and Advantages...

(ELLIPSIS)


[style] ~1126-~1126: This word has been used in one of the immediately preceding sentences. Using a synonym could make your text more interesting to read, unless the repetition is intentional.
Context: ...r adoption, recognizing that developers often bring experience from these established...

(EN_REPEATEDWORDS_OFTEN)

docs/async-sqlalchemy-with-pg-and-falcon.md

[typographical] ~92-~92: If specifying a range, consider using an en dash instead of a hyphen.
Context: ...losed and replaced).9 | 1800-7200 (30-120 minutes) | Preve...

(HYPHEN_TO_EN)


[style] ~95-~95: To form a complete sentence, be sure to include a subject.
Context: ... as checkouts, checkins, and recycling. Can be verbose for production. ...

(MISSING_IT_THERE)


[style] ~507-~507: Consider using the typographical ellipsis character here instead.
Context: ...-----| | selectinload | Issues a second SELECT ... WHERE id IN (...) | 2 (or more for nes...

(ELLIPSIS)

🔇 Additional comments (24)
docs/testing-sqlalchemy-with-temporary-postgresql.md (2)

1-1: Simplified title formatting
The removal of bold styling and the "A Unified Approach" subtitle in favour of a concise header improves readability and aligns with other docs.


413-415: Consistent use of angle-bracket links
Converting URLs to <...> style Markdown links enhances clarity and uniformity.

docs/postgresql-schema-design.md (1)

229-237: Formatted inline SQL into a fenced sql block
The multi-line sql code fence with indentation makes the condition clearer without altering its semantics.

docs/embedding-with-hf-tei.md (1)

81-91: Clear cypher code fence with split options
The explicit cypher language tag and separated lines for vector.dimensions and vector.similarity_function improve readability and maintain consistency with other docs.

docs/cli-guide.md (2)

8-8: Reflowed installation instructions
Condensing the install line into a single, clear sentence enhances user comprehension.


24-28: Unified command descriptions
Combining the login, token, and chat command explanations into fewer lines improves paragraph flow and keeps instructions concise.

docs/testing-falcon-websocket-apis.md (1)

100-102: Standardised fenced code blocks
All code snippets now use explicit language annotations (bash, ini, python), ensuring consistent syntax highlighting and improved readability.

Also applies to: 134-137, 187-196, 263-284, 293-317, 336-348, 396-405, 415-427, 446-457, 474-490, 535-544, 563-582

docs/mid-level-design.md (1)

1-1199: No annotated changes detected to review in this file.

docs/mocking-with-pytest-httpx.md (2)

1-2: Formatting of top-level heading — LGTM

The H1 title is clear and appropriately formatted.


72-76: Bash snippet fencing — Verified

The installation commands are correctly enclosed in a ```bash fenced block.

docs/openrouter-completions-api-client.md (3)

1-1: Document title is clear.

The updated title succinctly conveys the purpose of the client and includes key technologies.


82-92: Consistent fenced code block with language tag.

The example for __aenter__ uses python, ensuring correct highlighting and readability.


446-446: Uniform use of Python code fences.

The added python fences for non-streaming and streaming examples standardise the document's code formatting.

Also applies to: 481-481

docs/design-proposals.md (3)

1-2: Add top-level title
The new H1 improves document discoverability and aligns with other guides.


12-12: Demote main architecture heading to level 2
This maintains a clear heading hierarchy under the H1 title.


96-97: Verify markdown table formatting
The header row and separator line are valid and aligned. The table should render correctly under the caption.

docs/testing-async-falcon-endpoints.md (8)

199-199: Approve: Clarify base_url explanatory note
The note correctly emphasises that base_url="<http://test>" is mandatory even with ASGITransport.


245-245: Approve: Add Python language tag to code block
Marking the fence as ```python improves syntax highlighting and clarity.


278-278: Approve: Standardise base_url in GET test snippet
Using <http://test> here matches other examples and maintains consistency.


287-287: Approve: Standardise base_url in POST test snippet
Consistent use of <http://test> across tests enhances readability.


366-366: Approve: Add Python fence for streaming endpoint snippet
Explicit ```python fencing enhances formatting and readability.


739-739: Approve: Add Python fence for service mocking example
Explicit language tagging on the code block is beneficial for clarity.


1024-1024: Approve: Add Python fence for middleware startup example
This reinforces proper formatting and syntax highlighting.


1092-1092: Approve: Add Python fence for middleware conductor example
Language identifier on the fence ensures consistent rendering.

Comment thread docs/using-falcon-with-msgspec-structs.md Outdated
Comment thread docs/mocking-with-pytest-httpx.md
Comment thread docs/mvp-architecture.md
Comment thread docs/mvp-architecture.md Outdated
Comment thread docs/mvp-architecture.md Outdated
Comment thread docs/async-sqlalchemy-with-pg-and-falcon.md Outdated
Comment thread docs/async-sqlalchemy-with-pg-and-falcon.md Outdated
Comment thread docs/design-proposals.md Outdated
Comment thread docs/design-proposals.md
Comment thread docs/testing-async-falcon-endpoints.md Outdated
@leynos
Copy link
Copy Markdown
Owner Author

leynos commented Jun 16, 2025

@coderabbitai review

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Jun 16, 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

🔭 Outside diff range comments (1)
docs/async-sqlalchemy-with-pg-and-falcon.md (1)

212-223: Standardise code block fencing and remove trailing backslashes.

The middleware snippet mixes four-backtick and three-backtick fences and includes stray backslashes at line ends. Use triple backticks consistently for both opening and closing fences and remove the trailing backslashes from the import and class definitions.

♻️ Duplicate comments (5)
docs/design-proposals.md (2)

85-85: Clarify or remove asterisk in table caption
The escaped asterisk (\*) in “Table 1: Major Components and Technology Choices*” has no matching footnote. Consider removing the escape or adding a footnote definition for clarity.


439-466: Improve consistency in bullet list formatting
The bulleted list replacement is far more readable than the previous multi-column table. In the “Low Novelty” section, capitalise the first word of the sentence after “Cons:” for consistency:

- *Cons:* Detection mistakes could drop important info. the system’s memory
+ *Cons:* Detection mistakes could drop important info. The system’s memory
docs/mocking-with-pytest-httpx.md (1)

3-4: Separate headings from their body text
Several ##-level headings have descriptive content on the same line. Add a blank line after each heading and move the paragraph to the next line to comply with Markdown syntax.

Also applies to: 37-38, 67-68, 81-82, 119-120, 222-223

docs/async-sqlalchemy-with-pg-and-falcon.md (2)

92-95: Use en dash and complete sentences in Table 1.

Replace the hyphen in 1800-7200 with an en dash (1800–7200) and prepend “It” to “Can be verbose for production.” so the description reads as a full sentence (It can be verbose for production.).


507-507: Use typographical ellipsis in Table 3.

Replace SELECT ... WHERE id IN (...) with SELECT … WHERE id IN (…) for consistent typographical ellipses.

📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between a6b7dad and f489896.

📒 Files selected for processing (4)
  • docs/async-sqlalchemy-with-pg-and-falcon.md (29 hunks)
  • docs/design-proposals.md (4 hunks)
  • docs/mocking-with-pytest-httpx.md (23 hunks)
  • docs/using-falcon-with-msgspec-structs.md (32 hunks)
🧰 Additional context used
🪛 LanguageTool
docs/mocking-with-pytest-httpx.md

[uncategorized] ~7-~7: Although a hyphen is possible, it is not necessary in a compound modifier in which the first word is an adverb that ends in ‘ly’.
Context: ...ls, and a feature set comparable to the widely-used requests library but with significant e...

(HYPHENATED_LY_ADVERB_ADJECTIVE)


[style] ~64-~64: Consider an alternative adverb to strengthen your wording.
Context: ...g is active only during the test and is properly cleaned up afterward, contributing to t...

(PROPERLY_THOROUGHLY)


[grammar] ~67-~67: Please add a punctuation mark at the end of paragraph.
Context: ...stallation To begin using pytest-httpx, it must be installed in the Python enviro...

(PUNCTUATION_PARAGRAPH_END)


[uncategorized] ~153-~153: Possible missing comma found.
Context: ...epresenting the HTTP method and is case-insensitive as pytest-httpx converts it to uppercas...

(AI_HYDRA_LEO_MISSING_COMMA)


[uncategorized] ~183-~183: Possible missing comma found.
Context: ... The Content-Type may default to text/plain or can be explicitly set via the header...

(AI_HYDRA_LEO_MISSING_COMMA)


[misspelling] ~244-~244: Use “a” instead of ‘an’ if the following word doesn’t start with a vowel sound, e.g. ‘a sentence’, ‘a university’.
Context: ...ect for regular expression matching, or an httpx.URL instance. Matching is perform...

(EN_A_VS_AN)


[grammar] ~289-~289: Please add a punctuation mark at the end of paragraph.
Context: ...object. For partial matching within the JSON ```python from unittest.mock import AN...

(PUNCTUATION_PARAGRAPH_END)


[misspelling] ~319-~319: Use “a” instead of ‘an’ if the following word doesn’t start with a vowel sound, e.g. ‘a sentence’, ‘a university’.
Context: ...pts a string, a re.Pattern instance, or an httpx.URL instance, and matching is ``...

(EN_A_VS_AN)


[grammar] ~319-~319: Please add a punctuation mark at the end of paragraph.
Context: ... or an httpx.URL instance, and matching is ```python httpx_mock.add_response(prox...

(PUNCTUATION_PARAGRAPH_END)


[style] ~459-~459: Since ownership is already implied, this phrasing may be redundant.
Context: ...thod of a class instance can maintain its own state (e.g., a counter, a list of previ...

(PRP_OWN)


[grammar] ~460-~460: Please add a punctuation mark at the end of paragraph.
Context: ... import httpx from pytest_httpx import HTTPXMock ```python class StatefulAPISimulator: ...

(PUNCTUATION_PARAGRAPH_END)


[grammar] ~798-~798: Please add a punctuation mark at the end of paragraph.
Context: ...Response(200, json={"message": "Handled by ```python if os.environ.get("TESTING_W...

(PUNCTUATION_PARAGRAPH_END)


[uncategorized] ~1100-~1100: Possible missing comma found.
Context: ...y. ## 14. Migrating from Other Mocking Libraries Developers transitioning to httpx and ...

(AI_HYDRA_LEO_MISSING_COMMA)


[duplication] ~1104-~1104: Possible typo: you repeated a word.
Context: ...mparisons, which can significantly ease the The responses library is a popular choice f...

(ENGLISH_WORD_REPEAT_RULE)


[style] ~1108-~1108: Consider using the typographical ellipsis character here instead.
Context: ...-|---| | Add a response | responses.add(...) | add_response(...) | | Add a callback...

(ELLIPSIS)


[style] ~1109-~1109: Consider using the typographical ellipsis character here instead.
Context: ...nse | responses.add(...) | add_response(...) | | Add a callback | responses.add_cal...

(ELLIPSIS)


[style] ~1109-~1109: Consider using the typographical ellipsis character here instead.
Context: ...Add a callback | responses.add_callback(...) | add_callback(...) | | Retrieve reque...

(ELLIPSIS)


[style] ~1110-~1110: Consider using the typographical ellipsis character here instead.
Context: ...ponses.add_callback(...) | add_callback(...) | | Retrieve requests made | responses...

(ELLIPSIS)


[style] ~1124-~1124: Consider using the typographical ellipsis character here instead.
Context: ...method) | aioresponses_instance.get(url,...) | add_response(method="GET", url=url,....

(ELLIPSIS)


[style] ~1125-~1125: Consider using the typographical ellipsis character here instead.
Context: ....) | add_response(method="GET", url=url,...) | | Add a callback (for specific metho...

(ELLIPSIS)


[style] ~1126-~1126: Consider using the typographical ellipsis character here instead.
Context: ..._instance.get(url, callback=my_callback,...) | add_callback(my_callback, method="GE...

(ELLIPSIS)


[style] ~1127-~1127: Consider using the typographical ellipsis character here instead.
Context: ...back(my_callback, method="GET", url=url,...) | 14.3. Key Differences and Advantages...

(ELLIPSIS)


[style] ~1144-~1144: This word has been used in one of the immediately preceding sentences. Using a synonym could make your text more interesting to read, unless the repetition is intentional.
Context: ...r adoption, recognizing that developers often bring experience from these established...

(EN_REPEATEDWORDS_OFTEN)

docs/async-sqlalchemy-with-pg-and-falcon.md

[typographical] ~92-~92: If specifying a range, consider using an en dash instead of a hyphen.
Context: ...losed and replaced).9 | 1800-7200 (30-120 minutes) | Preve...

(HYPHEN_TO_EN)


[style] ~95-~95: To form a complete sentence, be sure to include a subject.
Context: ... as checkouts, checkins, and recycling. Can be verbose for production. ...

(MISSING_IT_THERE)


[uncategorized] ~506-~506: A punctuation mark might be missing here.
Context: ...-----------------|---------------------| | selectinload | Issues a second `SELECT...

(AI_EN_LECTOR_MISSING_PUNCTUATION)


[style] ~507-~507: Consider using the typographical ellipsis character here instead.
Context: ...-----| | selectinload | Issues a second SELECT ... WHERE id IN (...) | 2 (or more for nes...

(ELLIPSIS)

🔇 Additional comments (5)
docs/design-proposals.md (3)

1-3: Standardise heading structure
The document now begins with a formal top-level title and the main architecture heading has been demoted to level 2, improving both structure and consistency with other guides.


87-101: Table formatting is consistent and readable
The table columns are aligned properly and adhere to standard Markdown table syntax, enhancing readability.


507-507: Add explicit code block language
Specifying text for the RAG prompt code block clarifies its contents and aligns with the style applied across other examples.

docs/using-falcon-with-msgspec-structs.md (2)

57-65: Code fences are correctly formatted and tagged
All code examples consistently use triple backticks with explicit language identifiers (python, bash, etc.), improving readability and syntax highlighting.

Also applies to: 76-86, 98-119, 149-160


504-508: Markdown table formatting is correct
The exception handling summary table uses proper pipe-delimited syntax with aligned headers and rows, enhancing clarity.

Comment thread docs/async-sqlalchemy-with-pg-and-falcon.md Outdated
@leynos
Copy link
Copy Markdown
Owner Author

leynos commented Jun 16, 2025

@sourcery-ai review

@leynos
Copy link
Copy Markdown
Owner Author

leynos commented Jun 16, 2025

@coderabbitai review

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Jun 16, 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

@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 and they look great!

Prompt for AI Agents
Please address the comments from this code review:
## Individual Comments

### Comment 1
<location> `docs/openrouter-completions-api-client.md` </location>
<code_context>
-    `headers: Optional] = None`
</code_context>

<issue_to_address>
Typo: 'Optional]' should be 'Optional[dict[str, str]]'.
</issue_to_address>

### Comment 2
<location> `docs/testing-async-falcon-endpoints.md:278` </location>
<code_context>
-base_url="http://test") as ac:\
-response = await ac.get("/things")\
-assert response.status_code == falcon.HTTP_200\
+base_url="<http://test>") as ac: response = await ac.get("/things") assert
+response.status_code == falcon.HTTP_200\
 assert response.json() == {'message': 'Hello, async world!'}
</code_context>

<issue_to_address>
Incorrect use of angle brackets in base_url parameter.

Use "http://test" without angle brackets for the base_url parameter to avoid confusion and potential errors.
</issue_to_address>

### Comment 3
<location> `docs/testing-async-falcon-endpoints.md:286` </location>
<code_context>
-base_url="http://test") as ac:\
-response = await ac.post("/things", json=payload)\
-assert response.status_code == falcon.HTTP_201\
+base_url="<http://test>") as ac: response = await ac.post("/things",
+json=payload) assert response.status_code == falcon.HTTP_201\
 assert response.json() == {'received': payload}
</code_context>

<issue_to_address>
Incorrect use of angle brackets in base_url parameter.

Please replace <http://test> with "http://test" in all relevant code blocks.
</issue_to_address>

### Comment 4
<location> `docs/testing-async-falcon-endpoints.md:189` </location>
<code_context>
+```python
+import pytest
+from httpx import ASGITransport, AsyncClient
+# from my_falcon_app import app  # Your Falcon ASGI application instance

 @pytest.mark.asyncio\
</code_context>

<issue_to_address>
The comment uses 'Your', which is a 2nd person pronoun and should be avoided.

Please rephrase to avoid 2nd person, e.g., 'the Falcon ASGI application instance'.
</issue_to_address>

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.

Comment thread docs/openrouter-completions-api-client.md
Comment thread docs/testing-async-falcon-endpoints.md Outdated
Comment thread docs/testing-async-falcon-endpoints.md Outdated
Comment thread docs/testing-async-falcon-endpoints.md Outdated
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:

  • Several complex tables (e.g., in async-sqlalchemy-with-pg-and-falcon.md and design-proposals.md) look malformed after formatting; please double-check and fix the Markdown table syntax so they render correctly.
  • There are inconsistent code fence styles (e.g., quadruple backticks, misaligned fences) across the docs; please unify to standard triple backticks for all code blocks.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- Several complex tables (e.g., in async-sqlalchemy-with-pg-and-falcon.md and design-proposals.md) look malformed after formatting; please double-check and fix the Markdown table syntax so they render correctly.
- There are inconsistent code fence styles (e.g., quadruple backticks, misaligned fences) across the docs; please unify to standard triple backticks for all code blocks.

## Individual Comments

### Comment 1
<location> `docs/openrouter-completions-api-client.md:210` </location>
<code_context>
   - `seed: Optional[int] = None` 2
-  - `tools: Optional] = None` 8
-  - `tool_choice: Optional = None` 8
-  - `response_format: Optional = None` 8
+  - `tools: Optional[List[Tool]] = None`
+  - `tool_choice: Optional[ToolChoice] = None`
</code_context>

<issue_to_address>
Type hint for 'response_format' is incomplete; should specify the type.

Specify the type, such as 'Optional[ResponseFormat]'.
</issue_to_address>

<suggested_fix>
<<<<<<< SEARCH
  - `response_format: Optional[ResponseFormat] = None`
=======
  - `response_format: Optional[ResponseFormat] = None`
>>>>>>> REPLACE

</suggested_fix>

### Comment 2
<location> `docs/testing-async-falcon-endpoints.md:278` </location>
<code_context>
-base_url="http://test") as ac:\
-response = await ac.get("/things")\
-assert response.status_code == falcon.HTTP_200\
+base_url="<http://test>") as ac: response = await ac.get("/things") assert
+response.status_code == falcon.HTTP_200\
 assert response.json() == {'message': 'Hello, async world!'}

</code_context>

<issue_to_address>
Use a valid URL for base_url instead of <http://test>.

Angle brackets around the URL are non-standard; please use the plain URL format as before.
</issue_to_address>

### Comment 3
<location> `docs/testing-async-falcon-endpoints.md:488` </location>
<code_context>
-yield client\
-\# The client is automatically closed here upon exiting the 'async with' block.
+async with AsyncClient(transport=ASGITransport(app=app),
+base_url="<http://test>") as client: yield client # The client is automatically
+closed here upon exiting the 'async with' block.

 This pattern is crucial for robust resource management in asynchronous tests.
</code_context>

<issue_to_address>
Use a valid URL for base_url instead of <http://test>.

Angle brackets around the URL are non-standard; please use "http://test" without them for clarity and consistency.
</issue_to_address>

### Comment 4
<location> `docs/testing-async-falcon-endpoints.md:731` </location>
<code_context>
 def client_svc(event_loop): # event_loop fixture from pytest-asyncio\
-return AsyncClient(transport=ASGITransport(app=app_svc), base_url="http://test")
+return AsyncClient(transport=ASGITransport(app=app_svc),
+base_url="<http://test>")

 @pytest.mark.asyncio\
</code_context>

<issue_to_address>
Use a valid URL for base_url instead of <http://test>.

Angle brackets are not standard in URLs and may cause confusion. Use "http://test" without brackets.
</issue_to_address>

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.

Comment thread docs/openrouter-completions-api-client.md
Comment thread docs/testing-async-falcon-endpoints.md Outdated
Comment thread docs/testing-async-falcon-endpoints.md Outdated
Comment thread docs/testing-async-falcon-endpoints.md Outdated
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:

  • This PR mixes large-scale formatting changes with potential content edits—consider splitting pure formatting into its own commit or PR to simplify review and track substantive changes more easily.
  • A number of fenced code blocks lack explicit language identifiers—adding language hints (e.g., ```python) will improve readability and syntax highlighting in rendered docs.
  • Some Markdown tables show uneven column delimiters or misaligned pipes—please verify the rendered output to ensure all tables display correctly.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- This PR mixes large-scale formatting changes with potential content edits—consider splitting pure formatting into its own commit or PR to simplify review and track substantive changes more easily.
- A number of fenced code blocks lack explicit language identifiers—adding language hints (e.g., ```python) will improve readability and syntax highlighting in rendered docs.
- Some Markdown tables show uneven column delimiters or misaligned pipes—please verify the rendered output to ensure all tables display correctly.

## Individual Comments

### Comment 1
<location> `docs/design-proposals.md:456` </location>
<code_context>
+
+  - *Action:* No immediate update; maybe log frequency or update counters.
+  - *Pros:* Avoids cluttering the graph with irrelevant data.
+  - *Cons:* Detection mistakes could drop important info. the system’s memory
+    should evolve primarily when truly new knowledge is encountered, much like
+    human memory encodes new events and not every redundant detail. It’s worth
+    noting that novelty detection itself can be an *open-world problem*; the
+    system might encounter entities not just new to the user but completely
+    unknown globally. In such cases, external knowledge bases or web search
+    could be invoked to verify or enrich the information (though that’s beyond
+    our current scope, it could be a future extension: e.g., if a user mentions
+    a new movie, the system might search a movie database to get more details
+    for the KG).

</code_context>

<issue_to_address>
Remove repeated explanation about novelty detection and memory evolution.

The points about memory evolution and the open-world problem are stated in both the bullet and the following paragraph. Removing the duplicate content will improve clarity.
</issue_to_address>

<suggested_fix>
<<<<<<< SEARCH
  - *Action:* No immediate update; maybe log frequency or update counters.
  - *Pros:* Avoids cluttering the graph with irrelevant data.
  - *Cons:* Detection mistakes could drop important info. the system’s memory
    should evolve primarily when truly new knowledge is encountered, much like
    human memory encodes new events and not every redundant detail. It’s worth
    noting that novelty detection itself can be an *open-world problem*; the
    system might encounter entities not just new to the user but completely
    unknown globally. In such cases, external knowledge bases or web search
    could be invoked to verify or enrich the information (though that’s beyond
    our current scope, it could be a future extension: e.g., if a user mentions
    a new movie, the system might search a movie database to get more details
    for the KG).
=======
  - *Action:* No immediate update; maybe log frequency or update counters.
  - *Pros:* Avoids cluttering the graph with irrelevant data.
>>>>>>> REPLACE

</suggested_fix>

### Comment 2
<location> `docs/testing-async-falcon-endpoints.md:189` </location>
<code_context>
+```python
+import pytest
+from httpx import ASGITransport, AsyncClient
+# from my_falcon_app import app  # Your Falcon ASGI application instance

 @pytest.mark.asyncio\
</code_context>

<issue_to_address>
The comment uses 'Your', which is a 2nd person pronoun and should be avoided.

The phrase 'Your Falcon ASGI application instance' uses 'Your', which is a 2nd person pronoun. Please rephrase to avoid direct address, e.g., 'the Falcon ASGI application instance'.
</issue_to_address>

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.

Comment thread docs/design-proposals.md Outdated
Comment thread docs/testing-async-falcon-endpoints.md Outdated
@leynos
Copy link
Copy Markdown
Owner Author

leynos commented Jun 16, 2025

@sourcery-ai resolve

@leynos
Copy link
Copy Markdown
Owner Author

leynos commented Jun 16, 2025

@sourcery-ai review

@leynos
Copy link
Copy Markdown
Owner Author

leynos commented Jun 16, 2025

@coderabbitai review

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Jun 16, 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

@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 and they look great!


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

🔭 Outside diff range comments (5)
docs/using-falcon-with-msgspec-structs.md (3)

218-257: Remove language tag from closing fence
The closing fence at line 257 is ```python instead of a plain ```.

Apply this diff:

@@ line 257
-```python
+```

276-290: Fix closing fence on resource-attachment example
The block opener is ```python but the closer also uses python. It should be a plain fence.

@@ line 290
-```python
+```

323-342: Normalize ASGI middleware code fence
Line 342’s fence includes python—change it to a plain ```.

@@ line 342
-```python
+```
docs/async-sqlalchemy-with-pg-and-falcon.md (2)

206-217: Unify code fence delimiters in middleware example
The middleware snippet opens with four backticks and then a separate triple-backtick, leading to mismatched fences. Standardise on triple backticks for both the opening and closing of the entire example, for instance:

- ````python
+ ```python
  import falcon
  from sqlalchemy.ext.asyncio import AsyncSession
  from sqlalchemy.exc import SQLAlchemyError
  class SQLAlchemySessionManager:
      def __init__(self, async_session_factory):
          self.async_session_factory = async_session_factory

- ```python
+ ```  
  async def process_request(self, req, resp):
      # ...
  async def process_response(self, req, resp, resource, req_succeeded):
      # ...
  await session.close()
- ````
+ ```  

Also applies to: 217-247


208-213: Remove trailing backslashes in code examples
Lines like import falcon\ include trailing backslashes, which can render awkwardly and imply a wrapped line. Remove the backslashes to present clean, standalone import statements.

♻️ Duplicate comments (2)
docs/mvp-architecture.md (1)

11-11: Add missing period to H2
The secondary heading reads ## 2 Minimum-viable… but should be ## 2. Minimum-viable….

@@ line 11
-## 2 Minimum-viable component set (one **Kubernetes** namespace)
+## 2. Minimum-viable component set (one **Kubernetes** namespace)
docs/testing-async-falcon-endpoints.md (1)

192-195: Correct base_url syntax and quoting

Using "http://test" without angle brackets matches HTTPX requirements and avoids confusion.

📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between f489896 and 9338bba.

📒 Files selected for processing (6)
  • docs/async-sqlalchemy-with-pg-and-falcon.md (29 hunks)
  • docs/design-proposals.md (4 hunks)
  • docs/mvp-architecture.md (3 hunks)
  • docs/openrouter-completions-api-client.md (25 hunks)
  • docs/testing-async-falcon-endpoints.md (37 hunks)
  • docs/using-falcon-with-msgspec-structs.md (29 hunks)
🧰 Additional context used
🪛 LanguageTool
docs/mvp-architecture.md

[grammar] ~1-~1: Please add a punctuation mark at the end of paragraph.
Context: # 1. Key goals for the MVP | Target | Requirement ...

(PUNCTUATION_PARAGRAPH_END)

docs/openrouter-completions-api-client.md

[uncategorized] ~54-~54: Loose punctuation mark.
Context: ...timeout_config: Optional[httpx.Timeout]`: Optional timeout settings. If not pro...

(UNLIKELY_OPENING_PUNCTUATION)


[uncategorized] ~56-~56: Loose punctuation mark.
Context: ...fault_headers: Optional[dict[str, str]]`: Optional custom headers to be include...

(UNLIKELY_OPENING_PUNCTUATION)

docs/async-sqlalchemy-with-pg-and-falcon.md

[typographical] ~92-~92: If specifying a range, consider using an en dash instead of a hyphen.
Context: ...losed and replaced).9 | 1800–7200 (30-120 minutes) | Preve...

(HYPHEN_TO_EN)


[uncategorized] ~500-~500: A punctuation mark might be missing here.
Context: ...-----------------|---------------------| | selectinload | Issues a second `SELECT...

(AI_EN_LECTOR_MISSING_PUNCTUATION)


[style] ~501-~501: Consider using the typographical ellipsis character here instead.
Context: ...-----| | selectinload | Issues a second SELECT … WHERE id IN (...) | 2 (or more for nested) | Collection...

(ELLIPSIS)

🔇 Additional comments (25)
docs/using-falcon-with-msgspec-structs.md (5)

57-65: Consistent fenced code block
The snippet correctly uses python on the opener and a plain on the closer.


76-86: Correct language-tagged code fence
The block is explicitly tagged with python and closed with a plain fence—looks good.


98-119: Well-formed Python code block
Opening with python and closing with maintains consistency.


148-160: Properly tagged media handler example
The Python block is marked and closed correctly.


504-507: Approve exception-handling table
The replacement markdown table is clear, correctly aligned, and follows standard syntax.

docs/mvp-architecture.md (4)

1-1: Heading punctuation applied correctly
The top-level heading now includes the period after “1” for consistent numbering.


3-7: Table header formatting is solid
Pipes and separators are well-aligned, and “95%” is now correct.


13-19: Component-set table looks good
Rows and columns are correctly defined, and the backslash before “+” has been removed.


31-37: Approve text-fenced hot-path example
The code block uses ```text and a plain closing fence—perfect for illustrative flow.

docs/design-proposals.md (2)

1-4: Approve heading hierarchy update.
The formal top-level heading and adjusted architecture heading levels improve document structure and clarity.


511-513: Good catch: specify code block language.
Adding the text language tag to the RAG example prompt fence enhances syntax highlighting and clarity.

docs/openrouter-completions-api-client.md (7)

54-58: Parameter list styled correctly

The newly added parameters (timeout_config, default_headers) are clearly documented with proper Python typing and inline code formatting.


167-168: Annotate tool_calls in ChatMessage struct

The addition of tool_calls: Optional[List[ToolCall]] = None is consistent with other fields and clarifies the struct’s capabilities.


206-208: Extend ChatCompletionRequest with tooling options

Introducing tools, tool_choice, and response_format parameters aligns with OpenRouter’s API features. Well documented.


218-219: Include usage field in request payload

Documenting usage: Optional[dict[str, Any]] = None with an example improves discoverability of this option.


237-237: Expose tool_calls on ResponseMessage

Adding tool_calls to the non-streaming ResponseMessage struct ensures symmetry with streaming responses.


242-243: Expose tool_calls on ResponseDelta

The streaming ResponseDelta now properly models tool call chunks.


304-305: Add metadata to error details

Documenting metadata: Optional[dict[str, Any]] = None covers provider-specific errors and flags.

docs/testing-async-falcon-endpoints.md (6)

146-147: Use explicit python code fence for first example

Starting the snippet with ```python ensures proper syntax highlighting.


152-152: Proper indentation of await asyncio.sleep

The await asyncio.sleep(0.01) line is correctly indented within the fenced code block.


156-156: Apply @pytest.mark.asyncio decorator

Marking the test coroutine with @pytest.mark.asyncio clarifies its asynchronous context.


186-189: Fenced AsyncClient example with python tag

The HTTPX client setup is now enclosed in a ```python fence and includes necessary imports.


234-238: Consistent fencing for Falcon ASGI app example

Starting the src/app.py snippet with ```python aligns with other examples and standardises formatting.


246-252: Enclose POST handler example in fenced block

The POST handler code is now properly fenced, improving readability and consistency.

docs/async-sqlalchemy-with-pg-and-falcon.md (1)

29-29: Remove bold syntax from section headings
The AI summary states that bold markers were removed from headings, but these still use **. Convert to plain markdown headings (for example, change ## **II. …** to ## II. … and ### **A. …** to ### A. …) for consistency across the document.

Also applies to: 35-35, 102-102, 159-159

Likely an incorrect or invalid review comment.

Comment thread docs/design-proposals.md Outdated
Comment on lines +323 to +324
`forbid_unknown_fields=True` on _request_ structs is generally advisable to
catch typos or incorrect field names during development. For _response_
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)

Quote the forbid_unknown_fields setting

Wrap forbid_unknown_fields=True in backticks for consistency with other inline code references.

🤖 Prompt for AI Agents
In docs/openrouter-completions-api-client.md at lines 323 to 324, the term
forbid_unknown_fields=True should be wrapped in backticks to format it as inline
code. Update the text to enclose forbid_unknown_fields=True in backticks for
consistency with other inline code references.

Comment on lines +335 to +342
| Struct Name | Key Fields | API Concept | Notes | | --- | --- | --- | --- | |
`ChatMessage` | `role: Literal["system","user","assistant","tool"]`,
`content: str | list[ContentPart]`, `name: str | None`,
`tool_call_id: str | None` | Entry in the `messages` array | Use list form for
multimodal input; `tool_call_id` only with role="tool" | |
`ChatCompletionRequest` | `model: str`, `messages: list[ChatMessage]`,
`stream: bool = False`, `temperature: float | None`, `tools: list[Tool] | None`
| Body for `/chat/completions` | `model` and `messages` required; other fields
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.

🛠️ Refactor suggestion

Refactor the Data Models table

The header and delimiter row are merged into one line, breaking Markdown table syntax. Split them into distinct rows:

-| Struct Name | Key Fields | API Concept | Notes | | --- | --- | --- | --- | |
+| Struct Name            | Key Fields                         | API Concept           | Notes                                    |
+| ---------------------- | ---------------------------------- | --------------------- | ---------------------------------------- |

Then start data rows on the next line.

📝 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
| Struct Name | Key Fields | API Concept | Notes | | --- | --- | --- | --- | |
`ChatMessage` | `role: Literal["system","user","assistant","tool"]`,
`content: str | list[ContentPart]`, `name: str | None`,
`tool_call_id: str | None` | Entry in the `messages` array | Use list form for
multimodal input; `tool_call_id` only with role="tool" | |
`ChatCompletionRequest` | `model: str`, `messages: list[ChatMessage]`,
`stream: bool = False`, `temperature: float | None`, `tools: list[Tool] | None`
| Body for `/chat/completions` | `model` and `messages` required; other fields
| Struct Name | Key Fields | API Concept | Notes |
| ---------------------- | ---------------------------------- | --------------------- | ---------------------------------------- |
`ChatMessage` | `role: Literal["system","user","assistant","tool"]`,
`content: str | list[ContentPart]`, `name: str | None`,
`tool_call_id: str | None` | Entry in the `messages` array | Use list form for
multimodal input; `tool_call_id` only with role="tool" | |
`ChatCompletionRequest` | `model: str`, `messages: list[ChatMessage]`,
`stream: bool = False`, `temperature: float | None`, `tools: list[Tool] | None`
| Body for `/chat/completions` | `model` and `messages` required; other fields
🤖 Prompt for AI Agents
In docs/openrouter-completions-api-client.md around lines 335 to 342, the
Markdown table header and delimiter rows are combined into a single line, which
breaks the table formatting. Separate the header row and the delimiter row into
two distinct lines, with the header row first and the delimiter row (using
dashes and pipes) immediately below it. Then ensure the data rows start on the
following line to restore proper Markdown table syntax.

Comment thread docs/async-sqlalchemy-with-pg-and-falcon.md Outdated
Comment thread docs/async-sqlalchemy-with-pg-and-falcon.md Outdated
Comment thread docs/async-sqlalchemy-with-pg-and-falcon.md Outdated
@leynos
Copy link
Copy Markdown
Owner Author

leynos commented Jun 16, 2025

@coderabbitai review

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Jun 16, 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

🔭 Outside diff range comments (1)
docs/openrouter-completions-api-client.md (1)

916-916: Fix example code: missing messages argument
The streaming usage snippet has messages=, without a value. It should be something like:

stream_request_payload = ChatCompletionRequest(
    model="openai/gpt-4o-mini",
    messages=[ChatMessage(role="user", content="Hello!")],
    stream=True,
    max_tokens=150,
)
♻️ Duplicate comments (2)
docs/openrouter-completions-api-client.md (2)

323-324: Wrap forbid_unknown_fields=True in backticks
Inline code references should consistently use backticks.


335-343: Fix Markdown table syntax
The header and delimiter rows are merged—separate them into two lines to restore proper table rendering:

-| Struct Name | Key Fields | API Concept | Notes | | ----------- | ---------- |
+| Struct Name            | Key Fields                           | API Concept           | Notes                                  |
+| ---------------------- | ------------------------------------ | --------------------- | -------------------------------------- |
📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 9338bba and 1b0dcbd.

📒 Files selected for processing (5)
  • docs/async-sqlalchemy-with-pg-and-falcon.md (28 hunks)
  • docs/design-proposals.md (4 hunks)
  • docs/mvp-architecture.md (3 hunks)
  • docs/openrouter-completions-api-client.md (25 hunks)
  • docs/using-falcon-with-msgspec-structs.md (25 hunks)
🧰 Additional context used
🪛 LanguageTool
docs/openrouter-completions-api-client.md

[uncategorized] ~54-~54: Loose punctuation mark.
Context: ...timeout_config: Optional[httpx.Timeout]`: Optional timeout settings. If not pro...

(UNLIKELY_OPENING_PUNCTUATION)


[uncategorized] ~56-~56: Loose punctuation mark.
Context: ...fault_headers: Optional[dict[str, str]]`: Optional custom headers to be include...

(UNLIKELY_OPENING_PUNCTUATION)

docs/mvp-architecture.md

[grammar] ~1-~1: Please add a punctuation mark at the end of paragraph.
Context: # 1. Key goals for the MVP | Target | Requirement ...

(PUNCTUATION_PARAGRAPH_END)

docs/async-sqlalchemy-with-pg-and-falcon.md

[style] ~74-~74: Consider using “incompatible” to avoid wordiness.
Context: ...tion explicitly notes that QueuePool is not compatible with asyncio.10 AsyncAdaptedQueuePool a...

(NOT_ABLE_PREMIUM)


[style] ~487-~487: Consider using the typographical ellipsis character here instead.
Context: ...inload | Issues a second SELECT … WHERE id IN (...) | 2 (or more for...

(ELLIPSIS)


[grammar] ~570-~570: The verb ‘await’ does not usually follow articles like ‘The’. Check that ‘await’ is spelled correctly; using ‘await’ as a noun may be non-standard.
Context: ...nested transactions through savepoints. The await session.begin_nested() method initiates...

(A_INFINITIVE)


[style] ~759-~759: Consider using the typographical ellipsis character here instead.
Context: ...func).3 It is a best practice to use try...except blocks within service layers or F...

(ELLIPSIS)


[style] ~991-~991: Using four (or more) nouns in a row may decrease readability.
Context: ...ional db_session fixture instead of its production database session factory. Falcon does not have a direct equivale...

(FOUR_NN)

🔇 Additional comments (38)
docs/using-falcon-with-msgspec-structs.md (12)

57-65: Corrected code fence for JSONHandler example
The opening and closing fences now consistently use three backticks with python specified on the opener and none on the closer.


76-86: Updated code fence for optimized JSON handler
The snippet correctly uses a triple-backtick fence with language tag for syntax highlighting.


98-119: Standardised fence for MessagePack handler sample
The code block delimiters are now uniform and explicitly tagged.


148-160: Fixed fence for media handler registration example
Marked with python on opening and properly closed with three backticks.


218-257: Consistent fence usage in MsgspecMiddleware snippet
All code fences now adhere to three-backtick syntax with python on open.


275-282: Corrected resource attachment example fence
Fence is properly closed and tagged for Python.


322-341: ASGI middleware example properly fenced
Triple backticks and language annotation are applied correctly; inline comment highlights the key await change.


413-432: Robust JSON loads wrapper fence fixed
Fences are uniform, and the example now renders correctly under markdownlint.


457-488: Full application instantiation snippet fence aligned
The opening and closing fences follow the standard pattern with python.


501-505: Simplified Markdown table formatting
The pipe-delimited table and its separator row comply with markdownlint rules and render cleanly.


682-763: Pattern matching example fence standardised
Structural match/case snippet is now correctly fenced with language annotation.


857-999: Complete example application fence consistency
The final, large code block uses three backticks with python on open, matching the closing fence.

docs/async-sqlalchemy-with-pg-and-falcon.md (7)

1-1: Top-level heading clarified
The title now explicitly names the framework versions and context, improving discoverability and setting clear expectations.


12-21: Introduction paragraphs formatted consistently
The opening section reads smoothly, with no errant backslashes or inconsistent line breaks, and clearly outlines the guide’s scope.


38-39: Explicit Python code fence for engine setup
Adding the python specifier to the code block ensures correct syntax highlighting and clarity.


84-93: Table 1: create_async_engine parameters
Columns are now properly aligned, separator rows are consistent, and numeric ranges use en dashes, greatly enhancing readability.


144-150: Table 2: async_sessionmaker configuration options
The header row, separator, and data rows align correctly across four columns, making the key options and their rationale easy to scan.


485-489: Table 3: Async relationship loading strategies
This five-column table is now properly formatted with consistent pipes and typographical ellipsis in examples, improving clarity.


70-81: Security hardening checklist reformatted
The two-column table under section 5 now aligns cleanly, making the list of surfaces and measures much clearer.

docs/mvp-architecture.md (5)

1-1: Numeric prefix added to H1
Changing to “1.” enforces consistent numbered-heading formatting at level 1 throughout the docs.


3-7: Key goals table aligned with markdown conventions
Header, separator, and data rows now use uniform pipes and column widths, improving legibility.


11-11: Decimal punctuation standardised in H2
Adding the period after “2” ensures uniform numbering style for section headings.


13-19: Component set table reformatted
Columns and separators are aligned correctly, escaped characters (e.g., backslashes before “+”) removed for clarity.


29-31: Flow diagram block marked as text
Switching to ```text clarifies this is illustrative flow, not executable code, aiding comprehension.

docs/design-proposals.md (6)

1-1: Introduced Top-Level Title

The new document title clearly defines the purpose with a top-level heading.


3-3: Adjusted Architecture Heading Level

Demoting the architecture section to level 2 under the main title maintains a logical hierarchy.


85-85: Revised Section Heading

The heading “Major Components and Technology Choices” accurately reflects the conversion from a table to a bulleted list.


87-107: Clear Component Bullet List

Replacing the multiline table with a concise, consistently formatted bullet list enhances readability and keeps uniform punctuation.


446-470: Simplified Novelty-Level Breakdown

Converting the multi-column table into a nested bullet list improves clarity on high, moderate, and low novelty actions, with consistent indentation and spacing.


511-511: Explicit Code Block Language

Adding the “text” specifier to the fenced code block clarifies the content type and supports proper syntax highlighting.

docs/openrouter-completions-api-client.md (8)

167-169: Add tool_calls to ChatMessage struct
Including tool_calls: Optional[List[ToolCall]] = None makes the model complete for tool-enabled responses.


206-208: Include tools, tool_choice, and response_format in ChatCompletionRequest
These fields align with the API’s expanded parameter set and match earlier struct definitions.


218-219: Document usage parameter in request payload
The addition of usage: Optional[dict[str, Any]] and its JSON example is accurate and clear.


237-237: Expose tool_calls in ResponseMessage struct
Adding tool_calls: Optional[List[ToolCall]] = None ensures non-streaming responses mirror the request model.


242-243: Expose tool_calls in ResponseDelta struct
This change correctly supports streamed tool call chunks by including tool_calls.


301-302: Add metadata field to error details
Adding metadata: Optional[dict[str, Any]] = None in OpenRouterAPIErrorDetails covers provider-specific error metadata.


593-596: Validate table formatting in Table 2
The header and delimiter rows are correctly split and aligned; no changes needed here.


769-773: Validate table formatting in Table 3
The exception hierarchy table has distinct header and delimiter rows and displays correctly.

Comment on lines +54 to +55
- `timeout_config: Optional[httpx.Timeout]`: Optional timeout settings. If not
provided, `httpx` defaults (5 seconds for all operations) will apply.
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)

Consistent punctuation and formatting for timeout_config description
The sentence describing Optional[httpx.Timeout] should end with a period, and the entire type hint (Optional[httpx.Timeout]) ought to be enclosed in backticks for consistency with other parameter docs.

🧰 Tools
🪛 LanguageTool

[uncategorized] ~54-~54: Loose punctuation mark.
Context: ...timeout_config: Optional[httpx.Timeout]`: Optional timeout settings. If not pro...

(UNLIKELY_OPENING_PUNCTUATION)

🤖 Prompt for AI Agents
In docs/openrouter-completions-api-client.md around lines 54 to 55, the
description of the `timeout_config` parameter lacks consistent punctuation and
formatting. Enclose the type hint `Optional[httpx.Timeout]` in backticks and
ensure the sentence ends with a period to match the style of other parameter
descriptions.

Comment on lines +56 to +58
- `default_headers: Optional[dict[str, str]]`: Optional custom headers to be
included with every request. These merge with standard headers like
`Authorization` and `Content-Type`.
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)

Standardise punctuation and backtick usage in default_headers
Ensure the description of Optional[dict[str, str]] is fully wrapped in backticks and concludes with a period.

🧰 Tools
🪛 LanguageTool

[uncategorized] ~56-~56: Loose punctuation mark.
Context: ...fault_headers: Optional[dict[str, str]]`: Optional custom headers to be include...

(UNLIKELY_OPENING_PUNCTUATION)

🤖 Prompt for AI Agents
In docs/openrouter-completions-api-client.md around lines 56 to 58, the type
annotation Optional[dict[str, str]] in the description of default_headers is not
fully wrapped in backticks and the sentence does not end with a period. Wrap the
entire type annotation in backticks and add a period at the end of the sentence
to standardize punctuation and formatting.

@leynos leynos merged commit 3f95dd3 into main Jun 16, 2025
2 checks passed
@leynos leynos deleted the codex/run-mdformat-and-fix-markdownlint-errors branch June 16, 2025 21:46
@coderabbitai coderabbitai Bot mentioned this pull request Jun 25, 2025
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