Skip to content

docs: bring documentation in line with 3.0 - #174

Merged
GingerGraham merged 8 commits into
mainfrom
claude/kind-newton-b82yww
Nov 6, 2026
Merged

GingerGraham merged 8 commits into
mainfrom
claude/kind-newton-b82yww

Conversation

@GingerGraham

Copy link
Copy Markdown
Owner

Summary

Addresses the seven open documentation issues for the 3.0 release in one PR, with one commit per issue so each can be traced. The documents still described the 2.x, Bash-only library and left out several 3.0 behaviour changes.

Every message text, mode and behaviour that is now documented was checked against logging.sh and by running the library (bash and dash). zsh and busybox are not installed in the session, so statements about those shells come from docs/shell-compatibility.md and docs/upgrading-to-3.0.md.

Changes

One commit per issue:

Things to review

These go beyond, or differ from, the issue text:

Testing

  • Markdown: all 43 tracked .md files pass markdownlint 0.47.0 with .markdownlint.yaml (the version pinned in .pre-commit-config.yaml)
  • Commit messages: all seven pass scripts/validate-commit-msg.sh
  • Examples added to the docs were run: POSIX sh Quick Start, Getting Started and Examples scripts (dash), the stub logger examples, and the file modes under umask 022, 002 and 000
  • Full suite: ./tests/run_tests.sh gives 687 tests, 651 passed, 11 failed, 25 skipped. origin/main gives the same numbers and the same 11 failures. They are permission tests that fail because the session runs as root.

Related issues

Closes #155
Closes #167
Closes #169
Closes #170
Closes #171
Closes #172
Closes #173

Refs #151
Refs #154
Refs #165


Generated by Claude Code

The README listed 7 suites and 201 tests. There are now more than 30
suites and the numbers go stale with every change.

* group the suites by area instead of listing per-suite counts
* tell the reader to run ./run_tests.sh to get current numbers
* use N placeholders in the example output
* link to docs/testing.md for cross-shell runs

Closes #155

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01THRgLKXYXnVz5L4DgTE7hk
tests/README.md said Bash 4.0 and never mentioned cross-shell runs.
docs/writing-tests.md had no guidance for tests that run under more
than one shell. The writing-tests and running-tests skills did not
mention TEST_SHELLS, so an agent changing logging.sh ran bash only.

* tests/README.md: require bash 3.2, add a cross-shell run section
* docs/writing-tests.md: add scenarios, known failures, golden files
  and the shell helpers in test_helpers.sh
* skills: add the TEST_SHELLS command and say it is required after any
  change to logging.sh

Closes #173

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01THRgLKXYXnVz5L4DgTE7hk
Findings INF-04 and INF-01 of the 3.0.0 security audit.

* initialization.md: sourcing resets every setting, and only
  SCRIPT_NAME is inherited (init_logger sanitizes it). Replace the
  "may use LOG_FILE from environment" example and the unset list, and
  use --no-color, which is the real option, in place of --colors.
* security-review skill: add the test_ prefix to the suite commands,
  replace the spoofable "readonly -p | grep" guard with _is_readonly
  and _logger_readonly, and name the _into sanitizer functions.
* running-tests skill: the same missing test_ prefix, which also made
  its examples fail with "Test file not found".
* sensitive-data.md, upgrading-to-3.0.md and the skill: list the
  characters that are kept on purpose (U+200E, U+200F, U+061C, U+200B
  and U+FEFF).

Closes #167

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01THRgLKXYXnVz5L4DgTE7hk
The README still described the 2.x, Bash-only library. 3.0 is POSIX sh
plus local and runs in bash 3.2+, bash --posix, zsh, dash and busybox
ash.

* reword the opening sentence and "Primary artifact" without "Bash"
* add a Features bullet for shell support and update the sanitization
  bullet to terminal control sequences and other control characters
* add a POSIX sh example to Quick Start next to the source example
* move the "Upgrading from 2.x?" pointer into a NOTE block at the top

Closes #169

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01THRgLKXYXnVz5L4DgTE7hk
The guides still described the 2.x, Bash-only library and used 2.7.0
as the install example.

* replace "Bash Logging Module" with bash-logger in the guide
  introductions (docs/README.md says "the bash logging module")
* getting-started: add a POSIX sh version of "Your First Script", and
  use <version> in the INSTALL_VERSION examples (2.x is unsupported)
* examples: note that the examples are bash and add a POSIX sh example
* troubleshooting: replace "Check your Bash version" with the
  supported shells and how to find each version, and add entries for
  [unknown] script names, "requires a value" and CONFIG notices on
  stderr, which changed in 3.0
* output-streams: &> works in bash 3.2 and zsh, not only Bash 4+
* configuration: use a neutral value in the example file header

Closes #170

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01THRgLKXYXnVz5L4DgTE7hk
Two 3.0 log file changes were described only in upgrading-to-3.0.md.
Every message text and mode below was checked against logging.sh and by
running the library.

* sensitive-data: add "re-checked on every write" and "private by
  default" to the measures list, add the runtime message, and drop the
  path from the "not writable" message, which logging.sh does not print
* troubleshooting: add "Other Users Cannot Read the Log File" and the
  "now a symbolic link" entry, separate the init-time "not writable"
  error from the runtime "Failed to write" error, and replace the
  chmod 644 fixes with the mode a created file really has
* initialization, getting-started, SECURITY: say who can read a created
  file and how to share it with a group

Closes #171

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01THRgLKXYXnVz5L4DgTE7hk
Only runtime-configuration.md and upgrading-to-3.0.md described the 3.0
behaviour. Each statement below was checked against logging.sh and by
running the library.

* sensitive-data: rewrite the ANSI section around terminal control
  sequences and control characters, state that very long messages are
  cut before they are sanitized, and replace the dead examples.md link
* initialization, configuration, api-reference: the unsafe ANSI option
  also keeps the other control characters, not only escape codes
* api-reference: log_to_journal and set_journal_tag descriptions
* journal-logging: add Tag Rules (what is rejected, the messages, the
  previous tag is kept, and the config file corrects instead)
* journal-logging, testing: add "Using a Stub logger in Tests". A
  readonly LOGGER_PATH alone is not enough when a real logger is
  installed; the suites also replace _find_and_validate_logger and
  check_logger_available
* troubleshooting: correct the tag row and add -t, --tag and
  set_journal_tag to the validation table

Closes #172

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01THRgLKXYXnVz5L4DgTE7hk
Copilot AI balanced review requested due to automatic review settings November 6, 2026 16:53

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Note

Copilot was unable to complete this review at the selected tier due to model policy or plan restrictions.

🟡 Changes recommended

Approval should be held until the two documented MarkdownLint MD013 line-length violations are addressed and the noted grammatical error in README.md is corrected.

2 open issues
What changed in this PR

This pull request updates the project’s documentation and contributor guidance to match bash-logger 3.0 behavior, replacing remaining 2.x-era Bash-only wording and refreshing examples and operational/security notes across the docs set.

Changes:

  • Aligns README and guides with 3.0 behavior and shell-neutral / POSIX sh-compatible examples where applicable.
  • Updates testing documentation and skills to reflect current suite structure, cross-shell workflows, and stub logger requirements.
  • Refreshes security/troubleshooting guidance for 3.0 (sanitization wording, journald/tag behavior, secure log-file modes, symlink/runtime checks).
File Summary
tests/​README.md Reworks test-suite documentation and cross-shell run guidance. Nit: avoid contradicting the runner exclusions (test_example.sh, test_helpers.sh) when describing tests/test_*.sh suites.
SECURITY.md Updates security guidance to reflect 3.0 behavior and secure defaults. Nit: add a trailing period to the noted list item for consistent punctuation.
README.md Shell-neutral wording, 3.0 upgrade note, and POSIX sh quick start/example updates. Nit: wrap an overlong blockquote line and fix “a expansion” → “an expansion”.
docs/​writing-tests.md Expands test-writing guidance (scenarios, failures, golden files, helpers). Nit: wrap the noted overlong paragraph line to satisfy MD013.
docs/​upgrading-to-3.0.md Updates/clarifies 3.0 upgrade guidance and behavior notes.
docs/​troubleshooting.md Adds/updates 3.0 troubleshooting entries and clarifies behavior.
docs/​testing.md Documents testing workflows including stub logger patterns consistent with 3.0 validation.
docs/​sensitive-data.md Updates sanitization and sensitive-data handling guidance to match 3.0 behavior.
docs/​runtime-configuration.md Minor wording/positioning updates for 3.0.
docs/​README.md Updates docs index introduction wording to match current positioning.
docs/​output-streams.md Clarifies redirection guidance and shell applicability.
docs/​log-levels.md Updates wording to match current naming/behavior.
docs/​journal-logging.md Updates journald/tag rules documentation and related testing notes.
docs/​initialization.md Clarifies initialization behavior and environment inheritance in 3.0.
docs/​getting-started.md Updates getting-started steps, examples, and 3.0-era notes.
docs/​formatting.md Wording and guidance refresh consistent with 3.0 docs set.
docs/​examples.md Updates examples and clarifies shell expectations/compatibility.
docs/​configuration.md Refreshes configuration guidance and unsafe-mode wording.
docs/​api-reference.md Aligns reference docs with 3.0 behavior descriptions.
.claude/​skills/​writing-tests/​SKILL.md Updates skill guidance to match current test workflow and cross-shell expectations.
.claude/​skills/​security-review/​SKILL.md Updates security review guidance and references to match current conventions.
.claude/​skills/​running-tests/​SKILL.md Corrects/updates test-running guidance to match current suite/workflow naming.

This pull request is ready to be approved.

Review effort: Balanced

Comment thread README.md Resolved
Comment thread docs/writing-tests.md Resolved
* README: "a expansion" becomes "an expansion", and the gist note is
  wrapped so no line passes 200 characters
* writing-tests: wrap a 203-character paragraph

Refs #169
Refs #173

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01THRgLKXYXnVz5L4DgTE7hk
@GingerGraham
GingerGraham merged commit d8b8c9a into main Nov 6, 2026
13 checks passed
@GingerGraham
GingerGraham deleted the claude/kind-newton-b82yww branch November 6, 2026 17:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

3 participants