Skip to content

docs(handoff): correct worktree paths after tree relocation; v0.2.0 is published - #138

Merged
AsafMah merged 10 commits into
devfrom
asafmah-worktree-repair-triage
Aug 20, 2026
Merged

docs(handoff): correct worktree paths after tree relocation; v0.2.0 is published#138
AsafMah merged 10 commits into
devfrom
asafmah-worktree-repair-triage

Conversation

@AsafMah

@AsafMah AsafMah commented Aug 20, 2026

Copy link
Copy Markdown
Owner

Important

Merge this after #137. §7 states that the two runTests skip guards were removed in #137. Those guards are still present on dev (SubtypeTest.kt, InputLogicTest.kt) until #137 lands, so merging this first would put a document on dev that describes code dev doesn't have yet.

Corrects docs/HANDOFF.md, which had gone stale in several independent ways.

1. The worktree paths were wrong (§11)

The repo tree moved from C:/Users/mahle/ to C:/Users/mahle/programming/. Git's per-worktree admin records still pointed at the old absolute paths, so git worktree list marked all 24 secondary worktrees prunable — a relocation artifact, not abandonment. git worktree repair with the new paths re-linked every one.

With them visible again, all 24 were triaged (branch, ahead/behind vs origin/dev, merge status, remote containment, PR state, dirty working tree, disk size) and 13 fully-merged worktrees were removed, reclaiming ~5.6 GB. Every branch was kept, so each is restorable with git worktree add <dir> <branch>.

