Skip to content

docs(bin): clarify fleet freshness is point-in-time - #4

Merged
Hozzy02 merged 3 commits into
mainfrom
fm/fm-clone-freshness-doc
Sep 9, 2026
Merged

Hozzy02 merged 3 commits into
mainfrom
fm/fm-clone-freshness-doc

Conversation

@Hozzy02

@Hozzy02 Hozzy02 commented Sep 8, 2026

Copy link
Copy Markdown
Owner

Intent

Documentation only: make explicit that a session-start project-clone freshness result (bin/fm-fleet-sync.sh) is a point-in-time fact, not a standing guarantee for the rest of the session, so work that depends on current project code refreshes or re-verifies immediately before using that code. Triggered by a concrete incident: a session-start refresh correctly reported a clone current at 13:18, a PR merged at 13:56 advancing origin/main, and at ~14:08 a secondmate found its clone one commit behind and wrongly recorded a durable learning that the refresh 'reports clean while stale' - the report was true when made and went stale afterward, which is expected behavior, not a sync defect. Explicitly out of scope: do not change any sync logic, comparison, or output string in bin/fm-fleet-sync.sh - an investigation already confirmed fm-fleet-sync.sh's clean/current report correctly compares local default against remote-tracking ref after a successful fetch, and a failed fetch already reports 'skipped: fetch failed' rather than falling through to 'already current'. Applied the coding guidelines' knowledge-placement decision tree and one-owner rule: added a 6-line clarification to bin/fm-fleet-sync.sh's header comment block, immediately after the existing description of skipped/fetch-failure reporting, since that script is the single owner of its own report-string semantics (mechanics belong in the script header per the decision tree, and AGENTS.md is size-disciplined and needs no pointer here). Did not duplicate this in AGENTS.md, docs, or bin/fm-startup-network.sh (which only runs the deferred network stage and is not the owner of fleet-sync's report semantics). No agent listed as commit co-author per repo style rules.

What Changed

  • Clarify that successful fleet-sync clone freshness results are point-in-time facts, not session-long guarantees.
  • Direct work that depends on current project code to refresh or re-verify immediately before using it.

Risk Assessment

✅ Low: Captain, the revised documentation-only change accurately limits the point-in-time guarantee to successful freshness results and conforms to all stated scope and ownership constraints.

Testing

No prior baseline results were supplied. Focused inspection, the repository documentation check, and manual evidence verification confirmed that the maintainer-visible header clearly describes freshness results as point-in-time, places the guidance directly after fetch-failure reporting, duplicates it nowhere else, preserves byte-identical executable script content, and adds no co-author trailer; the worktree remained clean.

Evidence: Fleet-sync freshness documentation validation transcript
FLEET-SYNC FRESHNESS DOCUMENTATION - TARGETED REVIEW EVIDENCE

Changed paths from requested base to target:
M	bin/fm-fleet-sync.sh

End-user/maintainer-visible script header at target:
# Every other off-default state - a non-default named branch, a detached HEAD with
# unique commits, a dirty tree, or a diverged default - may hold real work, so it
# is left untouched and reported as a quantified, loud "STUCK: ... N commits behind
# ... - needs attention" warning rather than a quiet drift. Nothing is ever forced,
# stashed, or discarded.
# Still skips (benignly) local-only/no-origin projects, missing remotes/branches,
# and fetch failures.
# Successful clone freshness results ("already current", "synced", or
# re-attached-branch "recovered") describe the moment this run's fetch completed,
# not a standing guarantee for the rest of the session.
# A long session can outlive that moment, because project remotes keep advancing,
# including from this fleet's own merges.
# A clean report going stale later is expected, not a sync defect.
# Work that depends on current project code must refresh or re-verify
# immediately before using that code rather than relying on an earlier report.
# Pruning never deletes the checked-out branch or a branch that still has a
# worktree, so it cannot discard unlanded work; set FM_FLEET_PRUNE=0 to disable it.
# When the fetch fails on an orphaned .git/packed-refs.lock (left by a ref rewrite
# killed mid-write - e.g. a timed-out bootstrap sync or a teardown process kill),

Executable-content comparison (blank lines and full-line comments excluded):
PASS: executable script content is byte-identical between base and target.

One-owner duplication check outside bin/fm-fleet-sync.sh:
PASS: no matching clarification text is duplicated outside bin/fm-fleet-sync.sh.

Documentation audience and owner-pointer check:
fm-doc-audience-check: ok surfaces=70 local_links=261

Commit trailers in branch commits:
PASS: no commit trailers or co-author lines are present.

Pipeline

Updates from git push no-mistakes

✅ **intent** - passed

✅ No issues found.

✅ **Rebase** - passed

✅ No issues found.

🔧 **Review** - 1 issue found → auto-fixed ✅
  • ⚠️ bin/fm-fleet-sync.sh:16 - “Every report” is too broad: sync_project emits several reports before any fetch (invalid directory/repo, local-only, or no origin) and after a failed fetch, so those reports cannot describe when “this run's fetch completed.” Narrow this to successful freshness results such as already current or synced.

🔧 Fix: Narrow fleet freshness wording to successful results
✅ Re-checked - no issues remain.

✅ **Test** - passed

✅ No issues found.

  • git diff --find-renames --find-copies eb627ec7fe31f130f63c143dd1bba9a7ca205664..d247ebebceb924d96aa8bec6dc198d0f8d3ee00c
  • git log --oneline --no-merges eb627ec7fe31f130f63c143dd1bba9a7ca205664..d247ebebceb924d96aa8bec6dc198d0f8d3ee00c
  • rg -n -i "point-in-time|standing guarantee|going stale|refresh or re-verify|already current.*synced|freshness result" --glob '!bin/fm-fleet-sync.sh' .
  • bin/fm-doc-audience-check.sh
  • Compared base and target bin/fm-fleet-sync.sh after excluding blank and full-line comment lines with cmp -s
  • Captured the target header, changed-path scope, one-owner search, executable-content comparison, documentation check, and commit-trailer check in the evidence transcript
  • git status --short
✅ **Document** - passed

✅ No issues found.

✅ **Lint** - passed

✅ No issues found.

✅ **Push** - passed

✅ No issues found.

An investigation found a secondmate recorded a wrong learning after its
clone went stale following a session-start freshness report.
The report was true when made and went stale later; nothing said so.
Documents that in fm-fleet-sync.sh's header, the single owner of its
report-string semantics.
@Hozzy02
Hozzy02 merged commit 9bd0232 into main Sep 9, 2026
13 checks passed
@Hozzy02
Hozzy02 deleted the fm/fm-clone-freshness-doc branch September 26, 2026 00:41
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