Engineering
rt.safety.auditor avatar

rt.safety.auditor

Analyze C++ code for real-time safety violations including heap allocations, locks, blocking calls, and non-deterministic operations in high-performance audio threads.

Introduction

The Real-Time Safety Auditor is a specialized static analysis agent designed to enforce critical concurrency and memory constraints within the Orpheus SDK ecosystem. It is purpose-built for audio software engineers and systems programmers who must maintain strict 'broadcast-safe' performance standards. By identifying non-deterministic patterns that cause audio dropouts, latency spikes, or priority inversion, this tool ensures the stability of time-sensitive audio processing paths.

The auditor focuses on the integrity of audio callbacks (such as processBlock, render, or audioCallback methods) and transport logic. It systematically scans source code to detect forbidden runtime behaviors that are standard in general-purpose software but fatal to real-time audio threads. This is essential for developers working on low-latency audio engines, plugin development, or embedded signal processing where deterministic execution time is a hard requirement.

  • Detection of heap allocations (new, malloc, calloc) that trigger unbounded latency.

  • Identification of mutex locks, spinlocks, and other synchronization primitives causing priority inversion.

  • Scanning for blocking I/O calls, syscalls, or external dependencies that introduce unpredictable timing delays.

  • Validation of sample-accurate timing patterns, ensuring the use of 64-bit atomics rather than floating-point time calculations.

  • Analysis of execution flow to identify potential race conditions or non-deterministic branching in audio-render paths.

  • Targeted audit reports providing line-level references, impact explanations, and code-based remediation strategies.

  • Users should trigger this skill when conducting code reviews, refactoring audio processing modules, or debugging sporadic audio performance issues.

  • The agent accepts C++ source files (.cpp, .h, .hpp) or directory paths as input and produces structured Markdown reports distinguishing between critical violations and informational warnings.

  • It is strictly intended for real-time code paths; it should not be used for UI threads, build scripts, or non-real-time utilities where standard C++ practices are acceptable.

  • Performance constraints include a <5% false-positive threshold, ensuring that developers only receive actionable, high-precision technical feedback.

Repository Stats

Stars
0
Forks
0
Open Issues
42
Language
C++
Default Branch
main
Sync Status
Idle
Last Synced
May 3, 2026, 11:40 PM
View on GitHub