§11 now records the resulting set:

  • Kept: bksp (PR Add source-key action target slides #106), two-thumb-pr (LeanBitLab PR feat(gestures): add step-one tap and gesture combining LeanBitLab/LeanType#240), and three baseline checkouts. check-origin-dev and check-origin-main were re-pointed to current origin/dev/origin/main (5 merges and 2 releases stale). check-upstream-main is documented as tracking whichever upstream tag is currently being integrated — now v4.1.2.
  • Unfinished: six worktrees, since backed up to origin. The section keeps a narrower warning, because a branch push captures commits but not working trees: LeanType-b7a and LeanType-swipe still hold uncommitted changes that exist nowhere else.

Two traps are now documented, both hit during the cleanup:

  • Never reach for git worktree prune when a relocation makes everything look prunable — it drops the admin records and orphans live work. repair is the tool.
  • core.longpaths=true is now set on the repo. Without it git worktree remove dies with Filename too long on worktrees carrying deep Gradle build output, leaving a de-registered but half-deleted directory behind. That happened to two worktrees here; their branches were confirmed intact and merged before the orphans were purged.

2. v0.2.0 shipped, so the headline claim was wrong (§1, §2.3, §5)

The document led with "the single open task: publish the signed v0.2.0 release", blocked on a CI runner outage. That release went out on 2026-08-20 — verified against the API: published, not draft, marked latest, 4 signed APKs; Release run 31128748928 succeeded 2026-08-06 22:04 UTC.

§5 keeps its recipe verbatim — still the correct procedure for the next release — but is reframed from "THE OPEN TASK" to release procedure, generalised to vX.Y.Z, with the outage signature retained so a recurrence is recognised rather than re-debugged.

Also corrected: the stale dev SHA in the §1 table (2c1c828c46ac372de3), the open-PR row (now #106, #134, #136, #137), and §2.3's "signed artifacts were never produced".

3. Both inherited upstream defects are fixed (§7, §12)

§7 described two tests that fail on pristine upstream and are guarded with the runTests skip. Upstream v4.1.2 fixes both, and #137 removes the guards. Verified from raw JUnit XML: pristine v4.1.2SubtypeTest 3 tests / 0 failures; merged tree → the regex test passing; e46454efb removes exactly those two guards and no others.

§7 is kept as history rather than deleted, because the reusable lesson is the technique: reproduce a merge failure on a pristine upstream checkout before blaming your own merge. Neither defect needs reporting upstream; the emoji accelerated-delete bug is reported as LeanBitLab/LeanType#423.

4. §6's failure list is now measured on both sides

The old §6 gave one blanket failure list. It was accurate for dev and wrong for the merge branch. Rather than swap one asserted list for another, both baselines were actually run on the same machine minutes apart:

Baseline Result
origin/dev (6ac372de3) 320 tests, 12 failed
v4.1.2 merge branch 324 tests, 5 failed

The merge-branch set — the autospace-indicator test plus the same four ParserTest failures the CI variant reports — is documented as the current expectation.

Attribution of the seven resolved failures is split by confidence rather than claimed wholesale: the two §7 defects and the Hangul case are safely merge-attributable; StringUtilsTest ×2 and ParserTest > backgroundType are plausible (bundled data/assets do change here) but unconfirmed; XLinkTest > otherLinks makes a live network call and is explicitly not counted as a fix. Same-machine runs control for toolchain, locale and machine state — not for a remote host being reachable.

5. Self-correction before merge

Statements written earlier in this same PR went stale within the hour and were fixed in 44dde85cb rather than shipped as fresh staleness — which would rather defeat the point: the two workflow runs §5 called "still stuck in queued" have since been cancelled, and check-upstream-main had already moved off v4.0.8. Likewise 70ba02846, after the six unfinished branches gained origin backups.

Note on authorship: the asafmah-fix-backspace-paragraph-delete session made the same §5 correction concurrently, landing c35c821a9 here 18 seconds after my own commit. Its effective diff was one additive line — adding #136 to the open-PR row, which I had missed. Reviewed and kept.

Testing

The document is prose, but its testing claims are measured, not asserted: :app:testOfflineDebugUnitTest was run on both origin/dev and the v4.1.2 merge branch, and every figure quoted here comes from the resulting JUnit XML. Other claims were checked against git, the GitHub API, or the filesystem; the repo was scanned to confirm no old-path references remain.

AsafMah and others added 5 commits August 20, 2026 05:56
The repo tree moved from C:/Users/mahle/ to C:/Users/mahle/programming/, which
left every secondary worktree marked `prunable` -- a relocation artifact, not
abandonment. Repaired all 24 with `git worktree repair` and triaged them.

Section 11 now records the post-cleanup worktree set: five kept deliberately
(PR #106, LeanBitLab PR LeanBitLab#240, three baseline checkouts) and six holding commits
that exist on no remote ref. Thirteen fully-merged worktrees were removed
(~5.6 GB); every branch was kept, so each is restorable with `git worktree add`.

Also documents two traps hit here: never reach for `git worktree prune` when a
relocation makes everything look prunable, and `core.longpaths=true` is
required or `git worktree remove` dies on deep Gradle build output and leaves a
de-registered but half-deleted directory.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: a6e8f983-22c2-4f2f-aacd-5316a5924a4d
The removed-worktree list read as if every LeanType-upstream-* worktree was
retired. They are a recurring, short-lived category created by the section 10
merge recipe; one (LeanType-upstream-412, merge/upstream-v4.1.2) was in flight
when the list was written.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: a6e8f983-22c2-4f2f-aacd-5316a5924a4d
…edure

The signed v0.2.0 release went out on 2026-08-20 with all four APKs, so the
document's headline claim -- a single open task blocked on CI runners -- was
wrong. Verified against the API before rewriting: the release is published, is
marked latest, and carries four signed APKs; Release run 31128748928 succeeded
on 2026-08-06 at 22:04 UTC.

Section 5 keeps its recipe verbatim because it is still the correct procedure for
the next release, but is now framed that way rather than as a blocker, with the
outage signature retained so a recurrence is recognised instead of re-debugged.
Also refreshes the stale dev SHA in section 1 (2c1c828 -> 6ac372d) and lists
the real open items in section 12: device verification of #134 and #137,
re-pointing check-upstream-main to v4.1.2, and reporting the emoji
accelerated-delete bug upstream.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: a6e8f983-22c2-4f2f-aacd-5316a5924a4d
Section 5 was still headed "THE OPEN TASK - publish signed v0.2.0", which
is no longer true: v0.2.0 was published on 2026-08-20 with all four
signed APKs and is marked latest. The runner outage that blocked it
resolved on its own; Release run 31128748928 succeeded and produced the
draft.

Reframes section 5 from a blocker into the verified release procedure,
since the recipe itself is still what the next release should follow, and
keeps the outage signature so it is recognised rather than re-debugged.

Also refreshes the TL;DR table (v0.2.0 published, current dev head, the
four open PRs including #134, #136 and #137) and replaces section 12's
"publish v0.2.0" item with the work that is actually outstanding: device
verification of #134 and #137, re-pointing LeanType-check-upstream-main
to v4.1.2 to re-check the two guarded upstream defects, reporting the
emoji accelerated-delete bug upstream, and deciding the fate of the
unfinished worktrees whose commits exist on no remote.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: a88bd77f-d993-44c5-9efc-c7124f0d825e
…v4.1.2

Three statements written earlier in this PR went stale within the hour, so they
are corrected before merge rather than shipped as fresh staleness:

- Section 5 said the two runs stuck in queued could be cancelled; both have since
  been cancelled, so it now reads as history with the recovery command kept for a
  recurrence.
- Section 11 said check-upstream-main was intentionally pinned at v4.0.8 and
  should be re-pointed by whoever merges next. It has already been moved to
  v4.1.2 for PR #137, so it is now described as tracking the tag currently being
  integrated.
- Section 12 listed the re-pointing as an open item. The re-pointing is done; what
  remains is the re-check itself, which is in flight in #137 where the runTests
  guards live.

Also adds a forward pointer in section 7 so its v4.0.8 reproductions are not read
as the current state, and drops the stale cancel-the-zombies chore.

Verified against the API before editing: both runs report cancelled, and the
worktree HEAD resolves to tag v4.1.2.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: a6e8f983-22c2-4f2f-aacd-5316a5924a4d
AsafMah and others added 5 commits August 20, 2026 06:31
Section 7 claimed two tests fail on pristine upstream and are guarded with the
runTests skip. Upstream v4.1.2 fixes both, and PR #137 removed the guards, so the
section described a state that no longer exists.

Verified from the raw JUnit XML rather than taken on report:
- pristine v4.1.2 checkout, SubtypeTest = 3 tests / 0 failures,
  subtypeStaysEnabledOnEdits passing
- merged tree, InputLogicTest = 125 tests / 1 failure, with
  immediateRegexExpansionTriggersForSymbolPrefixedRegex passing
- commit e46454e on origin/merge/upstream-v4.1.2 removes exactly those two
  guards; the guards left elsewhere are unrelated (Linux-only ParserTest
  ordering, XLinkTest network, dictionary-dependent cases, emoji-data versioning)

Section 7 is kept as history rather than deleted, because the reusable lesson is
the technique: reproduce a merge failure on a pristine upstream checkout before
blaming your own merge. Neither defect needs reporting upstream now, so section
12 keeps only the emoji accelerated-delete report.

Section 6's known-failure list is split by baseline, since the merge moved it:
4 debug-variant failures on origin/dev versus 1 on the v4.1.2 branch, v4.1.2
having also fixed insertLetterIntoWordHangulFails. testOfflineRunTestsUnitTest is
unchanged at the 4 ParserTest failures that pass on Linux CI.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: a6e8f983-22c2-4f2f-aacd-5316a5924a4d
Section 6's closing failure list was inherited from the original handoff and
carried forward here without being measured -- the exact staleness this PR exists
to remove. Both baselines have now been run on the same Windows machine minutes
apart:

  origin/dev 6ac372d   320 tests, 12 failed
  v4.1.2 merge branch    324 tests,  5 failed

The old list was accurate for dev and wrong for the merge branch, so it is now
presented as two measured baselines rather than one blanket claim, with the
merge-branch set (autospace-indicator plus the same four ParserTest failures as
the CI variant) called out as the current expectation.

Attribution is deliberately split. The two section 7 defects and the Hangul case
are safely merge-attributable: they are deterministic logic tests and were
separately confirmed fixed on a pristine v4.1.2 checkout. XLinkTest makes real
network calls and StringUtilsTest depends on bundled emoji-data, so their
run-to-run difference is not by itself evidence the merge fixed them, and the
document says so rather than claiming the win.

Also links the emoji accelerated-delete report (LeanBitLab#423, still
present at upstream f0ff166) so it is not filed twice.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: a6e8f983-22c2-4f2f-aacd-5316a5924a4d
Splits the seven resolved failures by how confidently each can be credited to
the merge, rather than lumping them. Both baselines were run on the same machine
minutes apart, which controls for most environment drift but not for a live
network call: XLinkTest > otherLinks hits Codeberg and can flip with no code
change, so it is explicitly not counted as a fix. StringUtilsTest depends on
bundled emoji-data that this merge does update, so it is marked plausible rather
than confirmed.

Also restates the closing rule around the actual hazard: 12 and 5 are both
correct figures for different trees, so neither should be quoted without naming
the tree.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: a6e8f983-22c2-4f2f-aacd-5316a5924a4d
Section 11 warned that the six unfinished worktrees held commits on no remote
ref and that the disk was their only copy. All six have since been pushed to
origin as backups, verified: each local tip is in sync with its origin
counterpart and git branch -r --contains now resolves for every one.

Reframes the risk instead of dropping it, because the backup covers commits and
not working trees. LeanType-b7a still has a modified InputLogic.java and
LeanType-swipe a modified app/build.gradle.kts plus an untracked
app/src/swipetest/, none of which any branch push captured; removing either
worktree would still lose them. The other four are clean.

Also drops the now-wrong no-tracking-branch note on
feat/statistical-swipe-decoder, and rewrites the section 12 item so it reads as
triage without a deadline rather than a race against disk failure.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: a6e8f983-22c2-4f2f-aacd-5316a5924a4d
Section 6 buried the attribution reasoning in a paragraph and grouped
ParserTest > backgroundType with the asset/locale-sensitive cases rather than
with the other bundled-data ones. Restructures it as three labelled tiers so a
reader can see at a glance which claims are load-bearing:

  attributable            - the two section 7 defects and insertLetterIntoWordHangulFails
  plausible, unconfirmed  - StringUtilsTest x2 and ParserTest > backgroundType
  not attributable        - XLinkTest > otherLinks

Also states the control precisely: same-machine, minutes-apart runs cover
toolchain, locale and machine state, but not whether a remote host was
reachable, which is why the network test is excluded rather than merely
hedged.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: a6e8f983-22c2-4f2f-aacd-5316a5924a4d
@AsafMah
AsafMah merged commit 21e0ed1 into dev Aug 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant