pull-all and flake-update-cascade: skip a host-provided checkout #269

Merged
vnprc merged 3 commits from agent/skip-host-provided into master 2026-10-01 20:59:07 +01:00
Member

pull-all and flake-update-cascade now skip a checkout that has no origin remote, naming it as host-provided, instead of failing on it. On a dev machine whose memory checkout is injected by the hypervisor, pull-all stops printing an error row for it and flake-update-cascade never reaches a default-branch or forge-name lookup on it. Every other checkout is handled byte-for-byte as before, which the existing suites prove. The rule is inspection only: no registry field, no list to keep in sync. What proves it: 38 pull-all cases (3 new), the cascade suites, and two Go tests for the predicate and the preflight skip. If it is wrong, revert; the change only decides what gets skipped.

Closes allod/tools#268
Refs allod/strategy#62

Risk

R2: a localized behavior change in two walkers, with the new predicate failing closed (a directory where git remote fails is not treated as host-provided). The worst credible failure after validation is a checkout skipped that should have been pulled, visible in the tool's own output. Rollback is a straight revert.

Validation

  • bash tests/workspace/pull-all.sh: 38 passed, including the exact skip row in both modes, exit status 0, and a non-repository directory not classified as host-provided.
  • go vet ./... && go test ./... under nix develop: all packages ok; every cascade suite green including external-remote.
  • allod check: all 11 steps passed (9 checks built).
  • Sabotage: inverting the bash predicate failed the pull-all suite; keying the Go predicate on any remote failed its unit test; swallowing a failed git remote and restoring the old check order each failed their new cases; all restored.
  • One cold cross-family review (codex gpt-5.6-sol): its skip-order and fail-closed findings and four comment items were fixed in the second commit; its empty-origin-URL finding describes pre-existing behavior and was not acted on.
`pull-all` and `flake-update-cascade` now skip a checkout that has no `origin` remote, naming it as host-provided, instead of failing on it. On a dev machine whose memory checkout is injected by the hypervisor, `pull-all` stops printing an error row for it and `flake-update-cascade` never reaches a default-branch or forge-name lookup on it. Every other checkout is handled byte-for-byte as before, which the existing suites prove. The rule is inspection only: no registry field, no list to keep in sync. What proves it: 38 pull-all cases (3 new), the cascade suites, and two Go tests for the predicate and the preflight skip. If it is wrong, revert; the change only decides what gets skipped. Closes allod/tools#268 Refs allod/strategy#62 ## Risk R2: a localized behavior change in two walkers, with the new predicate failing closed (a directory where `git remote` fails is not treated as host-provided). The worst credible failure after validation is a checkout skipped that should have been pulled, visible in the tool's own output. Rollback is a straight revert. ## Validation - `bash tests/workspace/pull-all.sh`: 38 passed, including the exact skip row in both modes, exit status 0, and a non-repository directory not classified as host-provided. - `go vet ./... && go test ./...` under `nix develop`: all packages ok; every cascade suite green including `external-remote`. - `allod check`: all 11 steps passed (9 checks built). - Sabotage: inverting the bash predicate failed the pull-all suite; keying the Go predicate on any remote failed its unit test; swallowing a failed `git remote` and restoring the old check order each failed their new cases; all restored. - One cold cross-family review (codex gpt-5.6-sol): its skip-order and fail-closed findings and four comment items were fixed in the second commit; its empty-origin-URL finding describes pre-existing behavior and was not acted on.
A checkout under ~/work with no origin remote is host-provided (the
hypervisor's injection step is git init plus a push, never a clone),
not a repository misconfiguration. pull-all now recognizes it and
reports a skip instead of a pull error; flake-update-cascade drops it
before any default-branch or forge-name lookup instead of reporting
it not on its default branch.

lib/workspace.sh gains workspace_repo_is_host_provided, mirrored in
Go by cmd/flake-update-cascade/workspace.go's repoIsHostProvided, so
both tools share one predicate. It inspects `git remote`, not `remote
get-url origin`: a dangling URL still counts as having an origin.

Refs allod/tools#268
- flake-update-cascade: check repoIsHostProvided before the flake.lock
  check, so a host-provided checkout with no lock is still reported as
  the no-origin skip rather than skip:no-lock.
- workspace_repo_is_host_provided: a failing `git remote` now means
  "not host-provided", matching the Go predicate's !ok -> false. New
  pull-all case covers a directory git itself refuses.
- Trim both predicates' comments to contract plus trap; drop narration
  comments from the two new Go tests.

Refs allod/tools#268
vnprc approved these changes 2026-10-01 20:59:01 +01:00
vnprc merged commit e312e6c0ad into master 2026-10-01 20:59:07 +01:00
vnprc deleted branch agent/skip-host-provided 2026-10-01 20:59:07 +01:00
Sign in to join this conversation.
No description provided.