Skip to content

fix(git-hooks): run hook entries and the commit-msg hook without calling bash by name #9774

Closed

Description

@kyle-sexton

Parent

Refs #5948

Depends on

  • none: on the frontier now

Outcome

No git hook file the plugins install, and not the convention resolver, names bash in its shebang or as a
command, so git bundled with Visual Studio or SSMS (which ships sh.exe and no bash.exe) never resolves
bash to the System32 WSL launcher. Entry points are #!/bin/sh with a POSIX body, or a sh entry that
execs a bash it has checked is not a System32 path.

Decisions

  • Step A (owner, 2026-10-13): sh entry point, tests; ships before the config-hook lane.
  • The canonical files are lib/git-hooks/install.mjs (its dispatcher runs each entry with bash) and
    lib/resolve-convention-pattern.sh; plugin copies are regenerated with scripts/sync-shared-copies.sh
    (C12: the allowlist hold no longer applies).
  • MSYS sh.exe is bash in POSIX mode, so bashisms pass on Windows and break only on dash: test on Linux.

Key interfaces

  • lib/git-hooks/install.mjs, lib/resolve-convention-pattern.sh, plugins/guardrails/git-hooks/commit-msg-convention.sh
    and their copies; block-noncanonical-commit and block-convention-violation share the resolver.

Done when

  • A test asserts no installed hook entry, the dispatcher it writes, or the resolver names bash in its shebang or as a command, and scripts/run-test-file.sh on it exits 0.
  • scripts/run-test-file.sh plugins/guardrails/git-hooks/commit-msg-convention.test.sh exits 0 and runs the hook under dash.
  • scripts/run-test-file.sh lib/git-hooks/install.test.mjs and scripts/run-test-file.sh lib/git-hooks/install.test.sh exit 0.
  • scripts/run-test-file.sh exits 0 on lib/resolve-convention-pattern.test.sh, plugins/guardrails/hooks/block-noncanonical-commit.test.sh and plugins/guardrails/hooks/block-convention-violation.test.sh.
  • scripts/sync-shared-copies.sh --check exits 0.
  • scripts/check-changelog-fragments.sh --check-required origin/main exits 0.
  • The PR body carries Hold: a human merges this (it changes a commit gate).

Activity

  1. added theissue type on Oct 24, 2026
  2. added
    status: readyTriaged, unblocked, and fully specified; eligible to pick up.
    on Oct 24, 2026
  3. added
    agent-readyFully specified and briefed; eligible for autonomous pickup from the frontier.
    and removed on Oct 24, 2026
  4. melodic-automation-lanes commented on Oct 24, 2026

    @melodic-automation-lanes
    Contributor

    The work-resolve-issue lane stopped on its usage limit, not on this issue. It keeps agent-ready, and work-unblock starts it again after 2026-10-25T16:00:00Z.

    Run: https://github.com/melodic-software/claude-code-plugins/actions/runs/40140182516

  5. added
    agent-readyFully specified and briefed; eligible for autonomous pickup from the frontier.
    and removed
    agent-readyFully specified and briefed; eligible for autonomous pickup from the frontier.
    on Oct 25, 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

    agent-readyFully specified and briefed; eligible for autonomous pickup from the frontier.priority: mediumReal value, no hard deadline; normal backlog flow.status: readyTriaged, unblocked, and fully specified; eligible to pick up.

    Type

    Fields

    No fields configured for Bug.

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions