Skip to content

v0.47.8.0

Choose a tag to compare

@github-actions github-actions released this 31 Aug 14:52
2a56b51

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:

  1. Run the orchestrator manually:

    gbrain apply-migrations --yes

    Migration v145 widens the facts table so the new idea kind 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.

  2. 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 by dream.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
  3. Verify the outcome:

    gbrain dream --phase synthesize --dry-run   # see which transcripts pass now
    gbrain stats
  4. If any step fails or the numbers look wrong, please file an issue:
    https://github.com/garrytan/gbrain/issues with the output of gbrain doctor,
    the contents of ~/.gbrain/upgrade-errors.jsonl if 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 retriage does 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.
  • idea is a storage kind, not a new verb. The remember verb'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.
    The all setting always promised every tier; the extractor used to be
    told to skip the low ones anyway. It now labels them honestly. Pass
    high-only if 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 least dream.triage.rescue_min_segments (default 2;
    0 disables) 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. passesTriageGate is the single gate
    every consumer reads — the synthesize fan-out, the report telemetry, dry-run
    counts, and gbrain 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 via dream.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.
  • idea fact kind across the extractor, database (migration v145), fence
    round-trip, decay half-life (365d), and gbrain recall rendering.
  • Synthesis spend telemetry: details.synthesis.spend (child tokens from
    the job rows plus triage judge tokens, cost_basis: in+out+cache_read, cost
    null rather than a fake 0 for 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-only callers 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/brainbench gate, 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 in docs/eval/FIX_WAVE_BASELINES.md.