← Back to Pull requests

Wave B: truth-in-UI — 10 audit fixes (DEMO banners, honest copy, coupon/address/tracking) #61

Open
unknown opened this pull request with 255 lines diff across 3 files
View on GitHub
unknown unknown commented on Nov 29, 2026 05:09 UTC
Author

Fixes the truth-in-UI findings from the CodeRabbit audit (report: docs/CODERABBIT_AUDIT_REPORT_2026-11-28.md, Wave B section).

Honesty surfaces:

  • DemoDataBanner gold chip on all 7 sample-data screens (merchant orders/inventory/dashboard, rider tasks/KYC/handover, admin radar) — founder rule: koi screen live data ka illusion nahi de sakti

  • Rider handover success banner honest in demo mode (no fake "earnings credited" without server OTP verification)

  • AdminOps "rules saved" notice honest when no server callback

  • Escrow claims removed (payment captures after satisfy — real contract)

  • Account-deletion copy matches the actual immediate-anonymize contract (screen + en/hi/hi-Latn)
  • Behavior fixes:

  • couponApplied derived from store — cleared coupon can never show APPLIED

  • Server promo_error surfaced (no more stuck "Validating…") + dead code cleared

  • AddressBook opens via PARENT stack (hard-coded address fallback removed)

  • OrderTracking adopts native checkout's explicit orderId (no wrong-order tracking)

  • Terms: 25–30 min Zaff Kwick (last 15–30 promise gone)

  • Demo/dev ids guarded at Orders + AddressBook uuid query sites
  • Checks: tsc 0 · eslint 0 · TYPING_OK · DEMO VISIBLE · export OK · all 7 banners verified in bundle

    <!-- This is an auto-generated comment: release notes by coderabbit.ai -->

    <!-- coderabbit-ai-generated:v1 -->

    Summary by CodeRabbit

    New Features
    Added demo-data notices across merchant, rider, and admin screens to clarify when information or actions are local or sample-only.
    Bug Fixes
    Improved checkout feedback for rejected promo codes and address-book navigation.
    Updated order tracking to use the order selected through navigation.
    Clarified account deletion as immediate and irreversible, with personal details anonymized and saved addresses removed.
    Updates
    Updated Zaff Kwick’s stated delivery window to 25–30 minutes and clarified when service payments are captured.

    <!-- end of auto-generated comment: release notes by coderabbit.ai -->

    Diff: 255 lines (+191 / -64) across 3 files Reviewer: coderabbitai[bot] Review duration: 5m
    All Vouch review confidence checks passed
    Residual risk 0.24 = Change Risk (0.39) × (1 − Review Confidence (0.39)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.39 · 255 lines diff across 3 files
    0.39
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.02 · 1 substantive comment(s)
    0.02
    Model 3 · Review Timing & Attention
    Session adequacy: 84% · Reviewer familiarity: 35%
    38%
    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
    Shallow Review Depth shallow_review_depth
    0.344
    Diff Size diff_size
    0.332
    Real PR Conversation Timeline
    1 comments
    "Review active on #61"
    general weight: 0.35
    Assignees
    Unassigned
    Labels
    risk: low confidence: 39.0% 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.1% (MEDIUM) · Higher = larger blast radius
    39.1%
    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: 39.0% · Lower = rushed or shallow review
    39.0%
    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: 23.8% · Safe to merge
    23.8%