Repository navigation
feat(diagnostics): export a sanitized runtime support report - #182
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configuration
📒 Files selected for processing (35)
Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review. 📝 WalkthroughWalkthroughAdds an authenticated, permission-gated runtime support report download. The report gathers controller, runtime, configuration, certificate, and job observations; validates and bounds the JSON; and marks unavailable data. The proxy runtime also gains a cached Caddy version endpoint. ChangesRuntime support report
Priority: ⬇️ Low Estimated code review effort: 4 (Complex) | ~60 minutes Change: Feature Sequence Diagram(s)sequenceDiagram
participant Admin
participant RuntimeSupportDownload
participant exportRuntimeSupportReportHandler
participant exportRuntimeSupportReportService
participant Controller
participant supportReportData
participant Database
Admin->>RuntimeSupportDownload: Activate download
RuntimeSupportDownload->>exportRuntimeSupportReportHandler: Request report
exportRuntimeSupportReportHandler->>exportRuntimeSupportReportService: Export request
exportRuntimeSupportReportService->>Controller: Collect health and proxy version
Controller-->>exportRuntimeSupportReportService: Return observations
exportRuntimeSupportReportService->>supportReportData: Read revision and aggregate counts
supportReportData->>Database: Run read-only aggregate queries
Database-->>supportReportData: Return aggregate results
supportReportData-->>exportRuntimeSupportReportService: Return report data
exportRuntimeSupportReportService-->>exportRuntimeSupportReportHandler: Return serialized report
exportRuntimeSupportReportHandler-->>RuntimeSupportDownload: Return JSON response
RuntimeSupportDownload-->>Admin: Download report locally
Merge Risk: ⚪ Minimal · up to The support-report download is ready to merge after normal checks; no actionable issue remains identified. Security Architecture ReviewSecurity architecture risk: 🔵 Low · up to The download checks permissions before collecting data and returns freshly constructed, bounded fields rather than raw source payloads. No authorization bypass or material privacy flaw was identified in the inspected flow. Production exposure and behavior under heavy concurrent use remain unconfirmed. Retained concerns Security review detailsSecurity Blast Radius
Trust Boundaries and Controls
Resilience and Maintainability Implications
Hardening Proposals
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Docstring CoverageExplanation Docstring coverage is 18.18% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 66 functions across 26 files. (9 skipped: 9 unsupported.)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
🐳 RentnerProxy PR PreviewA test-only image for this pull request has been published successfully. Images
Image digest: Tested and built merge commit: Pull request head commit: For reproducible testing and bug reports, prefer
|
Summary
Add an explicit local JSON support-report download to Proxy Hosts. Format 1 contains only versions, component availability, desired/applied revisions, activation time, host counts and aggregate certificate/job states with known error-code counters. Missing observations are marked as partial instead of being replaced with zeroes.
The server requires the existing proxy-host, redirect-host and certificate read permissions before reading sources. Fresh allowlisted fields, aggregate-only queries, bounded versions/counts, a 64 KiB export limit and no-store responses exclude domains, upstreams, credentials, raw configuration and source error messages. A separate authenticated controller endpoint reads only the configured Caddy binary version with a bounded, cached command. All eight locales and the format/privacy contract in root-level
RUNTIME_SUPPORT_REPORT.mdare documented.The presentation uses the owning download hook and a
handleDownloadhandler. Dedicated discriminated unions keep availability states correlated with their values. Runtime, environment and privacy explanations live in Markdown documentation, with the README linking the report contract.Related issue
Closes #177
Type of change
Testing
Checklist
Breaking changes
None. Older controllers produce partial version metadata and still allow report download.
Screenshots
Download interaction, focusability, busy/error/retry and partial feedback are covered by DOM tests. No live-system screenshot was taken.