Skip to content

fix: honour indented TOML headers and shim precedence on bash PATH - #24

Merged
Dreamcoder08 merged 1 commit into
mainfrom
fix/gga-backfill-findings
Sep 30, 2026
Merged

Dreamcoder08 merged 1 commit into
mainfrom
fix/gga-backfill-findings

Conversation

@Dreamcoder08

Copy link
Copy Markdown
Owner

With Codex quota back, GGA reviewed the files it had to skip during the usage limit (gga run --pr-mode --diff-only over the range since the first pin commit) and found real defects, then reviewed the fixes over three more rounds.

  • apply-ml4w-hooks.sh: table headers were only recognised in column 0. TOML allows leading whitespace, so after a disabled template an indented [templates.kitty] was commented out too. Headers are now matched and trimmed. The awk program of render_listener_hook moved to its own function.
  • Shim precedence: .bashrc and the generated gga config block checked whether the shim dir was on PATH, not whether it came first; a shim already behind ~/.local/bin left the real codex in front and bypassed the model pin. The rule now lives once in lib/gga-shim-path.sh (installed as ~/.config/gga/shim-path.sh, sourced by the block and .bashrc): it drops any existing entry, including adjacent duplicates (a:a:b), and prepends without leaving an empty PATH element. Both callers require a regular readable file before sourcing.

Tests: 4 new bats tests (indented headers, precedence in the block and in .bashrc, adjacent duplicates, fragment installed idempotently and skipped cleanly when absent); each fails without its change. bats 192 ok, pytest exit 0, CI shellcheck command clean. The final GGA review of this branch (gpt-6.1-sol) returned STATUS: PASSED.

A backfill review of files that gga could not review during the Codex usage limit (now that the
quota is back) found two real defects:

- apply-ml4w-hooks.sh only recognised TOML table headers in column 0. TOML allows leading
  whitespace, so after a disabled template an indented [templates.kitty] was commented out too.
  Match and trim indented headers.
- .bashrc and the gga config block checked whether the shim dir was on PATH, not whether it came
  first. A shim already behind ~/.local/bin left the real codex in front and bypassed the model
  pin. Drop any existing entry and prepend, without leaving an empty PATH element.

Tests cover both cases and fail without the change.

The PATH rule now lives in one place, lib/gga-shim-path.sh, which the installer copies to
~/.config/gga/shim-path.sh and both the gga config block and .bashrc source (a review flagged
the duplicated logic). The installer reports the extra file and tests cover it.

Follow-ups from the next review round: the fragment removes adjacent duplicate entries (a:a:b
kept one copy), both callers require a regular readable file before sourcing, and the awk
program of render_listener_hook moves to its own function so both stay screen-sized.
@Dreamcoder08
Dreamcoder08 force-pushed the fix/gga-backfill-findings branch from 6dc5ed1 to 5b1898c Compare September 30, 2026 06:53
@Dreamcoder08
Dreamcoder08 merged commit 18ed80f into main Sep 30, 2026
13 checks passed
@Dreamcoder08
Dreamcoder08 deleted the fix/gga-backfill-findings branch September 30, 2026 06:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant