Repository navigation
v0.60.770.0
Pre-releasegbrain dedupe classesandgbrain dedupe sampleno longer stop on a chat page stored in segments (#10227)gbrain repair ghost-pagesno longer soft-deletes a page whose file moved to another page, andgbrain repair moved-pagesfolds a file that was renamed and edited in one commit (#10210)- Doctor keeps the "first sync stopped at a usage limit" warning through frequent reruns, skipped and queued runs, and limits hit before any mail is read (#10211)
- The conversation archive no longer leaves pages any member can read when a brain turns shared while an archive run is starting or still running (#10228)
- A test that counts the statements of a page write no longer fails at random, and when it fails it names the extra statement (#10224)
- The nightly cycle now records what it learned, and
gbrain learnedshows it (#10193) - Thin-page filling can now start with the people you actually meet and message, and can stay under a daily spending cap (#10198)
- On the experimental Rust engine, the CLI's sync, fact repair, stale-link extraction, source refresh and code reindex commands can now hand their work to a running
gbrain servethat owns a Rust brain, as they already do on PGLite; nothing selects the Rust engine yet, and a Rust serve does not take this work until the rest of the Rust engine lands, so nothing changes for anyone today (#10099) - The shadow-off cost test no longer fails on a busy machine (#10223)
gbrain dedupe classes and gbrain dedupe sample no longer stop on a chat page stored in segments.
Fixed
gbrain dedupe classesandgbrain dedupe samplerefused the whole run withpage_body_segmentedwhen the brain held a chat page stored in segments (a page over 1 MiB). Such a page is now read whole up to 24 MiB and its chat counts as evidence. A larger one, or one whose read fails, is set aside, its chat adds no evidence, and the run carries on. The output lists it on its own line, and--jsoncarries it undermessaging.segmented_page(read,set_asideand thepages).
gbrain repair ghost-pages no longer soft-deletes a page whose file moved to another page, and gbrain repair moved-pages folds a file that was renamed and edited in one commit.
Fixed
gbrain repair ghost-pagesapproved a page whose file a commit deleted for soft-delete even when Git shows the file moved to another live page, so the old page's links, facts and timeline were purged 72 hours later instead of carried over. The preview now lists such a page apart asmoved_to, names the fold (gbrain repair moved-pages --source <id> --slug <slug>, which previews first and applies only with--apply --expect <hash> --yes) and never approves it. A page whose path Git renamed, or whose last committed content a file in HEAD still holds, but whose fold is not proven to lose nothing, is kept asmove_unproven.- A
database_ahead_of_fileghost now carries move evidence in the preview:matchedwhen a moved page holds every line of it, database edit included, with the fold to run, andunmatchedotherwise, naming any file that looks like where it went. gbrain repair moved-pagesfolded only a move that kept the file byte for byte. It now also folds a file the deleting commit renamed (or the one live file with the same name that Git first added after the old file and no later than its deletion) when the moved page holds every line of the old page's body and timeline in order, its type, its tags and its frontmatter, and a strict move whose old page was edited in the database when the moved page holds that edit. A move whose lines changed stays held as before.gbrain extract --stalecrashed withTypeError: undefined is not an objecton a page stored in segments (over 1 MiB) whose saved timeline derivation named a segment the page no longer holds. The incremental timeline read now falls back to the full pass, and saved timeline derivations are re-derived once.- Correction to the previous release's note on
file_driftholds: it said a plaingbrain syncnever re-checks a hold an earlier release wrote. That release adds no automatic re-check of its own, but a hold written before screen version 3 is still re-checked by every sync, as earlier releases already did.
Doctor keeps the "first sync stopped at a usage limit" warning through frequent reruns, skipped and queued runs, and limits hit before any mail is read.
Fixed
- Doctor's
sync_usage_limitedwarning for a connector source in a long first sync now holds while the newest limited run that landed pages is inside the fail age, however many later runs hit the spent limit (it read only the last 50 jobs before), and a skipped or queued newest job no longer hides it. A run whose writes are still pending no longer counts as having landed pages. - A gbrain.io usage limit hit while reading the account's identity, before any mail, now ends the run
partialwithstopped_on: usage_limitinstead of failing the sync. - A bare permission error (HTTP 403) on one Gmail thread no longer stops the rest of the batch as if a usage limit were spent, and the log no longer calls it rate limited.
- A sync job that keeps its job lock but has run past the staleness ceiling now reads
failwith a read-onlygbrain jobs getfix instead of "first sync running".
The conversation archive no longer leaves pages any member can read when a brain turns shared while an archive run is starting or still running.
Fixed
- An archive run read the brain's audience (personal or shared, and the owner) before it took its source's run lock. A
gbrain access member add(orgbrain config set brain.audience shared) that finished in that gap kept the earlier pages to the owner, but the run then wrote its new pages with no readers, so the new member could read them, and it recorded the brain as personal again. The run now reads the audience and the archive switch again once it holds the lock, so its pages are kept to the owner and a brain whose unset switch now resolves off archives nothing. - When the new audience moves the run to another source (on a shared brain, a checkout source's archive goes to its database-only
<source>-ownersource), the run writes nothing and ends with the new retryable codearchive_audience_changed; the maintenance pass records it as a skip, and the next run archives into the owner-only source. - A run that started on the personal brain and was still writing when the brain turned shared left its later pages for the next run to keep to the owner (
archive_rescope_pending). An archive run into a checkout source's<source>-ownersource, or one that found the archive off, could record the brain as shared in the meantime without holding that source's run lock, so the next run skipped the re-scope and those later pages stayed open to every member. The audience is now recorded only while the source's run lock is held; while another run holds it, the owner-only rules apply and the re-scope stays pending for the next run.
A test that counts the statements of a page write no longer fails at random, and when it fails it names the extra statement.
Fixed
- The test that checks a new page still costs 8 database statements leaves out the WAL checkpoint probe PGLite sends on its own when its last probe is over 50 ms old, and compares each statement by its text as well as by number. The limit of 8 is unchanged. No product behavior changes.
The nightly cycle now records what it learned, and gbrain learned shows it.
Added
- A new cycle phase,
learning_derive, runs after the other maintenance phases and before purge. It notes each new thing the cycle learned (a fact an extractor added, a promise someone made you, a pair of facts that disagree, a thin page that enrichment filled, and a Facts row you typed yourself) as a pointer in a newlearning_itemstable. It stores ids only, never the text, and records each thing once, however many cycles run. gbrain learned(MCP toollearned) lists what was learned that you have not seen yet, newest first, 15 by default (--limitup to 100), each rendered from the live fact, loop, proposal or page. Something you forgot, purged or made private drops out.--since <date>lists everything since then, and--statsshows, per night, how many items you kept or saw without undoing. Remote callers see only what their token can read, and other sources stay out.- Works on a brain with no git repository, and on PGLite and Postgres. A brain whose schema is behind gets a
migrations_pendingrefusal fromlearnedand a skipped phase; an engine without raw SQL getsengine_capability_missing.
Thin-page filling can now start with the people you actually meet and message, and can stay under a daily spending cap.
Added
gbrain enrich --thin --order owner-contactranks thin person and company pages by recent contact: meetings, conversations, email threads and chronicle events from the last 90 days that link to or mention the page (newer counts more), open loops with that person, and one point when the page links to or from your own page, divided by how full the page already is. A page you met three times this week now comes before one linked from 200 old imports. The ranking is one SQL query with no model call, so it works on a keyless brain, and--dry-runprints the order and each source's candidates in rank order.- The
enrich_thincycle phase uses owner-contact as its default order when gbrain finds your own page with no conflict, and keeps inbound-links otherwise. Acycle.enrich_thin.orderyou set always wins. The phase stays off by default. cycle.enrich_thin.max_daily_cost_usdandcycle.enrich_thin.max_daily_pagescap the phase across every run in your day (brain.timezone, UTC when unset), on top of the per-run caps. Unset, there is no daily cap; a cap set to something that is not a number ($5) stops the phase until it is fixed, instead of meaning no cap. A run charges each source its full cap before it starts and trues it up after, so a run that dies mid-source never under-counts.- Without a chat model the phase skips before any spend and still reports the order it would use.
- On a brain with no chat key,
gbrain learnednow says how many people you are in touch with have thin pages ("2 close contacts have thin pages; a chat key would fill them"), with the commands that turn filling on and what it would cost. Only you see it, locally or with your owner token. Nothing is filled and nothing is spent. gbrain learnednow keeps up to five possible duplicate people open at a time, the person groups fromgbrain dedupe --previewranked by how recently you met them (preview order when gbrain can't find your own page). Each one shows the exactgbrain dedupe confirmandgbrain dedupe rejectcommands for its group, and drops out once you answer; the next best group takes its place on the next cycle, and the best-ranked shows first. Nothing is linked or merged on its own, keyless brains get the list too, and a remote token sees only groups whose pages it can read.
For contributors
- On an engine with no raw SQL (the Rust engine), the
enrich_thinphase skips withengine_capability_missingbefore it lists candidates. - The Rust engine store refuses
listEnrichCandidateswithorder: 'owner-contact'(engine_capability_missing) instead of answering with another order. listEnrichCandidatesreturnscontact_scorefor the owner-contact order.test/learning-duplicates.test.tscovers the duplicate list on PGLite and Postgres.test/enrich-owner-contact.test.tscovers the ranking on PGLite and Postgres, the default-order fallback, keyless runs and 24 runs in one day;test/enrich-owner-contact-perf.slow.test.tsholds the query under 500 ms at 100,000 pages on PGLite.
On the experimental Rust engine, the CLI's sync, fact repair, stale-link extraction, source refresh and code reindex commands can now hand their work to a running gbrain serve that owns a Rust brain, as they already do on PGLite; nothing selects the Rust engine yet, and a Rust serve does not take this work until the rest of the Rust engine lands, so nothing changes for anyone today.
Changed
- When a
gbrain serveowns a Rust brain and can take the work,gbrain sync,gbrain embed --stale --facts,gbrain extract --stale,gbrain sources refreshandgbrain reindex-coderun inside that serve instead of opening the brain themselves. A Rust owner that cannot take the work leaves each command as it runs today. - While
gbrain serveowns a Rust brain, a command that cannot be handed to it (a fulldreamor cycle run,import,embed --all) waits for the serve or refuses, as on PGLite today. On Postgres these commands run beside the serve. - The "owner stopped before admission" errors of sync, fact repair and source refresh no longer say "PGLite", because the owner can now be a Rust brain's serve.
The shadow-off cost test no longer fails on a busy machine.
Fixed
- The test that checks shadow mode off adds no database statements compared two runs by the exact name of each cached statement they closed. A busy machine could change which earlier statements were cached, so the names differed even when every statement sent was the same, and the test failed about half the time under load. The test now renames closed statements the same way it already renamed prepared ones, so it fails only on a real difference in what is sent.