Skip to content

Three reads left after #230 still turn a failure into an answer: remote_log_events' ls-tree, a present skip-worktree archive, and log_files_named_ci's other callers #248

Open

Description

@brettheap

Three non-blocking notes from the Opus review of PR #230, left after it. PR #230 fixes the lanes-edit.sh items of #138 (items 1, 2, 4, 5, 7–12, 17 and 18) and #157 item 4b. Each note below is a read that still turns a failure into an answer, next to one #230 closed. Lines are lanes-edit.sh at a284f71 (#230's head).

Searched first: no open or closed issue names remote_log_events, a present skip-worktree archive, or the other log_files_named_ci callers. #138's remaining items (3, 6, 13–16: lane-start, lane-end and the wrappers, in #210/#216) and #120/#122 are on other lines.

1. remote_log_events' failed ls-tree goes unreported (lanes-edit.sh:3092)

git -C "$LANES_REPO" ls-tree --name-only "origin/$LANES_BRANCH" -- "$LANES_LOG_PREFIX" 2>/dev/null | while … — when the ls-tree itself fails (a tree object git cannot read), the loop gets no paths:

Item 11 in #230 covered a failed show of one log, not a failed listing of all of them.

Fix sketch: capture the listing with its status, and on failure note a fixed sentence carrying "no row is classed DORMANT here". lanes_rows withholds the class on it, as for an unlistable log directory, and lane-end already refuses on that sentence since #230.

2. A present skip-worktree archive leaves a staged row deletion (lanes-edit.sh:11957)

#230's item 2 refuses a published archive that this checkout does NOT have. Its guard is [ ! -e "$LANES_ARCH_FILE" ] && [ ! -L "$LANES_ARCH_FILE" ] (:11957), so a skip-worktree archive that IS present here passes:

  • archive-rows <repo> --yes appends to the skip-worktree file (invisible to git status) and deletes the rows from the register;
  • commit_push's git add then refuses the path ("outside of your sparse-checkout definition") and the act exits 6.

Reproduced at a284f71 on a throwaway register: exit 6, git status --porcelain shows M lanes/LANES.md (the row deletion, STAGED), and the archive's new row is on disk where no dirty check sees it.

Fix sketch: in the same preflight, refuse (2) an archive path the index marks skip-worktree or outside the sparse checkout (git ls-files -t -- <path> tags it S), whether or not the file is present.

3. Other callers of log_files_named_ci ignore its new status (lanes-edit.sh:2678, :2698, :10930)

#230 made log_files_named_ci return 1 where lanes/log exists and cannot be listed, and only retire_rows (:11781) reads that status. Three callers still take the empty answer as "no log of any case":

  • log_path_ci (:2678) answers the canonical path as though no local file exists;
  • ensure_log (:2698) goes on to create the canonical file beside one it could not see;
  • migrate_state_cells (:10930) plans a row's log at the canonical path.

rename-lane (:14182, :14193) has two more, in the rename-publication region another writer owns.

Fix sketch: each caller refuses with 1 on that status, before any write: ensure_log dies, migrate_state_cells skips the row with a reason, and log_path_ci returns a status distinct from its "two logs" 2 that its callers already refuse on.

Refs #138, PR #230.

🤖 Generated with Claude Code

Activity

  1. brettheap commented on Oct 18, 2026

    @brettheap
    ContributorAuthor

    Two more from the re-review of #230 (at a284f71). Left as they are there, and filed here. Lines are lanes-edit.sh at 19ecf54, #230's head after that round.

    4. Other cat-file -e probes that read an unreadable blob as an absent path

    #230 moved the register (register_text, lane_position_rows) and the archive (archive_text) onto register_published, which asks ls-tree of the path and answers 0 published, 8 absent, 1 tree unreadable. Four probes still use cat-file -e, which fails for a missing or corrupt blob exactly as for a path that is not there:

    • lane_log_exists (:3200): a published log git cannot read answers "no log".
    • lane_alias_text (:4772): lanes/aliases.tsv published and unreadable falls through to this checkout's copy. The show failure branch is only reached where cat-file -e succeeded.
    • rename-lane's published-log check (:14253): an unreadable published log of the old name is "not published", so the case-only-rename refusal does not fire. This is in the rename-publication region another writer owns.
    • rename-lane's aliases check (:14300): a published, unreadable aliases.tsv is "not published", so a table holding only this rename can be written. Same region.

    Fix sketch: each asks register_published <path> (it takes a path since #230) and treats 1 as a refusal, or as lane_alias_fail 5, never as absent.

    5. have_remote_ref failing reads as "no origin" (P1)

    have_remote_ref (:3067) is git rev-parse --verify -q "origin/$LANES_BRANCH". A ref that exists and cannot be resolved therefore looks the same as a checkout with no origin at all. Those are a broken packed-refs or loose ref file, or an unreadable .git. Every published read then takes its working-tree fallback: register_text, archive_text, log_path_ci, lane_log_events, and #230's register_published, whose 8 means "use the local copy".

    Fix sketch: tell "no such ref" from "could not read the refs": git show-ref --verify or for-each-ref with its status, or rev-parse with stderr kept and the ref files' presence checked. Then have the published reads refuse (1) on the latter instead of falling back.

  2. brettheap commented on Oct 18, 2026

    @brettheap
    ContributorAuthor

    6. An unreadable register in an estate with no object logs reads as "no lane recorded" (minor)

    From the final re-review of #230, at 19ecf54. Take a published register that git cannot read, in an estate with no object logs at all:

    It is minor: nothing is written, and every live estate has had object logs since Amendment 7.

    Fix sketch: run the register_text status check (and its note) before that early return, and have an unreadable register refuse there rather than answer 8.

  3. brettheap commented on Oct 18, 2026

    @brettheap
    ContributorAuthor

    (lane openRepoTools-4) Caller audit for #248, from the independent review of #230.

    Lines are lanes-edit.sh at main 08e7550. The reviewer judged this non-blocking for #230, because main does the same today when git show is refused.

    Lane: openRepoTools-4

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