Repository navigation
v0.47.4.0
Your brain's remote surface now behaves the same everywhere: reads stay
inside your grant, credentials never ride along in responses, and the test
suite proves it on every change.
gbrain's promise is that an agent connected to your brain sees exactly what
its access allows — no more, no less. This release is a wall-to-wall pass on
that promise. Read operations that report activity, anomalies, and
contradictions now follow the caller's source scope like every other read.
Job envelopes no longer carry internal queue credentials on any lifecycle
call, and messages sent into a running job are attributed to the client that
actually sent them. Pack and transcript file lookups validate their inputs
before touching the filesystem, on every surface that takes a name or a path.
Where a fence already existed, it now matches the documented access model
exactly (federated grants confine; your own default source does not lock you
out of explicit lookups).
The other half of the release is how we know all of this stays true: 52 new
test suites and 20 extended ones pin these contracts — including live-Postgres
journeys for engine migration, kill-and-resume sync, mount routing, and the
frozen 7-verb MCP surface — plus registry-walking ratchets that make the next
gap structurally impossible to ship silently. Pull requests now run the
end-to-end tests relevant to their diff instead of a tiny fixed set.
Also fixed along the way: the per-client daily spend cap now actually charges
embedding backfills to the right client; a keyless gbrain dream is pinned to
exit clean (your nightly cron can't break on a machine without API keys);
contradiction reads return complete result pages instead of silently
under-filling; and run_skillopt errors carry stable machine-readable codes.
To take advantage of v0.47.4.0
gbrain upgrade is all you need — there are no schema migrations and no
manual steps in this release.
- Verify the upgrade:
gbrain --version gbrain doctor
- If you call gbrain over MCP from a remote client, know that error codes
are now stable and machine-readable onrun_skillopt, admin auth endpoints
answer HTTP 429 with a JSON envelope under repeated failures, and
activity/anomaly/contradiction reads follow your client's source grant. - If anything looks wrong, file an issue at
https://github.com/garrytan/gbrain/issues with the output of
gbrain doctor.
Itemized changes
Added
- 52 new test suites + 20 extended (1,916 → 1,968 test files): live-Postgres
journeys for whole-brain engine migration (gbrain migrate --to), real
SIGKILL mid-sync resume, mount routing, autopilot cron lifecycle, the
bun-link upgrade arc, thin-client daily-driver verbs over the wire, the
7-verb--surface verbsceiling, and cross-engine read-path parity
(graph traversal, code edges, ontology merge, event projection, getHealth). - Registry-walking ratchets: every operation must name its covering test
(shrink-only ledger), every non-localOnly read op carries an explicit
source-isolation disposition with anti-vacuity controls, every e2e file
must be claimed by a CI lane, and everyBrainEnginemethod is censused
against the engine prototype. evals/takes-bootstrap/: a 123-case graduation instrument for the takes
classifier (deterministic corpus, precision/recall scorer with
malformed-is-failure, live harness + $0 replay), CI-guarded keyless.- PR-time e2e selection: pull requests now run the end-to-end files relevant
to their diff (fork-runnable, no secrets), with the full nightly glob as
the scheduled backstop. - A runtime-reachability guard that fails the build when a src module is no
longer reachable from any entrypoint.
Changed
- Remote read surfaces follow the caller's source scope consistently:
activity (salience), anomaly, contradiction, chronicle timeline, and
source-diagnostic reads now apply the same grant boundary as their sibling
ops, with grant-confined callers seeing complete, correctly-counted result
pages. Diary-sourced rows are redacted from remote chronicle reads. - Job lifecycle envelopes no longer expose internal queue credentials on any
operation, remote job messages persist the authenticated client identity
(unauthenticated remote sends are refused), remote-submitted jobs carry
the authenticated client for spend attribution, and pause/resume honor
dry-run. - Name and path inputs on pack and transcript surfaces are validated before
any filesystem access, with the pack-name rule aligned to the manifest
schema's own charset (existing packs with dots or underscores stay
mutable) and symlink-hardened transcript resolution. - Admin auth endpoints rate-limit repeated failures (HTTP 429 with a JSON
envelope and Retry-After). run_skillopterrors now carry stable machine-readable codes; integrators
matching on the previous inverted shape should re-check their handling.
Fixed
- The per-client daily spend cap now settles embedding-backfill spend against
the submitting client on every exit path (it previously recorded nothing). - Keyless
gbrain dreamis pinned to exit 0 with a clean degraded posture,
so the documented nightly cron works on machines without API keys. find_contradictionsreturns complete result pages for grant-confined
callers (fences verify before the limit cutoff) and no longer pays a
per-finding page probe before filtering.- The conversation-parser eval scorer fails positive fixtures that report
unrecognized headings, so a speaker-folding regression can't pass on
recall alone. - Cycle take-proposal writes bind JSONB correctly on real Postgres (the
embedded-engine tests could not see the difference; the new
Postgres-backed suites can). mergeOntologyFactreturnssupersededIdas a number on Postgres,
matching the documented contract and the embedded engine.
For contributors
docs/TESTING.mddocuments the new ratchets and lanes;bun run verify
gainscheck:orphan-modules; the JSONB guard also flags uncast positional
binds into known-JSONB columns; guard self-tests cover both new guards.- The unmapped-e2e baseline and the operation-coverage allowlist are seeded
shrink-only; stale entries fail the build with removal instructions.