Skip to content

fix(bin): instruct crew status appends via tee -a - #1765

Closed
MabezDev wants to merge 1 commit into
kunchenguid:mainfrom
MabezDev:fm/fm-audit-fix-a3
Closed

MabezDev wants to merge 1 commit into
kunchenguid:mainfrom
MabezDev:fm/fm-audit-fix-a3

Conversation

@MabezDev

@MabezDev MabezDev commented Aug 5, 2026 •

Copy link
Copy Markdown

Summary

Low-risk non-core audit follow-up from fm-audit-s2.

  1. Brief status append form - Generated ship, scout, and secondmate briefs now instruct crews to report status with echo "{state}: ..." | tee -a $STATUS_FILE instead of echo ... >>. Herdr's sandbox blocks shell redirects, so the old form failed on the first status write (audit learning chore: initialize no-mistakes gate #1 / A5). Scaffold content only; spawn, teardown, watcher, and backend logic untouched. Path-quoting tests updated to assert tee -a.
  2. Docker --user hygiene - Out of scope for this PR. A full-tree search of this repo found zero docker invocations (including under bin/, tests/, generated brief text, and tooling). No non-core call site exists to add --user "$(id -u):$(id -g)". Recorded below for the morning session with the teardown/compose half of audit ci: enforce contributor guardrails #5.

Test plan

  • bin/fm-lint.sh (no-mistakes lint step + local)
  • ./bin/fm-test-run.sh tests/fm-brief.test.sh tests/fm-secondmate-safety.test.sh
  • no-mistakes run 01KZA50H2ZAB5RSFTSTFADQPWX: intent, rebase, review, test, document, lint, push all completed with 0 findings
  • GitHub Actions CI on this PR (see note below)

Delivery note

no-mistakes push succeeded to MabezDev:fm/fm-audit-fix-a3. The pipeline's PR and CI steps were skipped with skipping PR creation: gh CLI is not authenticated (daemon cannot use the interactive keyring token). This PR was opened with gh-axi after that pass. Upstream Actions for the fork PR are currently action_required with zero jobs (maintainer workflow approval for the fork); the opener has pull-only on kunchenguid/firstmate and cannot approve or re-run them.

For the morning interactive session

Hard out of scope for this crew; do not treat this PR as covering them:

  1. Firstmate self-update (audit setup chore: initialize no-mistakes gate #1) - use /updatefirstmate in an empty-fleet window.
  2. Validation-wait stale churn / watcher (setup docs: polish README banner and repo housekeeping #2, learning docs: clarify live supervision constraints #9) - re-measure after update; arm-level --stale-threshold or fix(watcher): bound stale wakes for parked crew #743-style cadence for alive validating crews if still burning turns.
  3. no-mistakes daemon update (setup docs: align tmux and harness guidance #3) - NEVER restart the shared daemon while lanes are mid-pipeline; empty-fleet only.
  4. gh auth login / daemon-visible gh token (setup fix(bin): coalesce watcher signals into one wake #4, learning fix: prevent watcher check starvation #13) - plain gh is unauthenticated from the no-mistakes daemon, so PR/CI steps skip; interactive shell keyring auth does not reach the daemon. Also needed so no-mistakes can open the PR body itself with the Pipeline section.
  5. Docker hygiene - remaining work (setup ci: enforce contributor guardrails #5, learnings fix: wake pi crewmates after each turn #12/feat(skills): add HomeMux design system skill #22):
    • Non-core --user half: no call site in this repo (repo-wide search: zero docker/podman/nerdctl run/build/exec/compose invocations). If root-owned files come from a project (e.g. birdied) compose/test containers, fix lives in that project.
    • Teardown/compose-recording half: record compose project in task meta and docker compose down on teardown - would touch bin/fm-teardown.sh / spawn path, deliberately out of scope here.
  6. Backend decision: herdr vs tmux (setup fix: reduce crewmate status wake noise #6) - captain call; pin config/backend if desired.
  7. treehouse binary update (setup feat: add scout task lifecycle #7) - live pools tonight; opportunistic later.
  8. captain.md determinism (setup feat(bin): guard watcher liveness across supervision scripts #8 / upstream data/captain.md is not respected #911) - monitor only.
  9. learnings.md curation - home data; firstmate maintains it directly, not via this PR.
  10. Approve fork workflow runs for this PR (or grant write) so CI and Require no-mistakes can execute on fix(bin): instruct crew status appends via tee -a #1765

Pipeline

Updates from git push no-mistakes

Run id: 01KZA50H2ZAB5RSFTSTFADQPWX head b04e6a4a

✅ **intent** - passed

✅ Intent supplied by the agent; no issues found.

✅ **Rebase** - passed

✅ Already ahead of origin/main.

✅ **Review** - passed

✅ No issues found. Scope-complete scaffold tee -a change; fix 2 out-of-scope claim source-verified.

✅ **Test** - passed

✅ tests/fm-brief.test.sh and tests/fm-secondmate-safety.test.sh green; generated ship/scout/secondmate briefs use tee -a only.

✅ **Document** - passed

✅ No documentation updates required; bin/fm-brief.sh owns status protocol.

✅ **Lint** - passed

✅ bin/fm-lint.sh (ShellCheck 0.11.0 pinned).

✅ **Push** - passed

✅ Pushed to fork MabezDev/firstmate branch fm/fm-audit-fix-a3.

⚠️ **PR / CI** - skipped by pipeline

Daemon: skipping PR creation: gh CLI is not authenticated / skipping CI: gh CLI is not authenticated. PR opened afterward via gh-axi as #1765.

Herdr's sandbox blocks shell redirects like echo >> status-file, so
generated briefs that teach that form fail on the first status write.
Scaffold ship, scout, and secondmate briefs with echo | tee -a instead;
path-quoting tests assert the new form.

Docker hygiene (audit kunchenguid#12) has no non-core call site in this repo and is
left for the morning interactive session.
Copilot AI lite review requested due to automatic review settings August 5, 2026 23:56

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Captain, this PR updates firstmate’s generated brief scaffolds so crews append status lines using tee -a (instead of shell redirection >>), aligning the scaffold guidance with Herdr sandbox behavior while keeping all runtime/spawn/watcher logic unchanged.

Changes:

  • Switched ship/scout/secondmate brief templates to instruct status appends via echo ... | tee -a $STATUS_FILE.
  • Updated brief-related tests to assert the new tee -a wording while preserving the existing path shell-quoting expectations.

Reviewed changes

Copilot reviewed 2 out of 3 changed files in this pull request and generated no comments.

File Description
bin/fm-brief.sh Updates scaffolded status-append instructions from >> to tee -a across ship/scout/secondmate briefs.
tests/fm-secondmate-safety.test.sh Adjusts FM_HOME path-quoting assertions to match the new tee -a status-append instruction.
tests/fm-brief.test.sh Updates secondmate absolute-path stability assertions to expect tee -a instead of >>.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@MabezDev MabezDev closed this Aug 6, 2026
@MabezDev
MabezDev deleted the fm/fm-audit-fix-a3 branch September 24, 2026 14:22
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.

2 participants