Skip to content

Commit 83af11f

Browse files
committed
Merge F44 (PR #35 merged) into plan-00086 branch — combine both fixes for live re-proof
2 parents 6338948 + 7495412 commit 83af11f

4 files changed

Lines changed: 164 additions & 1 deletion

File tree

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
# Plan 00085 — Journal 26-08-24
2+
3+
> **Append-only activity log** for plan 00085. One file per day
4+
> (`00085-Journal-YY-MM-DD.md`). `PLAN.md` tracks the plan (what/why,
5+
> current state, tasks); this journal tracks what actually *happened* —
6+
> findings, decisions, dead-ends, hand-off state — the linear lifecycle a plan
7+
> document structurally cannot carry.
8+
>
9+
> **Entry grammar** — append new entries at the BOTTOM; NEVER edit earlier
10+
> entries (corrections are new entries):
11+
>
12+
> ```
13+
> ## HH:MM · category · REF — optional short title
14+
> ```
15+
>
16+
> - `HH:MM` local 24h (the date is in the filename); times increase down the file.
17+
> - `category` ∈ `action` | `finding` | `decision` | `thought` | `blocker` | `handoff`
18+
> - `REF` = optional task/phase ref (`T1.2`, `P1`) or `—`.
19+
> - Bodies may embed fenced logs/diffs/snippets — no size limit — with a
20+
> one-line takeaway above the fence.
21+
> - End a working session with a `handoff` entry so the next agent's entry
22+
> point is the last entry of the newest day-file.
23+
24+
## 15:33 · action · — — plan scaffolded
25+
26+
Plan 00085 created via `mkplan.bash`; `JOURNAL/` initialised. Next:
27+
fill in `PLAN.md`, then log progress here as it happens.
28+
29+
## 15:50 · finding · T1.1 — root cause confirmed, both PR #33/#34 mechanisms proved live
30+
31+
A downstream deployment repo's live proof of `RUN_BASH_GITHUB_ACCOUNTS=none` against a real
32+
guest (via Ansible `become`/`become_user`, not an interactive shell) reached
33+
`headless_preflight OK — sudo=password (RUN_BASH_SUDO_PASSWORD_FILE)`, the HTTPS self-clone,
34+
and the correctly-skipped GitHub setup steps — proving PR #33 and PR #34 both work end-to-end
35+
in composition — then failed at `ansible-galaxy: command not found`, even though the preceding
36+
pipx step's own output listed `ansible-galaxy` among "these apps are now available".
37+
38+
Confirmed root cause: `pipx install --include-deps ansible` creates its app shims under
39+
`~/.local/bin`, but this script never adds that directory to its own `PATH`. An interactive
40+
terminal already has it (Fedora's `.bash_profile` adds it at login), so the desktop-interactive
41+
path was never affected. `sudo -u <user>` (what both headless mode and any Ansible `become` task
42+
use) resets `PATH` to sudoers' `secure_path`, which never includes `~/.local/bin` — so the
43+
bare `ansible-galaxy install -r requirements.yml` call, and `./playbooks/playbook-main.yml`
44+
right after it (shebang `#!/usr/bin/env ansible-playbook`, same PATH lookup), cannot resolve.
45+
Confirmed the shebang directly (`head -1 playbooks/playbook-main.yml`) so the fix covers both
46+
call sites, not just the one that happened to fail first.
47+
48+
Fix: `export PATH="$HOME/.local/bin:$PATH"` (guarded against a caller that already has it)
49+
right after the pipx install/inject block. `bash -n`/`shellcheck -x` clean. Version bumped to
50+
1.14.0.
51+
52+
## 16:00 · handoff · — — PR opened
53+
54+
Committed and pushed on `plan-00085-headless-path-local-bin`; PR opened against `F44`.
55+
56+
## 16:12 · action · T1.5 — merged, plan complete
57+
58+
Dispatched an independent review agent (`qa-reviewer` stand-in) over PR #35's full diff;
59+
verdict MERGE-READY WITH NITS, nits addressed (README index row, Task 1.3/1.4 ticked) in
60+
commit `300269c`.
61+
62+
Then re-proved the fix live, pinned at the branch tip `8fd8725` (lts-infra Plan 00045's
63+
`verify-github-accounts-none.yml`, prove-before-merge on an unmerged commit — `get_url`
64+
resolves any sha regardless of branch state). The run got past `ansible-galaxy` and through
65+
`playbook-main.yml`'s Preflight Sanity and DNF Upgrade plays cleanly — proving both the PATH
66+
fix AND the underlying PR #33/#34 composition all work together — before hitting an
67+
unrelated, pre-existing defect in `play-AB-dnf-upgrade.yml`'s kernel-modules enumeration
68+
(filed as Plan 00086, PR #36). Success criteria met: the failure that remained was not a
69+
PATH failure.
70+
71+
Checked PR #35's CI: `gitleaks secret scan` was failing, but confirmed via
72+
`git diff origin/F44...plan-00085-headless-path-local-bin --stat` that the flagged file
73+
(`CLAUDE/Plan/Completed/00070-.../research/scan-alt-engines.md`) is untouched by this PR, and
74+
via `gh run list --branch F44` that F44's own tip already fails the same way — a pre-existing
75+
false positive unrelated to this change, not a merge blocker.
76+
77+
Merged PR #35 (`gh pr merge 35 --merge --delete-branch`, merge commit `dac4f7c`). Plan
78+
status flipped to Complete and archived to `Completed/`.
Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
# Plan 00085: headless path ~/.local/bin PATH gap
2+
3+
**Status**: Complete
4+
**Created**: 2026-08-24
5+
**Owner**: joseph
6+
**Priority**: High
7+
8+
## Overview
9+
10+
A downstream deployment repo's live proof of the headless `RUN_BASH_GITHUB_ACCOUNTS=none`
11+
path (run via Ansible `become`/`become_user`, not an interactive login shell) found that
12+
`run.bash` fails partway through provisioning with `ansible-galaxy: command not found`,
13+
even though the preceding pipx install step reported `ansible-galaxy` as one of the apps
14+
it made available.
15+
16+
Root cause: `pipx install --include-deps ansible` creates its app shims under
17+
`~/.local/bin`, but `run.bash` never adds that directory to `PATH` within its own process.
18+
An interactive terminal session already has `~/.local/bin` on `PATH` (Fedora's default
19+
`.bash_profile`/`.bashrc` add it at login), so the desktop-interactive path has always
20+
worked and this was never seen there. A non-interactive invocation via `sudo -u <user>`
21+
(what both this repo's headless mode and any Ansible `become`-based caller use) resets
22+
`PATH` to sudoers' `secure_path`, which never includes `~/.local/bin` — so the later bare
23+
`ansible-galaxy install -r requirements.yml` call, and the `./playbooks/playbook-main.yml`
24+
invocation right after it (shebang `#!/usr/bin/env ansible-playbook`), cannot resolve.
25+
26+
This is a pre-existing gap, unrelated to the RUN_BASH_GITHUB_ACCOUNTS=none (PR #33) or
27+
RUN_BASH_SUDO_PASSWORD_FILE (PR #34) mechanisms — the run log confirms both of those
28+
worked correctly (`sudo=password (RUN_BASH_SUDO_PASSWORD_FILE)` authenticated; the HTTPS
29+
self-clone succeeded; GitHub setup was correctly skipped) before hitting this third,
30+
independent blocker at the first bare `ansible-galaxy` call.
31+
32+
## Goals
33+
34+
- Make `run.bash` headless provisioning succeed regardless of the caller's PATH/shell
35+
context (login shell, non-login shell, `sudo -u`, SSH `command`), by having the script
36+
put `~/.local/bin` on its own `PATH` once pipx-installed tools are available.
37+
38+
## Non-Goals
39+
40+
- Not changing the interactive path's behaviour (already works).
41+
- Not working around this in the downstream repo's Ansible invocation (e.g. passing
42+
`environment: PATH=...`) — the fix belongs in `run.bash` itself so every caller
43+
benefits, not just this one call site.
44+
45+
## Tasks
46+
47+
### Phase 1: fix
48+
49+
- [x] ✅ **Task 1.1**: add `export PATH="$HOME/.local/bin:$PATH"` to `run.bash`
50+
immediately after the pipx-based ansible install block, before any later bare
51+
`ansible-galaxy`/`ansible-playbook`/`ansible` invocation.
52+
- [x] ✅ **Task 1.2**: `bash -n` + `shellcheck -x` clean; bump `RUN_BASH_VERSION`.
53+
- [x] ✅ **Task 1.3**: commit, push on a branch, open PR against `F44` (PR #35).
54+
- [x] ✅ **Task 1.4**: independent review (qa-reviewer stand-in) — verdict MERGE-READY
55+
WITH NITS; nits addressed (README index row added, Task 1.3 ticked).
56+
- [x] ✅ **Task 1.5**: merge (merge commit `dac4f7c`).
57+
58+
## Success Criteria
59+
60+
- [x] A downstream live proof re-run (via `sudo -u`/Ansible `become`, the exact context
61+
that found this) got past the `ansible-galaxy install -r requirements.yml` step and
62+
the subsequent `playbook-main.yml` invocation without a PATH-related failure — proven
63+
live before merge (pinned at the branch tip `8fd8725`): pipx-installed `ansible-galaxy`
64+
resolved, `playbook-main.yml`'s Preflight Sanity and DNF Upgrade plays both completed.
65+
The run then hit an unrelated, pre-existing defect (Plan 00086) in
66+
`play-AB-dnf-upgrade.yml`'s kernel-modules enumeration — not a PATH failure.
67+
68+
## Delivery & Milestones
69+
70+
<!-- Curated milestones + delivery commit hashes only (git is the SSoT for
71+
"when" — do not add dates). The blow-by-blow activity log lives in
72+
JOURNAL/00085-Journal-YY-MM-DD.md — see CLAUDE/PlanJournalling.md. -->
73+
74+
- Recovery cron: 28837729 (shared session-wide failsafe, already running).

‎CLAUDE/Plan/README.md‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,8 @@ Use these Unicode icons in plan documents:
136136

137137
## Completed Plans
138138

139+
- [00085-headless-path-local-bin](Completed/00085-headless-path-local-bin/) - A downstream live proof of the composed PR #33/#34 headless mechanisms found a third, unrelated blocker: `ansible-galaxy: command not found` under a non-interactive `sudo -u` invocation, since pipx's `~/.local/bin` shims are never put on PATH there. Exports PATH right after the pipx install block. Merged (`dac4f7c`).
140+
139141
- [00084-port-sudo-password-file-onto-f44](Completed/00084-port-sudo-password-file-onto-f44/) - Ports Plan 00073's `RUN_BASH_SUDO_PASSWORD_FILE` (stranded on an unmerged, diverged branch) onto `F44` so it composes with Plan 00082's `GITHUB_ACCOUNTS=none` — no single commit previously carried both. Merged (`d48fabd`). Also fixed two real VM hostnames from the downstream consumer estate that had been committed into this public repo's tracked content.
140142

141143
- [00083-plan-index-hygiene-and-comment-handlers](Completed/00083-plan-index-hygiene-and-comment-handlers/) - Enables the three handlers the 3.54.0 daemon upgrade shipped disabled (`comment_changelog`, `comment_size`, `sensitive_content`), each after measuring its existing backlog rather than assuming it, and clears the 39 over-length rows the new `index-row-length` check found in this index.

0 commit comments

Comments
 (0)