Skip to content

New-branch launches can be based on a stale cache without saying so #244

Description

@blooop

Destination

A branch dl cuts for a wf ticket — the shape wf hands it for every agent launch,
dl owner/repo@wayfinder/<repo>-<n> — is based on the remote's current default-branch
tip, or the launch says out loud that it isn't. Done when no arm of new-branch creation
can silently base the branch on a stale cache, and tests pin each arm.

Notes

Single-ticket map: known work, no fanning.

The happy path is already correct and already pinned — ensure_branch
(workspace_clone.py:504) fetches the requested ref, gets RefMissingOnRemote for a
brand-new wf branch, then fetches the default branch before basing on it, and
test_a_brand_new_branch_starts_from_the_current_default_branch
(test/integration/test_repo_manager_real.py:318) covers it. This map is about the
three degraded arms beside it, each of which logs a warning and proceeds from a cache
of unbounded age.

Constraint that shapes the fix: the fetch policy here was decided in
#144 and built in
#149/#150.
Launch-from-cache on an unreachable remote is deliberate and pinned by
test_an_unreachable_remote_launches_from_the_cache. So the answer is not "refuse to
launch" and not a broad +refs/heads/* fetch on the foreground path — it is making the
staleness legible to the caller.

Skills: wf-tdd to build (red before green), wf-review in fresh context.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions