Repository navigation
docs: add runtime architecture diagram to README - #133
Conversation
Adds a generated SVG architecture diagram to the Architecture section, showing the real runtime path: GitHub webhook -> FastAPI ingress -> ingest_webhook (dedup / router / run state machine) -> Redis Stream (TaskSpec v3) -> worker (LLM classifier + 10-gate preflight chain) -> DeepAgents workflow handler -> GitHub write-back, with the repo config, sandbox, Redis, Postgres, LLM router and the evals facade attached to the stages they actually touch. The diagram is generated by scripts/build_architecture_diagram.py rather than hand-authored, so it can be re-derived when the architecture moves. Geometry and composition are validated under the fireworks-tech-graph showcase profile (zero edge crossings, <= 2 bends per edge, >= 40px node whitespace). Also corrects the adjacent ASCII flow: preflight middleware runs in the worker, after the queue, not before the enqueue. ingest_webhook has no preflight call; worker._execute_task_spec runs classify_for_dispatch and run_preflight(build_preflight_chain()) before execute_handler, because the classifier's 10s timeout does not fit inside GitHub's webhook delivery deadline. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MaszS22MH8osYjDjqgD5gr
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (2)
📝 WalkthroughWalkthroughThe PR adds a standalone SVG architecture diagram generator and updates the README with the two-process runtime model. The documented flow moves classification and preflight processing to the worker after Redis dequeue. ChangesArchitecture documentation
Estimated code review effort: 3 (Moderate) | ~20 minutes ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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 |
SonarCloud's quality gate failed this PR with "C Security Rating on New Code". The only new Python is the diagram generator, and it carried a textbook path-injection taint flow: sys.argv -> Path(argv[1]) -> out.parent.mkdir() + out.write_text(), which Sonar reports as S2083. The override was a leftover from authoring the script outside the repo. The generator regenerates one committed file that README.md links to, so an output-path argument could only ever produce an untracked copy the README cannot see. Removing it deletes the taint source outright rather than suppressing the finding. The SVG regenerates byte-identically, so the diagram itself is unchanged. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MaszS22MH8osYjDjqgD5gr
|
|
ⓘ Qodo reviews are paused because the subscription is no longer active. Ask your workspace admin to reactivate the subscription to resume reviews. Manage billing |



What
Adds a generated SVG architecture diagram to the
## Architecturesection of the README, above the existing text flow.The diagram traces the actual runtime path, read off the code rather than the prose:
with
.openbot/config.yaml, the sandbox, Redis, Postgres, the LiteLLM router, and theevals/facade attached to the stages they actually touch. The two dashed containers mark thewebandworkerprocess boundary, so it is visible that the queue is what separates "must answer inside GitHub's delivery deadline" from "everything expensive".Doc correction included
The ASCII flow next to the diagram listed
preflight middlewarebeforeTaskSpec v3/Redis Stream. That is the olderdecide_and_enqueuedesign and no longer matches the code:openbot/application/use_cases/ingest_webhook.pyhas no preflight call at all — step 5a enqueues immediately withclassifier_output=None, with a comment explaining that the classifier's 10 s timeout does not fit inside GitHub's 10 s webhook delivery deadline.openbot/infrastructure/queue/worker.py::_execute_task_specrunsload_for_repo, thenclassify_for_dispatch, thenrun_preflight(ctx, build_preflight_chain()), and only thenexecute_handler.So the ASCII flow now reads
... -> Redis Stream -> worker -> LLM classifier -> preflight middleware -> dispatcher -> ....Worth noting separately: the
TaskSpecdocstring inopenbot/infrastructure/queue/task_spec.pystill claims "Built by the webhook async segment after running full preflight. The worker trusts this and executes the handler without re-running any preflight gates." That is stale in the same way, but it is a code comment rather than user-facing docs, so it is left out of this PR.Why a generator script
scripts/build_architecture_diagram.pyemits the SVG from node/edge tables instead of the SVG being hand-authored. A 16 KB hand-written SVG rots the first time a box moves; this way the diagram can be re-derived:Verification
ruff format/ruff checkclean on the new script.showcasecomposition profile: zero edge crossings, at most two bends per edge, at least 40 px of whitespace between nodes, 20 px container gutters.No Python source under
openbot/orevals/is touched, somake checkbehaviour is unchanged.🤖 Generated with Claude Code
https://claude.ai/code/session_01MaszS22MH8osYjDjqgD5gr
Generated by Claude Code
Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.Summary by CodeRabbit