From 0d97648c3d86108d853051fa85f026e8524d75f7 Mon Sep 17 00:00:00 2001 From: Thomas Kosiewski Date: Tue, 16 Jun 2026 11:00:25 +0000 Subject: [PATCH] fix: sync readme version in release PRs --- README.md | 4 +-- release-please-config.json | 1 + test/unit/tools/release-please-runner.test.ts | 33 ++++++++++++++++++- 3 files changed, 35 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index dc6cf0f..fb26232 100644 --- a/README.md +++ b/README.md @@ -107,7 +107,7 @@ Rendering uses Ghostty's terminal engine through two interchangeable backends (` ## Where it came from -I maintain [`coder/claudecode.nvim`](https://github.com/coder/claudecode.nvim) and was drowning in issues and PRs I couldn't easily reproduce. Neovim is a TUI, and "reproduce this, configure that, screenshot the result" is painful to script with sleeps and `capture-pane`. `agent-tty` lets me spin up an isolated, reproducible terminal, hand it to a coding agent to attempt a fix, and then verify the fix with a fresh session and a recording I can actually look at. +I maintain [`coder/claudecode.nvim`](https://github.com/coder/claudecode.nvim) and was drowning in issues and PRs I couldn't easily reproduce. Neovim is a TUI, and "reproduce this, configure that, screenshot the result" is painful to script with sleeps and `capture-pane`. `agent-tty` lets me spin up an isolated, reproducible terminal so an agent can first reproduce the issue reliably, turn that reproduction into a fixture, and only then attempt a fix with that fixture — plus a fresh recording — as the hard validation gate. A colleague then used `agent-tty` to build an experimental TUI for Coder agents almost entirely by letting coding agents drive it, checking the screenshots and recordings it produced instead of watching over their shoulder. That's the loop it's built for: an agent acts, `agent-tty` captures reviewable evidence, and a human (or another agent) verifies. @@ -138,7 +138,7 @@ See [`docs/AGENT-SKILLS.md`](./docs/AGENT-SKILLS.md). ## Status & platform support -`agent-tty` is `0.3.0` and focused on reliable, isolated, reviewable terminal and TUI automation through a stable CLI. +`agent-tty` is `0.4.3` and focused on reliable, isolated, reviewable terminal and TUI automation through a stable CLI. - Linux and macOS are tier-1; Windows is tier-2 and not CI-tested. - Screenshots and WebM video depend on Playwright/Chromium and the `ghostty-web` backend. diff --git a/release-please-config.json b/release-please-config.json index a5d05a5..ff7531f 100644 --- a/release-please-config.json +++ b/release-please-config.json @@ -7,6 +7,7 @@ "include-component-in-tag": false, "include-v-in-tag": true, "bump-minor-pre-major": true, + "extra-files": ["README.md"], "pull-request-title-pattern": "chore(release): ${version}", "pull-request-header": "The next agent-tty release. Merging this PR creates the release tag and GitHub Release and starts the publish pipeline.", "pull-request-footer": "Maintained by the release-please workflow. Notes are regenerated by Communique on every push to main, so manual edits to this PR are overwritten." diff --git a/test/unit/tools/release-please-runner.test.ts b/test/unit/tools/release-please-runner.test.ts index 247bf25..338110b 100644 --- a/test/unit/tools/release-please-runner.test.ts +++ b/test/unit/tools/release-please-runner.test.ts @@ -5,6 +5,7 @@ import { describe, expect, it } from 'vitest'; // document — the merged release PR body must parse back into a version + // notes, otherwise no GitHub Release is created on merge. import { BranchName } from 'release-please/build/src/util/branch-name.js'; +import { Generic } from 'release-please/build/src/updaters/generic.js'; import { PullRequestBody } from 'release-please/build/src/util/pull-request-body.js'; import { PullRequestTitle, @@ -24,7 +25,7 @@ import { normalizeCommuniqueBody, todayIsoDate, } from '../../../src/tools/release-please-runner.js'; -import { writeFileSync } from 'node:fs'; +import { readFileSync, writeFileSync } from 'node:fs'; const SAMPLE_BODY = [ '### Added', @@ -97,6 +98,36 @@ describe('buildCommuniqueArgs', () => { }); }); +describe('README version release-please contract', () => { + it('keeps the status sentence wired to release-please generic updates', () => { + const readme = readFileSync( + new URL('../../../README.md', import.meta.url), + 'utf8', + ); + const packageJson = JSON.parse( + readFileSync(new URL('../../../package.json', import.meta.url), 'utf8'), + ) as { readonly version: string }; + const config = JSON.parse( + readFileSync( + new URL('../../../release-please-config.json', import.meta.url), + 'utf8', + ), + ) as { + readonly packages: { + readonly '.': { readonly 'extra-files': readonly string[] }; + }; + }; + const statusSentence = (version: string): string => + `\`agent-tty\` is \`${version}\` and focused on reliable, isolated, reviewable terminal and TUI automation through a stable CLI. `; + + expect(config.packages['.']['extra-files']).toContain('README.md'); + expect(readme).toContain(statusSentence(packageJson.version)); + expect( + new Generic({ version: Version.parse('9.8.7') }).updateContent(readme), + ).toContain(statusSentence('9.8.7')); + }); +}); + describe('formatChangelogSection', () => { it('uses the bracketed no-v heading with the house date style', () => { const section = formatChangelogSection('0.4.2', '2026-06-12', SAMPLE_BODY);