flake-update-cascade commits and pushes to any workspace repo, including third-party checkouts with a GitHub origin #172
Labels
No labels
blocked
bug
decision
duplicate
enhancement
help wanted
invalid
landed?
question
ready-to-merge
stale
wontfix
bug
duplicate
enhancement
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
allod/tools#172
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
flake-update-cascadein its default mode committed a lock update on the default branch of a third-party upstream checkout living under the workspace root, whoseoriginishttps://github.com/..., and then rangit pushagainst it, which stopped atUsername for 'https://github.com':. The push never completed, so nothing reached GitHub, but the tool had already committed to that repository'smainand was one credential away from pushing to a remote outside the forge.Symptom
Run on 2026-09-08 on the host, in default (direct-commit) mode, with the input list
flake-status --upstreamsuggested. Every workspace repository with aflake.lockwas processed; the last one was the upstream checkout:The input names that pulled that repository into the run (
crane,dart-overlay,rust-overlay) came from theOutdated (external)suggestion line offlake-status --upstream, which lists inputs from every repository under the workspace root without distinguishing forge repositories from third-party checkouts.Evidence
The documented pre-flight checks are: not on the default branch, dirty working tree, unpushed commits, no
flake.lock, input absent or afollows, and a~/.config/git/protected-branchesentry. None of them looks at whereoriginpoints. On this host the checkout was not listed inprotected-branches, so it was eligible, and the direct-mode path is commit thengit pushwith no remote check between them.The same run also committed and pushed directly to the
masterof four framework repositories, which is the documented default-mode behaviour when they are not listed inprotected-brancheson the machine running the tool.Recovery was
Ctrl+Cat the prompt andgit reset --hard origin/mainin the upstream checkout.Fixed on master by
536c8b3(flake-update-cascade: refuse repositories whose origin is outside the forge), which landed the same day this was filed and predates the Go port that followed it.What the tool does now, in every mode including the direct-commit default: a repository whose
originis not the forge and is not listed in~/.config/git/allowed-external-remotesis skipped with a notice and is never pulled, updated, committed to, or pushed. The README documents it under the pre-flight checks, andtests/flake/flake-update-cascade/external-remote.shpins it against exactly this shape, a checkout with ahttps://github.com/...origin, asserting the skip notice and the absence of any git mutation, plus the allowlist path for a deliberately permitted external remote. The suite runs undernix flake check.The
Outdated (external)line fromflake-status --upstreamstill names inputs from every repository under the workspace root, third-party checkouts included, so the suggested command can still list an input that only such a checkout pins. That is now harmless: the cascade reports the skip and touches nothing. The separate defect in that line, comparing every pin to the default branch, was allod/tools#170 and is fixed.