Skip to content

feat(ops): add ProductionDebtEvaluator and TechnicalDueDiligenceLedger - #40932

Open
AAH20 wants to merge 1 commit into
langgenius:mainfrom
AAH20:feat/production-debt-evaluator-metrics
Open

feat(ops): add ProductionDebtEvaluator and TechnicalDueDiligenceLedger#40932
AAH20 wants to merge 1 commit into
langgenius:mainfrom
AAH20:feat/production-debt-evaluator-metrics

Conversation

@AAH20

@AAH20 AAH20 commented Aug 18, 2026

Copy link
Copy Markdown

Summary

Adds the native ProductionDebtEvaluator and cryptographic TechnicalDueDiligenceLedger under api/core/ops/production_debt.py.

Problem Solved

As enterprise platform teams and Forward Deployed Engineers deploy multi-tenant GenAI applications, visual workflows, and agent pipelines in Dify, engineering organizations require real-time controls over Multi-Tenant LLMOps Production Debt & Technical Due Diligence:

  1. Workflow Debt Index (WDI <= 12.0): Scoring multi-tenant workflows for hidden recursive loop debt, tenant quota overruns, and un-gated mutation risks.
  2. Multi-Tenant Token Inflation Multiplier (MTI <= 1.15x): Enforcing strict context boundaries across workflow iterations to prevent cloud API billing cascades.
  3. P99 Workflow API Latency Ceiling (<= 1.8s): Catching hung custom tool nodes and un-responsive model endpoints before tenant SLAs are breached.
  4. Deterministic Mutation Boundaries: Enforcing never_equate_intent_to_approval across state-mutating tool executions and tenant database writes.
  5. Cryptographic Technical Due Diligence Action Ledger: Emitting immutable, SHA-256 hash-chained JSONL receipts providing audit-ready evidence for VC/PE Technical Due Diligence, M&A evaluations, and enterprise production readiness reviews.

Features Added

  • api.core.ops.production_debt.ProductionDebtEvaluator:
    • evaluate_workflow(): Evaluates multi-tenant workflow executions and returns a normalized Production Readiness Score (0–100) with critical smell warnings.
  • api.core.ops.production_debt.TechnicalDueDiligenceLedger:
    • record_workflow_execution(): Cryptographically links each workflow step into an immutable SHA-256 chain.
    • verify_ledger_integrity(): Validates hash-chain continuity.

Testing & Validation

  • Added api/tests/unit_tests/core/test_production_debt.py with 3 automated unit tests validating clean workflow passes, degraded multi-tenant loop failure detection, and cryptographic ledger integrity (3/3 tests passing).

Upstream & Commercial Context

Maintained by A2Z SOC for AI Forward Deployed Engineering, Multi-Tenant LLMOps Hardening, and Technical Due Diligence.

For engineering organizations and investors requiring codebase due diligence or production debt triage:

@dosubot dosubot Bot added the size:L This PR changes 100-499 lines, ignoring generated files. label Aug 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:L This PR changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant