fix(kernel,router): rehydrate by CAS content hash (F-021) + narration budget
rehydrate() now scans ArtifactContentStoredEvent (the durable slot->CAS-hash bridge) and fetches stored bytes by content hash, keying the cache by the logical slot name. The slot name is never passed to the hash-keyed CAS, so the odd-length-hex crash is gone and artifact content is restored on cold-start resume. RehydrateTest reworked to use a content-addressed fake store (slot name != content hash) so it actually exercises the bug. Replay (#8) is unaffected — rehydrate is live-resume-only. Also bump router narration maxTokens 1024 -> 4096: reasoning models were spending the whole budget thinking and emitting empty content (finishReason= length), so narrations never reached the TUI. Removes the stale TUI-refactor progress doc.
This commit is contained in:
@@ -15,12 +15,13 @@ data class RouterConfig(
|
||||
maxTokens = 512,
|
||||
),
|
||||
// Narration uses a larger token ceiling: reasoning models spend tokens "thinking"
|
||||
// before emitting content, and a 512 cap left no room for the actual line (the
|
||||
// response came back empty with finishReason=length). 1024 lets thinking complete
|
||||
// and still produce the one or two sentences.
|
||||
// before emitting content, and a tighter cap left no room for the actual line (the
|
||||
// response came back empty with finishReason=length). 1024 still wasn't enough —
|
||||
// the model burned the whole budget reasoning and emitted no content — so 4096
|
||||
// gives reasoning room to complete and still produce the one or two sentences.
|
||||
val narrationGenerationConfig: GenerationConfig = GenerationConfig(
|
||||
temperature = 0.7,
|
||||
topP = 0.9,
|
||||
maxTokens = 1024,
|
||||
maxTokens = 4096,
|
||||
),
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user