Skip to content

Lifecycle-Long Stale-Base Prevention & Mid-Task Worktree Sync

Choose a tag to compare

@Foxfire1st Foxfire1st released this 10 Jun 08:42
· 34 commits to main since this release
f62c732

Agents Remember 2.8.0

Base-currency becomes a lifecycle-long guarantee (GitHub #54): every stage of a task — session start, worktree start, and mid-task — can now see when its view of the official line went stale, and pull the official line in safely instead of silently building on old code and memory.

Highlights

  • Stale-base preflight: worktree_start refuses to base a new worktree on a source branch that is behind or diverged from its remote — with stale_base_choice="fast-forward" (the tool fast-forwards and proceeds) or "proceed-stale" recoveries. A stale base doesn't just produce wrong code: it silently defeated the provider seed fast-path into a multi-minute reindex.
  • New worktree_sync tool: pull a moved official line into a live worktree atomically — the new code tip must be ledger-mapped at the official memory tip, the code work branch merges (conflicts abort cleanly), parked memory fast-forwards, and the contract's recorded base pair advances with a durable sync_log. Sync early — before memories are written — and end-of-series integration stays ff-only with no carryover reconciliation.
  • Memory main keeps up: memory_carryover_apply now fast-forwards memory main to the official checkout tip (memory_main_advance), so cycles run on non-main source branches no longer leave memory main behind indefinitely.

Freshness Checkpoints

  • context_packet gains an opt-in include_freshness section: upstream ahead/behind for the code and memory checkouts plus ledgerMapsCodeHead, forming the lifecycle-start trust checkpoint (the l-01 skill opts in).
  • worktree_status carries a fetch-free freshness block (recorded base pair vs local source tips) with a syncHint recommending worktree_sync — network-free, so the background provider-setup polling loop stays fast.
  • A missing external-memory source branch is auto-created at the official memory tip using the code source branch name as template — one less manual step before worktree_start.

Onboarding And Memory

  • Runtime skills (l-01, c-09, c-11) teach the three checkpoints and the sync-early-before-memories doctrine.
  • The providers.context facade import-order fix (landed with 2.7.0) is now pinned by fresh-interpreter regression tests on Python 3.11.
  • Change-notification ping transport for the freshness payload is tracked as follow-up #60.