Skip to content

docs(architecture): add module graph overview - #53

Open
igor04091968 wants to merge 3 commits into
mainfrom
docs/module-architecture-graph
Open

docs(architecture): add module graph overview#53
igor04091968 wants to merge 3 commits into
mainfrom
docs/module-architecture-graph

Conversation

@igor04091968

@igor04091968 igor04091968 commented Jun 30, 2026

Copy link
Copy Markdown
Owner

Summary

  • add GitHub/Gitea-viewable Mermaid module architecture map for AWatch-rus / DetMir
  • document workforce, ClickHouse/File1C, security findings, containment, operations and governance flows
  • link the new architecture map from README

Checks

  • python3 scripts/public_secret_pattern_check.py
  • git show --check --stat --oneline HEAD

Runtime impact

Docs-only. No Rust, API, UI, runtime or deployment changes.

Summary by CodeRabbit

  • Documentation

    • Expanded the product architecture and orchestration documentation with clearer maps and links to related guides.
    • Added a note to keep orchestration documentation up to date when entry points change.
  • Bug Fixes

    • Improved checks that help keep repository documentation and orchestration references in sync.
    • Strengthened preflight validation in quality-gate flows to catch documentation drift earlier.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@coderabbitai

coderabbitai Bot commented Jun 30, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

Adds two Russian documentation files (docs/ORCHESTRATION_MAP_RU.md and docs/MODULE_ARCHITECTURE_GRAPH_RU.md) describing system orchestration and module architecture. A new Bash script scripts/check_orchestration_map.sh validates cross-document marker consistency. scripts/quality-gate.sh gains a preflight call to that script. README.md and ansible/README.md are updated with links and workflow instructions.

Changes

Orchestration Map, Architecture Docs, and Validation Guard

Layer / File(s) Summary
New orchestration map and module architecture documents
docs/ORCHESTRATION_MAP_RU.md, docs/MODULE_ARCHITECTURE_GRAPH_RU.md
ORCHESTRATION_MAP_RU.md defines the Ansible orchestration flow, entrypoints table, runtime rules, Windows/RDP task orchestration, quality-gate table, exclusions, and related links. MODULE_ARCHITECTURE_GRAPH_RU.md describes end-to-end module wiring with Mermaid diagrams covering the worktime hot path, browser categorization, ClickHouse/File1C analytics, security finding inbox, containment lifecycle, operational health, governance, and a manual checklist.
check_orchestration_map.sh validation script
scripts/check_orchestration_map.sh
New Bash script that requires key files exist and be non-empty, verifies marker strings appear in ORCHESTRATION_MAP_RU.md, checks cross-document marker presence in MODULE_ARCHITECTURE_GRAPH_RU.md and both READMEs, asserts forbidden compliance markers are absent, and exits non-zero with aggregated failure output.
quality-gate.sh preflight and Python allowlist
scripts/quality-gate.sh
Adds orchestration map guard as a preflight step, rewrites rust_candidates construction with QUALITY_GATE_USE_RUST/QUALITY_GATE_ALLOW_SYSTEM conditionals, and extends Python retirement regression allowlist globs to cover detmir-mcp, grafana-1c, and clickhouse-1c paths.
README cross-references
README.md, ansible/README.md
README.md adds links to both new docs in the architecture section and the bullet index. ansible/README.md adds a note pointing to ORCHESTRATION_MAP_RU.md and instructs running check_orchestration_map.sh when entrypoints change.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

🐇 A map for the orchestra, drawn with great care,
New docs in the warren for modules to share.
A script checks the markers, no drift can sneak by,
The quality gate now waves banners up high.
Hop hop, all in sync — the rabbit approves! 🗺️

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description covers summary and checks, but omits most required template sections like Impact, Review Checklist, Registry scope, and Safety. Add the missing Impact, Validation, Review Checklist, Registry/Public Mirror Scope, and Safety sections, and include the required bullet items.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title matches the main change: adding a module graph overview for the docs.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch docs/module-architecture-graph

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (1)
scripts/check_orchestration_map.sh (1)

19-33: 🔒 Security & Privacy | 🔵 Trivial | ⚡ Quick win

Add -- before grep patterns to prevent option injection.

grep -Fq "$marker" will misinterpret $marker if it ever starts with -. While the current markers are controlled strings, adding -- is defensive and costs nothing. Apply to both require_marker and require_absent.

🔒 Proposed fix
 require_marker() {
   local marker="$1"
   local path="$2"
-  if ! grep -Fq "$marker" "$ROOT/$path"; then
+  if ! grep -Fq -- "$marker" "$ROOT/$path"; then
     fail "missing_marker:$path:$marker"
   fi
 }
 
 require_absent() {
   local marker="$1"
   local path="$2"
-  if grep -Fq "$marker" "$ROOT/$path"; then
+  if grep -Fq -- "$marker" "$ROOT/$path"; then
     fail "forbidden_marker:$path:$marker"
   fi
 }
🤖 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 `@scripts/check_orchestration_map.sh` around lines 19 - 33, The grep checks in
require_marker and require_absent can misinterpret a marker that starts with a
dash as an option. Update both grep invocations in these shell functions to pass
the pattern after -- so the marker is always treated as data, not an option,
while keeping the existing fail behavior unchanged.
🤖 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 `@scripts/check_orchestration_map.sh`:
- Line 5: The check_orchestration_map.sh script defines DOC but never uses it,
triggering Shellcheck SC2034. Either remove the unused DOC assignment entirely
or update the orchestration-map helpers, especially require_marker and
require_absent, to consistently reference DOC when building the target path so
the variable is actually used.

---

Nitpick comments:
In `@scripts/check_orchestration_map.sh`:
- Around line 19-33: The grep checks in require_marker and require_absent can
misinterpret a marker that starts with a dash as an option. Update both grep
invocations in these shell functions to pass the pattern after -- so the marker
is always treated as data, not an option, while keeping the existing fail
behavior unchanged.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 3cdf1ee2-ea67-4c98-a7bc-ca7588c45909

📥 Commits

Reviewing files that changed from the base of the PR and between 5ac7b69 and 81e927b.

⛔ Files ignored due to path filters (1)
  • adk-rust/Cargo.lock is excluded by !**/*.lock
📒 Files selected for processing (6)
  • README.md
  • ansible/README.md
  • docs/MODULE_ARCHITECTURE_GRAPH_RU.md
  • docs/ORCHESTRATION_MAP_RU.md
  • scripts/check_orchestration_map.sh
  • scripts/quality-gate.sh

set -euo pipefail

ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
DOC="$ROOT/docs/ORCHESTRATION_MAP_RU.md"

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

📐 Maintainability & Code Quality | 🟠 Major | ⚡ Quick win

Remove unused DOC variable or use it consistently.

Shellcheck correctly flags DOC as unused (SC2034). The variable is assigned but all functions construct paths via "$ROOT/$path" directly. Either remove line 5 or refactor require_marker/require_absent to use $DOC when checking the orchestration map file.

♻️ Proposed fix
-ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
-DOC="$ROOT/docs/ORCHESTRATION_MAP_RU.md"
+ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
+DOC="$ROOT/docs/ORCHESTRATION_MAP_RU.md"
 failures=()

And update require_marker/require_absent to accept the doc path directly, or simply remove DOC if not needed:

-ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
-DOC="$ROOT/docs/ORCHESTRATION_MAP_RU.md"
+ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
 failures=()
📝 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
DOC="$ROOT/docs/ORCHESTRATION_MAP_RU.md"
🧰 Tools
🪛 Shellcheck (0.11.0)

[warning] 5-5: DOC appears unused. Verify use (or export if used externally).

(SC2034)

🤖 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 `@scripts/check_orchestration_map.sh` at line 5, The check_orchestration_map.sh
script defines DOC but never uses it, triggering Shellcheck SC2034. Either
remove the unused DOC assignment entirely or update the orchestration-map
helpers, especially require_marker and require_absent, to consistently reference
DOC when building the target path so the variable is actually used.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant