Repository navigation
fix: context telemetry ON by default + counter for proved-but-unregistered intents - #499
Conversation
The llm_context table carries the per-call context breakdown (system, tools, tool_result, assistant) but was EMPTY on a stand that had already run 15 tasks: the flag was opt-in and off. Context size was therefore discussed from per-task token sums, and any fix to it was a guess. limits: telemetry row 1 per model call - byte counting only, no content kept; наблюдаемо до ~300 вызовов на прогон, то есть до ~300 строк limits: disable via explicit falsy value only (0|false|off|no) - the point of the change is that an unset env means ON Tests: default-on and explicit-off are both asserted (RED first: the old test asserted the opposite default).
…o finding «Доказал — не зарегистрировал» was measurable all along and nobody measured it: on the 2026-11-22 run record, 3 runs out of 12 had EVERY fact-producing intent register nothing (3/3, 3/3, 2/2 intents) — task 8 burned 130 Bash calls in 35 minutes and registered zero findings. Facts carry no "this is a defect" flag, so the planner is the only place that can turn a fact into a finding; it had no counter telling it that a finished intent yielded facts and nothing else. db: FactOnlyIntents(limit) — intents with >=1 fact edge and no finding edge. agent: the situational block now carries them with the rule (register or say why not), so the nudge survives seeded agent_prompts (the block is code-owned, not a template). limits: FactOnlyIntents limit default 10 - a planner round acts on a handful, the counter is a nudge and not an inventory limits: summary truncation 140 chars - one-sentence intent summaries; full text stays one node_detail away, and the block must not become a second context source Tests RED first: db test asserts the fact-without-finding intent is picked and the fact+findings one is not; agent test asserts the block reaches the situational prompt and does not appear for an empty lookup.
7ce53cd to
8e1c88e
Compare
FactOnlyIntents now returns only terminal intents (done, blocked, exhausted, stopped), so an open, running or deleted intent is no longer reported as finished. The summaries go into the planner block inside env.wrap, and the telemetry docs, the llmrec comment and the db comment match the on-by-default flag with 0|false|off|no to disable it.
BaaRai
left a comment
There was a problem hiding this comment.
Thanks for turning telemetry on by default and for the counter.
I merged main into your branch, which brings the atomic threshold from #470 and the dependency bump, then pushed deba1d1: FactOnlyIntents now returns only terminal intents (done, blocked, exhausted, stopped), so an open, running or deleted intent is no longer reported as finished. The summaries go into the planner block inside env.wrap, and the telemetry docs, the llmrec comment and the db comment match the on-by-default flag with 0|false|off|no to disable it. Tests cover the terminal states and the envelope.
Merging once CI is green.
|
Merged. Thanks for turning the context telemetry on by default and for the fact-only counter: the state filter, the envelope around the summaries and the docs match the new default now. |
Two platform defects that were measurable all along and unmeasured.
1. Context telemetry was off, so context size was a guess
llm_contextholds the per-call context breakdown (system / tools / tool_result / assistant /user) and was empty on a stand that had already run 15 tasks — the flag was opt-in and off.
Everything said about "context bloat" came from per-task token sums instead of the per-call
composition. Now ON by default; only an explicit falsy value turns it off.
2. «Proved but did not register» had no counter
On the same run record, 3 runs out of 12 had every fact-producing intent register nothing
(3/3, 3/3, 2/2); one run burned 130 shell calls in 35 minutes and registered zero findings.
Facts carry no "this is a defect" flag, so the planner is the only place a fact can become a
finding — and it had nothing telling it that a finished intent yielded facts and nothing else.
db.FactOnlyIntentsreturns intents with a fact edge and no finding edge; the planner'ssituational block carries them with an explicit rule (register, or say why it is not a defect).
The block is code-owned, so it survives a seeded
agent_promptstemplate.Verification
go test ./agent/ ./db/ ./llmrec/green; both new tests were written RED first.limit-scan.py --fail-on commentedexits 0 on the touched files.Stacked on #470 (branch created on top of it; the diff shows #470 too until that merges).