Commit Graph
4 Commits
Author SHA1 Message Date
jason.woltje afc176de02 fix(scripts): row 211 R5 busy check literal listing, flat form, sourced word walk (#1709)
From the GPT review of R4 (row211-r4-gpt.md, N1 and N2), for #1709 and #426:

- slot-busy.sh (N1): gone() lists the proc root with
  ls -f -1 --quoting-style=literal, so QUOTING_STYLE can't quote a pid
  out of the listing, and the script exports LC_ALL=C before any tool
  runs. A failed or denied listing is still never gone.
- slot-busy.sh (N2): a command line holding quotes, backslashes, shell
  operators or uneven whitespace gets a flat form, made in awk. The
  snapshot rule reads the flat form. The general rules read the flat
  form, then the raw text. A wrapper's text goes through an awk word
  walk: every word of a source or . span counts, quoted text is read
  again, and the wrapper's own snapshot is skipped. More than 32 walk
  levels, an awk failure or bad output is exit 2, "cannot classify".
- test-git-guard.sh: 48 new cases, 153 in all. The new cases cover
  QUOTING_STYLE, the locale, the rule shapes, depth, awk failure, and
  live wrappers for the review's 13 shapes plus a CLEAR control.
- mutants.sh: sites R5 moved are updated, and 27 new mutants bring the
  total to 57, all killed.

RED 119/34 on fd1aa8cc8's slot-busy.sh, GREEN 153/0. The hook and the
installer are unchanged.
2026-11-02 17:53:26 -06:00
jason.woltje fd1aa8cc81 fix(scripts): row 211 R4 busy check ancestor reads, denied lookups, sourced tests (#1709)
From the GPT review of R3 (row211-r3-gpt.md, R1 to R3 and Check 5):

- slot-busy.sh: every ancestor status read must give a numeric PPid. A
  failed ancestor or cmdline read counts as gone only when a listing of
  the proc root succeeds and lacks the pid; anything else is exit 2 with
  no CLEAR. The [ -d ] and [ -e ] tests, which can't tell a denied lookup
  from a missing one, are gone.
- slot-busy.sh: a shell-snapshot wrapper whose text sources (source or .)
  a gate, test or mutant script is BUSY; one that only runs children is
  still skipped.
- install-git-hooks.sh: the hook is staged in a mktemp file in the hooks
  directory, not a pid-named path.
- mutants.sh: exit 1 on a survivor, NO MATCH, COPY FAILED or a timeout;
  nine new mutants, 30 of 30 killed.

test-git-guard.sh: RED 90/14, GREEN 105/0. BUILD.md R4 has the details,
including a correction to the R3 bind-mount note.
2026-11-02 14:11:47 -06:00
jason.woltje 7d03f212db fix(scripts): row 211 R3 push guard tags, installer hooks dir, busy check errors (#1709) 2026-11-02 13:50:11 -06:00
jason.woltje bcd74ec33d row 211 (#1709, #426): a pre-push guard that refuses deletes and non-fast-forward pushes, its installer, and slot-busy.sh that exits 1 on BUSY
scripts/git-hooks/pre-push refuses a delete, a remote tip missing locally and
any update whose remote tip isn't an ancestor of the local tip; a new branch
and a fast-forward pass. scripts/install-git-hooks.sh puts it in the common
.git/hooks, refuses a set core.hooksPath or a different hook without
--force-install, and runs a canary through git hook run. scripts/slot-busy.sh
exits 0 CLEAR, 1 BUSY, 2 error. scripts/test-git-guard.sh (61 cases) and the
mutant runner in agents/darkwing/work/queue-211; TOOLS.md gets the usage.
Not run yet: written during Gander's slot (sage-2801).

(cherry picked from commit 20e885dc35)
2026-11-02 13:50:11 -06:00