Skip to content

[Operations] Build redacted diagnostics, crash evidence and an offline support bundle #963

Description

@seonghobae

Parent: #958
Baseline: #968

Buyer-visible gap

A desktop analysis product will fail on unfamiliar codecs, devices, permissions, CPU/GPU environments, malformed local files, and interrupted workflows. The live queue includes useful narrow redaction and workflow-evidence PRs—such as #826, #895, #941, #949, #950, #951, and #956—but no single typed diagnostics contract or privacy-safe offline support bundle owns the complete failure journey.

Scattered log hardening is necessary; it is not a supportability architecture.

Product outcome

BandScope emits bounded, typed, redacted local diagnostic events and can generate a deterministic, user-previewable support bundle containing enough environment/configuration evidence to diagnose a failure while excluding audio, project payloads, credentials, and unnecessary PII.

Required scope

Typed diagnostics contract

  • Define stable event IDs, severity, stage, component, retryability, next-action code, correlation ID, monotonic sequence, and bounded fields.
  • Derive buyer-facing explanation and developer evidence from the same typed error rather than separately assembled strings.
  • Allowlist permitted fields instead of applying broad post-hoc regex masking to arbitrary logs.
  • Represent local files through opaque references and bounded metadata; never emit absolute paths, raw URLs, usernames, home directories, audio, or project content.
  • Version the event schema and support parsing of retained historical schemas.

Local-first observability

  • Keep a bounded local ring buffer with explicit retention and size limits.
  • Capture analysis-stage latency, queue depth, cancellation, backend/device selection, peak resource observations, and result state without user content.
  • Provide an OpenTelemetry-compatible projection for authorized operator use, while remote export remains disabled by default.
  • Require explicit enablement, purpose, tenant, retention, and egress controls for any remote diagnostics adapter.

Crash and hang evidence

Support bundle

  • Generate the bundle offline only after explicit user action.
  • Preview every included category and allow exclusion of optional categories.
  • Include a manifest, schema version, checksums, exact build identity, environment/capability summary, bounded diagnostic events, migration/recovery receipts, and recent failed-stage evidence.
  • Exclude audio, score PDFs, project JSON, lyrics, handoff payloads, credentials, environment variables, raw URLs, and absolute paths.
  • Use safe archive paths, bounded entry count/size/compression, deterministic ordering where feasible, and a signed or hashed manifest.
  • Generate human-readable and machine-readable reports from the same source model.

Live PR convergence

Acceptance criteria

  • Every production failure crossing UI, Tauri/Rust, Python/analysis, player, project, updater, and export boundaries maps to a typed event and customer next action.
  • Static and runtime tests prove forbidden content cannot enter ordinary logs or support bundles.
  • The support bundle is generated without network access and previews every included artifact/category.
  • The same input evidence generates a stable manifest and semantically equivalent human/machine reports.
  • Bundle size, event count, string length, archive entries, compression ratio, and generation time are bounded before allocation/write.
  • Crash, forced termination, Python failure, GPU/backend fallback, decoder failure, device loss, migration failure, and updater failure produce actionable evidence.
  • Diagnostics never mutate project state or weaken recovery.
  • Remote telemetry is disabled by default and clearly disclosed when enabled.
  • Repository-owned production statement/branch coverage and public API documentation remain 100%.
  • Fuzz, property, redaction, archive-safety, concurrent-event, and platform tests pass on the exact head.
  • Existing redaction PRs have a canonical succession map and duplicate helpers are removed or closed.
  • Current-head checks, qualifying independent approval, zero unresolved actionable threads, and branch protection pass without bypass.

Adversarial tests

  • Windows UNC and macOS home paths; non-UTF-8 filenames;
  • URL userinfo, query secrets, fragments, and encoded credentials;
  • exception text containing API keys, bearer tokens, emails, and raw subprocess arguments;
  • very long, multiline, and control-character error messages;
  • symlinked bundle destination and archive traversal names;
  • event flood during repeated decoder failure;
  • crash during bundle generation;
  • old-schema logs and partial/corrupt evidence;
  • user excludes an optional category;
  • bundle inspection on a machine without BandScope.

Non-goals

  • No automatic support upload.
  • No full-memory dump or raw user-content collection.
  • No broad regex masking as the primary safety boundary.
  • No claim that sampled observability data is a billing or product-data source of truth.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: accessibilityAccessibility and assistive-technology supportarea: authAuthentication, authorization, identity, or tenant isolationarea: ci-cdCI, GitHub Actions, checks, release, or supply chainarea: securitySecurity boundary, hardening, or vulnerability preventionpriority: mediumNormal-priority or P2 workscope: product-gapCustomer-visible product gapstatus: triagedOpen issue has an organization taxonomy assignmenttype: featureNew or expanded product capability

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions