Commit 8f5bd54
docs(worktree): the FENCE UNAVAILABLE list names every unplaceable shape (#1246)
prune-merged.ps1's header said the fence is available given "at least one
config root with a session registry, at least one readable record, and NO
record that failed to parse". That named one of three unplaceable shapes.
READ FROM Get-WorktreeOccupancy IN scripts/coord/occupancy.ps1, not from the
comment it replaces. The prior text is the thing under test, so it is not
evidence of anything. Line numbers below are that function at 05a37c1.
Available is withheld on FIVE conditions, not three:
253-261 $worktrees.Count -eq 0 RepoFound false
277-285 catch around Get-ClaudeConfigRoots / Get-SessionRecords
333-335 $roots.Count -eq 0
336-340 $faults.Count -gt 0
341-343 $records.Count -eq 0
THE SHAPE THAT MATTERS IS NOT THE COUNT, IT IS THE SPLIT. Four of the five mean
the fence could not look: nothing was examined, so nothing is cleared. The
fifth means it looked and found a session it cannot place. That is the only
refusal resting on positive evidence -- a session demonstrably exists, the
fence cannot say which tree it is in, and the tree could be the one the run is
about to delete. A flat list of five loses that, so the paragraph is now two
bullets and not an enumeration.
The unplaceable family has three shapes, built at 291-292 (a file that will not
parse), 301-305 (parses, carries no cwd) and 327-328 via
Get-UnplaceableCwdReason (a cwd that is a checkout of this repo which
`git worktree list` no longer carries). The third is the state this script's own
incident produces: deregister a worktree out from under its occupant and that
session's recorded cwd names a checkout git has stopped listing. The header
already tells that incident eleven lines above and did not connect it.
TWO THINGS A READER WOULD OTHERWISE RE-DERIVE, both now stated:
The ladder tests faults BEFORE the empty-record count, so a registry holding
nothing but unreadable files reports the unplaceable record rather than "not one
readable record".
RepoFound false reaches the Available gate on the SECOND read. RepoFound appears
exactly once in this script (line 227, which exits at 230), but the re-check
before each removal at 1101 reads $occ2.Available alone, and 1107-1110 prints
that Detail and skips. An earlier draft of this paragraph said the condition
never surfaces here. It was wrong and is recorded rather than quietly dropped,
because the reason it was wrong -- one guarded call site read as the only call
site -- is the error a later reader would repeat.
NO BEHAVIOUR CHANGE. Comment text only, inside the .DESCRIPTION help block.
Measured on the patched file, each zero beside a control that fired:
cp1252-unencodable characters 0, against a control where U+2500 fires and U+2014
deliberately does not, since tests/test_cp1252_console_safety.py gates on
encodability rather than on ASCII; non-ASCII 0, control ord(U+2014) > 127 true;
tabs 0 and trailing-whitespace lines 0, both detectors fired on planted text;
.DESCRIPTION block max width 104 with nothing over it, unchanged from before
this change, and the added lines top out at 103. The PowerShell parser reports 0
errors over the whole file. The patch applies to origin/main with `git apply
--check`, and the same patch is refused against a subject with line 84 mutated,
so the clean apply is attributable.
Get-Help was ATTEMPTED AND DISCARDED as a check: run against a bare path it
returns 0 description characters and the generic "SHORT DESCRIPTION" synopsis
for the unpatched file too, so it measured nothing either way.
WHAT I DID NOT VARY. scripts/coord/occupancy.ps1 was read at 05a37c1 and is
not touched here. Two sibling drifts of the same family are NOT fixed in this
commit and are not mine to widen into: docs/WORKTREES.md:225-232 restates the
shapes by count and still says "Two shapes qualify", and
scripts/coord/presence.ps1:180 prints "Nothing was examined" on an unavailable
roster, which is false on the fault path and was already false before this work.
prune-merged.ps1:856-857 does not have the second defect: it interpolates
$occ.Detail and adds no claim of its own.
Co-authored-by: wshallwshall <mefordev@messagefoundry.org>1 parent 852a3fa commit 8f5bd54
1 file changed
Lines changed: 23 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
80 | 80 | | |
81 | 81 | | |
82 | 82 | | |
83 | | - | |
84 | | - | |
85 | | - | |
86 | | - | |
87 | | - | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
88 | 106 | | |
89 | 107 | | |
90 | 108 | | |
| |||
0 commit comments