Skip to content

Garry's Opinionated OpenClaw/Hermes Agent Brain

TypeScript
3.3 KB
Raw Blame

Upgrade to v0.60.99.0: fixable facts and takes fences are rewritten, not held

A facts or takes table whose meaning is unambiguous is now normalized in the same write instead of being held or refused: a missing end marker right after the table, two-dash takes markers, zero or duplicate row numbers, header aliases and column order, invented kinds, enum synonyms, assistant holders (System, assistant) and percent confidences. Claims, existing row numbers and valid cells never change, and a row never becomes more visible. Managed sync commits the rewritten file. What cannot be fixed exactly is held or refused as in v0.60.98.0.

  1. Finish the upgrade. gbrain upgrade runs it; no schema migration is added. Restart every gbrain serve, autopilot and worker.

  2. Tell the user what will be rewritten before the next sync. Normalization is on by default and managed sync commits each rewritten file with the usual gbrain: persist canonical memory update commit. To preview it:

    gbrain sync --source <id> --dry-run       # would_normalize: path and fix classes per file
    

    If the user does not want gbrain to rewrite fences, stop here and run (ask first; such fences are then held or refused as before):

    gbrain config set fences.normalize false
    

    A read-only mirror keeps the fix in the database and never rewrites its checkout. A company-brain source never rewrites repository files: it refuses source_writeback_required and names the fence to fix in the repository.

  3. Held fences recover by themselves. Every fence hold v0.60.98.0 wrote is re-screened on the next sync, with no command: a fixable one is normalized, committed and imported, the rest stay held. To do it now:

    gbrain sync --source <id> --no-pull
    

    The sync reports fences_normalized (count, fix classes, top directories and sample paths). The top directories name the writer emitting malformed fences; tell the user so it can be fixed at the source.

  4. Know the behavior changes.

    • put_page, put_pages, capture, remember, extract_facts, takes_add / takes_update and facts relink normalize a fixable fence and report fences_normalized with one fence_normalized notice: the stored page differs from what was sent, so read it with get_page before editing it.
    • A fence that cannot be fixed exactly refuses invalid_fence with fence_issues, one entry per blocking row and column with the allowed values; correct all of them and resubmit with a new request_id. An append verb whose target page has such a fence refuses target_fence_malformed; edit_page and the other takes writes refuse it too and never rewrite a fence.
    • Legacy (unmanaged) sync and direct imports store the normalized fence in the database (the file is not rewritten) and report fences they could not fix in fence_issues; they never hold a file for a fence.
    • Write facts with remember and takes with takes_add: their rows never need normalizing.
  5. Verify:

    gbrain sources status <id> --json
    gbrain doctor --only git_held_files --json
    

    Fence holds left after the sync are the tables that need a person (or a later repair pass): each names the fence, section, rows and reason.