← Back to Pull requests

feat: add copyable error reports to detailed exception pages #10220

Closed
unknown closed this pull request without merging on May 27, 2026 05:49 UTC
View on GitHub
unknown unknown commented on May 19, 2026 21:24 UTC
Author

Description

This PR proposes adding a Copy Details button to CodeIgniter’s detailed HTML exception page.

The goal is to make debugging information easier to share from the local development error page. Instead of manually gathering the relevant debugging information, users can copy a Markdown-formatted report with one click and paste it into an issue, discussion, chat, LLM or anywhere else they need.

https://github.com/user-attachments/assets/b9e5b1aa-85b5-402a-ac59-413c1dac796f

The copied report includes the most useful debugging context:

  • Exception type, status code, status text, and message

  • PHP, CodeIgniter, environment, SAPI, timestamp, and memory usage

  • Request method, path, safe URL without query string, and user agent

  • Source file location and nearby source lines

  • Previous exceptions, when available

  • Stack trace
  • The report intentionally avoids riskful or sensitive request data. It does NOT include headers, cookies, query strings, request body data, session data, route params, database queries, or trace arguments.

    Implementation wise, the Markdown report is rendered by a small error_report.php partial used by the detailed HTML error view. The button uses the Clipboard API when available and falls back to a textarea-based copy path when needed.

    Tests cover rendering the button, escaping the hidden report content, including previous exceptions, and omitting sensitive request data, trace arguments, and query strings from copied output.

    Checklist:

  • Securely signed commits

  • Component(s) with PHPDoc blocks, only if necessary or adds value (without duplication)

  • Unit testing, with >80% coverage

  • User guide updated

  • Conforms to style guide
  • Diff: 219 lines (+164 / -55) across 2 files Reviewer: neznaika0 Review duration: 10584m
    All Vouch review confidence checks passed
    Residual risk 0.16 = Change Risk (0.42) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.42 · 219 lines diff across 2 files
    0.42
    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%
    60%
    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.323
    Shallow Review Depth shallow_review_depth
    0.289
    Ai Authored ai_authored
    0.050
    Real PR Conversation Timeline
    1 comments
    "Review active on #10220"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 60.5% 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: 41.7% (MEDIUM) · Higher = larger blast radius
    41.7%
    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: 60.5% · Lower = rushed or shallow review
    60.5%
    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: 16.5% · Safe to merge
    16.5%