feat(diagnostics): preserve Registry and resource fault context for PLN-0176 step 28

This commit is contained in:
2026-10-07 21:13:59 +01:00
parent 74c7522dd1
commit 63e371955a
24 changed files with 1085 additions and 85 deletions
@@ -379,6 +379,10 @@ impl HostDebugger {
CrashReport::VmTrap { trap } => (Some(trap.code), Some(trap.opcode)),
CrashReport::VmPanic { .. } | CrashReport::VmInit { .. } => (None, None),
};
let span = match report {
CrashReport::VmTrap { trap } => trap.span.clone(),
_ => None,
};
self.send_event(DebugEvent::Fault {
kind: report.kind().to_string(),
@@ -386,6 +390,9 @@ impl HostDebugger {
pc: report.pc(),
trap_code,
opcode,
span,
resource: report.resource_failure(),
init: report.init_diagnostic(),
});
self.last_fault_summary = Some(summary);
}