Skip to content

Stale-mount auto-refresh targets a stale directory and can never heal; staleness is not surfaced in status #219

Description

@khaliqgant

The daemon detects a stale local mount and tries to refresh it, but the refresh targets a hardcoded directory rather than the workspace's currently registered one, so it can never succeed:

[factory] local mount is stale (last reconcile 4499m ago); refreshing
[factory] local mount is stale (last reconcile 4499m ago) and auto-refresh failed
  (relayfile mount start failed (exit 1): error: workspace rw_7ccfea89 is already
   mirrored at .../chief/.integrations; refusing to silently re-home it to
   .../pear/.integrations.)

4499 minutes is just over three days. The mirror had been serving three-day-old data with no surfaced signal, and the one mechanism meant to heal it was structurally incapable of doing so — it attempts to re-home to a path the workspace is no longer registered at, which relayfile correctly refuses.

Why this one bites hard: a stale projection does not look broken. Directory listings still return files, so anything counting or reading from the mirror gets a plausible, wrong answer. This exact failure produced a report of "3,121 open pull requests" from a projection directory when the live API count was 303.

Expected:

  1. Auto-refresh resolves the target from the workspace registration (~/.relayfile/workspaces.json localDir), or omits LOCAL_DIR entirely so relayfile uses the registered directory.
  2. When refresh fails, the staleness is surfaced, not just logged — factory status returns "slackDegraded": false and clean JSON while reading a three-day-old mirror. A mount older than the sync interval by some multiple should show up in status as degraded.

Related: the per-repo mount design in the companion issue is what put the registration and the refresh target out of sync in the first place.

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