Skip to content

fix: persist shell-only git identity; helper survives offline regeneration; sync status scans the whole run - #68

Merged
mustafa-bharmal-shipveho merged 2 commits into
mainfrom
fix/git-identity-persist
Sep 8, 2026
Merged

mustafa-bharmal-shipveho merged 2 commits into
mainfrom
fix/git-identity-persist

Conversation

@mustafa-bharmal-shipveho

Copy link
Copy Markdown
Owner

Summary

  • Follow-up to feat: v0.7.0 reliability overhaul (daemon, honest telemetry, health chain) #67 closing the findings of the fifth staff review (reports/code-review-claude-followup3.md, APPROVED WITH SUGGESTIONS) and Codex pass 5 (one P2) on the last four commits of that PR, which landed after the previous review round.
  • No behaviour change for a machine with a configured git identity or a healthy network; the three fixes are about degraded environments (identity only in the shell, offline pip, a sync run blocked by a missing scan gate).

Changes

Installer (install.sh, bin/install-recall-cli.sh)

  • An identity that exists only in the installing shell (EMAIL, GIT_AUTHOR_EMAIL, GIT_COMMITTER_EMAIL) is persisted into the brain's .git/config, so the hourly sync.sh — launchd, minimal environment — can keep committing. Before, only the seed commit worked and every later auto-commit died with "Author identity unknown". A configured git identity is still left alone; no identity anywhere still gets the brainstack <brainstack@localhost> placeholder. (Codex pass 5, P2; follow-up 3, M2.)
  • Regenerating a stale recall wrapper needs the network (pip's build isolation downloads hatchling). Offline, the bare call under set -e ended the helper before its own warning and before the ~/.local/bin symlink step. It now warns with the exact command to run later and falls through. (Follow-up 3, M1.)

Pending-review renderer (agent/tools/render_pending_summary.py)

  • _check_sync_status scanned only the run's last sync: line. The scan_gate-missing path logs its marker and then a sync: reinstall … hint, so that run classified as ok and blocked-scanner was unreachable. It now scans every sync: line of the last run, newest first, down to and including the terminal marker. (Follow-up 3, M3; pre-existing.)

Testing

  • New tests: shell-only identity persisted (GIT_*_EMAIL and EMAIL-only, each followed by a commit from a bare environment), git-config identity left alone, failed regeneration warns and still symlinks, blocked marker behind a trailing sync: line, previous run's block not inherited.
  • Targeted files green (installer suite 23 passed; parsers/status/sync 180 passed); hermetic suite running on this branch and in CI.

🤖 Generated with Claude Code

…o scheduled syncs can commit

Codex review pass 5 (P2). With only EMAIL (or GIT_AUTHOR_EMAIL /
GIT_COMMITTER_EMAIL) exported and no git user.email configured, the seed
commit succeeded on that transient identity and the installer wrote no
repo-local one; agent/tools/sync.sh then ran from launchd's minimal
environment and every auto-commit died with 'Author identity unknown'.

The installer now branches on whether git CONFIG has an email: if not, it
persists the shell's identity (committer > author > EMAIL; name from the
same variables, else the account's full name) into the brain's .git/config,
or the brainstack <brainstack@localhost> placeholder when the shell has
none either. A configured identity is left alone. Tests cover the three
cases and prove a later commit from a bare environment succeeds.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…atus scans the whole last run

Staff review follow-up 3, MINOR items M1 and M3:

* bin/install-recall-cli.sh — regenerating the console script needs the
  network (pip's build isolation downloads hatchling). Offline, the bare
  pip call under set -e ended the helper before its own warning and before
  the ~/.local/bin symlink step; --upgrade swallowed that with || true. The
  call is now wrapped: warn with the exact command to run later, and fall
  through to the symlink step.

* render_pending_summary._check_sync_status read only the run's LAST
  'sync:' line. The scan_gate-missing path logs its marker and then a
  'sync: reinstall ...' hint, so that run classified as ok and
  blocked-scanner was unreachable for it. The status now scans every
  'sync:' line of the last run, newest first, down to and including the
  terminal marker (a new _last_run_sync_lines helper; _in_last_run assumes
  the marker is a run's last line and would have hidden exactly this case).

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@mustafa-bharmal-shipveho
mustafa-bharmal-shipveho merged commit 1b9f00d into main Sep 8, 2026
3 checks passed
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.

1 participant