{
  "files": [
    "crates/spt-net-diag/src/stacks.rs",
    "crates/spt-net-diag/src/stacks/windows.rs"
  ],
  "api": "pub(crate) StackSampler::new([u32; 2]) -> io::Result<Self>; capture(&mut self) -> serde_json::Value",
  "dependency": "windows-sys 0.59, target cfg(windows), features: Win32_Foundation, Win32_System_Diagnostics_Debug, Win32_System_Kernel, Win32_System_Threading, Win32_System_Memory",
  "implementation": [
    "Copies register contexts and bounded stack bytes for exactly two retained OS-thread handles; rejects duplicate/zero/foreign/self TIDs.",
    "Preallocates and touches 2 MiB per worker. Suspension path uses kernel APIs and fixed-size state only; guards resume on all paths before DbgHelp locking, unwinding, allocation, or symbolization.",
    "Serializes backend DbgHelp operations, uses a distinct owned process handle/symbol session, eagerly loads local symbols during new, and cleans handles/session on drop.",
    "Emits real symbolized frames, retained raw PCs, explicit copy/resume/unwind/symbol errors, per-worker suspension upper-bound microseconds, total capture milliseconds, copy-phase time, and DbgHelp-lock wait.",
    "Idle requires an uninterrupted recognized OS-wait chain into Tokio park; otherwise unknown. Operation IDs and genuine progress counters remain null.",
    "Non-Windows/non-x64 produces two explicit unsupported worker records without fabricated frames."
  ],
  "caveats": [
    "Construct and use sampler within watchdog thread; owned HANDLE storage is not Send.",
    "Useful Rust frame names require the matching PDB alongside the executable. Missing/truncated symbols invalidate worker evidence explicitly.",
    "Live image/unwind metadata is used after stack copying; unloaded modules, JIT code, and incomplete unwind/copy coverage are errors rather than fabricated success.",
    "Mutex serializes this backend's DbgHelp calls, not unrelated external consumers of the same process-global DbgHelp DLL.",
    "ResumeThread failures are emitted and guard retries once; unrecoverable OS resume failure cannot be guaranteed recoverable by userspace.",
    "Capture <=100 ms has not been demonstrated here; eager initialization keeps initial PDB loading outside captures, but Main must run healthy forced-stale proof."
  ],
  "verification": "No builds, tests, formatters, or linters executed, as explicitly required. Added one meaningful classifier unit covering generic waits, active reactor/waker stacks, and a genuine Tokio park chain; unexecuted."
}