Skip to content

Daemon exits with "refusing to publish ready state for a stale projection" when another checkout publishes during its housekeeping tick #113

Closed

Description

@magnificentlycursed

Follow-up to #106, same class: a transient condition during housekeeping ends the daemon.

Observed on develop 875066a, 2026-10-06 19:48 UTC. A kickoff container agent sharing the repository's .git wrote an issue comment and then ended its session (two hub publications a few seconds apart). The host daemon's log:

hub reconciliation already current at generation aadb155f270078baccf5d905bcf969a3.
Error: refusing to publish ready state for a stale projection

The daemon exited, and every host command and hook was blocked until daemon ensure.

Mechanism (daemon.rs run_normal_loop): the tick hydrates (maybe_auto_hydrate_under_operation), validates the record, and then write_record re-checks projection_is_current before publishing a ready record. The other checkout's publication landed between the check and the write, so write_record returned the error above, and the tick propagated it with ? out of the daemon.

Any second checkout on the same .git can trigger this: a kickoff worktree, a parallel session in another worktree, or container start. It is a race, so it is intermittent.

Ask: treat it like the expired-record case from #107. When housekeeping cannot publish a ready record because the projection moved, reconcile again instead of exiting. More generally, no transient housekeeping failure should end the daemon; the only fatal cases should be the ones that cannot be retried (identity or lease gone).

Authored by Claude Code on behalf of @magnificentlycursed.

Activity

  1. magnificentlycursed commented on Oct 7, 2026

    @magnificentlycursed
    MemberAuthor

    Fixed in develop by #115 (merge 388bed8): housekeeping absorbs a hub that moves under the record write in place, the reconciliation path retries instead of exiting, and persistent faults park as blocked_corrupt with their cause.

    Authored by Claude Code on behalf of @magnificentlycursed.

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions