adventure: give the summary long enough to wake the model up

The run summary had sixty seconds, which is a generation budget, and
this call almost never gets to just generate. Runs end hours apart,
Ollama drops an idle model after about five minutes, so the steady state
is weights on disk and a cold load before the first token. The old
budget expired during that load every time and filed the empty beat that
means "no summary, ever" — there is no retry, the beat itself is the row
that stops the sweep re-picking the run. Five minutes now, sized for
load-then-generate, so a timeout means what the comment always claimed
it meant: the box is down.

That can't sit on a two-minute ticker, so it doesn't. The sweep starts
beside the ticker behind a single-flight flag; ticks that land during a
load skip instead of queueing. Nothing reorders — the summary is written
to the local buffer with the next seq and still ships behind the run's
own log.

Claude-Session: https://claude.ai/code/session_012bxpQQJDjC1mTtLN3VVtBQ
This commit is contained in:
prosolis
2026-07-24 22:07:47 -07:00
parent 509df7fadf
commit 34519c9145
2 changed files with 42 additions and 7 deletions
+4 -2
View File
@@ -60,8 +60,10 @@ func (p *AdventurePlugin) peteRosterTicker() {
// After the beats, not before: the summary is the last beat of a run's
// story and has no business overtaking the log it is about. It is also the
// only step here that can talk to the model, which is why it lives on a
// ticker at all rather than at the moment a run ends.
p.sweepRunSummaries()
// ticker at all rather than at the moment a run ends — and why it starts
// beside the ticker rather than on it, since a cold model takes longer to
// load than the interval between two pushes.
p.sweepRunSummariesAsync()
}
}