Skip to content

feat: harden gbrain self-update — smoke test, auto-rollback, daily catch-up - #11

Merged
El-Kurdi-Chad merged 1 commit into
masterfrom
feat/gbrain-selfupdate-hardening
Aug 19, 2026
Merged

feat: harden gbrain self-update — smoke test, auto-rollback, daily catch-up#11
El-Kurdi-Chad merged 1 commit into
masterfrom
feat/gbrain-selfupdate-hardening

Conversation

@El-Kurdi-Chad

Copy link
Copy Markdown
Contributor

Summary

  • Extracted gbrain self-update from the 04:00 nightly into engine/nightly/gbrain-selfupdate.sh, callable from two places: the nightly, and a new SessionStart catch-up hook (gbrain-update-check.py, rate-limited once/day) — a machine asleep at 04:00 is never more than a day behind.
  • Every update now runs a smoke test (gbrain doctor --fast) after install; a broken pull auto-rolls back to the previous commit instead of shipping a dead gbrain.
  • Result written to ~/.gbrain/last-update.json and surfaced as a one-line block in Profile/memory.md (with the new version's top CHANGELOG bullets) — only when something actually changed, no daily noise.
  • Docs (README, CHANGELOG, CONTRIBUTING, stack.md) updated to match.

Test plan

  • bash -n on every touched/new shell script
  • python3 -m py_compile on the new hook
  • ./test-hooks.sh — 25/25 passing, including 10 new checks: no-op when up to date, memory.md block + changelog surfaced on a real update, last-update.json status, auto-rollback on a failed smoke test, SessionStart daily rate-limiting

https://claude.ai/code/session_01QEFbVY56vJYjVfEkf8Ldww

…tch-up

Extracted self-update from the 04:00 nightly into gbrain-selfupdate.sh so it
can also run from a new SessionStart hook (gbrain-update-check.py), rate
limited once/day — a machine asleep at 04:00 is never more than a day behind.

Every update now runs a smoke test (gbrain doctor --fast) after installing;
a broken pull auto-rolls back to the previous commit instead of leaving a
dead gbrain. Result is written to ~/.gbrain/last-update.json and surfaced as
a one-line block in Profile/memory.md (with the new version's top CHANGELOG
bullets), only when something actually changed.

test-hooks.sh: 25/25 (10 new checks for the two pieces).

Claude-Session: https://claude.ai/code/session_01QEFbVY56vJYjVfEkf8Ldww
@El-Kurdi-Chad
El-Kurdi-Chad merged commit fa7d47d into master Aug 19, 2026
1 check passed
@El-Kurdi-Chad
El-Kurdi-Chad deleted the feat/gbrain-selfupdate-hardening branch August 19, 2026 09:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants