mirror of
https://github.com/esengine/DeepSeek-Reasonix.git
synced 2026-11-07 10:45:59 -10:00
Problem: background children from an older chat or Goal could charge late usage to a newly active Goal while still retaining their original root budget. Root cause: the usage tee selected its current recorder at event delivery, so recorder epoch checks were applied to the wrong owner. Fix: capture an opaque process-local accounting scope at the shared tool-call boundary. Forward the optional capability through sink wrappers, preserve it for nested delegation, and select the captured Goal recorder at consumption. Keep session tally, quoting, title exclusion, provider requests and wire data unchanged. Document between-turn accounting and persistence limitations. Verification: real Boot delayed-background and nested fixtures, same-Goal controls, Goal lifecycle and JSON tests, exact preceding-owner negatives, root package inventory, owner/Boot race tests, static gates, cross-compilation and a pinned native Windows inventory with fail-closed verifier mutants. Hosted native execution and independent review remain separate gates. Refs #14025.