Skip to content

Garry's Opinionated OpenClaw/Hermes Agent Brain

TypeScript
4.5 KB
Raw Blame

Upgrade to v0.60.6.0: prune orphaned timeline rows, settle slug collisions

This release keeps a page's graph, timeline and tags in step with its text on every extraction path, makes forget work on large brains, moves facts and aliases with renamed pages, and gives dream synthesis a default per-run budget. Two schema migrations run automatically: v174 (punctuation-folded withdrawal fingerprints) and v175 (tags.tag_source). Neither starts a background service or calls a model provider.

Two things need one explicit pass from you with the user: timeline rows left behind by older versions of pages, and files that collide on one page slug.

  1. Confirm the upgrade finished on the brain host.

    gbrain --version          # expect 0.60.6.0 or newer
    

    If gbrain doctor reports a partial migration, run gbrain apply-migrations --yes --no-autopilot-install on the brain host. Do not change the operator's search mode or engine.

  2. Tell the user about two upgrade-time behavior changes.

    • v174 expires any active fact that differs from a forgotten fact only by case, spacing or sentence punctuation, so "Prefers email" and "prefers email." are now the same forgotten claim. +, # and in-word dots still count, and paraphrases are still different claims.
    • Dream synthesis now stops at $5 per run by default (dream.synthesize.budget_usd); a transcript that does not fit is deferred to the next run, not dropped. 0 means spend nothing and unlimited removes the cap. Only change it when the user asks: gbrain config set dream.synthesize.budget_usd 20.
  3. Run one full doctor pass (not --fast) and look for the two new checks.

    gbrain doctor --json
    
    • timeline_orphans samples the first 500 pages with timeline rows and counts rows that an earlier stored version of a page produced and its current text no longer has: a dated bullet that was later edited or deleted while extraction was insert-only. Those rows still show up in gbrain timeline. The check is read-only.
    • slug_collisions names files in a source checkout that map to the same page slug (for example notes/Foo Bar.md and notes/foo-bar.md, or two spellings that differ only by case). Only one of each group is indexed; the message says which.
  4. Preview the orphaned timeline rows, then prune them after the user agrees. This is a one-time cleanup; from this release on, extraction retracts removed rows page by page.

    gbrain extract timeline --prune-orphans --dry-run
    gbrain extract timeline --prune-orphans --dry-run --json   # pages_scanned, orphans, examples
    

    Show the user the count and the example rows (source, slug, date and summary). The dry run changes nothing. When the user agrees, remove them:

    gbrain extract timeline --prune-orphans
    gbrain extract timeline --prune-orphans --source-id <id>   # one source at a time
    

    Only rows that some stored version of the page produced and the current text does not are removed. Rows no version ever produced (enrichment, meeting fan-out, --infer-dates anchors) are kept. On a managed brain each page's removal goes through a coordinated write. The command is safe to rerun, and it calls no model provider. These rows are removals, not history: gbrain repair timeline and the timeline_history check do not count them, so do not try to restore them with gbrain repair.

  5. Settle each slug collision with the user. For every group slug_collisions lists, ask which file should keep the page; the indexed one already does. Rename the other files so each maps to its own slug, commit, then sync:

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

    Managed sync no longer stops on a collision: it keeps a live page whose file still exists, else the file named like the slug, else the first path, and reports the rest as slugCollisions. Do not delete or merge the user's files on your own; renaming is their decision.

  6. Verify:

    gbrain extract timeline --prune-orphans --dry-run   # 0 would be removed
    gbrain doctor --json                                # timeline_orphans and slug_collisions ok
    gbrain timeline <slug>                              # an edited page lists only its current entries
    

If a step fails, keep the doctor output and the dry-run JSON, and do not delete timeline rows, pages or files by hand to make a warning disappear.