Skip to content

pm-stack(deploy): kaneo-sync-guard path breaks when deploy.sh is invoked from the repo root #10527

Closed

Description

@dezren39

Finding (from PR review)

Codex P2 on merged PR #10190: pm-stack/deploy.sh resolves the Kaneo sync guard from $0 after it has already changed directory, so invoking deployment from the repository root looks for the guard in the wrong place and a healthy deployment fails without running the guard.

"When deployment is invoked from the repository root as bash pm-stack/deploy.sh, the script has already changed into pm-stack, but $0 still contains pm-stack/deploy.sh. This expression therefore looks for pm-stack/pm-stack/kaneo-sync-guard.py, causing a healthy deployment to fail without running the guard. Use the already-established absolute STACK_DIR to locate the sibling script regardless of the invocation directory."
— chatgpt-codex-connector[bot], 2026-11-14T17:03:15Z

Evidence

Acceptance criteria

  • pm-stack/deploy.sh locates kaneo-sync-guard.py via the established absolute STACK_DIR (or an equivalent invocation-independent path), so bash pm-stack/deploy.sh from the repository root runs the guard correctly; OR the finding is resolved by a documented decision recorded on this issue.
  • Verification is by fresh reads of the changed script (CI-first; no sandbox builds).

Activity

  1. added
    kind/bugSomething isn't working (prefixed form of the classic bug label)
    task/triageQueue packet kind: verify, reproduce, and route this item
    priority/normalOrdinary priority (the default)
    app/pm-stackpm-stack (Pad/Grist) in developing-today/code
    on Nov 15, 2026
  2. developing-today commented on Nov 15, 2026

    @developing-today
    Contributor
  3. dezren39 commented on Nov 15, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · filed

  4. added
    queue/claimedQueue worker lifecycle state
    work/assignedQueue worker lifecycle state
    task/small-fixQueue packet kind: bounded fix with reproduction and targeted tests
    effort/xsTrivial: expected under 30 minutes of work
    and removed
    task/triageQueue packet kind: verify, reproduce, and route this item
    on Nov 15, 2026
  5. dezren39 commented on Nov 15, 2026

    @dezren39
    MemberAuthor

    Picked up by lane any-a as task 17378 and triaged inline.

    Verification (fresh, 2026-11-15T18:04Z): the Codex P2 finding on merged PR #10190 is still live on current main. pm-stack/deploy.sh line 28 does cd "$(dirname "$0")", line 29 sets STACK_DIR="$PWD", but line 104 still runs python3 "$(dirname "$0")/kaneo-sync-guard.py". Invoked from the repo root as bash pm-stack/deploy.sh, $0 is pm-stack/deploy.sh, so after the cd the guard resolves to pm-stack/pm-stack/kaneo-sync-guard.py and a healthy deploy fails without running the guard. PR #10190 is MERGED; issue #10527 is OPEN with no hard-stop labels.

    Triage: work kind = small-fix; kind/bug (already present); priority/normal (P2 reviewer severity, per the priorities brief ordinary band); effort/xs. Labels synced: status/needs-triage removed, task/small-fix + effort/xs added, claim labels applied.

    Fix (same session): change line 104 to locate the guard via the established absolute $STACK_DIR. Acceptance check: bash -n clean, and a path-resolution simulation showing the guard resolves correctly when invoked from the repo root, from pm-stack/, and by absolute path. The source PR review thread is not replied to (per packet scope); all discussion lives here.

  6. added a commit that references this issue on Nov 15, 2026
  7. dezren39 commented on Nov 15, 2026

    @dezren39
    MemberAuthor

    Done — fixed and merged in the claiming session (task 17378, lane any-a).

    • PR fix(pm-stack): resolve kaneo-sync-guard via STACK_DIR (#10527) #10532 MERGED at 2026-11-15T18:08:00Z, merge commit 6317aa9. One-line change: pm-stack/deploy.sh line 104 now runs python3 "$STACK_DIR/kaneo-sync-guard.py" instead of resolving from $0 after the cd.
    • Verified on current main with a fresh read: line 104 carries the $STACK_DIR form.
    • Tests: bash -n clean; path-resolution simulation (oracle: resolved guard path exists on disk) — old expression fails the repo-root invocation (bash pm-stack/deploy.sh), new expression passes repo-root, in-directory (./deploy.sh), and absolute-path invocations.
    • Codex disposition is recorded on PR fix(pm-stack): resolve kaneo-sync-guard via STACK_DIR (#10527) #10532 (comment 6898922172): Codex review failed to run / usage-limited with zero findings; CodeRabbit rate-limited with no findings; merged on own verification.
    • This issue auto-closed via the PR's Fixes #10527; all in-flight status/*, queue/*, and work/* labels have been removed. The source PR pm-stack: close authority — sync guard + design record (#10136) #10190 review thread was not replied to, per the packet scope.
  8. dezren39 commented on Nov 15, 2026

    @dezren39
    MemberAuthor

    Task 17381 (auto follow-on of task 17378, same issue #10527) completed as already_done: fresh verification shows issue #10527 CLOSED, PR #10532 MERGED (merge commit 6317aa9), and current main pm-stack/deploy.sh line 104 reads python3 "$STACK_DIR/kaneo-sync-guard.py". No further work exists for this packet.

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

    app/pm-stackpm-stack (Pad/Grist) in developing-today/codeeffort/xsTrivial: expected under 30 minutes of workkind/bugSomething isn't working (prefixed form of the classic bug label)priority/normalOrdinary priority (the default)source/pr-comment-reviewFiled by the pr-comment-review jobtask/small-fixQueue packet kind: bounded fix with reproduction and targeted tests

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions