jcp-intercept: a reading meter meters a seam as one span, divided among its steps by CPU time #236
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/intercept-one-span-per-pass"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Why
jcp-intercept metered every interceptor step as a span of its own.
Where the meter reads this process's energy count, each read first takes the reading thread off its core (#229), which costs tens of microseconds plus the read's own wake-up. An interceptor step (a redaction, a call-count check, an approval hold) is often a few microseconds, so a span of its own read mostly the meter. A chain of k interceptors also paid 2k reads per seam, 6k per model and tool call.
What
HwShunt) now meters each seam's whole pass as one span, two reads per seam.ModelBased. A pass with one step keeps the reading's own grade. APartialreading givesPartialshares.thread_cpu_time).jcp/README.md.Evidence (M3 Ultra)
ModelBased. The shares summed to the chain's figure every time, and to 96–97% of an independentri_energy_njread around the pass. That oracle folds its own way and shares no code with the meter.HwShunt: 3 tests fail;jcp-conformancepasses. The Linux check is clean, and clippy reports nothing new in jcp-intercept or jcp-energy.intercept/1step's grade.🤖 Generated with Claude Code