Skip to content

Review request: dual-mode dispatch + external awk refactor (v1.0.0-rc5) #2

Description

@nnunley

@chazu @mparrett — could you take a look at the refactor that shipped in rc5 and flag any concerns?

What changed (full diff, merge e5c0784):

  • bin/git-issue (3.2k-line bash CLI) is now dual-mode: sourcing it defines functions and executes nothing; execution goes through a BASH_SOURCE == $0 gate with set -e scoped inside it.
  • Busybox-style $0 dispatch: git-issue-status is now a symlink to git-issue; basename $0 routes to status_report(). Its duplicated plumbing helpers were deleted in favor of the canonical ones.
  • The three inline awk programs moved verbatim to share/git-issue/awk/*.awk (params via -v only, testable standalone, BSD awk/gawk/mawk-clean); missing files are a hard error via require_awk_file.
  • Self-path resolution is a BSD-safe symlink loop (no readlink -f, works on stock macOS and through brew's symlink chains).
  • All four installers (Makefile w/ DESTDIR, both formulas, install-git-issue.sh) ship the symlink + awk dir; new CI suites cover dispatch and a staged-install smoke test through a fake-brew symlink chain.

Design/decision record: docs/plans/2026-08-13-modularization-refactor-design.md — includes why we rejected a full libexec module split.

Specific things worth adversarial eyes:

  1. The dual-mode gate + set -e scoping — any sourcing side effects we missed?
  2. The $0 dispatch — footguns you've hit with multi-call binaries?
  3. The awk -v-only contract and the trailing-header parsing semantics (front_matter.awk).

Known issues already found in post-release clean-install testing (fixes incoming, don't burn time on them): install-git-issue.sh quotes its awk glob so the copy fails, and the #!/bin/bash shebang breaks FreeBSD (/bin/bash doesn't exist there).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions