Skip to content

feat(omni-graph): agent dx & forensic auditing suite (R-110 to R-117) - #21

Merged
vadde merged 2 commits into
mainfrom
feat/omni-graph-agent-dx-improvements
Nov 7, 2026
Merged

vadde merged 2 commits into
mainfrom
feat/omni-graph-agent-dx-improvements

Conversation

@vadde

@vadde vadde commented Nov 7, 2026

Copy link
Copy Markdown
Owner

Summary

This PR resolves the critical friction points uncovered during the autonomous forensic security audit of django-sorcery (v0.13.0). It delivers the Omni-Graph Agent DX & Forensic Auditing Suite across the Stdio MCP server, Rust Axum backend, SurrealDB v2 HNSW query engine, and Tree-Sitter parsers.

Governing PRD: specs/catalog/omni-graph-agent-dx-prd.md
Governing Spec: specs/catalog/omni-graph-agent-dx-improvements.md


Key Capabilities Delivered

  1. In-Band AST Code Slices & Adaptive Budgeting (R-110):

    • Eliminates the two-step round-trip penalty.
    • For single targets under 120 lines / 3,500 chars, omni_definition returns the complete implementation directly in language-tagged code fences.
    • Adaptive budgeting clamps ambiguous queries (>3 matches) to signature previews to prevent prompt bloat.
    • Expanded node text storage ceiling from 1,000 to 4,000 characters in parser/mod.rs.
  2. Semantic Kind-Weighted Centroid Election (R-111):

    • Permanently purges barrel import titles (from ...fields import ..., import os) from Louvain/Leiden galaxy clusters.
    • Ranks candidate labels by architectural significance: Class (100) > Function (75) > Method (50) > Constant (20) > Import (0).
  3. Pre-KNN Scoped Vector Search (R-112):

    • Injects exclude_tests and path_prefix directly into SurrealDB's HNSW vector KNN query.
    • Prevents unit test mocks from displacing production vulnerability sinks in the top-$k$ window.
  4. Qualified Symbol Resolution (R-113):

    • Resolves Class.method (e.g. Query.order_by) via CONTAINS edge traversal and enclosing file scope.
    • Resolves file-qualified paths (e.g. django_sorcery/db/models.py:deserialize).
  5. Python Class Inheritance & Metaclasses (R-114, R-115):

    • Tree-sitter extracts metaclass = <identifier> emitting explicit METACLASS_OF edges.
    • Recognizes from X import Y as Z, registering both original names and aliases to preserve inheritance DAGs.
  6. Dynamic Reflection Heuristic Flagging (R-116):

    • Detects dynamic reflection primitives (setattr, getattr, eval), rendering a [⚠️ reflection] badge in MCP output without speculative fake edges.
  7. Schema & Stdio MCP Parity (R-117):

    • Synchronized tool schemas across workspace, global skills, and CLI.

Verification & Status

  • 125/125 unit tests passing (cargo test --test unit_tests in 0.08s).
  • 0 clippy warnings (cargo clippy --all-targets -- -D warnings).
  • Empirically verified against django-sorcery on running Docker container (omni-rust-app).

vadde added 2 commits November 6, 2026 20:28
- Implement in-band AST code slices with adaptive budgeting in omni_definition (R-110)
- Expand AST node text ceiling from 1,000 to 4,000 chars in parser/mod.rs (R-110)
- Implement semantic kind-weighted centroid election in Louvain clustering (R-111)
- Purge import statement titles (from ..., import ...) from architectural galaxy clusters (R-111)
- Add pre-KNN scoped filtering (exclude_tests, path_prefix) in SurrealDB vector search (R-112)
- Implement qualified symbol resolution (Class.method and path:symbol) via CONTAINS traversal (R-113)
- Extract Python class inheritance, keyword metaclass (METACLASS_OF), and aliased imports (R-114, R-115)
- Surface dynamic reflection detection warning badge [⚠️ reflection] in MCP tool calls (R-116)
- Synchronize MCP tool schemas across workspace and global configuration (R-117)
- Add comprehensive unit test suite: 125/125 tests passing (0 clippy warnings)
- Author PRD-OMNI-006 and SPEC-OMNI-006 in specs/catalog/
@vadde
vadde merged commit af2211e into main Nov 7, 2026
6 checks passed
@vadde
vadde deleted the feat/omni-graph-agent-dx-improvements branch November 7, 2026 01:45
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