Skip to content

Rust panic reports carry the same os, webos and hardware contexts as the fault fallback - #646

Merged
GLinnik21 merged 1 commit into
mainfrom
fleet/panic-contexts-land
Oct 12, 2026
Merged

GLinnik21 merged 1 commit into
mainfrom
fleet/panic-contexts-land

Conversation

@GLinnik21

Copy link
Copy Markdown
Collaborator

What

Rust PANIC events sent to Sentry now carry the same os / webos / hardware contexts (including hardware.probe, rtkmem, install) the C-fault fallback report carries, so a firmware-specific panic can be told apart in Sentry's Contexts UI.

  • panic_sentry_body calls sentry::attach_os_context and sentry::attach_hardware_context, the same two functions sentry_body uses. No parallel allowlist: the closed native::{OS,WEBOS,HARDWARE}_FIELDS vocabulary (now pub(super)) is the only thing added, and the test grades against it.
  • Not inside the panic hook: panic_sentry_body has one production caller, recover_pending's queue step, which builds the body on the next launch from the crash log. The hook (app/boot.rs::install_panic_logger) only appends the log record and is untouched.
  • The consent preview's panic fallback sample shows the same placeholders as the fault sample (never the host's kernel or model).
  • PRIVACY.md panic paragraph names the new fields.
  • POLICY_VERSION stays 4: no new category of data, only fields already disclosed for the fault fallback (owner-approved, not a consent scope expansion).

Verification

  • Regression test a_panic_body_carries_the_same_os_webos_and_hardware_contexts_as_a_fault fails with the two attach calls removed (panic body lacks contexts.os) and passes with them; the_panic_preview_declares_the_contexts_as_placeholders covers the preview.
  • make check green on the committed tree (plx_telemetry: 284 passed; 0 failed), cargo +nightly check --lib --no-default-features finished, ARM make exit 0.
  • doc-claim-auditor over the diff: 0 contradictions.

NOT verified

  • No real panic was delivered to Sentry from the TV; the contexts are verified at the body level on the host only.
  • No hostsim test touched.

Closing keyword: none apply (open #289 is about native crash frames, unrelated).

🤖 Generated with Claude Code

…the fault fallback

panic_sentry_body now attaches the contexts through attach_os_context and
attach_hardware_context, the same two functions sentry_body uses, so the closed
native::{OS,WEBOS,HARDWARE}_FIELDS vocabulary is the only thing a panic report
adds. The body is built on the next launch from the crash log, never inside the
panic hook. The consent preview for the panic fallback shows the same
placeholders as the fault preview; PRIVACY.md names the new fields.
POLICY_VERSION stays 4: no new category of data, only fields already disclosed
for the fault fallback.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
@GLinnik21
GLinnik21 merged commit e66612d into main Oct 12, 2026
17 checks passed
@GLinnik21
GLinnik21 deleted the fleet/panic-contexts-land branch October 12, 2026 23:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant