Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
81 commits
Select commit Hold shift + click to select a range
0b380ad
Add lane-worktrees: the sweep that retires a lane's abandoned worktrees
brettheap Oct 5, 2026
8b49339
Test the sweep against every row of #162's disposition table
brettheap Oct 5, 2026
7d130ea
Place lane-worktrees as the seventeenth installed file
brettheap Oct 5, 2026
4f2acfb
Document the sweep in the lanes manual
brettheap Oct 5, 2026
7e58b98
Walk the estate for --links with scandir
brettheap Oct 5, 2026
8d2b71b
Keep a test run's bytecode, cache and temp out of the worktree
brettheap Oct 5, 2026
c4d97db
Name the repository's virtual environment on --install
brettheap Oct 5, 2026
c01ec43
Seed the workspace .gitignore with bytecode and cache rules
brettheap Oct 5, 2026
5458571
Refuse a workspace commit whose pathspec carries bytecode
brettheap Oct 5, 2026
23786c2
Run the estate report once a day from lane-start
brettheap Oct 5, 2026
7fdef8a
Report the estate's leftovers with sweep --all --dry-run --report
brettheap Oct 5, 2026
38e090f
Document the estate report and prevention at creation
brettheap Oct 5, 2026
bf066fd
Take Copilot round 1's defects in the sweep
brettheap Oct 5, 2026
ae17742
Document round 1's rules in the lanes manual
brettheap Oct 5, 2026
f4f4915
Merge branch 'feat/lane-worktrees-sweep' into feat/lane-worktrees-report
brettheap Oct 5, 2026
23d84da
Say what expiry_rows keeps now that #168 checks whole archives
brettheap Oct 5, 2026
da7bc59
Stop the suite's whole process group when a run ends
brettheap Oct 5, 2026
b0ea54e
Offer and seed site-packages/ with the other bytecode rules
brettheap Oct 5, 2026
b422d8f
Report duplicate clones with no named checkout, over one estate
brettheap Oct 5, 2026
3c0b188
Take Copilot round 2's defects in the sweep
brettheap Oct 5, 2026
892b02d
Merge branch 'feat/lane-worktrees-sweep' into feat/lane-worktrees-report
brettheap Oct 5, 2026
65f73ed
Refuse bytecode that is already staged, not only what add would stage
brettheap Oct 5, 2026
f5bccbd
Quote the venv paths in the command --install prints
brettheap Oct 5, 2026
dc7971c
Report what the report could not read
brettheap Oct 5, 2026
31db36f
Keep AGENTS.md and README.md within their line caps
brettheap Oct 5, 2026
30cc63a
Assert the flock file only where there is flock
brettheap Oct 5, 2026
5f4bd84
Switch --yes off until #170; keep the gate and exit contract honest
brettheap Oct 5, 2026
296e2f0
Document the --yes switch, lane-root ownership and porcelain escaping
brettheap Oct 5, 2026
9dd63f0
Merge branch 'feat/lane-worktrees-sweep' into feat/lane-worktrees-report
brettheap Oct 5, 2026
0cf1051
Run the suite in the foreground when stdin is a terminal
brettheap Oct 5, 2026
0b7a5c6
Never adopt a standalone clone under the lane's root
brettheap Oct 5, 2026
1484603
Merge branch 'feat/lane-worktrees-sweep' into feat/lane-worktrees-report
brettheap Oct 5, 2026
87da332
Merge remote-tracking branch 'origin/main' into feat/lane-worktrees-s…
brettheap Oct 6, 2026
45fa45d
Merge #168 at main 00971b9 (#121) into the report branch
brettheap Oct 6, 2026
4a79c8c
Fetch the register directly under --yes and refuse when it fails
brettheap Oct 6, 2026
040b12b
Pin the sweep's fetch refspec so --prune cannot delete local branches
brettheap Oct 6, 2026
d71569f
Refuse when a lane root or a registration list cannot be read
brettheap Oct 6, 2026
4b65c30
Walk every estate directory for dependents; a partial scan deletes no…
brettheap Oct 6, 2026
af80118
Read every other lane's control root before granting a tree
brettheap Oct 6, 2026
85365fd
Keep trees whose hidden edits, nested clones, tags or submodule refs …
brettheap Oct 6, 2026
8ec5a9a
Judge an ignored entry by its own name, not an ancestor's
brettheap Oct 6, 2026
d32be5d
Leave other people's open branches alone: rescue, and keep the remote
brettheap Oct 6, 2026
31bbfb1
Rescue before a prune, bundle what only a reflog names, self-check ea…
brettheap Oct 6, 2026
d4724a2
Run the push hooks where git-lfs is configured
brettheap Oct 6, 2026
1e583d1
Keep scratch that holds a tree or a repository
brettheap Oct 6, 2026
741b407
Check --live paths, want the writer count for own trees, stop on NOT …
brettheap Oct 6, 2026
c6ab9f8
Count --branches by origin's own ref, never by upstream or an open PR…
brettheap Oct 6, 2026
2eb5216
Remove a tmp.* only on proof, and read hidden processes as unknown
brettheap Oct 6, 2026
a6fb64b
Document what #170's fixes change in the sweep
brettheap Oct 6, 2026
7e1865a
Hold the existing cases to the register fetch, the untracked bundle a…
brettheap Oct 6, 2026
76011d9
Walk the whole estate only where a removal deletes a directory
brettheap Oct 6, 2026
08ad126
Refuse an inventory row that carries no id
brettheap Oct 6, 2026
5ba0c96
Fail closed when the bytecode check cannot read the pathspec
brettheap Oct 6, 2026
6404f1c
Document G9's id-less row and G13's failed read
brettheap Oct 6, 2026
6ef7c87
Read a .git file that is no pointer as no repository, not as unreadable
brettheap Oct 6, 2026
c550e89
Switch --yes back on: remove LANE_WORKTREES_ENABLE_YES
brettheap Oct 6, 2026
4eb9cbd
Refuse a clone's removal when a reflog directory under it cannot be l…
brettheap Oct 6, 2026
64710fb
Keep a tree whose submodule names an unpublished commit only in its r…
brettheap Oct 6, 2026
968f29d
Archive every ignored entry selected, whatever its ancestors are named
brettheap Oct 6, 2026
573a420
Never remove a cache directory that holds a repository
brettheap Oct 6, 2026
6436450
List an unmarked tmp.* that holds a repository, whatever its age
brettheap Oct 6, 2026
702c2df
Bundle a branch's reflog-only commits and self-check before --branche…
brettheap Oct 6, 2026
8fdb336
Hold back untracked files by the act's own snapshots, and keep untrac…
brettheap Oct 6, 2026
4ea93db
Read a clone's annotated tag through its peeled commit, and bundle th…
brettheap Oct 6, 2026
685cbe3
Document what #174's first Copilot round changes in the sweep
brettheap Oct 6, 2026
9eb473a
Keep a tree whose git directory keeps a submodule repository with wor…
brettheap Oct 6, 2026
b266ce2
Keep a tree whose submodule has a skip-worktree or assume-unchanged e…
brettheap Oct 6, 2026
72970e2
Pass over nothing but .git when proving a removal takes no nested rep…
brettheap Oct 6, 2026
fed0e5c
Read another lane's claims in every .lane-state the whole-estate walk…
brettheap Oct 6, 2026
4fba346
Never push a lane's commits onto a branch gh still answers OPEN, what…
brettheap Oct 6, 2026
a03f5df
Never prune a gone worktree's registration whose git directory keeps …
brettheap Oct 6, 2026
de45178
Keep a clone with a local git-lfs store when its commits would go to …
brettheap Oct 6, 2026
3cdd387
Count a suite's .lock or run.sh marker as provenance only when it nam…
brettheap Oct 6, 2026
de168db
Document what #174's second Copilot round changes in the sweep
brettheap Oct 6, 2026
c538ec1
Read a submodule repository kept under a git directory as that git di…
brettheap Oct 6, 2026
77db871
Keep a tree or registration whose submodule repository has an annotat…
brettheap Oct 6, 2026
499d2ab
Read the gone worktree's kept submodule repository in its regression …
brettheap Oct 6, 2026
c3fd2a2
Merge remote-tracking branch 'origin/main' into feat/lane-worktrees-r…
brettheap Oct 6, 2026
2b7d91a
Adopt a tree by its Lane: trailer only when HEAD's own trailer is thi…
brettheap Oct 6, 2026
801d97d
List every tmp.* sandbox and never remove it; a bare repository is a …
brettheap Oct 6, 2026
4ea84c8
Read other lanes' claims in this sweep's estate only; with no tree, a…
brettheap Oct 6, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
125 changes: 88 additions & 37 deletions docs/README-lanes.md

Large diffs are not rendered by default.

2,122 changes: 1,894 additions & 228 deletions lane-worktrees

Large diffs are not rendered by default.

32 changes: 25 additions & 7 deletions lanes-edit.sh
Original file line number Diff line number Diff line change
Expand Up @@ -1878,17 +1878,27 @@ node_modules/
.venv/
venv/
site-packages/'
bytecode_in_pathspec() { # <repo> <pathspec>...
bytecode_in_pathspec() { # <repo> <pathspec>... 0 read (the paths printed) · 3 a read FAILED
bip_repo="${1-}"; shift || :
[ "$#" -gt 0 ] || return 0
# WHAT THE ADD WOULD STAGE, AND WHAT IS STAGED ALREADY: `add --dry-run` says
# nothing of a path the index already holds at these bytes, and the commit
# takes it all the same. A staged DELETION of bytecode is a cleanup and is
# let through (`--diff-filter=d`).
#
# A READ THAT FAILED IS NO "CLEAN" (#170 G13): a malformed magic pathspec, or
# an index git cannot read, made both reads exit 128 with their stderr thrown
# away and printed nothing, and the check passed. Each status is kept now.
# `add --dry-run`'s 1 is the one answer that is not a failure: it means some
# NAMED path is ignored, which the add would not stage.
bip_add=""; bip_rc=0
bip_add="$(git -C "$bip_repo" add --dry-run --ignore-missing -- "$@" 2>/dev/null)" || bip_rc=$?
[ "$bip_rc" -le 1 ] || return 3
bip_staged=""
bip_staged="$(git -C "$bip_repo" diff --cached --name-only --diff-filter=d -- "$@" 2>/dev/null)" || return 3
{
git -C "$bip_repo" add --dry-run --ignore-missing -- "$@" 2>/dev/null |
sed -n "s/^add '\(.*\)'\$/\1/p"
git -C "$bip_repo" diff --cached --name-only --diff-filter=d -- "$@" 2>/dev/null
printf '%s\n' "$bip_add" | sed -n "s/^add '\(.*\)'\$/\1/p"
printf '%s\n' "$bip_staged"
} |
awk '!seen[$0]++ {
n = split($0, part, "/"); hit = 0
Expand Down Expand Up @@ -1991,7 +2001,9 @@ commit_push() {
|| die "git update-index --force-remove $cp_ren failed — the log is already renamed on disk and git still holds the old path, so nothing was committed. Re-run; if it refuses again, \`git -C $LANES_REPO rm --cached -- $cp_ren\` is the same act by hand." 6
fi
if [ "$cp_add_n" -gt 0 ]; then
cp_byte="$(bytecode_in_pathspec "$LANES_REPO" ${cp_add[@]+"${cp_add[@]}"})"
cp_brc=0
cp_byte="$(bytecode_in_pathspec "$LANES_REPO" ${cp_add[@]+"${cp_add[@]}"})" || cp_brc=$?
[ "$cp_brc" = 0 ] || die "git could not read what this commit would stage (a pathspec it cannot parse, or an index it cannot read), so whether it carries bytecode is unknown; nothing was staged or committed (opensoft/openRepoTools#170 G13)" 2
[ -z "$cp_byte" ] || die "$(bytecode_refusal_text "$cp_byte")" 2
git -C "$LANES_REPO" -c "$CP_EXACT" add -- ${cp_add[@]+"${cp_add[@]}"} || die "git add failed" 6
fi
Expand Down Expand Up @@ -16998,11 +17010,17 @@ EOF
# refuses such a pathspec for every write this file makes; attachments are
# committed by hand, so this is the same question for a person to ask first.
# 0 nothing in those paths would stage bytecode, a cache or an environment
# 2 something would: the paths on stdout, the offer on stderr
# 2 something would: the paths on stdout, the offer on stderr - or git
# could not read what they would stage, which is never "clean" (#170 G13)
# 64 usage
pathspec-check)
[ "$#" -gt 0 ] || die "usage: pathspec-check <path>... (relative to the workspace repository $LANES_REPO)" 64
pck_out="$(bytecode_in_pathspec "$LANES_REPO" "$@")"
pck_rc=0
pck_out="$(bytecode_in_pathspec "$LANES_REPO" "$@")" || pck_rc=$?
if [ "$pck_rc" != 0 ]; then
note "git could not read what that pathspec would stage (a pathspec it cannot parse, or an index it cannot read), so whether it holds bytecode is unknown, and an unknown is never reported clean (opensoft/openRepoTools#170 G13)"
exit 2
fi
if [ -n "$pck_out" ]; then
printf '%s\n' "$pck_out"
note "$(bytecode_refusal_text "$pck_out")"
Expand Down
4 changes: 4 additions & 0 deletions tests/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,10 @@ make_run_root() {
exit 1
}
chmod 700 "$RUN_ROOT" 2>/dev/null || :
# THE RUN'S MARK: `lane-worktrees sweep --include-sandboxes` removes a
# temporary directory only on proof a suite made it (#170 item 1), and this
# pid is that proof for a run root a SIGKILL left behind.
printf '%s\n' "$$" > "$RUN_ROOT/.openrepotools-run" 2>/dev/null || :
export TMPDIR="$RUN_ROOT/tmp"
export PYTHONPYCACHEPREFIX="${XDG_CACHE_HOME:-$HOME/.cache}/openRepoTools/pycache"
venv="${XDG_CACHE_HOME:-$HOME/.cache}/openRepoTools/venvs/openRepoTools"
Expand Down
10 changes: 10 additions & 0 deletions tests/test_lane_helpers.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15600,6 +15600,16 @@ has "…a venv under any name included, by its site-packages" "$out" "$B162_REL
has "…and the line that covers it is among those offered" "$err" "'site-packages/'"
run "$E" pathspec-check "$B162_REL/r1/notes.md"
is "a pathspec with nothing of the kind passes" "$rc" 0
# A READ THAT FAILED IS NO "CLEAN" (#170 G13): a malformed magic pathspec makes
# both git reads exit 128, and the check printed nothing and passed.
run "$E" pathspec-check ':(bogus)x'
is "a pathspec git cannot read is refused, never reported clean" "$rc" 2
has "…saying the read failed" "$err" "could not read what that pathspec would stage"
b162_head="$(git -C "$WIP" rev-parse HEAD)"
run env LANES_LANE=repoA-1 LANES_PATH=':(bogus)x' "$E" commit "attach nothing"
is "…and the commit path refuses it before the add" "$rc" 2
has "…saying so" "$err" "could not read what this commit would stage"
is "…committing nothing" "$(git -C "$WIP" rev-parse HEAD)" "$b162_head"
b162_head="$(git -C "$WIP" rev-parse HEAD)"
run env LANES_LANE=repoA-1 LANES_PATH="$B162_REL" "$E" commit "attach r1"
is "the commit path refuses the same pathspec" "$rc" 2
Expand Down
Loading
Loading