Skip to content

A lane control root that cannot be searched makes lane-trees and lane-state answer 8, no record, instead of failing closed #225

Open

Description

@brettheap

The finding

A lane's control root (<projects>/.lane-state/<lane>, or $LANES_LANE_STATE_ROOT/<lane>) that exists but cannot be searched hides every record under it. In that case the existence tests the two lifecycle reads make are false, and both reads answer 8, no record, where they should fail closed.

Evidence

On main a74c7fc (lanes-edit.sh there is byte-identical to f87fd5a's) and on #213's head. Here are the shell semantics the two checks rest on, as an unprivileged user (uid 1000), with a root at mode 600 that holds both records:

$ mkdir -p r/trees; : > r/lane-state.yaml; : > r/trees/c1-x.yaml; chmod 600 r
$ [ -d r/trees ]                                        -> false   (lane_trees_list returns 8)
$ [ -r r/lane-state.yaml ] / [ -e … ] / [ -L … ]        -> all false (lane_state_read returns 8)

What would fix it

Tell an absent root from an unsearchable one before either read looks inside it:

Filed by lane openRepoTools-4 from the #213 review.

🤖 Generated with Claude Code

Activity

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