ReviewOS

craft-native/craft

release tooling: logsmith --no-output mutates CHANGELOG.md

#283
Closed glennmichael123 opened this 9 days ago ·
9 days ago

Problem

The installed logsmith 0.2.3 treats --no-output as if no output option was supplied and silently prepends the generated changelog to the repository CHANGELOG.md. The help text says --no-output should write to console only.

Reproduction

From a clean main checkout:

bun node_modules/.bin/logsmith --from v0.0.92 --to main --no-output --hide-author-email --no-dates --theme default
git status --short

Result:

M CHANGELOG.md

The command prints no changelog to stdout and inserts 53 lines into CHANGELOG.md.

Control checks:

  • bumpx patch --recursive --dry-run ... leaves the tree clean.
  • logsmith ... --output /private/tmp/preview.md leaves the tree clean and writes only the requested file.

This isolates the mutation to --no-output parsing/behavior. The generated text also duplicates an issue reference when a commit subject contains #211: the refactor entry appends the same #211 link twice.

Expected

  • --no-output emits only to stdout and never writes a tracked file.
  • A dry preview can be used safely in release audits.
  • Linkification de-duplicates issue references.
  • Add a clean-tree regression test around both output modes.

The accidental CHANGELOG.md mutation was detected and fully restored; no Craft source change or commit resulted. Discovered during the post-merge release audit for #254, #242, and #220.

9 days ago

Fixed upstream in @stacksjs/logsmith v0.2.12 (stacksjs/logsmith ce08fc2). The parser reports --no-output as output === false, which the CLI's default branch read as "no output given" and turned into CHANGELOG.md. It now prints to stdout only, with a regression test that runs the CLI in a scratch repository and asserts no file is written. Duplicate issue links are gone too: references are unique per id. Craft picks it up with its next logsmith bump.

Sign in to comment on this issue.