Skip to content

session_ids_of_lane / session_ids_local_of_lane don't distinguish "no row" from "register unreadable", so every caller that treats an empty id set as a fact is fail-open on that read #67

Closed

Description

@brettheap

Both functions (lanes-edit.sh) return non-zero / print nothing on either of two different facts:

  • the lane genuinely has no row in the register (the common, benign case — most pre-cutover or brand-new lanes)
  • the underlying register read failed (register_text could not git show origin/<branch>:<path>, or the local LANES_FILE could not be cat)

live_holder and lane_log_events both make this split explicitly (0 / 8 / other, or an analogous 3-way answer) — this pair does not. A caller that does ids="$( { session_ids_of_lane "$l" || : ; session_ids_local_of_lane "$l" || : ; } | …)" (the established pattern already used at several call sites) cannot tell "this lane has no ids" from "I could not find out", and if it then hands an empty set to live_holder, that function answers 8 (no live holder found) — which is correct for the first fact and wrong for the second.

Flagged by Copilot review on #61 (PR) against two of that PRs own new call sites — holder_is_dead (lanes-edit.sh:2297ish) and duplicate_holder_pids (lanes-edit.sh:4484ish) — both declined there with this issue as the follow-up, because a proper fix means changing what session_ids_of_lane/session_ids_local_of_lane themselves return, and roughly eight other places in the file call them (live_holder's own fallback, the live-holder dispatch case, lane_forks, lane-start's register veto, …) — too wide a blast radius for a two-small-hunks PR to reach into.

Ask: give the pair a real 0/8/other-style contract (or a sibling read that does), so claim --force's dead-lane path (#30) and duplicate-holder' both refuse rather than proceed when the register itself could not be read, instead of reading that as "no ids, nothing to check".

🤖 Generated with Claude Code

Activity

  1. brettheap commented on Sep 14, 2026

    @brettheap
    ContributorAuthor

    CLAIMED — lane openRepoTools-3, session 4135b2c9-34a6-47e3-a156-5adebb632fae@Eagle, 2026-09-14T22:48:50Z, for #67

    Logged in lanes/log/openRepoTools-3.md at 4598fe94ec40de46bd87d104845980827028f828.

    The three reads (lane-collision-protocol Rule 1):

    1. existing `CLAIMED —` comments on opensoft/openRepoTools#67:
       none
    2. `gh pr list --repo opensoft/openRepoTools --state all --search "#67"`, kept where the row or its body names `#67`:
       none
    3. `git ls-remote --heads [email protected]:opensoft/openRepoTools` branches naming `67` as a whole token:
       none
    
  2. brettheap commented on Oct 11, 2026

    @brettheap
    ContributorAuthor

    TAKEOVERopenRepoTools-3 — lane openRepoTools-5, session 0d83dca2-c18c-4bb0-99ce-896e6cafea02@Eagle, 2026-10-11T16:54:07Z, for #67

    Logged in lanes/log/openRepoTools-5.md at e92e462632a6df2f730f311e8565e207980917fd (takeover of the stale claim held by lane openRepoTools-3).

    The three reads (lane-collision-protocol Rule 1):

    1. existing `CLAIMED —` comments on opensoft/openRepoTools#67:
    6:CLAIMED — lane openRepoTools-3, session 4135b2c9-34a6-47e3-a156-5adebb632fae@Eagle, 2026-09-14T22:48:50Z, for opensoft/openRepoTools#67
    13:1. existing `CLAIMED —` comments on opensoft/openRepoTools#67:
    2. `gh pr list --repo opensoft/openRepoTools --state all --search "#67"`, kept where the row or its body names `#67`:
       none
    3. `git ls-remote --heads [email protected]:opensoft/openRepoTools` branches naming `67` as a whole token:
       none
    
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