Repository navigation
v0.47.8.0
Your nightly dream cycle stops losing the good stuff. Sessions where the real
insight was buried in routine chatter now produce pages instead of being
skipped, quotes on those pages are actually the words you said, and the facts
extractor finally has a home for ideas.
Three things used to go wrong when gbrain turned a working session into a brain
page. First, if you spent an hour on scheduling and email and dropped one
genuinely good idea in the middle, the cheap "is this worth writing up?" check
averaged the whole conversation, scored it medium, and wrote nothing — the
whole session vanished. Second, quotes on the pages it did write were often
paraphrases wearing quotation marks: the words looked verbatim, but you never
said them that way. Third, when the extractor pulled structured facts out of a
conversation, it had categories for events, preferences, commitments, beliefs,
and plain facts — but none for an idea, so your best thinking got filed as a
generic "fact" or dropped.
All three are fixed, and the fix is measured end to end on a public benchmark
rather than asserted. On the write-path benchmark (24 fictional agent sessions
with 173 planted salient units), the amount of a session's meaningful content
that survives into a page went from 70.2% to 88.1%, every one of the four
previously-skipped sessions now produces pages, and quote fidelity went from
54% to 83%. Invented claims roughly halved.
To take advantage of v0.47.8.0
gbrain upgrade should do this automatically. If it did not, or if
gbrain doctor warns about a partial migration:
-
Run the orchestrator manually:
gbrain apply-migrations --yes
Migration v145 widens the facts table so the new
ideakind can be stored.
Until it runs, an extractor that emits an idea will have that page's fact
batch rejected (atomically — nothing is lost, and the markdown fence stays
the source of truth), so run it before your first post-upgrade extraction. -
Nothing else is required. The distillation improvements are on by
default. Your next dream cycle re-scores the transcript corpus once (the
scoring rubric changed, so cached verdicts are invalidated) — that is one
cycle of cheap re-judging, bounded bydream.triage.max_ms. To sweep it in
one go instead:gbrain dream retriage --dry-run # what would change, zero LLM calls gbrain dream retriage # re-score the corpus
-
Verify the outcome:
gbrain dream --phase synthesize --dry-run # see which transcripts pass now gbrain stats -
If any step fails or the numbers look wrong, please file an issue:
https://github.com/garrytan/gbrain/issues with the output ofgbrain doctor,
the contents of~/.gbrain/upgrade-errors.jsonlif it exists, and which step
broke. This feedback loop is how the maintainers find fragile upgrade paths.
Thank you.
Say to your agent: "synthesize my conversations" / "process yesterday's
transcripts" — "re-score the triage" / "retriage the backlog" — "what do
we know about" the topic you worked through, to read the page back.
What you would see in a concrete example
A two-hour session: forty minutes of calendar shuffling, one paragraph where
you work out why customers actually churn, then more logistics.
| Before v0.47.8.0 | After | |
|---|---|---|
| Did it produce a page? | No — scored 0.35, under the 0.5 bar | Yes |
| Why | The whole session averaged out as routine | Two passages verified word-for-word against the transcript carried it through |
| The quotes on the page | Often paraphrased inside quote marks | Verbatim, or unquoted and honest |
| "our churn is a billing-surprise problem" | Filed as a generic fact, or dropped | Filed as an idea |
Things to watch
- The scoring change re-judges your corpus once. Cached scores are
invalidated on upgrade; the first cycle re-scores within its time budget and
continues next cycle if it runs out.gbrain dream retriagedoes it in one
sweep. - Quote repair rewrites page bodies. It only touches pages the current run
just created, only quoted spans, and never invents text — an ungroundable
quote loses its quotation marks and keeps its words. If you ever need it off:
gbrain config set dream.synthesize.quote_verify false. ideais a storage kind, not a new verb. Therememberverb's kinds are
a frozen protocol enum and still number five. Note that once idea facts
exist, an OLDER gbrain reading those pages drops them as malformed — forward
only, same as previous taxonomy widenings.- Real-time fact capture now stores low-importance facts when you asked it
to. Theallsetting always promised every tier; the extractor used to be
told to skip the low ones anyway. It now labels them honestly. Pass
high-onlyif you want the old suppression (sync already does).
Itemized changes
Added
- Verified-segment triage rescue (
src/core/cycle/triage-rescue.ts). A
transcript scoring in[dream.triage.rescue_floor, dream.triage.threshold)
passes the gate when at leastdream.triage.rescue_min_segments(default 2;
0disables) of the triage judge's own quoted segments verify as normalized
substrings of the transcript, and its content type is in
dream.triage.rescue_content_types(default mixed/reflection/idea/strategy/
people). Zero extra model calls, works on already-cached scores, and
fabricated segments cannot trigger it.passesTriageGateis the single gate
every consumer reads — the synthesize fan-out, the report telemetry, dry-run
counts, andgbrain dream retriage(so a queue reconcile can no longer
cancel the jobs the rescue just admitted). - Mechanical quote verify/repair (
src/core/cycle/synthesize-verify.ts),
on by default viadream.synthesize.quote_verify. Runs after the synthesis
children write and before the provenance stamp, file dual-write, and embed
sweep, so every downstream artifact carries the repaired body. Ladder per
quoted span: exact substring kept; whitespace/punctuation-drifted match
replaced with the verbatim transcript slice; near match (rare-trigram anchor,
≥0.8 token overlap, ambiguity refuses to guess) replaced; otherwise the
quotation marks come off and the text stays. Scoped to pages the run just
created, fail-open per page, hard CPU caps. Telemetry in
details.synthesis.quote_verify, including a warn-only count of numeric and
date claims that do not appear in the transcript. ideafact kind across the extractor, database (migration v145), fence
round-trip, decay half-life (365d), andgbrain recallrendering.- Synthesis spend telemetry:
details.synthesis.spend(child tokens from
the job rows plus triage judge tokens,cost_basis: in+out+cache_read, cost
nullrather than a fake0for unpriced models) and
children_zero_pages, which distinguishes a child that read the session and
decided not to write from a session that never got scored. - A hermetic write-path regression harness (
bun test test/cycle-write-path-mini-eval.test.ts) — a frozen mini-corpus through the
real synthesis phase with only the model transport scripted, in ~3 seconds
at no cost.
Changed
- The synthesis prompt's output policy: quotation marks are now explicitly only
for spans reproducible exactly (otherwise paraphrase without them), pages must
carry the specific numbers, dates, amounts, names, and who-decided-what of the
content they cover, and claims must be grounded with speculation attributed as
speculation. - The triage rubric scores by a transcript's peak passage rather than its
average, and prefers segments carrying concrete facts and decisions. Cached
verdicts re-judge once on upgrade. - Real-time fact capture labels low-importance facts honestly instead of being
told to skip them;high-onlycallers are unaffected.
Fixed
- Quoted spans after a paragraph break longer than two characters were silently
skipped by the verifier, and an interior curly-quoted phrase inside a
straight-quoted span mis-paired across quote types. - Case folding desynced from its offset map whenever lowercasing expanded a
character (Turkish dotted I), which could splice garbled or empty text into a
page as a "verbatim" repair. Presence checks and repair now share one folding
routine, so they cannot disagree. - A long ungroundable quote could scan a large transcript thousands of times on
the event loop; the search is now bounded and yields between pages. - Chat spend from inline-drained background jobs was attributed to the calling
cycle phase instead of the job itself, so the same tokens could be counted
twice by anything reading both ledgers.
For contributors
evals/brainbenchgate, the retrieval canary, and the read path are
unchanged by this wave and pinned green (know-to-ask 0/149 on all three
harness seams, same-hash compare).- Wave receipts, including the bracketing benchmark runs and the live triage
calibration numbers, are indocs/eval/FIX_WAVE_BASELINES.md.