Skip to content

build: move repo to prettier 3.9.x (fix template format:check drift)#827

Merged
DaveHanns merged 1 commit into
masterfrom
chore/format-agents-md
Jun 30, 2026
Merged

build: move repo to prettier 3.9.x (fix template format:check drift)#827
DaveHanns merged 1 commit into
masterfrom
chore/format-agents-md

Conversation

@DaveHanns

@DaveHanns DaveHanns commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

Root cause: prettier version drift between root and templates

The per-template format:check (run in CI by Test Node.js templates / Test LLM AI Node.js templates) started failing on every PR run on/after 2026-06-27 (e.g. #824) due to a version mismatch:

prettier range lockfile version it installs
repo root ^3.7.4 pnpm-lock.yaml 3.8.3 (frozen)
each template ^3.5.3 ❌ none 3.9.x (fresh npm install floats to newest)

Prettier 3.9.0 (2026-06-27) reformats the comment-only objects in the AGENTS.md input/output schema snippets. So the templates' 3.9.x flagged files that the root's pinned 3.8.3 considers correctly formatted.

Fix: put the whole repo on prettier 3.9.x

Bump the root prettier and reformat, so the root and the templates' floating installs agree.

Notes

  • Root lands on 3.9.1, not 3.9.3 — the repo's minimumReleaseAge: 1440 (24h) blocks 3.9.2/3.9.3 (released today). The templates' npm install has no such policy and floats to 3.9.3; 3.9.1 and 3.9.3 produce identical output for these files (verified). They'll converge once 3.9.3 is >24h old.

  • The templates still float (^, no lockfile), so a future prettier release that changes formatting can re-introduce this for the templates (the root is shielded by its lockfile until bumped deliberately).

@DaveHanns DaveHanns requested a review from l2ysho June 29, 2026 14:57
@DaveHanns DaveHanns force-pushed the chore/format-agents-md branch from 7758a84 to dd148fd Compare June 29, 2026 15:09
@DaveHanns DaveHanns changed the title chore: fix prettier check on generated AGENTS.md chore: reformat generated AGENTS.md for prettier 3.9.x Jun 29, 2026
@DaveHanns DaveHanns force-pushed the chore/format-agents-md branch from dd148fd to 0131763 Compare June 29, 2026 15:22
@DaveHanns DaveHanns changed the title chore: reformat generated AGENTS.md for prettier 3.9.x chore: make AGENTS.md schema snippets prettier-version-proof Jun 29, 2026
@DaveHanns DaveHanns removed the request for review from l2ysho June 29, 2026 18:04
@DaveHanns DaveHanns marked this pull request as draft June 29, 2026 18:05
@DaveHanns DaveHanns force-pushed the chore/format-agents-md branch from 0131763 to 4d91748 Compare June 29, 2026 18:11
@DaveHanns DaveHanns changed the title chore: make AGENTS.md schema snippets prettier-version-proof fix: pin templates' prettier to 3.8.3 (stop CI version drift) Jun 29, 2026
@DaveHanns DaveHanns force-pushed the chore/format-agents-md branch from 4d91748 to b12efb0 Compare June 29, 2026 19:56
@DaveHanns DaveHanns changed the title fix: pin templates' prettier to 3.8.3 (stop CI version drift) fix(test): drop brittle per-template prettier format:check Jun 29, 2026
The per-template `format:check` (run in CI by the Node template test jobs)
was failing because the repo root and the templates ran different prettier
versions:

- the repo root pins prettier 3.8.3 via pnpm-lock.yaml (range `^3.7.4`), so it
  never drifted;
- each template declares prettier as an open `^` range with NO lockfile, so a
  fresh `npm install` floats to the newest available — 3.9.x.

Prettier 3.9.0 (2026-06-27) reformats the comment-only objects in the AGENTS.md
input/output schema snippets, so the templates' 3.9.x considered the committed
files mis-formatted while the root's 3.8.3 considered them fine — a version
disagreement, not a real formatting problem.

Move the repo root onto the latest prettier and reformat, so the root and the
templates' floating installs agree:

- bump prettier to 3.9.1 (3.9.2/3.9.3 are blocked by the repo's 24h
  `minimumReleaseAge` policy; the templates' npm install floats to 3.9.3, which
  produces identical output for these files — verified);
- reformat with it. The ONLY content change is the AGENTS.md schema snippets
  collapsing onto one line (`"properties": {/* ... */}`); no other files change.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@DaveHanns DaveHanns force-pushed the chore/format-agents-md branch from b12efb0 to bd7ed86 Compare June 29, 2026 20:54
@DaveHanns DaveHanns changed the title fix(test): drop brittle per-template prettier format:check build: move repo to prettier 3.9.x (fix template format:check drift) Jun 29, 2026
@DaveHanns DaveHanns self-assigned this Jun 29, 2026
@DaveHanns DaveHanns added the adhoc Ad-hoc unplanned task added during the sprint. label Jun 29, 2026
@DaveHanns DaveHanns requested a review from l2ysho June 29, 2026 22:27
@DaveHanns DaveHanns marked this pull request as ready for review June 29, 2026 22:29
@DaveHanns DaveHanns requested a review from vladfrangu June 29, 2026 22:32
Comment thread agent-bases/js.AGENTS.md
"type": "object",
"schemaVersion": 1,
"properties": {
/* define input fields here */

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

We probably don't want this collapsed right?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I think it does not really matter much for the agents.

Just for a record, this was the issue failing the tests. The older version of prettier (root level) kept it spread, but the newer versions of prettier (template level) marked it as incorrect formatting.
Now both root and template level are at versions that collapse it.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

You can use // comment if you want force it expanded

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Thanks @fisker, I was considering it as a possible solution, but decided to not clutter the md files if not really necessary. As these are supposed to be read mainly by agents, the one-liner is not really an issue.

@DaveHanns DaveHanns merged commit 08c19cb into master Jun 30, 2026
77 of 79 checks passed
@DaveHanns DaveHanns deleted the chore/format-agents-md branch June 30, 2026 12:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

adhoc Ad-hoc unplanned task added during the sprint.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants