Repository navigation
Add delete-data, create-report, and breadcrumbs - #19
Conversation
…k events until launch. Co-authored-by: Cursor <cursoragent@cursor.com>
There was a problem hiding this comment.
Stale comment
Review: Add delete-data, create-report, and breadcrumbs
This PR adds the public
DeleteCollectedDataOnDevice/CreateReport/AddBreadcrumb/Upload(IReport)surface, live-applies iOSCreateReportmutations onto a native open report, and buffers iOS wrapper-channel network events untilLaunched.I reviewed the diff against the existing report-handler apply path (
BugseeUnityApplyReportDict),IReport/IosReportserialization, AndroidcreateReport/upload, lifecycle fan-out, and the new buffer — not the patch alone.P0: none
P1 High — iOS
CreateReportis a process-wide singleton with no public discardLocation:
Runtime/Platform/IOS/IOSBridge.cs:141,Runtime/Bugsee.cs:91,IosLiveReport.DisposeatIOSBridge.cs:510Problem: iOS allows only one native open report (
gOpenReport+_openReportHandle). The public type isIReport, which is notIDisposable.IosLiveReportimplementsDispose, butBugsee.CreateReport()is declared asIReport, sousing (var r = Bugsee.CreateReport())does not compile and there is noDiscardAPI. Dropping the handle withoutUploadleaves native+managed locks set untilStop.Impact: A cancelled in-game reporter bricks every later
CreateReportwithInvalidOperationException: a report is already open. Android has no such exclusive slot.Scenario:
OnBug()creates a report and shows UI. User hits Cancel and theIReportis dropped. NextOnBug()throws. Uncaught, that takes down the reporting flow for the rest of the session.Fix: Release the previous native report on a second
CreateReport(or snapshot C# state and bind native only atUpload). Expose discard on the public type (IReport : IDisposableorBugsee.Discard(IReport)). Do not rely on an internalDisposethe compiler cannot see.P1 High — live iOS apply uses optional off-protocol attachment APIs and re-runs on every setter
Location:
Plugins/iOS/BugseeUnityBridge.mm:95-128,IOSBridge.IosLiveReportsetters /CreateAndAddAttachmentat:518and:601Problem:
IosLiveReportcalls_bugsee_apply_open_reporton every field and attachment mutation.IosReport.ToResultJson()always emits"attachments":[...]. The new apply path then:
- calls
clearAttachmentsonly ifrespondsToSelector(not onBGSReportContract;clearLabels/clearAllAttributesare direct protocol calls)- re-adds via optional
addAttachmentWithData:name:mimeType:/addAttachmentWithFilePath:...- ignores
fileNameThe report-handler path in
BugseeUnityCallbacks.mm(BugseeUnityApplyReportDict) already uses protocolcreateAndAddAttachmentWithName:and setsfileName. A source test in this PR forbids that selector here.Impact: If
clearAttachmentsis missing, eachSetData/Summaryset appends another copy of every attachment. IfaddAttachmentWithData:...is missing, C# looks like it attached bytes and native upload has none.Filenamenever reaches native.Scenario:
var a = report.CreateAndAddAttachment("log"); a.Filename = "log.txt"; a.SetData(bytes); report.Summary = "stuck"; Bugsee.Upload(report);— empty apply, then data apply, then summary apply. Without a guaranteed clear, native ends up with duplicate attachments; without the add selector, none.Fix: Apply native state once at
Upload(C# already holds the snapshot). For attachments, reusecreateAndAddAttachmentWithName:+fileName/mimeType/datafrom the handler path. If you must live-apply, fail closed whenclearAttachmentsis absent instead of appending.P2 Medium — Android
CreateReportwraps a null Java reportLocation:
Runtime/Platform/Android/AndroidBridge.cs:450-454Problem: No null check on
createReport. iOS throwsInvalidOperationException("CreateReport failed.").Impact / scenario:
CreateReport()beforeLaunch(or whenever Java returns null) yieldsAndroidReport(null). FirstSummary/Uploadis aNullReferenceExceptioninstead of a typed failure.Fix: If
javaReport == null, throw the sameInvalidOperationExceptionas iOS.P2 Medium — Android delete is a silent no-op while launched; iOS deletes
Location:
Runtime/Platform/Android/AndroidBridge.cs:443-447vsIOSBridge.cs:137/_bugsee_delete_collected_dataProblem: The public API is one void method. Android returns immediately when
GetLaunched()is true. iOS always hops to main and calls[Bugsee deleteCollectedDataOnDevice].Impact: A GDPR/logout wipe that is only tested on iOS leaves Android session data on disk. Callers cannot tell it was skipped.
Scenario:
Bugsee.DeleteCollectedDataOnDevice()during an active session (common logout path).Fix: Throw if launched, or
Stopthen delete. Do not swallow a destructive privacy call.P2 Medium — iOS network launch buffer is not thread-safe
Location:
Runtime/WrapperPolicy/NetworkEventLaunchBuffer.cs:26-62,IOSBridge.AddNetworkEvent/NotifyLifecycleProblem:
List<T>with no lock.Enqueueis on the caller thread;SetPhaseruns from lifecycle on the Unity main thread. This shared mutable buffer is new in this PR.Impact:
IndexOutOfRangeException/ list corruption, or lost events aroundLaunch/Stop.Scenario: Custom
AddNetworkEventfrom aUnityWebRequestcompleted callback (worker thread) overlappingLaunch/Stop/Launched.Fix: One lock around phase + pending, or marshal
Enqueueonto the main thread before touching the list.
Verdict
- Overall risk: High
- Merge recommendation: Request changes
- Must-fix: iOS exclusive
CreateReportwith no discard; live attachment apply via optional selectors on every setter- Also fix: Android null
createReport; silent Android delete; unsynchronized network bufferI did not run the WrapperPolicy tests here (
dotnetis not installed in this environment). The new tests are mostly source-string assertions; they would not have caught these runtime paths.What looks solid:
BreadcrumbLevelMap.ParseOrThrowfail-closed on both platforms; iOS delete hops to main; editorCreateReport/Upload(IReport)throwNotSupportedException; network submit stays ongChannelwithToNativeMapJsonfor headers; FIFO buffer tests match the intended launch/stop phases.Sent by Cursor Automation: Bugsee code review
…eport. Co-authored-by: Cursor <cursoragent@cursor.com>
There was a problem hiding this comment.
Stale comment
Review: Add delete-data, create-report, and breadcrumbs
Re-review of a74b63f (prior pass was 698c632). I checked the new public API against iOS/Android 7.x docs, the existing report-handler apply path (
BugseeUnityApplyReportDict),IosReportserialization,Stopcompletion behavior, and the launch buffer — not the patch alone.Prior findings: exclusive native
CreateReport/ no discard, live-apply optional attachment selectors, Android nullcreateReport, and the unsynchronized buffer are addressed. Android delete-while-launched is only partially addressed (see P1/P2 below).P0: none
P1 High — iOS delete runs before native
stop:finishes
DeleteCollectedDataOnDevicecallsStop()then_bugsee_delete_collected_data(). iOSStopissues[Bugsee stop:nil]and invokes its managed completion on the same turn._bugsee_stopdoes not wait.BugseeRunOnMainthen runsdeleteCollectedDataOnDevice:YESimmediately because this is already the main thread.iOS 7.x cleanup and the 7.x migration require delete inside the
stop:completion (Recording must be stopped with +[Bugsee stop:] before calling it). A logout wipe while launched — the intended use of this new API — races with teardown and can leave session video/logs on disk. The native completion isnil, so the caller cannot seesuccess=NO.P2 Medium — Android delete is the wrong 7.3 signature
Same C# shape:
Stop()thenCallStatic("deleteCollectedDataOnDevice")with no args. Android 7.3 documentsdeleteCollectedDataOnDevice(true, callback)—truewipes intermediate capture data, matching iOS:YES. A no-arg JNI lookup either throwsNoSuchMethodErroror hits a leftover that defaultsincludingIntermediate=false, so a GDPR wipe that works on iOS leaves Android capture buffers.Stop(Action)already exists and maps tostop(Runnable)(“fully stopped”); use that, then the two-arg delete.P2 Medium — iOS upload apply still drops
fileName
IosAttachment.ToJsonObject()emitsfileName.BugseeBridgeApplyReportDictonly passesnameintoaddAttachmentWithData:name:mimeType:/addAttachmentWithFilePath:.... The report-handler path inBugseeUnityCallbacks.mmalready doescreateAndAddAttachmentWithName:and setsfileName.IAttachment.Filenameis a public setter; Android honorssetFileName.
Verdict
- Overall risk: Medium
- Merge recommendation: Request changes
- Must-fix: nest iOS delete inside the native
stop:completion; call AndroiddeleteCollectedDataOnDevice(true, cb)afterstophas finished- Also fix: apply
fileNamethe same way the handler path doesI did not run WrapperPolicy tests (
dotnetis not on PATH). The new tests are source-string assertions and would not catch the stop/delete race or the missingfileNameapply.What looks solid:
createReportWithCompletion+ apply-once at upload; publicDiscard; Android nullcreateReportnow throws; network buffer is locked; breadcrumbs fail-closed viaParseOrThrow; iOS delete at least uses the 7.x:YESselector.Sent by Cursor Automation: Bugsee code review
…eport. Co-authored-by: Cursor <cursoragent@cursor.com>
There was a problem hiding this comment.
Stale comment
Review: Add delete-data, create-report, and breadcrumbs
Re-review of 0dc19cf (prior a74b63f, 698c632). I checked the new stop-then-delete helper against iOS 7.x cleanup docs, Android 7.3
deleteCollectedDataOnDevice(true, callback), and the still-unchanged apply path.Addressed since last pass: iOS delete is now
[Bugsee stop:^{ deleteCollectedDataOnDevice:YES }]via_bugsee_stop_then_delete_collected_data. Android waits onStop(callback)and passestruefor intermediate data.P0 / P1: none
P2 Medium — Android delete callback is
Runnable, not the 7.3 success consumer
InvokeDeleteCollectedDataOnDevicecallsCallStatic("deleteCollectedDataOnDevice", true, new RunnableProxy(...)).RunnableProxyisjava.lang.Runnable. The documented 7.3 API isdeleteCollectedDataOnDevice(true, success -> { ... })— aBooleanconsumer (Boolean.TRUE.equals(success)). Unity JNI matches the proxy interface, so this either throwsNoSuchMethodErrorafter stop has already completed, or never receives the success flag.P2 Medium — iOS upload apply still drops
fileNameUnchanged from last pass.
IosAttachment.ToJsonObject()emitsfileName;BugseeBridgeApplyReportDictonly passes displaynameintoaddAttachmentWithData:name:mimeType:. The handler path setscreated.fileName.
Verdict
- Overall risk: Medium
- Merge recommendation: Request changes
- Must-fix: Android delete callback type; apply
fileNameon iOS uploadI did not run WrapperPolicy tests (
dotnetis not on PATH).What looks solid: iOS stop-then-delete sequencing now matches the 7.x docs; managed exclusive report +
Discard; apply-once atcreateReportWithCompletion; locked network buffer; Android nullcreateReportthrows.Sent by Cursor Automation: Bugsee code review
Co-authored-by: Cursor <cursoragent@cursor.com>
There was a problem hiding this comment.
Stale comment
Review: Add delete-data, create-report, and breadcrumbs
Re-review of b1a6d56 (prior 0dc19cf, a74b63f, 698c632).
Addressed in this commit: Android delete now uses
BooleanConsumerProxy(java.util.function.Consumer/accept(Boolean)), matching the 7.3success ->callback, and logs on failure. iOSBugseeBridgeApplyReportDictreadsfileNameand passes it intoaddAttachmentWithData:/addAttachmentWithFilePath:(falls back to displaynamewhen empty).P0–P3: none remaining. All earlier findings (exclusive native report, live-apply, null
createReport, buffer lock, iOS stop-then-delete, Android no-arg delete) stay addressed.Residual only:
addAttachmentWithData:name:mimeType:has a single name slot, so a distinct displayNameandFilenamecollapse. That is inherent to the beta5 selector this path uses; the download name now reaches native.
Verdict
- Overall risk: Low
- Merge recommendation: Approve
- Must-fix: none
I did not run WrapperPolicy tests (
dotnetis not on PATH).What looks solid: public
Discard; apply-once atcreateReportWithCompletion; iOS delete nested instop:; AndroidStop(callback)thendeleteCollectedDataOnDevice(true, Consumer); locked launch buffer; breadcrumbs fail-closed viaParseOrThrow.Sent by Cursor Automation: Bugsee code review
There was a problem hiding this comment.
Stale comment
Review: Add delete-data, create-report, and breadcrumbs
Re-review of b1a6d56 (prior 0dc19cf, a74b63f, 698c632). I checked the new public API against iOS 7.x cleanup/create-report docs, the handler apply path (
BugseeUnityApplyReportDict),IosReportserialization, Android 7.3 delete, and the launch buffer — not the patch alone.Addressed since last pass: Android delete now passes
BooleanConsumerProxy(java.util.function.Consumer) afterStop(callback). iOS apply now reads JSONfileName(still incomplete — see P2).P0 / P1: none
P2 Medium — iOS
UploadReportis not fenced by Discard / Stop / Delete
UploadReportsnapshots JSON and startscreateReportWithCompletionasynchronously, but leaves_openReportHandleset untilFinishManagedReportUpload.DiscardReportonly nulls the slot.Stop/DeleteCollectedDataOnDevicenull_pendingManagedReportUploadand return; they do not cancel native work.
FinishManagedReportUploadthen unconditionally clears_openReport/_openReportHandle. Native_bugsee_upload_managed_reportstill callsuploadReport:after the managed callback, even if Stop/Delete already ran.P2 Medium — iOS apply still does not set attachment
fileName
IosAttachment.ToJsonObject()emits bothnameandfileName.IAttachmentand Android (setName/setFileName) treat them as distinct (display vs download). The handler path already doescreateAndAddAttachmentWithName:+created.fileName. This apply path stuffsfileNameintoaddAttachmentWithData:name:and never sets thefileNameproperty. The source test still forbids the handler selector.P2 Medium —
Stop(callback)then Delete still races on iOS
DeleteCollectedDataOnDevicewhile launched correctly uses[Bugsee stop:^{ deleteCollectedDataOnDevice:YES }]. AfterStop(),_launchedis already false and Stop's callback runs on the same turn ([Bugsee stop:nil]). The official cleanup sample translated to Unity —Bugsee.Stop(() => Bugsee.DeleteCollectedDataOnDevice())— therefore takes the not-launched path and deletes immediately.
Verdict
- Overall risk: Medium
- Merge recommendation: Request changes
- Must-fix: fence iOS Upload (generation token / clear slot at submit; do not wipe a newer handle; do not
uploadReportafter Stop/Delete)- Also fix: set
fileNameon the created attachment; make Stop+Delete use the native stop completionI did not run WrapperPolicy tests (
dotnetis not on PATH). The new tests are source-string assertions and would not catch the Discard/Stop race or Name vs Filename.What looks solid: Android
BooleanConsumerProxy+trueafterstop(Runnable); iOS stop-then-delete when Delete is called while launched; managed exclusive report + publicDiscard; apply-once atcreateReportWithCompletion; locked network buffer; breadcrumbs fail-closed viaParseOrThrow.Sent by Cursor Automation: Bugsee code review
Co-authored-by: Cursor <cursoragent@cursor.com>
There was a problem hiding this comment.
Stale comment
Review: Add delete-data, create-report, and breadcrumbs
Re-review of 094a11d (prior b1a6d56). I checked the new generation token /
gCancelManagedReportUploadpath and the unified_bugsee_delete_collected_datastop-chain against the remaining Discard/Stop/Delete races.Addressed:
Stop(() => Delete())is now safe — delete itself does[Bugsee stop:^{ delete… }]wheneversharedInstance != nil. C# generation preventsFinishManagedReportUploadfrom clearing a handle after Stop/Delete with no follow-up Upload. Discard/Stop/Delete set the native cancel flag.P0 / P1: none
P2 Medium — next Upload clears the cancel flag for an in-flight create
_bugsee_upload_managed_reportsetsgCancelManagedReportUpload = NOon entry.UploadReportstill holds_openReportHandleuntil the async callback, so the nextCreateReportthrows “already open” and the natural unlock isDiscardthen a new report.
Discard+CreateReport+Uploadof report B resets the global cancel flag while report A’screateReportWithCompletionis still running. A’s completion then applies A anduploadReport:s it (cancelled report still leaves the device), thenOnManagedReportCreateCompletionsees B’s pending/generation andFinishManagedReportUploadwipes B’s handle.Residual only (not blocking): apply still passes
fileNameas the singlename:slot, so a distinct displayNamecollapses.
Verdict
- Overall risk: Medium
- Merge recommendation: Request changes
- Must-fix: per-upload native token (or do not reset cancel on a new upload until in-flight completions have seen it); clear the managed slot when JSON is snapped at
UploadReportI did not run WrapperPolicy tests (
dotnetis not on PATH).What looks solid: delete always stop-chains when the SDK instance is alive; C# generation; Android
BooleanConsumerProxy; locked network buffer.Sent by Cursor Automation: Bugsee code review
There was a problem hiding this comment.
Stale comment
Review: Add delete-data, create-report, and breadcrumbs
Re-review of 094a11d (prior b1a6d56, 0dc19cf, a74b63f, 698c632). Checked against iOS 7.x
createReportWithCompletion/stop:+delete, the handler apply path (BugseeUnityApplyReportDict),IosReport.ToResultJson(), Android 7.3 delete/createReport, and the launch buffer — not the patch alone.Addressed in this commit:
Stop(() => DeleteCollectedDataOnDevice())now hits_bugsee_delete_collected_data, which does[Bugsee stop:^{ deleteCollectedDataOnDevice:YES }]wheneversharedInstanceis still non-nil. Stop/Delete-only also setgCancelManagedReportUploadand drop_pendingManagedReportUpload, so a lone in-flight create no longeruploadReport:s after teardown.P0: none
P1 High — Discard + second Upload still uploads the discarded report and wipes the new handle
The generation token never reaches native.
_bugsee_upload_managed_reportresets a process-widegCancelManagedReportUpload = NO, andOnManagedReportCreateCompletionalways binds to the current_pendingManagedReportUpload/_pendingUploadGeneration.UploadReportalso leaves_openReportHandleset, so a secondCreateReportthrows until native completes — the only unlock isDiscard, which is this race.P2 Medium — iOS apply still collapses attachment
Name/FilenameUnchanged.
addAttachmentWithData:name:getsfileNameonly; displaynameis dropped. The handler path still sets both viacreateAndAddAttachmentWithName:+created.fileName.P2 Medium — CreateReport with unset Severity applies wire
0Empty
IosReportDto.severityis0.ToResultJson()always emits it; apply always writesreport.severity.IssueSeverity/IssueSeverityWirestart at 1. AndroidcreateReportkeeps the native default.
Verdict
- Overall risk: Medium
- Merge recommendation: Request changes
- Must-fix: per-upload native generation (do not reset a global cancel; do not attribute a stale
createReportWithCompletionto the current pending); clear the managed slot once JSON is snapshotted; on cancel, do notuploadReport:that native report- Also fix: set both attachment
nameandfileName; omit/skip severity0I did not run WrapperPolicy tests (
dotnetis not on PATH). The new tests are source-string assertions and would not catch the overlapping-upload race or Name vs Filename.What looks solid: Android
BooleanConsumerProxy+trueafterstop(Runnable); iOS delete now stop-then-wipe when an instance exists (including after C#Stop); managed exclusive report + publicDiscard; apply-once atcreateReportWithCompletion; locked network buffer; breadcrumbs fail-closed viaParseOrThrow.Sent by Cursor Automation: Bugsee code review
…nd filename distinct. Co-authored-by: Cursor <cursoragent@cursor.com>
There was a problem hiding this comment.
Stale comment
Review: Add delete-data, create-report, and breadcrumbs
Re-review of 39f218a (prior 094a11d).
Addressed: Native upload is keyed by
uploadId/gActiveManagedReportUploadId. Completions whose token is no longer active skip apply/uploadReport:.UploadReportclears_openReport/_openReportHandlewhen JSON is snapped, so a secondCreateReportdoes not needDiscard. Apply now adds with displaynameand setsfileNameonBGSAttachmentContractwhen the two differ. Stop/Delete cancel only the matching in-flight token.P0–P3: none remaining.
Residual: a second
Uploadwhile the firstcreateReportWithCompletionis still running last-wins (the first token is deactivated, no error). That matches the removed “upload already in progress” guard.
Verdict
- Overall risk: Low
- Merge recommendation: Approve
- Must-fix: none
I did not run WrapperPolicy tests (
dotnetis not on PATH).What looks solid: per-upload cancel; slot released at submit; stop-chained delete; Android
BooleanConsumerProxy; distinct attachment names; locked network buffer.Sent by Cursor Automation: Bugsee code review
There was a problem hiding this comment.
Stale comment
Review: Add delete-data, create-report, and breadcrumbs
Re-review of 39f218a (prior 094a11d). Checked the per-upload id, slot-clear at
UploadReport, andBugseeBridgeSetAttachmentFileNameIfNeededagainst beta5BGSContracts/createReportWithCompletion:— not the patch alone.Addressed: The Discard-then-reupload race is gone: JSON is snapshotted, the managed slot is cleared, and completions carry
uploadIdso a stale create does not wipe a new handle oruploadReport:after Stop/Delete. Attachment apply now passes displayname:and setsfileNameon the returnedBGSAttachmentContract(beta5addAttachmentWithData:does return the attachment).Stop(() => Delete())still stop-chains whensharedInstanceis live.P0: none
P1 High — second
Upload(IReport)silently cancels the first in-flight create
gActiveManagedReportUploadId = uploadIdis still one slot. OverlappingCreateReport+Upload(now allowed; the “already in progress” guard was removed) drops report 1. Android keeps both.P2 Medium — unset CreateReport Severity still applies wire
0Unchanged. Cocoa
BugseeSeverityLevelstarts at 1.ToResultJson()always emits 0 from an empty dto.
Verdict
- Overall risk: Medium
- Merge recommendation: Request changes
- Must-fix: track each upload id independently (set/queue), do not overwrite the active id; skip/omit severity 0
I did not run WrapperPolicy tests (
dotnetis not on PATH). I did inspect Bugsee 7.0.0-beta5 headers (addAttachmentWithData:returns the attachment;createReportWithCompletion:is documented off the main thread).What looks solid: per-id callback; managed slot cleared at submit;
fileNameoverride after add; AndroidBooleanConsumerProxy; stop-then-delete; locked network buffer.Sent by Cursor Automation: Bugsee code review
There was a problem hiding this comment.
Stale comment
Review: Add delete-data, create-report, and breadcrumbs
Re-review of 39f218a. I checked the new per-upload token /
fileNamepath against iOScreateReportWithCompletionand against the bugsee-android 7.3.0 AAR (javapofBugsee,BugseeExchangeFactory,Breadcrumb$Level) — not the patch alone.Addressed: Discard + second Upload no longer uploads the discarded snapshot;
UploadReportclears the managed slot immediately; attachment displaynameandfileNameare applied separately; Stop/Delete still stop-chain before wipe.P0: none
The three new Android public APIs in this PR do not match 7.3.0 JNI. Each throws
AndroidJavaExceptionon first use. iOS still last-write-wins when twoUpload(IReport)calls overlap.
Verdict
- Overall risk: High
- Merge recommendation: Request changes
- Must-fix: Android
createReport(ReportCreationListener),deleteCollectedDataOnDevice(boolean, Callback1<Boolean>), and breadcrumb factory/LevelJNI; keep in-flight iOS uploads independently live- Also: do not block the Unity main thread waiting for Android
onCreatedif that callback is posted to main — bind native at Upload like iOS, or complete in the listenerI inspected
com.bugsee:bugsee-android:7.3.0classes.jar. I did not run WrapperPolicy tests or a device JNI session. The new tests are source-string assertions and would not catch these signatures.What looks solid: iOS per-upload token vs a process-wide cancel flag; apply-once at
createReportWithCompletion; distinct attachment name/fileName; locked network buffer;upload(Report)on Android is the correct 7.3.0 overload; breadcrumbs fail-closed viaParseOrThrow.Unset iOS
Severityserializing0is not a user-facing clobber: 7.x ignores values outside 1–5 and keeps the native default.Sent by Cursor Automation: Bugsee code review
Co-authored-by: Cursor <cursoragent@cursor.com>
There was a problem hiding this comment.
Stale comment
Review: Add delete-data, create-report, and breadcrumbs
Re-review of e49f387 (prior 39f218a). iOS overlapping uploads now use a fence + cancelled-id set instead of a single active id. Android public APIs in this PR are unchanged; I checked them with
javaponcom.bugsee:bugsee-android:7.3.0classes.jar.Addressed: Two
Upload(IReport)calls on iOS both stay live until Stop/Delete incrementsgManagedReportUploadFence. The discarded-snapshot / wiped-handle races stay fixed. Attachmentname/fileNamestay distinct.P0: none
P1 High — Android 7.3.0 JNI still does not match this PR
Unchanged in this commit. All three new Android entry points throw
AndroidJavaExceptionon first use:
CreateReport— no-argcreateReport(); AAR isvoid createReport(ReportCreationListener)DeleteCollectedDataOnDevice—java.util.function.Consumer; AAR isCallback1<Boolean>(void run(T))AddBreadcrumb—Level.fromRawValue+ 4-argcreateBreadcrumb; AAR isfromValue(byte)/valueOfand 0-arg or 6-arg factory
Verdict
- Overall risk: High
- Merge recommendation: Request changes
- Must-fix: Android
createReport(ReportCreationListener),deleteCollectedDataOnDevice(boolean, Callback1<Boolean>), and breadcrumbLevel/factory JNI. Bind native report at Upload like iOS; do not block Unity main waiting foronCreatedif it posts to main.I inspected
com.bugsee:bugsee-android:7.3.0classes.jar. I did not run WrapperPolicy tests (dotnetis not on PATH) or a device JNI session.What looks solid: iOS independent upload ids + fence on Stop/Delete; apply-once at
createReportWithCompletion; distinct attachment names; locked network buffer; Androidupload(Report)overload exists; breadcrumbs fail-closed viaParseOrThrow.Sent by Cursor Automation: Bugsee code review
There was a problem hiding this comment.
Stale comment
Re-review of
39f218a. Prior iOS lifecycle / upload-token / attachment / buffer-lock findings are closed. This pass independentlyjavap'dcom.bugsee:bugsee-android:7.3.0(classes.jarfrom Maven Central). The new public Android APIs do not match that AAR, soCreateReport,AddBreadcrumb, andDeleteCollectedDataOnDevicethrowAndroidJavaExceptionbefore any null-check can run. Requesting changes.P1 (3, all Android 7.3.0 JNI)
CreateReportcalls no-argcreateReport(). 7.3.0 only hasvoid createReport(ReportCreationListener)(onCreatedon the main thread;nullif not launched).deleteCollectedDataOnDeviceis invoked withjava.util.function.Consumer. AAR:(ZLcom/bugsee/library/contracts/common/Callback1;)V. ExistingEventFilterProxyalready usesCallback1.run.AddBreadcrumbcallsLevel.fromRawValue(LogLevel API) and 4-argcreateBreadcrumb. AAR:fromValue(byte)andcreateBreadcrumb()or 6-arg(long, String, String, Level, String, Map).Residual (not blocking): one
gActiveManagedReportUploadIdstill last-write-wins if two iOSUploads overlap. Serial in-game reporter is fine.
PublicApiSourceTestscurrently asserts the same incorrect JNI strings, so unit tests stay green while the player throws.Risk: High. Merge: Request changes.
Sent by Cursor Automation: Bugsee code review
There was a problem hiding this comment.
Stale comment
Review: Add delete-data, create-report, and breadcrumbs
Re-review of e49f387 (prior 39f218a). I checked the new public API against iOS
createReportWithCompletion/ stop-then-delete, and against bugsee-android 7.3.0classes.jar(javapofBugsee,BugseeExchangeFactory,Breadcrumb$Level,Callback1,ReportCreationListener) — not the patch alone.Addressed in this commit: overlapping iOS
Upload(IReport)is no longer last-write-wins._bugsee_upload_managed_reportkeeps eachuploadIdindependently live; Stop/Delete bumpgManagedReportUploadFenceinstead of replacing a single active id. The oldgActiveManagedReportUploadIdpath is gone.P0: none
The three new Android public APIs still do not match 7.3.0 JNI. Each throws
AndroidJavaExceptionon first use, so Delete / CreateReport / AddBreadcrumb are dead on Android while iOS works.
Verdict
- Overall risk: High
- Merge recommendation: Request changes
- Must-fix: Android
createReport(ReportCreationListener),deleteCollectedDataOnDevice(boolean, Callback1<Boolean>), and breadcrumbLevel.fromValue/ 6-argcreateBreadcrumb- When wiring
createReport(listener): do not block the Unity main thread waiting foronCreated— that callback is posted to Android main (the Unity thread). Match iOS: managed snapshot atCreateReport, bind native atUpload.I inspected
com.bugsee:bugsee-android:7.3.0from Maven Central. I did not run WrapperPolicy tests. The new tests are source-string assertions (BooleanConsumerProxy,fromRawValueis untested) and would not catch these signatures —Android_delete_collected_data_stops_then_deletescurrently requires the wrong callback type.What looks solid: iOS independent upload tokens + fence cancel; apply-once at
createReportWithCompletion; distinct attachmentname/fileName; stop-chained delete; locked network launch buffer;upload(Report)on Android is the correct 7.3.0 overload; breadcrumbs fail-closed viaParseOrThrow.Sent by Cursor Automation: Bugsee code review
Co-authored-by: Cursor <cursoragent@cursor.com>
There was a problem hiding this comment.
Stale comment
Review: Add delete-data, create-report, and breadcrumbs
Re-review of 2506581 (prior e49f387). Android now snapshots C# at
CreateReportand binds native viacreateReport(ReportCreationListener)atUpload. I checked the new JNI againstjavapofcom.bugsee:bugsee-android:7.3.0(createReport(ReportCreationListener),deleteCollectedDataOnDevice(boolean, Callback1),Level.fromValue(byte), 6-argcreateBreadcrumb).Addressed: The three Android 7.3.0 JNI P1s.
BooleanCallback1ProxyimplementsCallback1.run; breadcrumb usesfromValue+ type"manual"+HashMap;ReportCreationListenerProxy.onCreatedapplies thenupload(Report)without blocking Unity main. iOS overlapping-upload fence stays in place.P0 / P1: none
P2 Medium — Android
ApplyTowipes native snapshot fields the user never setAlways writes
Email ?? ""andClearAllAttributes/ClearLabels/ClearAttachments. iOS omits those keys when unset so session email/attributes on the native report survive.
Verdict
- Overall risk: Medium
- Merge recommendation: Request changes
- Must-fix: apply only fields the C# snapshot actually set (especially email and attributes)
I inspected the 7.3.0 AAR earlier this run. I did not run WrapperPolicy tests (
dotnetis not on PATH).What looks solid: JNI signatures now match 7.3.0; managed snapshot at CreateReport / native bind at Upload on both platforms;
Callback1delete; 6-arg breadcrumb factory; iOS independent upload ids + stop-then-delete; distinct attachment names.Sent by Cursor Automation: Bugsee code review
There was a problem hiding this comment.
Stale comment
Re-review of
2506581(priore49f387). Independentlyjavap'dcom.bugsee:bugsee-android:7.3.0again.Closed (the three Android JNI P1s)
createReport(ReportCreationListener)+ managed snapshot atCreateReport/ bind atUpload— no Unity-main waitdeleteCollectedDataOnDevice(boolean, Callback1<Boolean>)viaBooleanCallback1Proxy.runBreadcrumb.Level.fromValue(byte)(values 1–5 matchToAndroid) and 6-argcreateBreadcrumb(..., "manual", HashMap)- iOS overlapping uploads remain independent (
e49f387fence + cancelled-id set)P0: none
P1:
AndroidManagedReport.ApplyToalwaysClearAllAttributes()/ClearAttachments()and writesEmail ?? "". NativecreateAndPrepareBugReporthas already filled theReport(session attributes, handler attachments). iOSToResultJsonomitsattributesunless the user touched them for this reason.Residual: Android
Stop/Deletedoes not fence an in-flightcreateReportlistener the way iOS bumpsgManagedReportUploadFence.Risk: Medium. Merge: Request changes.
Sent by Cursor Automation: Bugsee code review
There was a problem hiding this comment.
Stale comment
Review: Add delete-data, create-report, and breadcrumbs
Re-review of 2506581 (prior e49f387). I checked the new Android managed-snapshot path against bugsee-android 7.3.0
classes.jar(javapofBugsee,BugseeExchangeFactory/f0.createBreadcrumb,Breadcrumb$Level.fromValue,Callback1,ReportCreationListener,BugseeIssueReportingCoordinator.createAndPrepareBugReport) and against the iOS apply-once / upload-fence path — not the patch alone.Addressed in this commit: the three Android 7.3.0 JNI mismatches are gone.
CreateReportis a managed snapshot;Uploadcallsvoid createReport(ReportCreationListener)and does not block Unity main waiting foronCreated(that callback is posted to Android main).- Delete uses
Callback1(BooleanCallback1Proxy.run(AndroidJavaObject)→booleanValue), matching(ZLcom/bugsee/library/contracts/common/Callback1;)V.- Breadcrumbs use
Level.fromValue(byte)(1–5 = DEBUG…FATAL) and the 6-arg factory(timestamp, category, message, level, type, data)— bytecode issetCategory/setMessage/setLevel/setType/setData.Prior iOS findings stay addressed: independent upload ids +
gManagedReportUploadFence, apply-once atcreateReportWithCompletion, distinct attachmentname/fileName, stop-chained delete, locked network buffer.P0: none
The new Android bind-at-upload path still has two happy-path / lifecycle bugs that iOS already avoided.
Verdict
- Overall risk: High
- Merge recommendation: Request changes
- Must-fix: do not
ClearAllAttributes/ forceEmail=""onto a native report that already copied session attributes andgetUserIdentifier(); fence in-flightonCreated→upload(Report)across Stop/Delete the same way iOS fencesuploadReport:- Also: skip unset Summary/Description (null) instead of writing
""I inspected
com.bugsee:bugsee-android:7.3.0from Maven Central. I did not run WrapperPolicy tests (dotnetis not on PATH).What looks solid: JNI now matches the 7.3.0 AAR; iOS overlapping uploads stay independent; managed snapshot at
CreateReport/ native bind atUploadon both platforms; breadcrumbs fail-closed viaParseOrThrow.Sent by Cursor Automation: Bugsee code review
…upload after stop. Co-authored-by: Cursor <cursoragent@cursor.com>
There was a problem hiding this comment.
Stale comment
Re-review of
586646b(prior2506581). Both remaining Android P1s are addressed.Closed
ApplyTooverlays only assigned fields:Summary/Descriptionwhen non-null,_emailAssigned, attributes/labels when dirty. NoClearAttachments()— native/handler attachments stay. Matches iOS omit-if-untouched.AndroidManagedReportUploadFence:UploadcapturesCurrent;onCreatedchecks before apply and beforeupload(Report);StopandDeleteCollectedDataOnDeviceInvalidate(). GDPR wipe can no longer send a report whose create was still inopenAsync.- Prior JNI / iOS lifecycle / attachment-name / buffer-lock findings stay closed.
P0 / P1: none
Residual (not blocking):
ClearAttachments()on the managed snapshot still only clears the C# list (same as iOS).Relaunchdoes not bump the fence (iOS relaunch also does not).Risk: Low. Merge: Approve.
Sent by Cursor Automation: Bugsee code review
There was a problem hiding this comment.
Stale comment
Review: Add delete-data, create-report, and breadcrumbs
Re-review of 586646b (prior 2506581). I checked the new dirty-field overlay and
AndroidManagedReportUploadFenceagainst bugsee-android 7.3.0classes.jar(javapofBugsee.createReport(ReportCreationListener),upload(Report),reporting.gctor copyinggetUserIdentifier()/getAttributes()), against iOScreateReportWithCompletion:/BugseeBridgeApplyReportDictomit-if-untouched, and against Stop/Delete callers — not the patch alone.Addressed in this commit
- ApplyTo session wipe (P1):
AndroidManagedReportnow applies Email only when_emailAssigned, Summary/Description only when non-null, attributes/labels only when dirty, and no longer callsClearAttachments(). UntouchedCreateReport+Uploadkeeps nativereporting.gemail, session attributes, and handler attachments — matching iOS omitting unset keys.- In-flight upload after Stop/Delete (P1):
StopandDeleteCollectedDataOnDeviceincrementAndroidManagedReportUploadFence.onCreatedcaptures the generation atUploadand returns withoutApplyTo/upload(Report)if it no longer matches. The GDPR/logout case (Upload startsopenAsync, then Delete) no longer sends the session.Prior JNI / iOS lifecycle findings stay closed:
createReport(listener)at Upload,Callback1delete,Level.fromValue+ 6-arg breadcrumb, per-upload iOS ids + fence, distinct attachmentname/fileName, stop-chained iOS delete, locked network buffer.P0–P3: none remaining that I can back with a concrete failure.
Verdict
- Overall risk: Low
- Merge recommendation: Approve
- Must-fix: none
- What looks solid: Snapshot at
CreateReport/ native bind atUploadon both platforms; Android overlay now skips untouched fields the same way iOSToResultJsonomits them; Stop/Delete fence is the Android counterpart ofgManagedReportUploadFence.I inspected
com.bugsee:bugsee-android:7.3.0from Maven Central and iOS 7.0.0-beta5Bugsee.h. I did not run WrapperPolicy tests locally (dotnetis not on PATH). GitHub Actions on 586646b is green: Wrapper policy tests, Android wrapper tests, iOS bridge tests.Sent by Cursor Automation: Bugsee code review
There was a problem hiding this comment.
Stale comment
Review: Add delete-data, create-report, and breadcrumbs
Re-review of 586646b (prior 2506581). I checked the new Android apply/fence commit against bugsee-android 7.3.0
classes.jar(createReport(ReportCreationListener)→createAndPrepareBugReport(Upload, null…),upload(Report)→sendBugReport,Callback1.run,Level.fromValue/ 6-arg factory) and against the iOS apply-once /createReportWithCompletionpath — not the patch alone.Addressed in this commit: both remaining Android P1s.
ApplyTooverlays only fields the snapshot actually set (Summary/Descriptionif non-null,getUserIdentifier()) andgetAttributes()copied byreporting.gsurvive a summary-only upload.ClearAttachments()is no longer called, so handler attachments added before apply are kept.AndroidManagedReportUploadFenceis captured atUploadand checked inonCreatedbefore apply and beforeupload(Report).Stop/DeleteCollectedDataOnDeviceincrement it, so a GDPR wipe no longer sends the in-flight session.Prior iOS findings stay addressed: independent upload ids +
gManagedReportUploadFence, apply-once atcreateReportWithCompletion, distinct attachmentname/fileName, stop-chained delete, locked network buffer. JNI still matches the 7.3.0 AAR.P0 / P1: none
The new iOS bind-at-upload path still drops the entire managed overlay (and still uploads) when
ToResultJson()is not strict JSON.
Verdict
- Overall risk: Medium
- Merge recommendation: Request changes
- Must-fix: escape all JSON string controls (or use a real serializer) in
IosReport.ToResultJson; do notuploadReport:when deserialize fails- Also: consider omitting
labels/attachmentsunless the snapshot touched them (Android now does this for labels)I inspected
com.bugsee:bugsee-android:7.3.0from Maven Central and confirmedJSON.parse/json.loadsreject an unescaped tab in a string. I did not run WrapperPolicy tests (dotnetis not on PATH).What looks solid: Android apply no longer clobbers session email/attributes; in-flight
onCreatedis fenced across Stop/Delete; JNI matches 7.3.0; iOS overlapping uploads stay independent; breadcrumbs fail-closed viaParseOrThrow.Sent by Cursor Automation: Bugsee code review
There was a problem hiding this comment.
Stale comment
Re-review of
586646b. Prior Android JNI / ApplyTo / Stop-Delete fence P1s stay closed. Independently confirmed a remaining iOS serialization hole on the newUpload(IReport)path.P0 / P1: none
P2:
IosReport.ToResultJson/IosAttachment.ToJsonObjectonly escape\\,",,\r. An unescaped tab (or other U+0000–U+001F) in Summary/Description/label/attribute is not JSON.NSJSONSerializationfails,BugseeBridgeApplyReportDictis skipped, and_bugsee_upload_managed_reportstill callsuploadReport:. The issue lands without the text the player typed.float.NaN/InfinityviaAppendValueis the same class of invalid token. AndroidApplyTosets Java strings directly and does not have this failure.Residual: managed
ClearAttachments()only clears the C# list;Relaunchdoes not bump the Android fence (same as iOS).Risk: Low–Medium. Merge: Approve (P2 should-fix, not a happy-path JNI/lifecycle break).
Sent by Cursor Automation: Bugsee code review
There was a problem hiding this comment.
Stale comment
Review: Add delete-data, create-report, and breadcrumbs
Re-review of 586646b. The two Android P1s from 2506581 stay closed (
ApplyTooverlay +AndroidManagedReportUploadFence). Independently checking the iOS bind-at-upload path againstNSJSONSerialization/ RFC 8259 turned up a remaining correctness hole this PR’sUpload(IReport)now depends on.Still closed: JNI matches 7.3.0; iOS overlapping uploads; stop-chained delete; fileName vs name; locked network buffer; session email/attributes survive an untouched Android apply.
P0 / P1: none
P2:
IosReport.ToResultJson()/IosAttachment.ToJsonObject()only escape\\,",,\r. A tab (or any other U+0000–U+001F control) in Summary/Description/labels/attributes/attachment text is invalid JSON.BugseeDeserializeJsonreturns nil and_bugsee_upload_managed_reportstill callsuploadReport:— the native report goes out without the managed overlay. AndroidApplyTosets Java strings directly and does not have this failure.
Verdict
- Overall risk: Medium
- Merge recommendation: Request changes
- Must-fix: escape all JSON string controls in
AppendRawString(and the attachment helper); if deserialize fails, callback0and return — do notuploadReport:- What looks solid: Android session overlay and Stop/Delete fence; JNI; iOS upload-id independence
Confirmed:
json.loads('{"summary":"Crash:\tnull ref"}')raisesInvalid control character. I did not run WrapperPolicy tests locally (dotnetis not on PATH). GitHub Actions on 586646b is green.Sent by Cursor Automation: Bugsee code review
There was a problem hiding this comment.
Stale comment
Review: Add delete-data, create-report, and breadcrumbs
Re-review of 448da2d (merge of the report-attachment API into public-api; prior approve was b5641b2).
Prior P0–P3s from the CreateReport / delete / breadcrumb work stay closed: exclusive slot, upload fence, overlay-vs-replace, JSON escape/NaN, late
Stopped, breadcrumb enqueue timestamps, not-launched Delete buffer clear, JNI 7.3 selectors. I did not re-escalate the intentionalBumpForLaunchskip-wipe.This pass is the merge of
#18(AddAttachmentFile/pathsnapshots) into CreateReport. Handler apply (BugseeUnityApplyReportDict) was taught to readpath+move:YES. CreateReport apply was not.PublicApiSourceTestsstill pins the old bytes-onlyBugseeBridgeApplyExtendedReportDict, so the suite cannot catch this.Findings
- P1 — iOS
CreateReport+AddAttachmentFileuploads an empty body.IosAttachment.ToJsonObject()emitspathand omitsdataBase64/text; apply only reads those keys and falls back to[NSData data].- P2 — CreateReport never calls
ReleaseSnapshotFiles(). HandlerCompleteReportdoes (after native apply). Upload/Discard/Stop/Delete drop_openReportand leavebugsee-unity-report-attachments/*on disk.- P2 — Android CreateReport stores the caller path and ingests it later in async
onCreated. No snapshot /File.Existsat add time. The same attach-then-delete sequence iOS snapshots for silently drops on Android.
AddAttachmentBytesstill works on both platforms.Overall risk: Medium
Merge recommendation: Request changes
Most important to fix: teach
BugseeBridgeApplyExtendedReportDictto consumepath(same as handler, ordataWithContentsOfFile:into the existingsetAttachment:path), release snapshots on Upload completion and on Discard/Stop/Delete, and pin that in tests so CreateReport apply cannot regress to data-only. Snapshot Android CreateReport files at add time (or copy bytes) so the two platforms share oneAddAttachmentFilecontract.I did not run
dotnet testor device jobs in this environment (dotnetis not on PATH).Sent by Cursor Automation: Bugsee code review
…es after upload. Co-authored-by: Cursor <cursoragent@cursor.com>
There was a problem hiding this comment.
Stale comment
Review: Add delete-data, create-report, and breadcrumbs
Re-review of 802063a (prior 448da2d). Independently checked
BugseeBridgeApplyExtendedReportDictagainstIosAttachment.ToJsonObject()(path/dataBase64) and iOS 7.0.0-beta5BugseeExtendedReport/BugseeAttachment(data-onlysetAttachment:). Native_bugsee_upload_managed_reportapplies the dict insidecreateReportWithCompletion:before the managed callback.Closed at 802063a
- P1 iOS CreateReport file attachments — fully_addressed. Apply reads
att[@"path"]viadataWithContentsOfFile:, skips when the read fails (no empty-NSDatafallback), thenattachmentWithName:filename:data:+setAttachment:.AddAttachmentBytesstill usesdataBase64. Source tests pinpath/dataWithContentsOfFile:on this apply.- P2 CreateReport snapshot lifetime on Upload/Discard — fully_addressed for those paths. Upload keeps the
IosReportin_uploadSnapshotReportsuntilHandleManagedReportCreateCompletion(after native apply). Discard releases immediately. Stop/Delete cancel releases in-flight upload snapshots.Residual (not blocking)
Stop/DeleteCollectedDataOnDevicestill null_openReportwithoutReleaseSnapshotFiles().CreateReport(); AddAttachmentFile(...); Stop();(no Upload/Discard) leaves the temp snapshot until the OS reaps/tmp. Same class as the accepted #18SetDatasnapshot leak.- Delete-then-Launch skip-wipe when
BumpForLaunchwins. Do not re-escalate to P1.BugseeAttachmenthas nomimeType; MIME helper remains best-effort.- Android CreateReport still stores the caller path until
onCreated(no add-time snapshot). Accepted #18 asymmetry.Prior P0–P3s (JNI, fences, handler overlay, late
Stopped, not-launched Delete buffers) still hold. Wrapper policy and Android CI green; iOS bridge still running at review time.No remaining P0–P3. Risk Low. Merge: approve.
Sent by Cursor Automation: Bugsee code review
There was a problem hiding this comment.
Stale comment
Review: Add delete-data, create-report, and breadcrumbs
Re-review of 802063a (prior 448da2d). I checked
BugseeBridgeApplyExtendedReportDictpath ingest againstIosAttachment.ToJsonObject, callback ordering vscreateReportWithCompletionapply, and snapshot lifetime on Upload / Discard / Stop / Delete. I did not rundotnet test(SDK not installed).Closed at 802063a
- P1 iOS CreateReport file attachments uploading empty — fully_addressed. Apply now reads
att[@"path"]withdataWithContentsOfFile:, skips when the read fails, and no longer substitutes emptyNSData.AddAttachmentBytesstill usesdataBase64. Native callback runs after apply, soNSDatais already on theBugseeAttachmentbefore C# releases the snapshot.PublicApiSourceTests/ReportPathSourceTestspinpath+dataWithContentsOfFile:.- P2 Upload/Discard snapshot leak — partially_addressed.
DiscardReportreleases immediately.UploadReportkeeps theIosReportin_uploadSnapshotReportsuntilHandleManagedReportCreateCompletion. In-flight uploads are released fromCancelManagedReportUpload.Remaining
P2 Medium —
Stopand bothDeleteCollectedDataOnDevicebranches still null_openReportwithoutReleaseSnapshotFiles(). An open CreateReport (attached, not yet Upload/Discard) leaks temp copies. Same drop on GDPR Delete leaves wrapper snapshots underbugsee-unity-report-attachmentsafter native wipe.Residual (not blocking)
- Void
Delete(); Launch();skip-wipe. Do not re-escalate to P1.- Android CreateReport still stores the caller path and ingests at async
onCreated(no snapshot). Attach-then-delete can drop the file on Android after iOS would have kept a copy.
- Overall risk: Low
- Merge recommendation: Request changes
- Most important to fix:
_openReport?.ReleaseSnapshotFiles()on Stop and both Delete branches (same as Discard), before nulling the slot- Positive: CreateReport path apply matches the new JSON shape; upload snapshots survive until after native file read; failed path reads no longer attach empty bodies.
Sent by Cursor Automation: Bugsee code review
There was a problem hiding this comment.
Stale comment
Review: Add delete-data, create-report, and breadcrumbs
Re-review of 802063a (prior 448da2d). I checked CreateReport apply against
IosAttachment.ToJsonObject()path, snapshot lifetime on Upload/Discard vs Stop/Delete, and AndroidAddAttachmentFile(still caller-path, unchanged).Closed in 802063a
- P1 iOS CreateReport file attachments — fully_addressed.
BugseeBridgeApplyExtendedReportDictloadsatt[@"path"]withdataWithContentsOfFile:and skips when the read fails (no emptyNSDatafallback). Bytes path still usesdataBase64. Tests pinpathon this apply.- P2 Upload/Discard snapshot leak — partially_addressed.
UploadReportkeeps theIosReportin_uploadSnapshotReportsuntilHandleManagedReportCreateCompletion;DiscardReportreleases immediately.CancelManagedReportUploadreleases in-flight upload snapshots.Prior closes stay closed: not-launched Delete buffers, late
Stopped, timestamps, MIME helper, handler overlay, JNI, fences. Do not re-escalate skip-wipe to P1.Remaining
P2 Stop/Delete still drop
_openReportwithoutReleaseSnapshotFiles()(open CreateReport, not yet uploaded).P2 Android CreateReport
AddAttachmentFilestill stores the caller path and ingests it later inonCreated(unchanged this commit).
- Overall risk: Medium
- Merge recommendation: Request changes
- Most important to fix:
_openReport?.ReleaseSnapshotFiles()on Stop and both Delete branches, matching Discard. Snapshot or copy bytes at AndroidAddAttachmentFileso attach-then-delete cannot drop the file.- Positive: Path apply plus skip-on-failed-read is the right ExtendedReport shape (
setAttachment:+ in-memory data). Upload completion now releases after native apply, same order as the handler path.Sent by Cursor Automation: Bugsee code review
There was a problem hiding this comment.
Stale comment
Review: Add delete-data, create-report, and breadcrumbs
Re-review of 802063a (prior 448da2d). I checked CreateReport apply vs handler apply, snapshot lifetime around
createReportWithCompletion, and AndroidAndroidManagedReport.AddAttachmentFile. I did not rundotnet test(dotnetis not on PATH).Closed
- P1 iOS CreateReport file attachments:
BugseeBridgeApplyExtendedReportDictnow loadsatt[@"path"]withdataWithContentsOfFile:before the bytes/textpath, and skips the item if the file cannot be read (no empty-NSDatafallback). Apply runs in the native completion before the C# callback, so the snapshot is still on disk when it is read.AddAttachmentBytesviadataBase64still works. Source tests pinpath/dataWithContentsOfFile:on this apply function.- Upload/Discard snapshot release:
UploadReportkeeps theIosReportin_uploadSnapshotReportsuntilHandleManagedReportCreateCompletion;DiscardReportreleases immediately.- Prior closes still hold: not-launched Delete buffers, late
Stopped, enqueue timestamps, overlay, JNI, upload fences, JSON escape/NaN. Do not re-escalateDelete(); Launch();skip-wipe to P1.Remaining
P2 Medium — snapshot lifetime is incomplete, and the new map is not safe for the callback thread. Details on
ReleaseAllUploadSnapshotReports.P2 Medium — Android CreateReport still stores the caller path and ingests it later in async
onCreated. Details onAddAttachmentFile.
- Overall risk: Medium
- Merge recommendation: Request changes
- Most important issues to fix: Release
_openReportsnapshots on Stop/Delete; serialize_uploadSnapshotReports(lock or hop the native completion onto the Unity main thread); snapshot Android CreateReport files at add time so the two platforms share oneAddAttachmentFilecontract.- Positive: The empty-upload P1 is actually fixed, unreadable paths are skipped instead of attached as zero bytes, and MIME is applied on the file path too.
Sent by Cursor Automation: Bugsee code review
There was a problem hiding this comment.
Stale comment
Review: Add delete-data, create-report, and breadcrumbs
Re-review of 802063a (prior 448da2d). I checked
BugseeBridgeApplyExtendedReportDictagainstToJsonObject()path/dataBase64, upload snapshot lifetime (_uploadSnapshotReportsvsHandleManagedReportCreateCompletion), Discard vs Stop/Delete, and AndroidAndroidManagedReport.AddAttachmentFile. Wrapper policy and Android wrapper CI jobs on this head pass; iOS bridge tests were still pending. I did not rundotnet testlocally (dotnetis not on PATH).P0 / P1: none remaining
Closed in 802063a
- P1 iOS
CreateReport+AddAttachmentFileuploaded empty bytes — fully_addressed. Apply now readsatt[@"path"]viadataWithContentsOfFile:, skips the row when the read fails (no empty[NSData data]fallback), and still appliesdataBase64. Source tests pinpathon this apply function.- P2 Upload/Discard snapshot leak — fully_addressed for those paths.
UploadReportkeeps theIosReportuntil create completion (after native apply has copied bytes),DiscardReportreleases immediately, andCancelManagedReportUploadreleases in-flight upload snapshots.Prior closes stay closed: not-launched Delete buffers, late
Stopped, timestamps, handler overlay, JNI, upload fences, JSON escape/NaN. Do not re-escalate skip-wipe to P1.Remaining
P2 Medium —
Stopand bothDeleteCollectedDataOnDevicebranches still null_openReportwithoutReleaseSnapshotFiles(). Details onStop.P2 Medium — Android CreateReport still stores the caller path and ingests it later in async
onCreated. Details onAddAttachmentFile.Residual (not blocking)
- Void
Delete(); Launch();skip-wipe (BumpForLaunch/ShouldRunDelete).IosAttachment.SetData/SetFilePathdrop_pathwithoutDeleteSnapshotIfOwned()(#18 P3).- iOS CreateReport email remains an ExtendedReport SDK gap (warning logged).
- Overall risk: Medium
- Merge recommendation: Request changes
- Most important to fix: Release
_openReportsnapshots on Stop/Delete (same as Discard). Snapshot or copy Android CreateReport files atAddAttachmentFileso attach-then-delete-then-Upload matches iOS.- Positive: CreateReport apply now matches the #18 JSON shape, failed path reads no longer upload a zero-byte stub, and Upload waits until native apply before deleting the snapshot — the right order for
dataWithContentsOfFile:.Sent by Cursor Automation: Bugsee code review
There was a problem hiding this comment.
Stale comment
Review: Add delete-data, create-report, and breadcrumbs
Re-review of 802063a. Path apply and Upload/Discard snapshot lifetime stay fully_addressed. New evidence from iOS 7.0.0-beta5
Bugsee.h:createReportWithCompletion:does not run on the main thread.Remaining
P2 —
_uploadSnapshotReportsis an unsynchronizedDictionarywritten from that off-main completion (HandleManagedReportCreateCompletion→TryGetValue/Remove) and from the Unity main thread (UploadReportinsert,CancelManagedReportUpload→foreach/Clearon Stop/Delete). Concurrent mutation can throw or skip the delete. Stop/Delete still also null_openReportwithoutReleaseSnapshotFiles()(abandoned draft leak).Do not re-escalate skip-wipe or Android add-time snapshot (accepted #18 residual).
Risk Medium. Merge: request changes.
Sent by Cursor Automation: Bugsee code review
There was a problem hiding this comment.
Stale comment
Deep review —
802063aIntent: public
DeleteCollectedDataOnDevice,CreateReport/ Upload / Discard, and breadcrumbs, plus iOS launch buffers.Closed on this head
- P1 CreateReport file attachments now load
pathviadataWithContentsOfFile:(skip if unreadable; no emptyNSData).- Upload / Discard / in-flight cancel keep the
IosReportuntil native apply, thenReleaseSnapshotFiles().- Delete generation fence, breadcrumb enqueue timestamps, stale-Stopped ignore, not-launched Delete buffer clear — all still hold. Do not re-escalate the
Delete(); Launch();skip-wipe: that is the intended generation-fence tradeoff.Remaining
- P2 Stop and both Delete branches still drop
_openReportwithoutReleaseSnapshotFiles().- Residual Android CreateReport stores the caller path until async
onCreated(no add-time snapshot). iOSCreateReportemail is warn-only.SetData/SetFilePathcan abandon an owned snapshot.I did not run the Unity /
dotnetsuite in this environment (dotnetis not onPATH).Overall
- Risk: Low
- Merge: Approve — the empty-upload P1 is gone; leftover P2 is a temp-file leak on abandoned reports, not a broken happy-path upload.
- Fix next:
_openReport?.ReleaseSnapshotFiles()before nulling on Stop and both Delete paths.- Positives: path apply, upload fence, and generation/buffer work are consistent with the native 7.x contracts.
Sent by Cursor Automation: Bugsee code review
There was a problem hiding this comment.
Stale comment
Review: Add delete-data, create-report, and breadcrumbs
Re-review of 802063a (prior 448da2d). Independently checked CreateReport apply (
BugseeBridgeApplyExtendedReportDictvsIosAttachment.ToJsonObject()), snapshot lifetime on Upload/Discard/Stop/Delete, and the delete-generation fence. Native_bugsee_upload_managed_reportapplies the dict insidecreateReportWithCompletion:before the managed callback. Wrapper policy, Android wrapper, and iOS bridge CI jobs on this head pass. I did not rundotnet testlocally (dotnetis not on PATH).Closed at 802063a
- P1 iOS CreateReport file attachments — fully_addressed. Apply reads
att[@"path"]viadataWithContentsOfFile:, skips when the read fails (no empty-NSDatafallback), thenattachmentWithName:filename:data:+setAttachment:. Bytes attachments still usedataBase64. Source tests pinpath/dataWithContentsOfFile:.- P2 Upload/Discard snapshot lifetime — fully_addressed on those paths. Upload keeps the
IosReportin_uploadSnapshotReportsuntilHandleManagedReportCreateCompletion. Discard releases immediately.CancelManagedReportUploadreleases in-flight snapshots.Prior P0–P3s still hold: exclusive slot, upload fence, overlay-vs-replace, JSON escape/NaN, late
Stopped, breadcrumb enqueue timestamps, not-launched Delete buffer clear, JNI 7.3 selectors. Do not re-escalate voidDelete(); Launch();skip-wipe to P1 (fence protects the new session).Remaining
P2 Medium —
Stopand bothDeleteCollectedDataOnDevicebranches still drop an unused CreateReport draft withoutReleaseSnapshotFiles(). See inline.Residual (not blocking)
- Android CreateReport stores the caller path until
onCreated(accepted #18 asymmetry).BugseeAttachmenthas nomimeTypesetter; MIME helper is best-effort.SetData/SetFilePathafterAddAttachmentFilestill drop_pathwithoutDeleteSnapshotIfOwned(#18 P3).Overall risk: Medium
Merge: Request changes — release_openReportsnapshots on Stop/Delete (especially GDPR Delete).
Most important to fix:Stop/DeleteCollectedDataOnDevicemust callReleaseSnapshotFiles()before nulling the unused draft.Sent by Cursor Automation: Bugsee code review
There was a problem hiding this comment.
Stale comment
Review: Add delete-data, create-report, and breadcrumbs
Re-review of 802063a (prior 448da2d). I checked CreateReport apply against
IosAttachment.ToJsonObject()(path/dataBase64), snapshot lifetime on Upload / Discard vs Stop / Delete, and AndroidAndroidManagedReport.AddAttachmentFile. Wrapper policy, Android wrapper, and iOS bridge CI jobs are green on this head.Closed at 802063a
- P1 iOS CreateReport file attachments uploading empty — fully_addressed.
BugseeBridgeApplyExtendedReportDictnow readsatt[@"path"]withdataWithContentsOfFile:, skips when the read fails (no empty-NSDatafallback), thenattachmentWithName:filename:data:+setAttachment:. Native apply runs insidecreateReportWithCompletion:before the managed callback, so the snapshot is still on disk when it is read. Bytes attachments still usedataBase64. Source tests pinpath/dataWithContentsOfFile:on this apply.- P2 Upload / Discard snapshot release — partially_addressed.
UploadReportkeeps theIosReportin_uploadSnapshotReportsuntilHandleManagedReportCreateCompletion.DiscardReportreleases immediately.CancelManagedReportUploadreleases in-flight upload snapshots only.Prior closes still hold: exclusive CreateReport slot, upload fence, overlay-vs-replace, JSON escape/NaN, late
Stopped, breadcrumb enqueue timestamps, not-launched Delete buffer clear, JNI 7.3 selectors, handler path apply. Do not re-escalate voidDelete(); Launch();skip-wipe to P1.Remaining
Two P2s, both with concrete failure paths. Details on the inline comments.
- Overall risk: Medium
- Merge recommendation: Request changes
- Most important to fix:
_openReport?.ReleaseSnapshotFiles()on Stop and both Delete branches before nulling the slot (GDPR Delete must not leave wrapper temp copies). Snapshot or copy bytes at AndroidAddAttachmentFileso attach-then-delete-then-Upload matches iOS.- Positive: Path apply now matches the #18 JSON shape; failed reads no longer attach a zero-byte stub; Upload waits until after native file ingest before releasing snapshots.
Sent by Cursor Automation: Bugsee code review
…d file attachments at add. Co-authored-by: Cursor <cursoragent@cursor.com>
There was a problem hiding this comment.
Stale comment
Review: Add delete-data, create-report, and breadcrumbs
Re-review of 17aae36 (prior 802063a). I checked iOS Stop/Delete draft release,
_uploadSnapshotReportslocking, and AndroidAddAttachmentFilesnapshot-at-add vs upload/cancel lifetime. I did not rundotnet test(dotnetis not on PATH).Closed at 17aae36
- P2 iOS Stop/Delete dropping an open CreateReport without
ReleaseSnapshotFiles()— fully_addressed. All three paths release the draft before nulling. Tests pin Stop and Delete.- P2 unsynchronized
_uploadSnapshotReports— fully_addressed. Insert/remove/clear run under_uploadSnapshotReportsGate; file delete on the per-token path is after the lock.- P2 Android CreateReport storing the caller path until
onCreated— partially_addressed.AddAttachmentFilenowFile.Exists+SnapshotAttachmentFile+SetSnapshotPath, so attach-then-delete-then-Upload keeps the copy. Stop/Delete/Discard/ClearAttachments release those copies.Prior closes still hold: iOS CreateReport
pathapply, Upload/Discard snapshot order, exclusive slot, fences, overlay, JSON escape/NaN, lateStopped, enqueue timestamps, not-launched Delete buffers, JNI. Do not re-escalateDelete(); Launch();skip-wipe to P1.Remaining
P2 Medium — Android CreateReport snapshots are never released after Upload (or after a fenced-off
onCreated). Details on the listener.
- Overall risk: Low
- Merge recommendation: Request changes
- Most important to fix:
try/finallyReleaseSnapshotFiles()inonCreatedafterApplyTo(and on the early fence/null returns). Stop/Delete afterUpload()currently cannot see the proxy-owned snapshot, so GDPR cancel of an in-flight create leaves the new temp copies.- Positive: iOS abandoned-draft leak and Dictionary race are actually gone; Android attach-then-delete now matches iOS at add time.
Sent by Cursor Automation: Bugsee code review
There was a problem hiding this comment.
Stale comment
Review: Add delete-data, create-report, and breadcrumbs
Re-review of 17aae36 (prior 802063a). I checked iOS Stop/Delete snapshot release, the
_uploadSnapshotReportslock, and the new AndroidAddAttachmentFilesnapshot. I did not rundotnet test(SDK not installed).Closed at 17aae36
- P2 iOS Stop/Delete dropping
_openReportwithoutReleaseSnapshotFiles()— fully_addressed. All three branches release before nulling. Source tests pin Stop and Delete.- P2 Android CreateReport storing the caller path until
onCreated— fully_addressed for attach-then-delete.AddAttachmentFilenowFile.Exists+SnapshotAttachmentFile+SetSnapshotPath. Stop/Delete/Discard release Android snapshots.SetFilePath/SetSnapshotPathdelete a previous owned copy.- P2 unsynchronized
_uploadSnapshotReports— fully_addressed. Insert, per-token release, andReleaseAlltake_uploadSnapshotReportsGate.P1 path apply from 802063a still holds. Prior closes (buffers, late Stopped, timestamps, overlay, JNI, fences, JSON) still hold. Do not re-escalate skip-wipe to P1.
Remaining
P2 Medium — Android Upload never releases the new snapshots.
UploadReportmoves the managed report intoReportCreationListenerProxyand nulls_openReport.onCreatedcallsApplyTo(addAttachment(File, …, false)copies; it does not move) and neverReleaseSnapshotFiles(). Early fence/nullreturns and the catch path also skip release. Stop/Delete cannot recover it:_openReportis already null, and there is no in-flight map like iOS_uploadSnapshotReports.Happy-path
CreateReport+AddAttachmentFile+Uploadon Android leavesbugsee-unity-report-attachments/<guid>on disk.UploadthenStopbeforeonCreatedis the same leak if the listener never runs.Residual (not blocking)
- Void
Delete(); Launch();skip-wipe.SetDataon a file snapshot still drops_pathwithoutDeleteSnapshotIfOwned(iOS and Android).
- Overall risk: Low
- Merge recommendation: Request changes
- Most important to fix:
ReleaseSnapshotFiles()after native ingest inonCreated(including early/error paths), and keep the in-flight managed report so Stop/Delete can release if the listener never runs — same shape as iOS Upload completion.- Positive: iOS abandoned-draft and Android add-time snapshot now match; the dictionary lock is the right fix for the off-main create completion.
Sent by Cursor Automation: Bugsee code review
There was a problem hiding this comment.
Stale comment
Review: Add delete-data, create-report, and breadcrumbs
Re-review of 17aae36 (prior 802063a). I checked iOS Stop/Delete/
_uploadSnapshotReportsGate, AndroidAndroidManagedReport.AddAttachmentFilesnapshotting, and whether Upload/onCreatedreleases those copies. Wrapper policy and Android wrapper CI jobs on this head pass; iOS bridge tests were still pending. I did not rundotnet testlocally (dotnetis not on PATH).P0 / P1: none remaining
Closed in 17aae36
- P2 iOS Stop / both Delete branches dropping
_openReportwithoutReleaseSnapshotFiles()— fully_addressed. Same helper as Discard; source test pins Stop and Delete.- P2
_uploadSnapshotReportsunsynchronized vs off-main completion — fully_addressed. Mutations go through_uploadSnapshotReportsGate; file delete inReleaseUploadSnapshotReportis outside the lock.- P2 Android CreateReport attach-then-delete drop — fully_addressed as a missing-file bug.
AddAttachmentFilenowFile.Exists+SnapshotAttachmentFile+SetSnapshotPath, matching iOS add-time copy.Prior closes stay closed: CreateReport
pathapply, iOS Upload/Discard snapshot lifetime, not-launched Delete buffers, lateStopped, timestamps, handler overlay, JNI, fences, JSON escape/NaN. Do not re-escalate skip-wipe to P1.Remaining
P2 Medium — Android snapshots are never released on the Upload / in-flight-create path. Details on
onCreated.Residual (not blocking)
- Void
Delete(); Launch();skip-wipe (BumpForLaunch/ShouldRunDelete).SetDataon iOSIosAttachmentand AndroidAndroidManagedAttachmentstill drop_pathwithoutDeleteSnapshotIfOwned()(#18 P3; AndroidSetFilePath/SetSnapshotPathnow do delete).- iOS CreateReport email remains an ExtendedReport SDK gap (warning logged).
- Overall risk: Medium
- Merge recommendation: Request changes
- Most important to fix:
ReleaseSnapshotFiles()inonCreated(try/finally), including fence/null early returns; keep the in-flight Android snapshot on the bridge so Stop/Delete can release if the listener never runs.- Positive: Abandoned iOS/Android drafts now release on Stop/Delete/Discard; Android attach-then-delete-then-Upload now has a copy at add time; the iOS completion map is locked.
Sent by Cursor Automation: Bugsee code review
There was a problem hiding this comment.
Stale comment
Review: Add delete-data, create-report, and breadcrumbs
Re-review of 17aae36 (prior 802063a). Independently checked iOS Stop/Delete release,
_uploadSnapshotReportslocking, and the new Android add-time snapshot.Closed at 17aae36
- P2 iOS
_uploadSnapshotReportsrace — fully_addressed. Insert /ReleaseAll/ReleaseUploadtake_uploadSnapshotReportsGate; file delete runs after the lock.- P2 iOS Stop / both Delete branches — fully_addressed.
_openReport?.ReleaseSnapshotFiles()before nulling. Source test pins Stop and Delete.- Android
AddAttachmentFilenow snapshots at add (File.Exists+SnapshotAttachmentFile+SetSnapshotPath). Stop / Delete / Discard release those copies.SetFilePath/SetSnapshotPathcallDeleteSnapshotIfOwned.Remaining
P2 Android CreateReport upload never releases the new snapshots.
UploadReporthands theAndroidManagedReporttoReportCreationListenerProxyand nulls_openReport.onCreatedApplyTos (nativeaddAttachment(File, …, false)copies) then uploads, with noReleaseSnapshotFiles(). Early fence/nullreturns also drop the snapshot. Stop after Upload cannot clean up — the slot is already empty.Same hole iOS closed with
_uploadSnapshotReportsuntil after native apply.Do not re-escalate skip-wipe.
SetDataafterAddAttachmentFilestill drops_pathwithoutDeleteSnapshotIfOwned(accepted #18 P3).Risk Medium. Merge: request changes.
Sent by Cursor Automation: Bugsee code review
There was a problem hiding this comment.
Stale comment
Review: Add delete-data, create-report, and breadcrumbs
Re-review of 17aae36 (prior 802063a). I checked Stop/Delete snapshot release on iOS and Android, Android
AddAttachmentFilesnapshotting,_uploadSnapshotReportslocking, and Android upload completion (ReportCreationListenerProxy.onCreated). 7.xReport.addAttachment(File, name, mime, move)copies whenmoveisfalse(this wrapper passesfalse).Closed at 17aae36
- P2 iOS Stop / both Delete branches dropping
_openReportwithoutReleaseSnapshotFiles()— fully_addressed. Same helper as Discard, before nulling the slot. Source tests pin Stop and Delete.- P2 Android CreateReport
AddAttachmentFilestoring the caller path — fully_addressed at add time.File.Exists, copy tobugsee-unity-report-attachments,SetSnapshotPath. Stop / Delete / Discard now release those copies._uploadSnapshotReportsmutations are locked.Prior closes still hold: path apply, exclusive slot, fences, overlay, JSON escape/NaN, late
Stopped, breadcrumb timestamps, not-launched Delete buffers, JNI 7.3 selectors. Do not re-escalate skip-wipe to P1.Remaining
One P2, introduced by adding Android snapshots without a release-after-ingest path. Details on the inline comment.
- Overall risk: Medium
- Merge recommendation: Request changes
- Most important to fix:
ReleaseSnapshotFiles()inonCreated(including fence-fail / null-report / exception paths) afterApplyTo, matching iOSHandleManagedReportCreateCompletion.- Positive: Abandoned-draft leak on Stop/Delete is gone on both platforms; Android attach-then-delete now matches iOS; iOS upload-map locking matches the off-main
createReportWithCompletioncontract.Sent by Cursor Automation: Bugsee code review
There was a problem hiding this comment.
Stale comment
Review: Add delete-data, create-report, and breadcrumbs
Re-review of 17aae36 (prior 802063a). Independently checked iOS Stop/Delete
_openReportrelease, the_uploadSnapshotReportslock, and AndroidAddAttachmentFilesnapshot-at-add vsReportCreationListenerProxy.onCreated. I did not rundotnet testlocally (dotnetis not on PATH).Closed at 17aae36
- P2 iOS Stop / both Delete branches dropping an unused CreateReport draft — fully_addressed. All three paths call
_openReport?.ReleaseSnapshotFiles()before nulling.ReportPathSourceTestspins Stop and Delete. Android Stop/Delete/Discard do the same for the open slot.- P2 Android CreateReport
AddAttachmentFilestoring the caller path — fully_addressed for attach-then-delete-original. Managed reports nowFile.Exists,SnapshotAttachmentFile, andSetSnapshotPath(same contract as iOS).- P2 unsynchronized
_uploadSnapshotReports— fully_addressed. Insert / TryGetValue-Remove / foreach-Clear all take_uploadSnapshotReportsGate. File deletes run outside the per-token lock.Prior P0–P3s still hold: CreateReport
pathapply, iOS Upload/Discard snapshot lifetime, exclusive slot, upload fence, overlay-vs-replace, JSON escape/NaN, lateStopped, breadcrumb timestamps, not-launched Delete buffers, JNI 7.3. Do not re-escalate voidDelete(); Launch();skip-wipe.Remaining
P2 Medium — Android now owns temp copies, but
onCreatednever callsReleaseSnapshotFiles(). See inline. iOS Upload already releases fromHandleManagedReportCreateCompletion/CancelManagedReportUpload; Android has no equivalent for the proxy-held snapshot (UploadReportnulls_openReportbeforecreateReport).Residual (not blocking)
SetData/SetFilePathafterAddAttachmentFilecan still drop_pathwithout deleting an owned snapshot on iOS; AndroidSetFilePathnow deletes first,SetDatastill does not.- MIME helper remains best-effort on beta5
BugseeAttachment.- Skip-wipe when
BumpForLaunchwins.Overall risk: Medium
Merge: Request changes —try/finally _snapshot.ReleaseSnapshotFiles()inonCreated(including fence-cancel and null-report returns).
Most important to fix: Release Android CreateReport snapshots after native ingest or when the upload is cancelled, matching iOS.Sent by Cursor Automation: Bugsee code review
There was a problem hiding this comment.
Stale comment
Review: Add delete-data, create-report, and breadcrumbs
Re-review of 17aae36 (prior 802063a). Independently checked Stop/Delete/
Discardsnapshot release on both bridges, AndroidAddAttachmentFilesnapshot-at-add,ReportCreationListenerProxy.onCreated, and the iOS_uploadSnapshotReportslock. I did not rundotnet testlocally (dotnetis not on PATH).Closed at 17aae36
- P2 unused CreateReport draft snapshots on
Stop/DeleteCollectedDataOnDevice— fully_addressed. iOS Stop and both Delete branches call_openReport?.ReleaseSnapshotFiles()before nulling the slot. Android Stop, Delete, and Discard do the same. Source tests pin the iOS Stop/Delete calls.- P2 Android
AddAttachmentFilestoring the caller path — partially_addressed. ManagedAddAttachmentFilenowFile.Exists, copies tobugsee-unity-report-attachments, andSetSnapshotPath. Attach-then-delete-then-Upload no longer depends on the original file still existing atonCreated.- iOS
_uploadSnapshotReportsmutations are now under_uploadSnapshotReportsGate.Prior closes still hold: CreateReport
pathapply, iOS Upload/Discard snapshot lifetime, exclusive slot, upload fence, overlay-vs-replace, JSON escape/NaN, lateStopped, breadcrumb enqueue timestamps, not-launched Delete buffer clear, JNI 7.3 selectors. Do not re-escalate voidDelete(); Launch();skip-wipe to P1.Remaining
P2 Medium — Android Upload never releases the new owned snapshots.
UploadReportmoves the report off_openReportintoReportCreationListenerProxy;onCreatedApplyTos then returns with noReleaseSnapshotFiles(). Stop/Delete only release the unused draft (_openReport), so an in-flight or completed Upload leaks the copies this commit just started owning. See inline.Residual (not blocking)
IAttachment.SetData/ iOSSetFilePathstill drop_pathwithoutDeleteSnapshotIfOwned(#18 P3). AndroidSetFilePathnow deletes.BugseeAttachmenthas nomimeTypesetter; MIME helper is best-effort.Overall risk: Medium
Merge: Request changes — Android must release upload snapshots the way iOS already does after native apply.
Most important to fix:finally { _snapshot.ReleaseSnapshotFiles(); }inonCreated(including fence-invalid / null-report returns), matching iOSHandleManagedReportCreateCompletion.Positive: Unused-draft GDPR wipe on Stop/Delete now matches Discard on both platforms; Android attach-then-delete works at add time; iOS dictionary access is locked.
Sent by Cursor Automation: Bugsee code review
There was a problem hiding this comment.
Stale comment
Overall risk: Medium. Merge: request changes.
17aae36closes the two P2s from802063a: iOS/Android Stop and Delete now callReleaseSnapshotFiles()before dropping_openReport, and AndroidCreateReportsnapshots files at add time (File.Exists+ copy +SetSnapshotPath). iOS still holds in-flight upload snapshots in_uploadSnapshotReports(now locked) until native create completes.The new Android snapshot copies are not released after
Upload(or after a fenced-offonCreated). That is the remaining P2.Most important to fix
- P2 — Android
CreateReportfile snapshots leak afterUpload/ cancelledonCreated. Release inReportCreationListenerProxy.onCreated(all exits), afterApplyToso the nativeaddAttachment(..., false)copy has finished.Residual (not blocking this round)
- Sequential
DeleteCollectedDataOnDevice(); Launch();still skips the in-flight wipe viaBumpForLaunch/ShouldRunDelete. Do not re-escalate to P1.IosAttachment.SetData/SetFilePathstill drop_pathwithoutDeleteSnapshotIfOwned()(same hole as #18).- MIME on beta5
BugseeAttachmentremains best-effort.Positive
JNI matches Android 7.3 (
createReport(listener),Callback1,fromValue+ 6-arg breadcrumb). Overlay-vs-replace, JSON escape/NaN, exclusive CreateReport slot, upload fence, lateStopped, breadcrumb enqueue timestamps, and iOS path apply all still look correct. CI on this head (run 37963089037): Wrapper policy, Android wrapper, and iOS bridge pass. I did not rundotnet testlocally (dotnetis not on this runner).Sent by Cursor Automation: Bugsee code review
…reated. Co-authored-by: Cursor <cursoragent@cursor.com>
There was a problem hiding this comment.
Stale comment
Review: Add delete-data, create-report, and breadcrumbs
Re-review of b8b2fd3 (prior 17aae36). Independently checked
ReportCreationListenerProxy.onCreated: fence/nullearly returns,ApplyTo, anduploadall sit intry, with_snapshot.ReleaseSnapshotFiles()infinallyafterApplyTo. NativeaddAttachment(File, …, false)has already copied. Source test pinsReleaseSnapshotFiles()afterApplyTo.Closed at b8b2fd3
- P2 Android CreateReport upload snapshot leak — fully_addressed. Success, fence-cancel, null report, and exceptions all release. Matches iOS
HandleManagedReportCreateCompletionorder.Prior closes still hold: iOS
pathapply, iOS Upload/Discard/Stop/Delete release,_uploadSnapshotReportslock, Android add-time snapshot, JNI, fences, overlay, JSON, lateStopped, not-launched Delete buffers.Residual (not blocking)
- If
createReportnever invokesonCreated, the proxy-held snapshot is not released (Stop/Delete already nulled_openReport). Same class as a lost listener, not the happy path.SetDataafterAddAttachmentFilestill drops_pathwithoutDeleteSnapshotIfOwned(#18 P3).- Delete-then-Launch skip-wipe. Do not re-escalate to P1.
- CreateReport MIME helper remains best-effort on beta5
BugseeAttachment.Wrapper policy CI green; Android/iOS still running at review time.
No remaining P0–P3. Risk Low. Merge: approve.
Sent by Cursor Automation: Bugsee code review
There was a problem hiding this comment.
Stale comment
Review: Add delete-data, create-report, and breadcrumbs
Re-review of b8b2fd3 (prior 17aae36). I checked
ReportCreationListenerProxy.onCreatedagainstApplyTo(addAttachment(File, …, false)copies) and iOSHandleManagedReportCreateCompletionordering. I did not rundotnet test(SDK not installed).P0 / P1 / P2: none remaining
Closed at b8b2fd3
- P2 Android Upload never releasing CreateReport snapshots — fully_addressed.
onCreatedwraps fence checks, null report,ApplyTo, anduploadintry/finallyand always_snapshot?.ReleaseSnapshotFiles(). Success path stillApplyTos before thefinally(native copy finishes first). Fence-invalid and null-report exits also delete.ReportPathSourceTestspinsReleaseSnapshotFilesafterApplyTo.Closed earlier (still holds)
- iOS CreateReport
pathapply (dataWithContentsOfFile:, skip on failed read).- iOS Upload/Discard snapshot lifetime and
_uploadSnapshotReportslock.- iOS/Android Stop/Delete/Discard
_openReport?.ReleaseSnapshotFiles().- Android add-time
File.Exists+ snapshot copy.- Exclusive slot, fences, overlay, JSON escape/NaN, late
Stopped, breadcrumb timestamps, not-launched Delete buffers, JNI 7.3 selectors.Residual (not blocking)
- Void
Delete(); Launch();skip-wipe (BumpForLaunch/ShouldRunDelete). Do not re-escalate to P1.- If Android
onCreatedis never invoked after Stop, the proxy-held snapshot would still leak (no in-flight map like iOS). The SDK still typically delivers the listener;finallycovers that delivery. Not merge-blocking.SetDataafterAddAttachmentFilestill drops_pathwithoutDeleteSnapshotIfOwned(iOS and Android).
- Overall risk: Low
- Merge recommendation: Approve
- Most important issues to fix: none remaining on this head
- Positive: Android Upload now matches iOS (native ingest, then delete the owned copy) including cancelled/failed create. Abandoned drafts and add-time snapshots were already in place from 17aae36.
Sent by Cursor Automation: Bugsee code review
There was a problem hiding this comment.
Stale comment
Review: Add delete-data, create-report, and breadcrumbs
Re-review of b8b2fd3 (prior 17aae36). I checked
ReportCreationListenerProxy.onCreatedagainstApplyTo/addAttachment(File, …, false)and the iOSHandleManagedReportCreateCompletionorder. I did not rundotnet test(dotnetis not on PATH).Closed at b8b2fd3
- P2 Android CreateReport snapshots never released after Upload / cancelled
onCreated— fully_addressed. The whole listener is intry/finally; fence-inactive, null report,ApplyTo,upload, and exceptions all call_snapshot.ReleaseSnapshotFiles(). Release runs afterApplyTo, so the JNI copy (move=false) has finished. Source test pinsReleaseSnapshotFiles()afterApplyTo.Prior closes still hold: iOS CreateReport
pathapply, Upload/Discard/Stop/Delete snapshot lifetime,_uploadSnapshotReportslock, Android snapshot-at-add, exclusive slot, fences, overlay, JSON escape/NaN, lateStopped, enqueue timestamps, not-launched Delete buffers, JNI 7.3 selectors. Do not re-escalateDelete(); Launch();skip-wipe to P1.Residual (not blocking)
- If native never invokes
onCreatedafterUpload, the proxy-owned snapshot has no other owner (unlike iOS_uploadSnapshotReports+CancelManagedReportUpload). 7.3createReport(listener)is documented to callonCreated(including null). Not a happy-path leak.SetDataafterAddAttachmentFilecan still drop_pathwithoutDeleteSnapshotIfOwned(accepted #18 P3).- MIME helper remains best-effort on beta5
BugseeAttachment.
- Overall risk: Low
- Merge recommendation: Approve
- Most important issues to fix: none remaining at P0–P2
- Positive: CreateReport file attachments now round-trip on both platforms (iOS
path→dataWithContentsOfFile:, Android add-time copy → JNI ingest → finally release), and abandoned drafts release on Stop/Delete/Discard.Sent by Cursor Automation: Bugsee code review
There was a problem hiding this comment.
Stale comment
Review: Add delete-data, create-report, and breadcrumbs
Re-review of b8b2fd3 (prior 17aae36). I checked
ReportCreationListenerProxy.onCreatedagainstApplyTo/addAttachment(..., false)and the newAndroid_upload_releases_snapshots_after_onCreatedpin. Wrapper policy CI on this head pass; Android wrapper and iOS bridge tests were still pending. I did not rundotnet testlocally (dotnetis not on PATH).P0 / P1 / P2: none remaining
Closed in b8b2fd3
- P2 Android CreateReport snapshots never released after Upload / cancelled
onCreated— fully_addressed. Fence-invalid, null report, ApplyTo/upload, and exceptions all hitfinally { _snapshot?.ReleaseSnapshotFiles(); }. Release is afterApplyTo, so native has already copied (move=false). Source test pinsReleaseSnapshotFilesafterApplyTo.Still closed
- iOS CreateReport
pathapply (dataWithContentsOfFile:, skip on failed read).- iOS Upload/Discard snapshot lifetime; Stop/Delete draft release;
_uploadSnapshotReportslock.- Android add-time snapshot (
File.Exists+ copy +SetSnapshotPath); Stop/Delete/Discard release the open slot.- Exclusive slot, fences, overlay-vs-replace, JSON escape/NaN, late
Stopped, breadcrumb timestamps, not-launched Delete buffers, JNI 7.3 selectors.- Do not re-escalate void
Delete(); Launch();skip-wipe (BumpForLaunch/ShouldRunDelete) to P1.Residual (not blocking)
- If native never invokes
onCreatedafterStop(listener dropped), the proxy-held copy would remain. 7.xcreateReport(listener)is specified to call back; fence-cancel now releases when it does.SetDataafterAddAttachmentFilestill drops_pathwithoutDeleteSnapshotIfOwned(iOS + Android; accepted #18 P3). AndroidSetFilePath/SetSnapshotPathnow delete.- iOS CreateReport email remains an ExtendedReport SDK gap (warning logged). MIME helper on beta5
BugseeAttachmentis best-effort.
- Overall risk: Low
- Merge recommendation: Approve
- Most important to fix: none remaining on this head
- Positive: CreateReport file attachments now snapshot at add on both platforms, apply from
path/Fileat upload, and release owned copies on Upload, Discard, Stop, Delete, and cancelled Android create.Sent by Cursor Automation: Bugsee code review
There was a problem hiding this comment.
Stale comment
Review: Add delete-data, create-report, and breadcrumbs
Re-review of b8b2fd3 (prior 17aae36). Independently checked
ReportCreationListenerProxy.onCreated: fence/null paths now sit insidetry,ApplyTostill runs beforeReleaseSnapshotFiles(), andfinallycovers success, fence-cancel, null report, and exceptions. Wrapper policy and Android wrapper CI jobs on this head pass; iOS bridge was still running at review time. I did not rundotnet testlocally (dotnetis not on PATH).Closed at b8b2fd3
- P2 Android CreateReport snapshots never released on Upload — fully_addressed.
onCreatedtry/finallycalls_snapshot.ReleaseSnapshotFiles()on every exit, after nativeaddAttachment(..., false)has copied.Android_upload_releases_snapshots_after_onCreatedpins ApplyTo before release. Fence-invalid and null-report returns no longer skip cleanup.Closed earlier (still holds)
- iOS Stop/Delete unused-draft release; iOS Upload/Discard snapshot lifetime;
_uploadSnapshotReportsGate; Android snapshot-at-add; CreateReportpathapply; exclusive slot; upload fence; overlay-vs-replace; JSON escape/NaN; lateStopped; breadcrumb timestamps; not-launched Delete buffers; JNI 7.3 selectors.Do not re-escalate void
Delete(); Launch();skip-wipe to P1.Residual (not blocking)
SetDataafterAddAttachmentFilestill drops_pathwithoutDeleteSnapshotIfOwned(iOS; AndroidSetFilePathnow deletes first).- MIME helper remains best-effort on beta5
BugseeAttachment.- If native
createReportnever invokesonCreated, the proxy-held snapshot would still leak (no finalizer). The 7.3 listener contract is to callonCreatedincluding on failure; not treated as a remaining defect.P0 / P1 / P2: none remaining
Overall risk: Low
Merge: Approve
Most important to fix: none for this head
Positive: Wrapper-owned file copies now have a release path on Discard, Stop, Delete, iOS Upload completion, and AndroidonCreated, including GDPR cancel of an in-flight create.Sent by Cursor Automation: Bugsee code review
There was a problem hiding this comment.
Stale comment
Review: Add delete-data, create-report, and breadcrumbs
Re-review of b8b2fd3 (prior 17aae36). I checked
ReportCreationListenerProxy.onCreatedagainstAndroidManagedReport.ReleaseSnapshotFiles, the 7.xaddAttachment(File, …, move=false)copy contract, andAndroid_upload_releases_snapshots_after_onCreated.Closed at b8b2fd3
- P2 Android CreateReport snapshots never released on Upload / cancelled
onCreated— fully_addressed. The whole listener is intry/finally; fence-invalid, null report,ApplyTo+upload, and exceptions all call_snapshot.ReleaseSnapshotFiles().ApplyTostill runs first on the success path, so native has copied before the wrapper temp is deleted. Source test pinsReleaseSnapshotFilesafterApplyTo.Closed earlier (still holds)
- iOS CreateReport
pathapply (dataWithContentsOfFile:, skip on failed read)- iOS Upload/Discard snapshot lifetime +
_uploadSnapshotReportslock- iOS/Android Stop and Delete release unused drafts
- Android
AddAttachmentFilesnapshots at add (File.Exists+ copy +SetSnapshotPath)- Exclusive CreateReport slot, upload fences, overlay-vs-replace, JSON escape/NaN, late
Stopped, breadcrumb enqueue timestamps, not-launched Delete buffers, JNI 7.3 selectorsResidual (not blocking)
- Void
Delete(); Launch();skip-wipe whenBumpForLaunchwins. Do not re-escalate to P1.SetDataafterAddAttachmentFilestill drops_pathwithoutDeleteSnapshotIfOwned(iOS; AndroidSetFilePath/SetSnapshotPathnow delete).- MIME helper remains best-effort on beta5
BugseeAttachment.- If native never invokes
onCreatedat all afterStop, the proxy is the only owner — same class as needing a bridge-side in-flight map. Not treating as P2 without evidence the SDK drops the listener.No remaining P0–P3.
- Overall risk: Low
- Merge recommendation: Approve
- Most important issues to fix: None for this head.
- Positive: Android upload now matches iOS — native ingest first, then delete the owned snapshot, including cancel/error exits.
Sent by Cursor Automation: Bugsee code review
There was a problem hiding this comment.
Stale comment
Review: Add delete-data, create-report, and breadcrumbs
Re-review of b8b2fd3 (prior 17aae36). Independently checked
ReportCreationListenerProxy.onCreated: fence/null/ApplyTo/uploadall sit insidetry, andfinallyalways calls_snapshot.ReleaseSnapshotFiles(). Native ingest (ApplyTo→addAttachment(File, …, false)) still runs before that delete. Source test pinsApplyTothenReleaseSnapshotFiles(). I did not rundotnet testlocally (dotnetis not on PATH).Closed at b8b2fd3
- P2 Android Upload never releasing owned snapshots — fully_addressed.
onCreatedreleases on success, fence-invalid, null report, and exception. Stop/Delete during in-flightcreateReportstill get a delete when the listener runs (fence check returns,finallystill runs). iOS already released fromHandleManagedReportCreateCompletion/CancelManagedReportUpload.Closed at 17aae36 and still holding: unused-draft Stop/Delete release on both platforms, Android snapshot-at-add,
_uploadSnapshotReportsGate.Prior closes still hold: CreateReport
pathapply, iOS Upload/Discard snapshot lifetime, exclusive slot, upload fence, overlay-vs-replace, JSON escape/NaN, lateStopped, breadcrumb enqueue timestamps, not-launched Delete buffer clear, JNI 7.3 selectors. Do not re-escalate voidDelete(); Launch();skip-wipe to P1.Remaining
No remaining P0–P3.
Residual (not blocking)
SetDataafterAddAttachmentFilestill drops_pathwithoutDeleteSnapshotIfOwned(iOSSetFilePathtoo; AndroidSetFilePathnow deletes). Same #18 P3.- MIME helper remains best-effort on beta5
BugseeAttachment.- If
onCreatednever runs, wrapper temps wait until the OS reaps cache. The 7.3 listener is documented to fire (includingnullon failure); Stop/Delete do not hold an in-flight Android map the way iOS_uploadSnapshotReportsdoes. Not a must-fix given that contract.Overall risk: Low
Merge: Approve
Most important to fix: Nothing remaining for this PR.
Positive:finallycovers everyonCreatedexit without deleting before native copy; attach-then-delete-then-Upload now matches iOS on both add and cleanup.Sent by Cursor Automation: Bugsee code review
There was a problem hiding this comment.
Review: Add delete-data, create-report, and breadcrumbs
Re-review of b8b2fd3 (prior 17aae36). I checked ReportCreationListenerProxy.onCreated against ApplyTo (addAttachment(File, …, false) copies into the native report) and the iOS HandleManagedReportCreateCompletion / _bugsee_complete_report ordering. WrapperPolicy CI on this head is green (37964082103). I did not run dotnet test locally (dotnet is not on PATH).
Closed at b8b2fd3
- P2 Android Upload /
onCreatedneverReleaseSnapshotFiles()— fully_addressed. Fence / null /ApplyTo/uploadall sit intry;finallyalways releases. That covers the happy path, fence-cancel, null report, and exceptions.ApplyTostill runs before delete, so the 7.3 copy (move=false) has already ingested the file.Android_upload_releases_snapshots_after_onCreatedpins the order.
Closed earlier (still holds)
iOS/Android Stop and Delete release unused drafts; Android snapshots at add; _uploadSnapshotReports is locked; CreateReport path apply; exclusive slot; upload fences; attribute overlay; JSON control/NaN handling; late lifecycle Stopped; breadcrumb enqueue timestamps; not-launched Delete clears buffers; JNI 7.3 selectors.
Residual (not blocking)
Delete(); Launch();still skip-wipe viaBumpForLaunch/ShouldRunDeleteso the new session is not deleted. Do not re-escalate to P1.IAttachment.SetDataafterAddAttachmentFilestill nulls_pathwithoutDeleteSnapshotIfOwned(iOS and Android). Upload then cannot delete the owned temp copy. Same leftover as #18.
P0 / P1 / P2: none remaining.
- Overall risk: Low
- Merge recommendation: approve
- Most important issues to fix: none for merge. Optional follow-up: call
DeleteSnapshotIfOwned()inSetDatabefore dropping_path. - Positives: CreateReport, DeleteCollectedData, and breadcrumbs now match 7.x listeners/selectors; iOS buffers network + breadcrumbs until launch; managed uploads overlay instead of clobbering session attributes; snapshot lifetime is finally closed on the Android upload path.
Sent by Cursor Automation: Bugsee code review


Summary
Test plan
Made with Cursor