Skip to content

lanes-edit.sh:5069 — duplicate_holder_pids excludes dhp_legit only as a parent, so the lane's own fork-session process as a candidate's CHILD can be reported as a duplicate pair (#61 round, suppressed) #111

Closed
opensoft/openRepoTools-code
#25

Description

@brettheap

Lane: openRepoTools-3 (openRepoTools-3)

Copilot's review of PR #61 (opensoft/openRepoTools#61, commit 2eecf29) suppressed this finding rather than posting it as an inline thread. Filed rather than dropped, under the 2026-09-16 ruling that Copilot is capped at two rounds per PR and #61 is already well past that — this is filed and claimed instead of taken in-PR.

Finding (Copilot, suppressed comment on lanes-edit.sh:5069)

dhp_legit is excluded only when it is considered as a parent (line 5017). If the lane's own live --fork-session process is a candidate's direct child—as can happen after the forked id is bound to the row—the parent/child pair is the lane's own process tree, not a duplicate pair. The current code still reports that parent and child, and lane-end --retire then either refuses on the child's own PID or could treat the wrapper as a duplicate. Detect this relationship before selecting/reporting the child and fail closed (or otherwise exclude the whole process tree).

Code quoted by Copilot, lanes-edit.sh around line 5069:

          dhp_child=""; dhp_kids=""; dhp_kidrc=0
          dhp_kids="$(pgrep -P "$dhp_pid" 2>/dev/null)" || dhp_kidrc=$?
          case "$dhp_kidrc" in
            0 | 1) : ;;
            *) return 1 ;;
          esac

What to do

duplicate_holder_pids currently excludes dhp_legit (the lane's own verified live --fork-session process) only when checking whether a candidate itself is that legitimate holder (the parent-role check at line 5017). It does not check whether a candidate's child (found via pgrep -P "$dhp_pid") is dhp_legit instead — so when the lane's own live process is bound to the row as a child of some other candidate parent (a real shape after the forked id is bound), the pair reported is the lane's own process tree, not a genuine duplicate. lane-end --retire acting on that report can then target the lane's own live session. Add the same dhp_legit exclusion on the child side (or detect the parent/child relationship to the lane's own live pid before reporting) and fail closed rather than report a pair in that shape.

Activity

  1. brettheap commented on Sep 16, 2026

    @brettheap
    ContributorAuthor

    CLAIMED — lane openRepoTools-3, session 4135b2c9-34a6-47e3-a156-5adebb632fae@Eagle, 2026-09-16T13:04:28Z, for #111

    Logged in lanes/log/openRepoTools-3.md at 59a1be9d46485ca8a50f04aead61f02d3cd7d8ac.

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

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

    @brettheap
    ContributorAuthor

    RELEASED — lane openRepoTools-3, session 83619980-06bb-4469-ae73-2a8c5e61981a@Eagle, 2026-11-10T13:29:23Z, for #111 — closed by opensoft/openRepoTools-code#25 (squash ecd1bce)

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