Skip to content

git-reconcile hard-disable (#969/#970) left two user-facing side effects unaddressed #976

Closed

Description

@fdaviddpt

The v0.42.1 hard-disable of hooks.d/after_save/60-git-reconcile.sh (#969/#970) landed the kill switch itself, but two downstream effects of that change were explicitly deferred, logged as trap.d fragments during the same lane's self-review, and are both still true at HEAD as of this curate pass (2026-10-07).

1. The kill-switch notice pollutes hook-errors.log for every user, every save, forever -- including the default-disabled majority. hooks.d/after_save/60-git-reconcile.sh:102 now unconditionally runs report_error "git-reconcile" "disabled pending #969 ..." on every successful save for every installed user, BEFORE the git_reconcile.enabled read -- confirmed at HEAD: that report_error call is still the very first thing the hook does, ahead of the RECONCILE_ENABLED check. Confirmed by a control with enabled:false: rc 0, and hook-errors.log still gets the [git-reconcile] disabled pending #969 ... line appended.

Effect: /remember:doctor (scripts/doctor.sh) reports WARN hook-errors.log is non-empty permanently; its tail -n 5 fills with this line within about 5 saves, so a real error scrolls out and the "Recent errors" check is effectively disabled; rotate_logs only ages memory-*.log, so this file grows one line per save with no limit. It also breaks the contract in tests/test_haiku_failure_reaches_hook_errors_694.py ("an ordinary successful save must not write anything to hook-errors.log") -- invisible to that test because its stub plugin ships no hooks.d/.

Possible fix (not applied here): read git_reconcile.enabled only to decide whether to print the notice, while keeping the exit 0 itself unconditional -- that preserves the kill switch's own unconditional guarantee while stopping the notice from reaching users who never opted in.

2. Two other hooks still promise the disabled behavior will happen automatically. Hard-disabling 60-git-reconcile.sh left prose in two sibling files describing the OLD, now-false behavior, confirmed unchanged at HEAD:

  • hooks.d/after_save/50-git-backup.sh (~lines 505, 519): when git_reconcile.enabled=true and a push is rejected, the log line and the git-backup-notice both still say "git_reconcile.enabled is on, so the next after_save run (60-git-reconcile.sh) may fetch, rebase and push this automatically" -- false, since the hook now exits before reading that flag at all.
  • hooks.d/before_session_start/50-git-restore.sh (~lines 624-638): the DIVERGED log line and git-restore-notice make the identical promise on the restore side -- "may rebase and push this automatically ... do not act on this by hand until you have checked whether it already resolved itself." A diverged store now waits on a resolution that will never come while the kill switch is in place.

Not fixed in the original #969 diff because 50-git-backup.sh's wording is under a protected, named test contract (tests/test_git_backup_push_rejected_253.py::TestTheRejectionNoticeRespectsReconcile, from #935) with assertions keyed to the pre-#969 behavior where reconcile really does act automatically when enabled -- correcting the prose means rewriting that test class's assertions too, a decision (does #935's enabled/disabled distinction collapse entirely while #969 is open, or does the wording just get a "currently inert" caveat?) better made alongside whatever re-enables the hook, not as a one-off patch. scripts/user-prompt-hook.sh's routing-table comments (~lines 367-369, 375-379) make the same now-false claim as internal documentation only, lower impact.

Note the historical irony for whoever picks this up: #935 originally fixed "the log falsely promises nothing will auto-resolve when reconcile actually will"; this is "the log falsely promises something will auto-resolve when reconcile (temporarily) never will" -- same notice, same two knobs, opposite direction, now wrong depending on whether #969's kill switch is still in place.

[AI-generated]

Activity

  1. added
    priority:medium
    filed-by-loop
    lane-storage
    priority:high
    and removed
    priority:medium
    on Oct 7, 2026
  2. fdaviddpt commented on Oct 7, 2026

    @fdaviddpt
    ContributorAuthor

    Raised to priority:high (scheduler ruling). Part 1 is a regression that shipped to every v0.42.1 user, not only those who opted into reconcile. Every save appends a line to hook-errors.log, with no size limit. As a result /remember:doctor warns permanently, and real errors scroll out of its "Recent errors" tail. Part 1 should go out as v0.42.2 promptly, without waiting for the usual 10-merge trigger. Part 2 (the stale backup/restore prose) can ship in the same PR.

    [AI-generated]

  3. self-assigned this
    on Oct 7, 2026
  4. added a commit that references this issue on Oct 8, 2026
  5. removed their assignment
    on Oct 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    filed-by-looplane-storagepriority:high

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions