Skip to content

lanes-edit.sh:9322 — commit_push's LOG_RENAMED_FROM is never set for the moved log pathspec, likely already correct (#81 round 9, filed rather than taken) #124

Closed as not planned

Description

@brettheap

Lane: openRepoTools-3 (openRepoTools-3)

Copilot's round 9 review of PR #81 (opensoft/openRepoTools#81, commit 352caa6, submitted 2026-09-16T13:10:36Z) posted this as an inline thread. Filed rather than taken in-PR, under Brett Heap's ruling of 2026-09-16: Copilot is capped at two rounds per pull request and #81 is at nine — this is filed and claimed instead of fixed in-PR. Measured below, so the next round does not have to re-derive it: this one looks like a false positive, but the measurement and the reasoning are left here for a person to confirm rather than closed on this filing's own say-so.

Finding (Copilot, PR #81 thread on lanes-edit.sh:9322)

commit_push only handles a moved log when LOG_RENAMED_FROM is populated: it force-removes that index entry and omits the nonexistent old path from git add. This rename path adds rl_log_old_rel to rl_paths but never sets the variable, so staging receives the just-moved lanes/log/<old>.md path and the four-file rename fails instead of creating the tested commit. Set LOG_RENAMED_FROM to rl_log_old_rel before this call (empty when there was no old log).

Why this looks like it already works

commit_push's LOG_RENAMED_FROM branch exists for a narrower problem than "the old path is gone": its own comment (lanes-edit.sh:~1418) says the old path "matches neither the index nor a directory read that compares exactly" — the case-insensitive-filesystem hazard of a case-only rename (core.ignorecase=false a few lines below is the same guard). rename-lane cannot produce a case-only old/new log pair at all — clause (a)'s own refusal table treats "<old> and <new> are one name under any case" as not a rename (that is Amendment 15(d)'s separate hand act) — so the log's old and new basenames always differ by more than case, on any filesystem.

For that ordinary case, plain git add -- <tracked, now-missing path> already stages the removal — which is exactly what an existing comment two screens above this call already establishes, from a prior round on this same PR (lanes-edit.sh:~9143, Copilot round 3 on #81): "A TRACKED path that has been moved away still matches in the index and git add stages its deletion." rl_log_old_rel is only ever added to rl_paths when that same git ls-files --error-unmatch check confirms it is tracked (lanes-edit.sh:9146-9148), so by the time commit_push sees it, it is exactly the shape that comment already relies on.

Measured directly (a throwaway repo, core.ignorecase=false, no LOG_RENAMED_FROM/update-index --force-remove involved):

$ printf 'a\n' > old.md && git add old.md && git commit -q -m init
$ mv old.md new.md && git add new.md
$ git -c core.ignorecase=false add -- old.md   # the old, now-gone, tracked path
$ echo exit=$?
exit=0
$ git -c core.ignorecase=false diff --cached --name-status
R100	old.md	new.md

git add on the explicit, tracked, now-absent path succeeds and git even detects the rename on its own. Nothing here needed LOG_RENAMED_FROM or a force-removed index entry.

What's left to check

This filing does not rule out every path through rename-lane; in particular it does not re-verify the case where a lane has no old log at all (rl_log_old_rel empty, not added to rl_paths) or interaction with refuse_dirty_checkout's exemption list. bash tests/test_lane_helpers.sh passed at 2803/2803 on this branch (commit 352caa6, and again on a from-scratch rerun after an unrelated sandbox contamination invalidated the first run's tail), which exercises rename-lane committing a moved log without LOG_RENAMED_FROM set — consistent with this being already correct rather than untested. Left for a person to confirm and close, or to say what this filing missed.

Activity

  1. brettheap commented on Nov 10, 2026

    @brettheap
    ContributorAuthor

    Lane: openRepoTools-3

    Verdict: obsolete. It was never a bug (the title says "likely already correct"), and commit_push no longer exists. Closing as not planned.

    • LOG_RENAMED_FROM is given a value in one place, for the case-only ensure_log rename (lanes-edit.sh:4343), and commit_publish reads it at :3178 (both at code main 9a219ed). rename-lane cannot produce a case-only old and new log pair, which is the only case the variable exists for, so it does not need to set it.
    • rename-lane adds the old log to rl_paths only when git tracks it (lanes-edit.sh:18862 at 9a219ed) and publishes with commit_publish "$rl_msg" "${rl_paths[@]}" (:19029).
    • The triage probe copied that sequence in a throwaway repo: add of the live paths and the old tracked-but-gone path under -c core.ignorecase=false, then diff --cached --quiet, then commit by pathspec. Result at 86d635b: add rc 0, commit rc 0, R100 lanes/log/repoOld-1.md renamed to repoNew-1.md, status clean.
    • The issue's other gaps are closed by the code that replaced it. refuse_dirty_checkout has 0 hits at 9a219ed; cs_own_pending is asked over every rl_paths entry before the first byte (:18874). commit_push became commit_publish in 8652321 (Amendment 23 S4, 2026-10-20), landed by Amendment 23 slice 1b: every writer fetches and fast-forwards under its lock or refuses with nothing written, pushes with no pull and reads origin back, a refused push replays the one edit, and commit with nothing staged is the publish act openRepoTools-code#17 (merge a8f6f01, 2026-11-10).
    • No PR was ever opened for it.

    Method: read, not run. Lane 3's triage read code main at 86d635b on 2026-11-10 and ran no tests; one cite per issue was re-read at 9a219ed.

    Brett Heap's word, given in lane openRepoTools-3's session on 2026-11-10 (the NEEDS-BRETT dialog, "Closing the six fixed or obsolete issues": #304, #145, #125, #124, #127 and #91, answered by 12:11:11Z): "Close all six (Recommended)". Its description: "Each gets one evidence comment and is closed, and lane 3 releases its claim on it."

    🤖 Generated with Claude Code

  2. brettheap commented on Nov 10, 2026

    @brettheap
    ContributorAuthor

    RELEASED — lane openRepoTools-3, session 83619980-06bb-4469-ae73-2a8c5e61981a@Eagle, 2026-11-10T12:44:38Z, for #124 — closed as obsolete; evidence 6767596277

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions