Skip to content

brain: voice_turn tail latency exceeds its own 45s declared budget (up to 86.5s observed) #270

Description

@adrianwedd

Found during the resident-brain-vs-cold-start assay (docs/audits/2026-08-22-resident-brain-assay.html, §02/§06). Kept out of that assay's A/B verdict because it's pre-existing and independent of which cognition backend is compared — this is about the resident brain's own tail latency against its own declared limit.

The numbers

  • voice_turn declares a 45s budget internally.
  • In the assay's controlled single-variable test (14 identical prompts against spark-brain), tail latency reached up to 86.5s — 1.9x the declared budget — with p90 at 39.3s and mean 23.0s (median 18.8s).
  • Outside the controlled test: 517 timeout/unavailable events logged since 2026-08-17, 11 of them on the day of this test before testing even began.

Where

src/pxh/brain.pyask_brain() / the voice_turn call path and its budget accounting.

Open question (from the assay's own falsification section, §07)

Does the elapsed time correlate with:

  • concurrent reflection/other-kind traffic contending for the single-flight FileLock on the session (see ask_brain meter, state/brain/meter.json per kind per day), or
  • session context size approaching a recycle boundary?

The assay's synthetic back-to-back calls may themselves induce contention that a real week of family-use traffic wouldn't show at the same rate — so the recommended next step is instrumenting the real base rate and correlating it against those two candidate causes over a week of actual use, not more synthetic load.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingqaQuality assurance, bugs found in auditreliabilityReliability and error handling

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions