Checkout walkers skip a host-provided checkout, recognized by having no origin #268

Closed
opened 2026-10-01 17:13:39 +01:00 by allod-agent · 0 comments
Member

pull-all and flake-update-cascade treat a checkout under ~/work that has no origin remote as host-provided and skip it with a named reason, instead of failing on it.

Part of allod/strategy#62.

Primary goals:

  • The rule is inspection, not a list — a checkout whose git remote output names no origin is host-provided. That is the contract the hypervisor's injection step establishes (allod/nexus#73: git init plus a push, never a clone), so no registry field or config is consulted and nothing has to be kept in sync.
  • pull-all reports it as skipped — today a host-provided checkout prints error [pull failed: There is no tracking information for the current branch.]; it prints skipped [host-provided: no origin] instead, and the exit status is unaffected either way.
  • flake-update-cascade leaves it alone — a no-origin checkout is dropped from the repository set before any default-branch or forge-name lookup and named once in the output as skipped, so a run no longer reports it as "not on default branch" or fails its forge-name resolution.
  • One shared predicate — lib/workspace.sh gains workspace_repo_is_host_provided <dir> and cmd/flake-update-cascade/workspace.go mirrors it, the same way defaultBranch mirrors workspace_repo_default_branch.

Current state and specifics

lib/workspace.sh workspace_collect_repos enumerates every repository root under WORK_DIR with no remote check, and workspace_repo_default_branch fails on a repo without origin/HEAD. workspace/pull-all process_repo runs git pull on every collected repo and turns the failure into an error row. cmd/flake-update-cascade/workspace.go repoForgeName and defaultBranch both read origin and report false without it, which main.go surfaces as a per-repo error rather than a skip. work-diff already renders such a checkout and needs no change; flake-status skips a checkout with no flake.lock, which a memory checkout never carries, so it needs no change either.

Scope

In scope: lib/workspace.sh, workspace/pull-all, cmd/flake-update-cascade/workspace.go and main.go, with cases in tests/workspace/pull-all.sh and cmd/flake-update-cascade/main_test.go. Tracked elsewhere: allod change cleanup's unpushed-commit guard answering "nothing unpushed" on a repo with no remote base (allod/tools#127), the injection step itself (allod/nexus#73), and the inventory marker (the allod/inventory child of allod/strategy#62).

`pull-all` and `flake-update-cascade` treat a checkout under `~/work` that has no `origin` remote as host-provided and skip it with a named reason, instead of failing on it. Part of allod/strategy#62. Primary goals: - **The rule is inspection, not a list** — a checkout whose `git remote` output names no `origin` is host-provided. That is the contract the hypervisor's injection step establishes (allod/nexus#73: `git init` plus a push, never a clone), so no registry field or config is consulted and nothing has to be kept in sync. - **`pull-all` reports it as skipped** — today a host-provided checkout prints `error [pull failed: There is no tracking information for the current branch.]`; it prints `skipped [host-provided: no origin]` instead, and the exit status is unaffected either way. - **`flake-update-cascade` leaves it alone** — a no-origin checkout is dropped from the repository set before any default-branch or forge-name lookup and named once in the output as skipped, so a run no longer reports it as "not on default branch" or fails its forge-name resolution. - **One shared predicate** — `lib/workspace.sh` gains `workspace_repo_is_host_provided <dir>` and `cmd/flake-update-cascade/workspace.go` mirrors it, the same way `defaultBranch` mirrors `workspace_repo_default_branch`. ### Current state and specifics `lib/workspace.sh` `workspace_collect_repos` enumerates every repository root under `WORK_DIR` with no remote check, and `workspace_repo_default_branch` fails on a repo without `origin/HEAD`. `workspace/pull-all` `process_repo` runs `git pull` on every collected repo and turns the failure into an `error` row. `cmd/flake-update-cascade/workspace.go` `repoForgeName` and `defaultBranch` both read `origin` and report false without it, which `main.go` surfaces as a per-repo error rather than a skip. `work-diff` already renders such a checkout and needs no change; `flake-status` skips a checkout with no `flake.lock`, which a memory checkout never carries, so it needs no change either. ### Scope In scope: `lib/workspace.sh`, `workspace/pull-all`, `cmd/flake-update-cascade/workspace.go` and `main.go`, with cases in `tests/workspace/pull-all.sh` and `cmd/flake-update-cascade/main_test.go`. Tracked elsewhere: `allod change cleanup`'s unpushed-commit guard answering "nothing unpushed" on a repo with no remote base (allod/tools#127), the injection step itself (allod/nexus#73), and the inventory marker (the allod/inventory child of allod/strategy#62).
vnprc closed this issue 2026-10-01 20:59:07 +01:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
allod/tools#268
No description provided.