Repository navigation
Description
Overview
feature.sh, build.sh and bug.sh print their --help by slicing their own header with hardcoded sed line ranges. The ranges have rotted: feature --help leaks set -uo pipefail, build --help stops before --rehearsal-run-id, --dry-run, --json and the exit codes, and bug --help leaks an internal comment. This switches all three to the header-help awk that health.sh, rehearse.sh, validate.sh and nightly.sh already use, and adds a test.
Plan
- Replace the
sed -n '2,NNp'help in feature, build and bug with the shared headerawk(print comment lines after the shebang, stop at the first non-comment line). - Add a test that runs each of the three with
--help, asserts no line starts withset, and that build's help names--rehearsal-run-idand the exit codes. - Run the PyAutoBrain test suite.
- Tier + merge mode: effective level: supervised; merge mode: auto-merge on green (this session: PR opened, merge left to the human).
Detailed implementation plan
Affected Repositories
- PyAutoBrain (primary)
Branch Survey
| Repository | Current Branch | Dirty? |
|---|---|---|
| ./organs/PyAutoBrain | main | clean |
Suggested branch: feature/agent-help-text-rot
Implementation Steps
agents/conductors/feature/feature.sh:49,agents/conductors/build/build.sh:97,agents/conductors/bug/bug.sh:50: replace thesedslice withawk 'NR==1{next} /^#/{sub(/^# ?/,""); print; next} {exit}' "${BASH_SOURCE[0]}", as inagents/conductors/health/health.sh:86.- New
tests/test_agent_help_text.py: run each script with--help(subprocess, bash), assert exit 0, no output line starts withset, help is non-empty; build's output contains--rehearsal-run-id,--dry-run,--jsonandExit codes. - Run
pytest tests/.
Key Files
agents/conductors/feature/feature.shagents/conductors/build/build.shagents/conductors/bug/bug.shagents/conductors/health/health.sh(reference pattern)
Original Prompt
Click to expand starting prompt
Agent --help text is rotted in feature, build and bug
Type: bug
Target: PyAutoBrain
Repos:
- PyAutoBrain
Difficulty: medium
Autonomy: supervised
Priority: normal
Status: formalised
Consequence: notify
Witness: a test runs each of the three with--helpand asserts no line starts withsetand that build's output names--rehearsal-run-idand the exit codes.
Review-minutes: 0
Unattended: ready
Lane: any
Agent --help text is rotted in feature, build and bug
Type: bug
Target: PyAutoBrain
Lane: any
Three shell agents print rotted --help text because they slice their own header with hardcoded sed line ranges. In @PyAutoBrain: agents/conductors/feature/feature.sh:49 leaks set -uo pipefail into --help; agents/conductors/build/build.sh:97 truncates the help before --rehearsal-run-id, --dry-run, --json and the exit codes; agents/conductors/bug/bug.sh:50 leaks an internal comment. health.sh, rehearse.sh, validate.sh and nightly.sh already use a header-help awk that stops at the first non-comment line; use the same in these three. Found in the 2026-11-22 refactor review (PyAutoBrain#700).
Witness: a test runs each of the three with --help and asserts no line starts with set and that build's output names --rehearsal-run-id and the exit codes.
Activity
Jammy2211 commentedon Nov 22, 2026
Library PR opened: #703. Heart: start_dev door read YELLOW (one unrelated euclid_assistant reason; an earlier RED came from a 2-day-old local snapshot and no longer held). The dev-ship readiness for PyAutoBrain read STALE only because Heart's CI poll hit a TLS timeout on this network;
gh run listshowed Brain Tests and Brain Board green on main at 428fe1e. Witness test passes; full suite 2454 passed, 1 skipped. No workspace impact. Merge is left to the human (/prm).Jammy2211 commentedon Nov 22, 2026
Shipped
Merged in #703 (2026-11-22).
feature,buildandbugnow print--helpwith the shared header-helpawk(comment block after the shebang, stop at the first non-comment line), so no more leakedset -uo pipefail, truncated build options or internal comments. Witness:tests/test_agent_help_text.py.Session note: Heart read STALE at ship time only because Heart's CI poll hit TLS timeouts on this network; accepted by the human.