← Back to Pull requests

[18.0][ADD] l10n_cl_dte_caf: register draft CAF authorizations #128

Open
unknown opened this pull request with 201 lines diff across 2 files
View on GitHub
unknown unknown commented on Nov 25, 2026 02:53 UTC
Author

Summary

Introduce the initial CAF registration model, scoped by company and SII
environment, using the existing DTE roles from Base.

  • Store the authorization as draft and calculate its content digest from the

  • decoded file bytes.
  • Protect state and integrity metadata, restrict access to CAF file content,

  • and reject invalid ranges, malformed content and duplicate registrations.
  • Document the registration workflow and access roles.
  • Signature verification, SII trust keys, activation, folio reservation and
    configuration views will follow in separate changes. Registering a draft CAF
    does not authorize issuance.

    Validation

    Based on OCA/18.0 at b108124. 398 review lines and 921 total lines including
    generated documentation.

  • Pre-commit passed.

  • Isolated OCB 18.0 installation: 25 Base tests on the baseline and 30 tests

  • with CAF installed, zero failures and errors in both runs.
  • Reviewed uniqueness using an ORM constraint and a pre-insert check. The

  • SQL unique constraint remains the guarantee for concurrent transactions.
  • Tested branch defaults, explicit parent registration when both companies

  • are selected, and branch-only access isolation. The draft model retains
    company-scoped records. Shared taxpayer folio allocation will be addressed
    when designing the reservation increment.
  • Local line coverage excluding tests: baseline 291/309 (94.17%),

  • candidate 395/414 (95.41%). CAF authorization model 101/102 (99.02%).
    The remaining uncovered line rejects editing a validated CAF, a state
    that has no public activation path in this first increment.

    Refs #121.

    Diff: 201 lines (+150 / -51) across 2 files Reviewer: edescalona Review duration: 8733m
    All Vouch review confidence checks passed
    Residual risk 0.34 = Change Risk (0.59) × (1 − Review Confidence (0.43)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.59 · 201 lines diff across 2 files
    0.59
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.02 · 1 substantive comment(s)
    0.02
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    42%
    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.318
    Sensitive Paths sensitive_paths
    0.059
    Real PR Conversation Timeline
    1 comments
    "Review active on #128"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 43.0% reviewed sensitive_module
    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: 59.4% (MEDIUM) · Higher = larger blast radius
    59.4%
    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: 43.0% · Lower = rushed or shallow review
    43.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: 33.9% · Safe to merge
    33.9%
    Repository