Skip to content

Share the formatter git-hooks' staged_gone check through check-lib.sh (part 2 of 2) #15631

Description

@kyle-sexton

Agent Brief

Type: Task
Summary: Switch the markdown-format, powershell-format and ruff-format git-hooks from their own staged_gone to checks_staged_gone in check-lib.sh, which part 1 adds (part of restructuring pass #14802).

Blocked by: R3-5. This item calls checks_staged_gone, which R3-5 adds to check-lib.sh.

Current behavior:
Three hooks define the same 4-line staged_gone <path> under the same 2-line comment and call it once:

  • plugins/markdown-format/git-hooks/markdown-check.sh:72-77, called at :97
  • plugins/powershell-format/git-hooks/powershell-check.sh:76-81, called at :104
  • plugins/ruff-format/git-hooks/ruff-check.sh:83-88, called at :107

Each sources check-lib.sh from beside it or from ../lib/git-hooks/, as plugins/actionlint/git-hooks/actionlint-check.sh:24-32 does. Part 1 adds checks_staged_gone, with the same body, to lib/git-hooks/check-lib.sh and its ten plugin copies, these three plugins included.

Desired behavior:
The three hooks delete their comment and definition and call checks_staged_gone.

Files:

  • plugins/markdown-format/git-hooks/markdown-check.sh
  • plugins/powershell-format/git-hooks/powershell-check.sh
  • plugins/ruff-format/git-hooks/ruff-check.sh
  • a new patch fragment in each of .changes/markdown-format/, .changes/powershell-format/ and .changes/ruff-format/: ### Changed, "Internal restructuring, no behavior change."

Key interfaces:

  • Each hook's arguments, output, exit codes and messages: unchanged.
  • No test names staged_gone.

Acceptance criteria:

  • No hook defines staged_gone; the three hooks call checks_staged_gone.
  • Behavior is unchanged: the same outputs, exit codes and printed results for the same inputs.
  • The diff edits only the listed files and the lines of a test that assert on them when the change breaks that assertion.
  • The pull request stays within 400 changed lines and 15 hand-edited files.
  • markdown-check.test.sh, powershell-check.test.sh and ruff-check.test.sh pass.
  • ci-status is green.

Out of scope:

  • check-lib.sh and its copies, each hook's batch loop, other duplication, eval cases, fixtures, and skill and agent text.

Activity

  1. added
    status: ready
    on Nov 12, 2026
  2. added theissue type on Nov 12, 2026
  3. removed
    status: ready
    on Nov 12, 2026
  4. melodic-automation-lanes commented on Nov 12, 2026

    @melodic-automation-lanes
    Contributor

    Not admitted to the issue lane yet: blocker #15627 is not closed by a listed human or a merge.

  5. github-actions commented on Nov 12, 2026

    @github-actions
    Contributor

    The triage sweep dispatched intake triage for this issue (dispatch 1; 2 runs that reach intake, or 6 dispatches, hand it to a maintainer).

  6. github-actions commented on Nov 12, 2026

    @github-actions
    Contributor

    Size: Small
    Complexity: Low
    Uncertainty: Known
    Flags: none
    Blocked by: #15627

    Understood: replace the duplicated staged_gone in the markdown-format, powershell-format and ruff-format git-hooks with checks_staged_gone from check-lib.sh. Behavior stays unchanged, and each plugin gets a patch change fragment. The scope, files and acceptance criteria are clear.

    This depends on part 1 (R3-5), which adds checks_staged_gone to check-lib.sh. The earlier admission note names #15627 as the blocker, and it is not closed yet. Work can start once that lands. No duplicates or merged fixes found. Part of #14802.

    Automated triage. A maintainer reviews it.

  7. melodic-automation-lanes commented on Nov 12, 2026

    @melodic-automation-lanes
    Contributor

    {"v":1,"actor_id":337595936,"title_sha256":"fc989319c28ff4414944a224d84ae21061e47f44e18e8efa556d8bdb63258e14","body_sha256":"8b82d067d4fd6dc93338d5cfdc5e82d83ed2ff3778f7e4f101c058549e252351"}

  8. github-actions commented on Nov 12, 2026

    @github-actions
    Contributor
    No description provided.
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

    Fields

    Work status

    needs-triage

    Priority

    low

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions