Separate privileged acquisition from unprivileged clients.
RAPL access can require elevation; the Unix socket becomes a narrow, auditable boundary.Alternative not selected: Letting every Python or CLI process read protected counters directly.
A protocol-first Rust measurement spine that separates privileged energy acquisition from unprivileged CLI, Python and VS Code workflows while preserving replayable raw evidence.

Hardware energy counters can require elevated access, while developers, tests and benchmark tools need a safe workflow that preserves source meaning and does not turn noisy machine-level evidence into false process-level precision.
Chakib designed and implemented the daemon/client boundary, typed protocol and validation model, Linux RAPL and synthetic acquisition paths, replayable CLI artifacts, the pywattch client and the Energy Tests developer workflow.
A privileged wattch-powerd daemon reads Linux RAPL counters or a synthetic source and serves strict, versioned frames over a local Unix socket. Unprivileged CLI and Python clients capture source descriptors and raw sample batches into immutable run artifacts; inspection, tests and later interpretation stay outside the acquisition path.
RAPL access can require elevation; the Unix socket becomes a narrow, auditable boundary.Alternative not selected: Letting every Python or CLI process read protected counters directly.
Raw descriptors and samples remain replayable while aggregation, comparison and claims evolve offline.Alternative not selected: Embedding baselines, joules-per-token, scoring or optimization advice in the acquisition path.
The public foundation supports Linux RAPL and synthetic acquisition, a strict local protocol, deterministic test scenarios, CLI capture/inspect/validate workflows, replayable traces, a pywattch Python API and VS Code Energy Tests. It does not claim per-process energy allocation or absolute meter accuracy.
Rust, Linux, RAPL, Unix sockets
CLI, Python, pyJoules API, VS Code
Typed descriptors, Deterministic daemon, Replayable traces
