Skip to content

dev-lead: every informational comment disposition fails verification in fleet repos — cdv_body_has_findings resolves its lib dir after the cd into the PR worktree #2152

Closed

Description

@don-petry

Problem

Every informational comment disposition dev-lead posts in a fleet repo is rejected by the harness, so the original comment is never minimized RESOLVED and pr-review's undispositioned-pr-comment gate holds the PR indefinitely.

cdv_body_has_findings (scripts/lib/comment-disposition-verify.sh:505) resolves its own directory lazily, at call time:

lib_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"

dev-lead-fix-reviews.sh is run as bash .dev-lead/scripts/dev-lead-fix-reviews.sh, so BASH_SOURCE[0] is the relative path .dev-lead/scripts/lib/comment-disposition-verify.sh. By the time the function is called (dev-lead-fix-reviews.sh:1734) the script has already cd'd into the PR worktree (checkout_pr_in_worktree, line 118). The cd fails, lib_dir is empty, the registry cannot be sourced, and the function takes its fail-closed path and returns 0 ("has findings"). The disposition is then marked verified=false.

The script already knows about this hazard for its own paths (AGENT_SCRIPT_DIR is "captured before any cd into a PR worktree"); the library function was missed.

Evidence

Run 37983598107 (google-app-scripts#594, dev-lead v139-stable, 2026-10-09 19:56Z):

.dev-lead/scripts/lib/comment-disposition-verify.sh: line 505: cd: .dev-lead/scripts/lib: No such file or directory
##[notice]comment IC_kwDORFz9wc8AAAABVtpOwA carries a finding-bearing section — an `informational` disposition cannot cover it; each finding needs a real disposition (#2008)
##[notice]skipping comment IC_kwDORFz9wc8AAAABVtpOwA — disposition 'informational' not authorized to resolve (is_human=false verified=false); leaving open (#1813)

IC_kwDORFz9wc8AAAABVtpOwA is gemini-code-assist's "Gemini is unable to generate a review for this pull request due to the file types involved not being currently supported." It has no finding-bearing section: pr-review's own gate classifier reports findings=false for it.

Local reproduction against main (0ae6227d), sourcing the library by a relative path:

cwd=root      rc=1   # no findings → informational verifies
cwd=elsewhere rc=0   # "has findings" → informational rejected
  comment-disposition-verify.sh: line 505: cd: .dev-lead/scripts/lib: No such file or directory

Impact

Acceptance criteria

  1. cdv_body_has_findings returns the same result regardless of the caller's working directory when the library was sourced by a relative path.
  2. A regression test sources the library by a relative path, changes directory, and asserts a no-finding notice body returns 1.
  3. The fail-closed behaviour for a genuinely unreadable registry is unchanged.

Notes

scripts/lib/maintainer-comment-gate.sh lines 92 and 127 use the same lazy BASH_SOURCE pattern inside functions. No failure has been observed there (pr-review invokes it differently), so it is not in scope here.

Activity

  1. github-actions commented on Oct 9, 2026

    @github-actions
    Contributor

    Thanks for the detailed report and the clear reproduction — the evidence from run 37983598107 and the local cwd comparison makes the root cause easy to follow. One question to help us scope the fix: besides dev-lead-fix-reviews.sh, are there any other callers that source comment-disposition-verify.sh by a relative path and then cd before calling cdv_body_has_findings, or is that script the only one affected?

  2. don-petry commented on Oct 10, 2026

    @don-petry
    CollaboratorAuthor

    Second occurrence, on a different repo and ring: petry-projects/.github PR #1269 (feat: implement issue #1267), dev-lead v139-ring0 at f6f2e384, run 38012232150, 2026-10-10 01:12Z.

    .dev-lead/scripts/lib/comment-disposition-verify.sh: line 505: cd: .dev-lead/scripts/lib: No such file or directory
    ##[notice]comment IC_kwDORyesfc8AAAABaxemig carries a finding-bearing section — an `informational` disposition cannot cover it; each finding needs a real disposition (#2008)
    ##[notice]skipping comment IC_kwDORyesfc8AAAABaxemig — disposition 'informational' not authorized to resolve (is_human=false verified=false); leaving open (#1813)
    ##[notice]resolve_dispositioned_comments: minimized 0 dispositioned comment(s) on PR #1269
    

    The comment in question is CodeRabbit's "Action not completed — Review rate limited" reply, which has no finding section at all. That PR is green with no open threads and is held only by undispositioned-pr-comment on four bot comments, so it is waiting on this fix reaching dev-lead/v139-ring0.

  3. added a commit that references this issue on Oct 10, 2026
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

    bugBug reports

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions