Eleven methods repeated the same body: run mapErr over the store's error,
allocate a slice of the wire type, convert row by row. mapRows holds it, and
each method is now the read plus the conversion it uses.
ListProposedRoutines had a conditional copy of ReminderID, which was a nil
pointer assigned over a nil pointer whenever it did not fire. It is
unconditional now and the result is the same.
Thirteen arms of dispatch spelled out the same handler: nil check, unmarshal,
call, marshal, and a hand-written unknown-method error at the bottom of each.
callDirect, callDirectNoParams and callDirectVoid hold the three shapes those
arms come in, so the switch now says which Server field backs which method and
nothing else.
The nil check is the load-bearing part and it is unchanged: a nil field is the
capability being unconfigured on this box, and the wire still answers
ErrUnknownMethod. WrapKeyFn and UnlockFn keep their own arms because they take
apart the request rather than passing it through. No wire change.
Fourteen table entries carried the same four lines: call the CoreAPI method,
return early on error, swap a nil slice for an empty one so the wire says []
and not null. withParamsSlice holds that once and each entry is now the call
it makes.
Three id-only request types were the same struct under three names, so the
routine transitions use the idReq that was already declared and unused. The
revert reply was a map literal on one side and an anonymous struct on the
other; revertResp names it. Both are wire-identical.
V-572. "напомни в 11:00 позвонить маме" answered "Когда?". ReminderGrammar
builds its slots by hand and the extractor never ran over a stage 0 decision,
so HasTime was false however clearly the hour was spoken, and missingFor read
the silence as absence.
fillMatchedSlots in internal/router/router.go now runs the stage 2 extractor
over every stage 0 decision and fills only what the grammar left empty. A
matched value always wins. The LLM path had the same hole and the same fix, so
both share one function rather than ten grammars re-implementing extraction.
Slots.Text is deliberately not filled. A grammar that left Text empty meant
it: agendaQueryBuild hands the query chain the sentence itself. Filling it
would also make SlotText unaskable, which is the bug V-383 fixed on the LLM
side.
Enabled for all ten grammars and inert for nine. Extract fills Time for a
reminder, Fn for an act and Key for a fact, and nothing for query, system,
note or chat. Benchmarked at 20000x with the real date parser: every stage 0
shape stays inside the noise, and the reminder rule gains, because
actionReminder was already running that same parse one layer down.
TestONNXBaseline 64/91 before and after, no case regressed. The fixture's own
"slots deferred to daemon" line went 6 to 0. On the box: "хорошо, напомню
сегодня в 11:00."
Conflict in internal/router/router.go resolved by hand: V-564's grammar-outcome
note and V-572's slot fill both belong, fill first. Full -race suite green.
--no-verify: the pre-commit hook refuses master, and the owner asked for
straight-to-master merges for this unattended run.
V-567, severe. classifyConfirm was strings.Contains over bare stems, so
"погода" contained "да" and "покажи" contained "ок". resolveConfirm runs
before routing, so asking the weather while a confirm was parked executed the
destructive tool or the bound Hexis capability. Measured on the box before the
fix: "какая погода" ran the parked act.
Second defect found while fixing: an unrecognised utterance also disarmed the
confirm, because claim() cleared the pending slot before the verdict was read.
An utterance that is not an answer is not a cancellation either.
The yes and no words are now two closed sets in internal/lexicon, matched as
whole tokens, phrases longest-first so "не надо" is read before "нет", and
negatives before positives. The whole utterance must be answer words plus
filler, so "давай посмотрим погоду" is unknown and leaves the confirm parked.
"хорошо", "ладно" and "точно" are deliberately absent: they open a sentence
about something else as often as they answer one.
Conflict in lexicon_ru_v1.json resolved by hand: V-560's slot_value_frame and
dialogue_cancel and V-567's confirm_yes and confirm_no all belong. 22 sets,
JSON validated, lexicon, mavend, router and router/eval green with -race.
--no-verify: the pre-commit hook refuses master, and the owner asked for
straight-to-master merges for this unattended run.
Conflict in cmd/mavend/voice.go resolved by hand: V-564's decision record
install and V-560's memoised turn route both belong at the top of runTurn, as
steps 0 and 0b. Full -race suite green over ./internal/... ./cmd/... after the
resolution, 64 packages, no failures.
--no-verify: the pre-commit hook refuses master, and the owner asked for
straight-to-master merges for this unattended run.
"напомни в 11:00 позвонить маме" answered "Когда?" about an hour he had
just said. ReminderGrammar builds its slots by hand and the router ran no
extraction over a stage-0 decision, so HasTime was false however plainly
the hour was spoken; missingFor read the silence as absence.
The fix runs the stage-2 extractor over every stage-0 decision, filling
only the slots the grammar left empty. A matched value always wins: the
rule read a literal pattern, the extractor guesses. This is the same hole
the LLM path already had, so fillSlots and the new stage-0 call share one
fillMatchedSlots.
Enabled for all ten grammars rather than a chosen few, because for every
intent but reminder it is inert. Extract fills Time for a reminder, Fn for
an act and Key for a fact, and nothing at all for query, system, note or
chat — which is what the clock, agenda, feed, list, task, Praxis-adjacent
and narrative rules emit. The two act rules, wakeword-act and the Praxis
ones, already carry an Fn or they do not match, so the matcher has nothing
left to fill. Measured rather than asserted: benchmarked at 20000x, a
stage-0 query is 3.7µs against 3.9µs before and a clock or act rule is
0.7µs either way, both inside the noise. The reminder rule is the one that
gains, and its date parse is not new spend — actionReminder was already
running exactly that parse one layer down, and now skips it.
Slots.Text is deliberately not filled. Extract sets it to the raw
utterance, and a grammar that left it empty meant it: agendaQueryBuild
hands the query chain the sentence itself, and narrativeQueryBuild's Text
is the topic.
Fixture unchanged at 64/91 (70.3%) on TestONNXBaseline, no case regressed,
no new false clarify. What moved is the line the fixture calls "slots
deferred to daemon": 6 to 0.
Verified on homesrv: "напомни в 11:00 позвонить маме" now answers
"хорошо, напомню сегодня в 11:00."
classifyConfirm was a substring test over bare stems, so "погода",
"дальше", "надо" and "давление" all read as "да", and "покажи" and
"около" read as "ок". resolveConfirm runs before routing, so a question
about the weather executed a parked destructive act. Reproduced on the box:
with "restart nonexistent-xyz" parked, "какая погода" answered "не
получилось выполнить команду".
The yes and no answers are now two closed sets in internal/lexicon, matched
as whole tokens longest-first, and the WHOLE utterance must be answer words
and filler — a leading "давай" does not make "давай посмотрим погоду" an
answer. Anything else is confirmUnknown, which now leaves the confirm parked
instead of disarming it: an utterance that is not an answer is not a
cancellation either.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
V-568. queryEmbed claimed the turn on an EmbedQuery error and answered
QueryFailAnswer from position 12 of querySources, above memory, notes, the
personal boundary, search, Kiwix and general knowledge. So one failing embed
call made every question below it answer "не смогла ответить", including the
ones search and Kiwix would have answered without the embedder at all.
The notes source had the same bug one position lower, on a QueryNotes error.
Both now log once and pass. Both also gained an empty-vector guard, because
scores off a nil vector are not a "there is nothing" answer.
The distinction the audit used: a source that looked and found nothing may
claim, a source that could not look must pass. day-plan, habits, feeds,
calendar, weather, home, network and web keep claiming, because each already
matched a question about his own data and nothing below can answer it.
Answering a personal question with a paragraph about the world is V-474 and
V-479.
V-565. internal/claim holds Claim{Claimant, Intent, Filled, Consumed,
Unexplained, Band, Veto} and imports nothing from Maven, so the dialogue to
router edge stays impossible. internal/router/claim.go builds one from a
Decision. Additive: nothing in Route calls it and Decision.Confidence is
untouched.
Measured first, on the 91-case fixture. Stage 0 emits 1.0 always and is right
20/20. The classifier cosine spans 0.859 to 0.942 and is right 62% of the
time, with 62% correct below its median and 62% above, so the number carries
no signal about correctness. The top1 to top2 margin is worse: p50 0.009, 68
of 71 cases under 0.02. A calibrated float is not cheaply available from the
classifier, which is what the task's ledger asked to be checked.
So four ordinal bands, highest first: anchored, structural, nearest, vetoed,
with unknown at the bottom so a builder that forgot cannot outrank a measured
claim. Anchored against nearest is 100% against 62% on the same utterances.
Nearest is one band and not a scale because the cosine is flat.
Coverage decides before the band does. That is what fixes Rome: the pending
claimant ate the question while explaining one token of it.
No fixture number moved. TestONNXBaseline is 64/91.
queryEmbed claimed the turn on a failed EmbedQuery and returned
QueryFailAnswer. It sits above memory, notes, the personal boundary,
search, Kiwix, the named page and general knowledge, so one ONNX error
answered every question below it with "не получилось найти ответ",
including the ones search and Kiwix answer without an embedder at all.
It now logs and passes, the shape turnVector already had. The two recall
sources below pass on an empty vector rather than searching on one, and
queryNotes passes on a store error too: a source that could not look is
not a source that looked and found nothing.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The measured failure of 2026-08-05 end to end through the real cascade, plus
the content test the classifier rests on, the call-off, the cost bound, and the
persona checks over the two new lines.
resolveClarifyAnswer now decides what the utterance IS before deciding what to
do with it: route, classify the role, then answer, cancel, or step aside. The
side_query and new_request arms drop the parked question and say so — nothing
may die in silence — and V-561 turns the first of those into a suspend.
isOwnRequest is deleted rather than extended. It only ran where the answer
filled nothing, which is why the greedy 'сейчас' in a weather question walked
straight past it and set a reminder for a time nobody asked for.
turnRoute memoises this turn's routing, so the resolver that reads it to
classify a role and the pipeline that acts on it cannot end up with two
different decisions, and the extra route is paid once. needsRoute is the fast
path: an utterance with no content of its own reaches the same role without the
model.
The turn role — answer, correction, side_query, new_request, cancel, plus the
not_applicable a resolver may return — decided from what the router made of the
utterance instead of from whatever the extractor found inside it.
The content gate in front of the evidence is what separates a hedged slot value
from a question: 'а что если в 11:00' leaves nothing of its own behind and
'какая сейчас погода в Риме' leaves the weather and Rome. Nothing calls it yet.
Two closed sets the turn-role classifier reads. slot_value_frame is what can
stand around a bare value without making the utterance a request — strip it
and the numbers and whatever is left is the utterance's own content.
dialogue_cancel is how he calls off a request she is still assembling, which
is not what task_drop_words means.
router.ClaimOf maps a Decision onto the common unit. Stage 0 is anchored,
the LLM path is structural, the classifier is nearest, and anything with a
structural hole is vetoed whoever produced it.
The veto recovers the reason gateLLMDecision throws away. Folding three
named holes into llmThinConfidence leaves 0.3, which says something was
wrong and never which thing, so the same conditions are read here as
sentences a trace can print.
Nothing in Route calls this. Decision.Confidence keeps its float and keeps
working, because r.threshold and gateLLMDecision read it and the classifier
is the failure floor. TestClaimOfLeavesTheDecisionAlone asserts that.
TestONNXBaseline is unchanged at 64/91.
TestCoverageBeatsBand is the V-558 failure as an ordering assertion. The
weather claim explains the whole utterance and the pending reminder explains
one token of it, so coverage settles it before the band is consulted.
TestBandOrder asserts the order rather than trusting the iota, and pins
BandUnknown at the bottom: a builder that forgot to set a band is a bug and
must not outrank a measured claim.
internal/claim holds the common unit: who wants the turn, the intent, the
slots it would fill, the tokens it explains, the tokens it declines, and why
it should not win. Specificity reads Consumed against Unexplained and
negative constraint reads Veto, so neither needs a float.
Four ordinal bands where a number is unavoidable, argued from measurement in
docs/plans/19-dialogue-arbitration.md. Anchored, structural, nearest,
vetoed. Nearest is one band and not a scale because the classifier's cosine
measured flat against correctness.
MoreSpecificThan puts coverage first and the band second. That is the fix
for the failure V-558 opened with: a pending reminder ate the Rome weather
question while explaining none of it.
The package imports nothing from the rest of Maven. internal/dialogue must
not import internal/router, so Intent is a plain string.
V-564. One decision.Record per turn: the utterance, the winner, and a Claim
per claimant carrying its stage, name, the intent it would have made the turn,
the score it reported, the outcome and the reason. HasScore is separate from
the score so a real 0.0 is not read as no score. Outcomes are won, declined,
lost_on_order, lost_on_score, thinned, merged, never_asked.
Every stage declares its roster up front, so Finish names everyone who never
reported. NEVER ASKED is explicit rather than an absence, which is the fact
the hardcoded ordering hides.
Covered: the seven pre-route resolvers, eleven stage 0 grammar sets, the LLM
router and the classifier with which arm of gateLLMDecision thinned a route,
the classifier runners-up, the follow-up merge, 27 query sources, and a
terminal action-handler or clarify-ask claim.
On by default, no flag. It rides the context like querysource.go and is
installed in runTurn, so mic, telegram and web leave the same trail. Storage
is a 25-turn in-memory ring: no write on the answer path, no migration, and
none of his words outlive the diagnosis. Readable on /trace.
TestRecordingDoesNotChangeTheReply answers the same utterances with and
without the ring.
Two reporting tests over the 91-case RU fixture, no ratchet: a ratchet here
would freeze a number nobody has decided to hold.
TestStage0Contention runs the 21 grammars one at a time instead of stopping
at the first match. One case of 91 draws two, ru-query-019, where
calendar-query beats agenda-query by list position alone.
TestONNXClaimConfidenceDistribution buckets the reported confidence by the
layer that produced it. Stage 0 is 20/20 at a hardcoded 1.0. The classifier
scores 62% below its median and 62% above, across a cosine range of 0.859
to 0.942, with a top-two margin of p50 0.009. The float is not a confidence.
newBaselineClassifier and baselineGrammars split out of newBaselineRouter so
the measurement runs the same rules the daemon runs. TestONNXBaseline is
unchanged at 64/91.
Both tables answer the same question, who won and who lost, one about nudges
and the other about utterances, so they share a page rather than splitting the
nav. A turn is one collapsible row; never_asked is coloured like a block,
because it usually is one. A read failure is logged and the rule trace above it
still renders: a daemon too old to know the method is the ordinary case during
a rolling deploy.
Same shape as TickTrace and RecentEvents: a bounded daemon ring, so the store
adapter refuses rather than pretending a table exists. No voice wiring means an
empty list and not an error, because a box with no voice path has had no turns
to arbitrate.
The two claimant sets that live in the daemon are where the arbitration is
least visible: both are a hardcoded order of functions that each answer 'is
this mine?' alone. The ladder declares its roster up front, so a rung that
never ran is named rather than omitted, and the query chain does the same for
the sources below the one that claimed.
Recording is installed in runTurn and not in the IPC entry point, so the mic,
telegram and the web leave the same trail. A record only the web produced would
be missing exactly the turns that are hardest to reproduce.
Stage 0 records every grammar it reached, keeping a pattern that never matched
apart from a Build that refused the content, and names the ones after the
winner as never asked. The routing arm records the classifier's runners-up and
which arm of gateLLMDecision cut the confidence, because thinned alone is not
enough to act on.
Arbitration between the claimants on the utterance stream is order, hardcoded
in three places, and a log that names the winner cannot explain a loss. The new
package holds one record per turn: who claimed, what it would have made the
turn, the score it reported, and why the rest did not get it. Being explicit
that a claimant was never asked is the point: that silence is what the
hardcoded ordering hides.
The record rides the context, the seam querysource.go already uses, so no claim
site can change a route and a context with no record costs nothing. The ring is
memory and bounded: a turn record is read minutes later or never, and his words
do not belong in a table that outlives the diagnosis.
V-563. cmd/mavend/dialogue_contract_test.go holds twelve whole multi-turn
traces. Each turn asserts the reply, what is parked afterwards including the
attempt count, and the end state: reminders with payload and fire time, fact
keys, note count, task texts.
Six traces pass today. Six carry the correct expectation and skip, naming the
task that makes them green: the owner's transcript and its parseable twin
(V-561), cancel and a correction under a parked question (V-560), a whole
reminder still being asked about and a short correction (V-562).
MAVEN_DIALOGUE_NO_SKIP=1 runs the skipped rows, so a fixer sees their row turn
green and a stale skip is caught.
Offline: hash embedder, no llama-server, no ONNX. Failures print a claimant
trace derived from the daemon's log lines, so a wrong claimant reads
differently from wrong copy.
Each carries the correct expectation and is skipped with the task that
will unskip it, because a weakened expectation would pin the bug as the
contract. MAVEN_DIALOGUE_NO_SKIP=1 runs them.
V-561: the owner's transcript, and the same shape in words the offline
date parser reads — a side query drops the parked question instead of
suspending it, so Rome is never answered and the reminder is never set.
V-560: a cancel is scored as a failed answer and spends a retry; clarify
pre-empts the repair marker, so no correction can be spoken mid-flow.
V-562: a stage-0 reminder never meets the extractor, so a reminder said
whole with its hour in it is still asked about; and finishClarified goes
straight to applyAction, so a repaired decision that lands short answers
with a parse error instead of asking.
Six whole traces through the real cascade with no model: a reminder and a
fact each completed over two turns, an answer that arrives past the TTL,
three unclear answers and the give-up line, a correction of the previous
turn, and an abandoned flow. Each asserts the reply, what is parked after
every turn, and the end state of the store.
Measures what each claimant on an utterance reports across the 91-case RU
fixture, then argues an ordinal band set from that distribution.
The classifier's cosine is flat against correctness: 62% correct below its
median and 62% above, over a spread only 0.083 wide, with every case above
the 0.55 gate. Its top-two margin is p50 0.009 and never reaches 0.03. So a
calibrated float is not cheaply available and the ledger's assumption holds.
Stage 0 is 20/20 on the cases it claims and asserts 1.0 for all of them. The
LLM router emits two values, and the lower one is a self-veto with a reason
flattened into a number.
V-559. internal/dialogue gains PendingAction: capability, slots, missing
slots, TTL and attempt cap, with CapabilityFor as the one intent to
capability map. PendingQuestion derives its action rather than storing a
second copy, so the TTL and attempt rules have one implementation.
The clarify store now holds a bounded stack, MaxStackDepth 2. Behaviour is
identical: Put replaces the top, nothing calls Push, so the daemon runs at
depth one. Push returns what the bound evicted, so nothing dies silently.
Groundwork for V-560 and V-561.
Push/peek/pop including that a peek does not consume and that the flow
under a popped entry survives; that a popped entry stays gone; that a push
past MaxStackDepth returns the evicted entry rather than dropping it
silently; that Put keeps the depth at one; that an expired top takes the
stack with it and is reported once by TakeExpired; and that two dialogue
ids do not read each other's stack.
One parked question per dialogue id meant a side query could only destroy
the flow it interrupted. The store now keeps a stack per id, newest last,
with Push, Peek, Pop, Depth and Delete as drop-all. MaxStackDepth is 2:
one flow plus the thing he interrupted it with, because spoken
conversation does not nest deeper, and because every level she keeps is a
level she has to be able to speak when it dies.
Behaviour is unchanged. Put still replaces the top rather than growing the
stack — a re-ask is another question about the same action — and nothing
calls Push yet, so the daemon runs at depth one exactly as before. Get is
Peek under the name the callers already use. An expired top takes the
stack with it and TakeExpired reports it, so no parked action dies without
a word; Push returns the entry the depth bound forced out for the same
reason.
PendingQuestion.IsExpired and CanAsk now answer through PendingAction, so
the TTL and attempt-cap rules have one copy and the widening cannot drift.
A parked clarify said what she heard (an intent) and not what she was
about to do, so the resolver had to infer the action from conversational
history instead of reading it off an object. PendingAction names the
capability being assembled in the ecosystem's dotted form
(reminder.create, fact.write, act.run), the slots it has, the slots it
still wants, when it was asked, attempts and TTL.
Gaps() computes the missing slots from the slots rather than trusting
Missing, because Missing is what she asked and the slots are what she
got. CapabilityFor maps every dialogue.Intent, so the mapping lives here
and dialogue still does not import router (the cycle rule).
Nothing reads it yet: this is the widening V-560 to V-562 build on.
The clarify path was gated on dec.Clarify, so a turn the cascade routed
confidently but incompletely skipped it. "напомни позвонить" reached applyAction,
failed on the missing time and parked nothing, and the "в семь вечера" that
followed was routed as a world question and web-searched.
The gate now also fires when missingFor names a required slot. A bare capture
verb gets a stage-0 rule of its own: it was reaching the resident model as chat,
which answered by agreeing to a wording change nobody asked for.
askClarify parked "Что сделать?" whatever was on the other end. With an empty
allowlist that question has no answer: she asks, fails, asks again and gives up,
three turns spent on a request she could have declined in the first one.
Empty allowlist now names the gap and parks nothing. A non-empty one still asks,
and names what she can run, capped at six, so the question is answerable.
Three durable stores said no client machine existed. That was written
when the workstation was only a model host. It is where he sits most of
the day and it has the microphone.
The verdict is unchanged and so is the seam. What changes is the size of
the remaining work: deploying two daemons and asking mavend to listen on
TCP, not acquiring hardware. Note that deploying them does not by itself
prove a wake word — mavwaked gates on energy and has no keyword model
(V-487).
Measured on the box: "глаголы в прошедшем времени с окончанием -ла",
copied from the query prompt where it fixes her gender, was read by the
resident model as an instruction to use the past tense throughout. She
answered "я вела заметки" and "если ты разрешил, я управляла домом",
which makes a live capability sound finished.
The gender rule stays, without the example.