the progress round: the provider streams, and the two long waits get honest meters -- the refine battery and her turn. The provider (provider.mjs): every completion now streams (vLLM SSE, probed live first: reasoning_content deltas arrive before content deltas, stream_options include_usage puts the full usage on the tail chunk) and assembles back into the one ChatResponse shape every caller already consumed -- content and reasoning in order, tool_calls stitched by index (id and name on the first fragment, arguments concatenated from shards, the assembled arguments parse), usage from the tail; a malformed data line fails loud where a skipped one would silently truncate, the log still records the assembled message whole, and an optional fifth param onProgress({phase, chars}) fires per delta as the meters' feed (ChatResponse names finish_reason, the wire shape the old typedef omitted). One cosmetic wire delta, named: streamed messages carry no provider_specific_fields (vLLM's duplicate reasoning channel plus refusal:null) -- nothing reads it. The refine meter (discovery.mjs + the home admin block): the job carries steps {total, done, label, chars} where the total is the scrape's model count plus the curator's two (thinking, writing), known the moment the scrape lands; the bar moves ONLY on real completions (GM, 2026-11-17: no step has a knowable duration, the point is meaningful feedback, not smooth fill), the label names the running call down to the effort-ladder sample, every completion lands a receipt line (elapsed seconds + the battery verdict), and the lines SURVIVE the job -- the receipt renders until the next refine (GM ruling: no reason to delete the log) and a rejected pass keeps its post-mortem; the curator's thinking step closes at the first prose delta (the streaming boundary -- why the provider went first), writing at the call's resolve, and a dead call closes both honestly; the 2s poll stays the transport (GM-ruled; SSE was rejected -- EventSource cannot send the Bearer header, and tokens in query strings are worse). The turn meter (loop.mjs + the progress route + the play view): the session carries a live progress record, one per provider call (a heal or tool round restarts it), fed by the streaming callback and cleared at every exit (the ask pause, the 422, the completing return, the failed request); GET /runs/:id/progress (owner-only, never queued) returns it plus the scale the bar guesstimates against -- the only true budget is max_tokens when the knobs set one (reasoning counts inside it, the usage arithmetic proves it; the route mirrors the loop's own param resolution at ~4 chars a token), else her own history: the longest past assistant turn in chars, thinking and prose both, the authored opening included (GM: a guesstimate, but an informed one). The 100% crossing pushes back geometrically: the scale grows by a quarter until the count fits, so the bar re-lands in the 80-100% band and climbs again, the same arithmetic every poll, never pinning (a count just under a grown bracket can still round to 100% for a moment -- named and accepted). No scale at all falls to the chunk-driven fallback: a twelve-segment strip, one lit, stepping ONLY when characters actually arrived -- never a free-running spinner, which would claim liveness the stream may not have; a stall shows as a stall. NO live partial prose in the transcript (the log is the one truth; streaming raw text would leak unpicked variants and half-formed heals onto the surface that shows them composed) -- the placeholder is a live div at the transcript foot, rebuilt when a render wipes it, sticking to bottom only when the scroller was already there, and the poll runs at 1s for turns (2s for refine). Verified: the provider live-probed against the real endpoint (prose+usage, thinking+progress transitions, a forced tool call with parseable arguments, the 403 path), a REAL refine run end to end on the GM's authorization (13 models, 541s, the meter exactly to spec with the curator's thinking ticking 4k-17k chars across polls) which also landed the effort measurements the registry was waiting for -- the deterministic re-pick is glm-5.3-max, and server.json's own pin still beats it until the op edits it -- smoke ALL PASS with the new assertions (the refine steps closed, the receipt's lines, the meter idle on a dormant run, idle-between-turns scaled by history, owner-gating; the first cut of the receipt assertion named the wrong mock tie-winner and the first cut of the dormant check clobbered a shared response variable -- both assertion bugs, the code was right), restart + reminder + repo checks green, typecheck green on both programs, and a disposable live run (created, three real turns, housekept, deleted) proving the meter in the browser with zero console errors: chars ticking, the phase flip at the streaming boundary, the scale re-anchoring to her new longest after each turn. Live findings on record: the measured effort default now rides every unset turn, and the test run's turns thought 12.1k/3.9k/6.5k chars against ~1.4k prose -- the max-observable default working as ruled, and the fresh-run decision the GM will make with the knob one click away; and the browser lesson pinned in AGENTS: the meter's DOM is invisible to a11y wait-text matching, so a whole frozen-meter scare during testing was a sampling artifact (the waits matched instantly against unrelated text) -- probe such widgets by DOM, never by wait

This commit is contained in:
2026-11-17 02:21:38 +00:00
parent eebc1993dd
commit bbaf33635c
13 changed files with 481 additions and 26 deletions
+80 -1
View File
@@ -137,6 +137,83 @@ memory the agent owes itself across sessions.
## State pointers
- **The progress round is BUILT COMPLETE (2026-11-17, uncommitted,
staged): the streaming provider, the refine meter, and the turn
meter are all done and live-proven.** The GM's plan: abandon
Chloe, start a fresh run from the top (the huge max-effort result
prompted it -- her one max turn thought
11,371 chars, 9x her session max, with real continuity work inside;
the comparison is in the 2026-11-17 conversation). The provider
(provider.mjs chat): every completion STREAMS (vLLM SSE, verified
live: reasoning_content deltas then content deltas, usage rides the
tail chunk via stream_options include_usage) and assembles back
into the same ChatResponse -- callers unchanged, the log records
the assembled message whole, tool_calls stitch by index, malformed
chunks fail loud; optional 5th param onProgress({phase, chars}) is
the meter's feed. One wire delta: streamed messages carry no
provider_specific_fields (vLLM's duplicate reasoning channel +
refusal:null) -- nothing reads it, cosmetic on raw surfaces only.
The refine meter (discovery.mjs + view-home admin block): the job
carries steps {total, done, label, chars} -- total = models + the
curator's two (thinking, writing), known at scrape; the bar moves
ONLY on real completions (GM, 2026-11-17: no step has a knowable
duration, the point is meaningful feedback, not smooth fill), the
label names the running call down to the ladder sample, every
completion lands a receipt line (elapsed seconds + verdict), and
the lines SURVIVE the job (the receipt renders until the next
refine -- GM ruling: no reason to delete the log); the curator's
thinking step closes at the first prose delta (the streaming
boundary -- why the provider went first), writing at the resolve,
a dead call closes both; a rejected job keeps its lines for the
post-mortem. The 2s poll is the transport (GM-ruled fine; SSE was
rejected -- EventSource can't send the Bearer header). The TURN
meter (loop.mjs s.progress per provider call, GET /progress route
+ scale, view-play placeholder + 1s poll): no true max exists for
a turn except max_tokens when set (reasoning counts inside it --
usage arithmetic proves it; the route mirrors the loop's param
resolution, ~4 chars a token); else the scale is her own history
-- the longest PAST assistant turn in chars, thinking and prose
both, the authored opening included (GM, 2026-11-17: a guesstimate,
an informed one). 100%-crossing push-back is GEOMETRIC: grow the
scale by 1.25x until the count fits, so the bar lands anywhere in
(80%,100%] per bracket and re-brackets on each crossing -- it never
pins (a count just under a grown bracket can still round to 100%,
named to the GM as working as designed). No scale (draft-before-
opening edge) falls to a chunk-driven strip: twelve segments, one
lit, stepping ONLY when chars arrived -- never a free-running
spinner. NO live partial prose in the transcript (the log is the
one truth; streaming raw text would leak unpicked variants and
half-formed heals) -- the placeholder is a live div at the
transcript foot, rebuilt when a render wipes it, stick-to-bottom
only when the scroller was already at the bottom. The placeholder
(and the refine meter's spans) are INVISIBLE to a11y wait-text
matching -- browser-test them via evaluate DOM probes, never
browser.wait on their text (a whole "frozen meter" scare was this
artifact: the waits matched instantly against unrelated text and
the samples landed within the same second). Live-proven on a
disposable test run (f42403f0, created/played/deleted, three real
glm-5.3 turns at effort max, zero console errors): chars tick, the
phase flips thinking->writing at the streaming boundary, the scale
re-anchors to her new longest after each turn. The REAL refine ran
2026-11-17 end to end (GM-authorized): 13 models in 541s, the meter
behaved exactly to spec (curator thinking ticked 4k->17k chars
across polls), and the registry gained the effort measurements --
defaults now glm-5.3-max (the deterministic lex re-pick, as
predicted; server.json still pins glm-5.3, which BEATS the registry
until the op edits it).
Watch: the effort defaults ride unset turns now, and the 2-sample
ladders are noisy (glm-5.3's argmax is max=291 while high=11 --
within-bucket noise by design, but a fresh glm-5.3 run now sends
effort max where nothing rode before -- the test run's turns thought
12k/3.9k/6.5k chars, an order over her prose). New ids this scrape:
auto (standard), glm-5.3-low (off), deepseek-v4.1-flash/-max
(standard, 1M/256k windows)/-nothink (off); the gev family still
fails the tool probe (no --enable-auto-tool-choice on that backend).
The debug server is RUNNING with the new code (port 7350, pid in
the temp pid file; restarted clean after the test run's deletion --
runs/ holds only Chloe and Irene). Chloe's session is open-on-disk
(killed with the old server; the reconcile handles it at next
start).
- **The reasoning-effort round is BUILT (2026-11-16, late night): the
battery probes the effort ladder, the knob is first-class, hidden
from the model, and its default SENDS.** The probe (discovery.mjs
@@ -540,7 +617,9 @@ memory the agent owes itself across sessions.
CLI note: the run summary is `report` now; `status` is the tier
verb.
- Postulates (GM, 2026-11-14): female PCs only (names are gendered;
DECISIONS #2 closed by it). Boutique: the GM emptied it wholesale
DECISIONS #2 closed by it). packages/detention is GM WIP (2026-11-17):
never commit it, never edit it unprompted -- it goes in when they say.
Boutique: the GM emptied it wholesale
(2026-11-15 -- it kept being a noisy problem); placeholder files
only, no content anywhere. Still do not fix or design it
unprompted -- its design round is where content returns. The