docs(readme): replace ASCII diagrams with Mermaid.js flowcharts#23
docs(readme): replace ASCII diagrams with Mermaid.js flowcharts#23akshayagunna151 wants to merge 4 commits into
Conversation
📝 WalkthroughSummary by CodeRabbit
WalkthroughREADME documentation is updated with two Mermaid flowchart diagrams: one visualizing the end-to-end HumaneProxy request flow with branching for safe versus unsafe content, and another depicting the 3-stage cascading classification pipeline with async webhooks and logging. ChangesDocumentation Architecture Diagrams
🎯 2 (Simple) | ⏱️ ~5 minutes
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
|
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
README.md (1)
136-142: ⚡ Quick winAlign “Clearly safe” wording with threshold-based behavior.
Given the nearby
stage1_ceiling/stage2_ceilingconfig, “Clearly safe” reads absolute. Consider “Below safe threshold” (or similar) to avoid semantic mismatch in docs.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@README.md` around lines 136 - 142, Update the README diagram labels to reflect threshold-based behavior: change the "Clearly safe" label in the arrow `B -->|Clearly safe| Y([✅ Forward to LLM])` (and the corresponding `C -->|Clearly safe| Y`) to a wording like "Below safe threshold" (or similar) so it aligns with the `stage1_ceiling` / `stage2_ceiling` configuration semantics and avoids implying absolute safety.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@README.md`:
- Line 134: The Mermaid node label "A --> B{{🟦 Stage 1 — Heuristics<br/>Keyword
corpus + regex<br/>< 1ms}}" contains an unescaped "<" which can be parsed as
HTML; update the label by replacing "< 1ms" with "< 1ms" so the node text is
treated as literal text and renders consistently across Markdown/Mermaid
renderers.
---
Nitpick comments:
In `@README.md`:
- Around line 136-142: Update the README diagram labels to reflect
threshold-based behavior: change the "Clearly safe" label in the arrow `B
-->|Clearly safe| Y([✅ Forward to LLM])` (and the corresponding `C -->|Clearly
safe| Y`) to a wording like "Below safe threshold" (or similar) so it aligns
with the `stage1_ceiling` / `stage2_ceiling` configuration semantics and avoids
implying absolute safety.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
| │ LlamaGuard (Groq) or OpenAI Moderation API │ | ||
| │ Optional: set OPENAI_API_KEY or GROQ_API_KEY │ | ||
| └──────────────────────────────────────────────────────────┘ | ||
| A --> B{{🟦 Stage 1 — Heuristics<br/>Keyword corpus + regex<br/>< 1ms}} |
There was a problem hiding this comment.
Escape < in Mermaid label to avoid render breakage.
< 1ms can be parsed as HTML in Mermaid/Markdown renderers. Use < 1ms to keep the node text stable across viewers.
Proposed fix
- A --> B{{🟦 Stage 1 — Heuristics<br/>Keyword corpus + regex<br/>< 1ms}}
+ A --> B{{🟦 Stage 1 — Heuristics<br/>Keyword corpus + regex<br/>< 1ms}}📝 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.
| A --> B{{🟦 Stage 1 — Heuristics<br/>Keyword corpus + regex<br/>< 1ms}} | |
| A --> B{{🟦 Stage 1 — Heuristics<br/>Keyword corpus + regex<br/>< 1ms}} |
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@README.md` at line 134, The Mermaid node label "A --> B{{🟦 Stage 1 —
Heuristics<br/>Keyword corpus + regex<br/>< 1ms}}" contains an unescaped "<"
which can be parsed as HTML; update the label by replacing "< 1ms" with "<
1ms" so the node text is treated as literal text and renders consistently across
Markdown/Mermaid renderers.
Changes Made
Closes [Docs] Create Mermaid.js Architecture Diagrams for README #4