← Back to Pull requests

feat(probes): show odoo-db's database.* flags off the same list run #49

Closed
unknown closed this pull request without merging on Oct 16, 2026 03:07 UTC
View on GitHub
unknown unknown commented on Oct 12, 2026 03:49 UTC
Author

Why

The TUI only knew whether a database had database.is_neutralized. Copies of production now carry more database.* flags (shrunk, anonymized, obfuscated, safe-testing, source dump date), and odoo-db reports them (trobz/odoo-db#38). To see what was done to a copy and how old its dump is, you still had to query each database yourself.

Depends on

  • trobz/odoo-db#38, so odoo-db list emits the flags. With an older odoo-db nothing breaks: no tags, no extra table, flags come back as null. Release odoo-db first.
  • What

    The flags come from the same odoo-db list run that already supplied neutralized, so there is no extra process or query.

  • Instance list: a database row tags each flag that is true (ANON, OBFUSC, SHRUNK, SAFE-TEST) and shows the dump's age (dump 146d). False and unset flags show nothing, so a plain database looks as before.

  • Neutralization tab: a new Database flags table lists the five flags as yes / no / not set, plus the dump date and age. It is hidden when none of them is set. These are the flags as declared; the live-surface check below it still says whether the database is really clean.

  • MCP instance_databases: keeps neutralized and adds a flags object per database.

  • probes.neutralized_databases becomes probes.database_flags, returning the whole row per database ({} when odoo-db is missing, times out or can't reach postgres, as before).

  • Table cells built from database values (Neutralization, Mail, Logs Analysis) are now rendered as plain text. A value like [/x] used to be read as Rich markup and could crash the tab.
  • Test plan

  • pytest (290 pass), ruff check, ruff format --check.

  • New tests for database_flags, the dump age, the row tags, the Database flags table and markup-safe cells.

  • Ran it against a docker instance with three databases (no flags / neutralized + anonymized / shrunk + safe-test): TUI at 160, 100 and 80 columns, MCP over stdio, and odoo-db main as the backing binary (no tags, no crash).
  • <img width="1872" height="839" alt="image" src="https://github.com/user-attachments/assets/f7cb5663-9061-4d01-97d4-0ed039f107d4" />

    Forge-ID: 69071

    Diff: 273 lines (+204 / -69) across 3 files Reviewer: xaviedoanhduy Review duration: 5718m
    All Vouch review confidence checks passed
    Residual risk 0.17 = Change Risk (0.40) × (1 − Review Confidence (0.57)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.40 · 273 lines diff across 3 files
    0.40
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.17 · 1 substantive comment(s)
    0.17
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    56%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.336
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #49"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 56.8% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 39.5% (MEDIUM) · Higher = larger blast radius
    39.5%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 56.8% · Lower = rushed or shallow review
    56.8%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 17.1% · Safe to merge
    17.1%