Repository navigation
ci(release): list only CLI changes in CLI release notes - #694
aliasunder merged 10 commits into
Conversation
The CLI release notes listed every commit that touched cli/, including the release's own version bump, test-only changes, and commits that only reworded comments or the .env template comments in cli/src/env.ts. A commit is now listed only when its diff under cli/ adds or removes a line that is not blank and not a comment. Files under cli/src/__tests__/ and the "version" line of cli/package.json are not counted; in .ts files, lines starting with #, //, /*, * or */ are comments. The logic moves to .github/scripts/generate-cli-notes.sh, tested against real git. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Add generate-cli-notes.test.ts to AGENTS.md's script-test enumeration
AGENTS.md's test-conventions exception enumerates the release-script tests in src/tests/ as install-deps.test.ts, generate-notes.test.ts, and update-changelog.test.ts; this PR adds generate-cli-notes.test.ts under that same exception, leaving the enumeration stale. Failure scenario: A contributor or agent checking AGENTS.md's list of src/tests/ script tests does not find generate-cli-notes.test.ts and 'fixes' its location — moving it next to the script or widening vitest's include paths — the exact outcome the same paragraph forbids. Suggested fixExtend the parenthetical list in AGENTS.md's test-conventions exception to include generate-cli-notes.test.ts.umm-actually · z-ai/glm-5.3-flash |
|
umm-actually re-reviewed at 1 new finding(s) posted (15 tracked finding(s) across all runs). umm-actually · z-ai/glm-5.3-flash |
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…-main' into fix-694
A file name with a space gets a trailing tab in the diff header, and a name with special characters is quoted, so neither matched the header pattern. The path then kept the previous file's value: a comment-only change to such a .ts file was listed, and a heading added to such an .md file after a .ts comment was read as a .ts comment and left out. The path now resets per file and the header pattern accepts both forms. Also lists generate-cli-notes.test.ts beside the other release-script tests in AGENTS.md, and says in CONTRIBUTING.md that in files other than .ts every non-blank line counts. Ship-Check: pr-review · claude-opus-5-5 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- generate-cli-notes.sh: one pathspec shared by git log and diff-tree; drop prefix flags diff-tree already defaults to (plumbing ignores diff.noprefix); state why merges are skipped, why renames are off, that the .ts rule reads only how a line starts, and what the describe fallback is for - cli_release.yml: name --generate-notes, say how to create the release by hand, and when the existing-release skip is reached - CONTRIBUTING.md: CLI bullet puts the counting rule after the skip list and covers moved files and which dependency bumps count - AGENTS.md: list the shell-script test locations as items Ship-Check: code-quality · claude-opus-5-5 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The patch reader resets its hunk state at each file's diff line, so the next file's headers are not read as changed lines. No test covered a comment-only commit touching more than one file; removing the reset left every test passing while such a commit was listed in the CLI notes. Ship-Check: test-audit · claude-opus-5-5 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- git log and git show pass --no-show-signature, so a log.showSignature setting no longer adds lines that break the hash loop (exit 128) or land in the notes when the release commands are run by hand. - A whitespace-only line in a CRLF file counts as blank. - The workflow runs the script with bash, like the server release scripts. - Comments and CONTRIBUTING.md state that the rules still apply with no earlier tag and to commits a merge brings in, and that code lines starting like a comment (the bin.ts shebang) are skipped too. Ship-Check: bug-check · claude-opus-5-5 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…in CLI notes A # line shaped like a setting (# KEY=value, the key in capitals) in a .ts file now counts. The .env templates in cli/src/env.ts ship optional settings commented out for the user to uncomment, so a commit that adds or renames one changes what the CLI writes. Rewording a template's comment text is still left out. Ship-Check: bug-check · claude-opus-5-5 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
--no-renames and --text change no output (diff-tree detects no renames unless asked, and cli/ has no binary files), --no-show-signature guards a git setting no runner has, and the optional previous-tag argument is never passed. The notes are identical for all 55 CLI tags before and after. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Response to the PR-level finding:
🔍 ship-check · pr-monitor · claude-opus-5-5 |
…-main' into fix-694
Summary
The CLI release notes list every commit that touches
cli/, so they include changes no CLI user gets: the release's own version bump, test-only commits, and commits that only reword comments (including the comment text of the.envtemplates incli/src/env.ts).A commit is now listed only when its changes under
cli/add or remove a line that none of these rules skips:cli/src/__tests__/"version"line ofcli/package.json(the release bump).tsfiles, lines that start, after any indent, with#,//,/*or*: comments, and the.envtemplates' comment text. A#line shaped like a setting (# KEY=value) still counts, because the templates ship optional settings commented out for the user to uncommentIn other files,
cli/README.mdincluded, every non-blank line counts. Dependency changes incli/package.jsonstay listed, and the "Published to npm" footer is unchanged. With no earlier CLI tag, the range is still the whole history, and the same rules decide which of its commits are listed..github/scripts/generate-cli-notes.sh: new script that prints the listed commits since the previous CLI tag, one- <subject>line each, newest first..github/workflows/cli_release.yml: the "Create GitHub release" step runs the script withbashinstead ofgit log -- cli/.src/__tests__/generate-cli-notes.test.ts: runs the real script underbashagainst a temporary git repository.scripts/__tests__/lint-shell.test.ts: lists the new script among the shell scripts ShellCheck checks.CONTRIBUTING.md: the release-notes section states the CLI rule.AGENTS.md: the script-test conventions list the new test.Test plan
cli-v*tag (55): cli-v0.16.0 lists exactly feat: run more than one vault-cortex install on a machine with INSTANCE_NAME #686, fix(remote): sync app.json by default so a blank daily-notes folder follows Obsidian's new-note folder #682 and fix(daily-notes): read the vault-root and blank folder settings the way Obsidian does #677 and leaves out its own bump, fix(trash): never sweep a note Obsidian trashed under a name the server recorded #665 and fix(search): follow daily-note settings in orphan defaults #642, whosecli/changes are comment text only. Counting setting lines changed the result for five commits in the whole history (docs: update feature surface docs for hybrid search #225, feat: env var consolidation — sync script, drift tests, AGENTS.md checklist #314, fix(security): gate Forwarded/X-Forwarded-For client-IP trust behind explicit proxy config #468, fix(deploy)!: trust the gateway's Forwarded header behind a locked tunnel; TRUST_FORWARDED_HOPS replaces TRUST_FORWARDED_HEADER #484, fix(remote): never push a deletion for a file the server never downloaded #617), each adding or renaming a commented-out.envsetting; without it, cli-v0.10.6 and cli-v0.12.0 would have had no listed commits.npx vitest run src/__tests__/generate-cli-notes.test.ts scripts/__tests__/lint-shell.test.ts: 30 tests pass; each rule was mutated once and fails the test that covers it./bin/bash3.2.npm run lint:shell, markdownlint and prettier pass.🤖 Generated with Claude Code