Skip to content

Add private upload outcome diagnostics - #14

Merged
ifBars merged 1 commit into
masterfrom
codex/loader-upload-diagnostics
Nov 17, 2026
Merged

ifBars merged 1 commit into
masterfrom
codex/loader-upload-diagnostics

Conversation

@ifBars

@ifBars ifBars commented Nov 17, 2026 •

Copy link
Copy Markdown
Owner

Records bounded, consent-gated upload outcomes and forwards incomplete-scan summaries for fixed-category counters. Upload failures expose status categories without response bodies, and permanent rejections are not retried.

Validation: 74 automated loader tests passed (2 live-service tests skipped). MelonLoader, BepInEx 5, BepInEx 6 Mono, and BepInEx 6 IL2CPP builds passed against published MLVScan.Core 1.10.0 with deployment copy targets disabled. No in-game runtime smoke was performed.

Release notes

  • Upload outcomes now feed a bounded, consent-gated telemetry path. Duplicate, in-flight, oversized, and empty-file cases record a reason.
  • Upload failures report a status category. They do not include response bodies.
  • Non-retryable upload rejections no longer retry. Only 5xx responses are retryable.
  • Sample preparation failures report size_limit or read_error through a new RecordPreparationFailure callback. All report-upload call sites pass this callback.
  • Incomplete scan diagnostics include each finding's description as the reason summary.
  • Scan telemetry adds review_candidate_count and file_sharing_enabled.
  • A new PostHogScanTelemetry.SendUploadOutcomeAsync sends one upload outcome event. It accepts only accepted, failed, or skipped outcomes, clamps attempts to 0–3, and returns false on invalid input or delivery failure.

Contributions by author

Author Lines added Lines removed
ifBars 104 22

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 17, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-17T00:12:13.557695Z 06967fe PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@coderabbitai

coderabbitai Bot commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The upload service now records consent-gated upload outcomes and sample-preparation failures. Telemetry includes additional scan fields and incomplete-finding descriptions. BepInEx and MelonLoader upload paths pass the preparation-failure callback.

Changes: Upload telemetry

Layer / File(s) Summary
Telemetry event fields and results
Services/Diagnostics/PostHogScanTelemetry.cs
SendAsync adds review candidate and file-sharing fields. A new method sends validated upload-outcome events with bounded attempt counts. Incomplete findings now contribute their descriptions as completeness-reason summaries.
Upload outcome tracking and call sites
Services/ReportUploadService.cs, BepInEx/*.cs, MelonLoader/MelonLoaderPlugin.cs
ReportUploadService records preparation and upload outcomes, classifies HTTP failures, and stops retries for non-retryable upload errors. BepInEx and MelonLoader call sites pass the preparation-failure callback.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Change: Feature

Sequence Diagram(s)

sequenceDiagram
  participant ReportUploadService
  participant PostHogScanTelemetry
  participant HttpClient
  ReportUploadService->>PostHogScanTelemetry: SendUploadOutcomeAsync(outcome, reason, attempts)
  PostHogScanTelemetry->>HttpClient: Send upload-outcome event
Loading

Possibly related issues

  • ifBars/MLVScan Issue 12: The change adds incomplete-finding descriptions to completeness reasons and includes review-category counts in telemetry. It does not add the requested user-facing loader messages or unsupported-input explanations.
  • ifBars/MLVScan Issue 13: The change adds bounded, consent-gated upload outcome reporting and status-based failure reasons. The supplied context says it does not establish rollout coverage or production event accounting.
Merge Risk: Minimal · up to 06967

The change adds consent-gated upload outcome telemetry and classifies upload failures without exposing response bodies. No merge-blocking issue was found.

Pre-merge checks: Passed 4

Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title "Add private upload outcome diagnostics" matches the main change. The PR records bounded, consent-gated upload outcomes through ReportUploadService and PostHogScanTelemetry, and it forwards …
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title "Add private upload outcome diagnostics" matches the main change. The PR records bounded, consent-gated upload outcomes through ReportUploadService and PostHogScanTelemetry, and it forwards incomplete-scan summaries. The title is 38 characters, which is under the 50-character guideline. It uses plain English and proper casing.

Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

Share

A rabbit checks each sample’s size
And notes the reason when it skips
A counted try, a status code
Becomes a message on the road
The telemetry hops along
While carrots cheer the upload song

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 1d537638-c907-4885-8b59-c3d88119d5e3
Commits

Reviewing files that changed from the base of the PR and between 5412bb8 and 06967fe.

Files selected for processing: 6

  • BepInEx/BepInExConsentPlugin.cs
  • BepInEx/BepInExIl2CppConsentPlugin.cs
  • BepInEx/BepInExReportGenerator.cs
  • MelonLoader/MelonLoaderPlugin.cs
  • Services/Diagnostics/PostHogScanTelemetry.cs
  • Services/ReportUploadService.cs

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

@ifBars
ifBars merged commit 99ab089 into master Nov 17, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant