Repository navigation
chore: prettier baseline — config, CI format gate, tree reformat - #438
Conversation
📦 Built Package ArtifactBranch: Option A — Install from npm PR tag (recommended)In your adapter project: npm install acp-kernel@pr-438Each push to this PR publishes a new version under the Option B — Download artifact
tar xzf acp-kernel-pr438.tgz
npm install ./packageThis comment is automatically updated on each push. |
[bot] 🏷 Reviewed PR #438 (branch Base & CI: head sits directly on current master ① Original issue (#435) — direction is right: the unsatisfiable ② Regression review — existing behavior on every touched path (127 files):
③ Local checks I ran on the PR head:
Recommendation: merge #438 now (the only clean/green/current-base option; unblocks the §7.2/§7.4 gates), then land #418's core fix (the Behavior change (flagged per policy): formatting becomes a hard CI gate for every PR/push to master (previously ungated) — the intended fix, disclosed in the PR body. No runtime/wire-format/prompt changes anywhere. —— |
[bot] 🏷 Cross-link from #445 (now closed as duplicate of this PR): #445 was filed during #443 implementation after hitting the broken Independent datapoint for the record (pristine master @ 476d440, prettier 3.9.6, all other defaults): printWidth 120 → 162 failing files / +10.6K−12.5K changed lines, vs your width-80 → 125 files / ~+15.9K−9.3K. Width 80 remains the min-diff choice by file count as measured in your PR body; noting only that 120 would preserve long single-line signatures if that ever matters to you. No action needed beyond the pin question — everything else here stands as reviewed. |
9654f8b to
c74586f
Compare
c74586f to
a68221f
Compare
The format gate runs inside the test matrix (both node versions) since the prettier-baseline branch; a separate format job is a redundant runner. Stacked on 2026-09-26_prettier-baseline (#438).
|
Rebased onto master (post-#448): now a clean 3-commit stack |
The format gate runs inside the test matrix (both node versions) since the prettier-baseline branch; a separate format job is a redundant runner. Stacked on 2026-09-26_prettier-baseline (#438).
[bot] 🏷 Re-reviewed the rebased head Base & CI: merge-base == current master Independent diff re-verification vs new master (my own scripts, not the author's):
Related-PR status (good news): #418 has already been retargeted onto this head ( Behavior change (flagged per policy): formatting becomes a hard CI gate (previously ungated) — the intended fix. No runtime/wire-format/prompt changes anywhere. —— |
a68221f to
53033aa
Compare
The format gate runs inside the test matrix (both node versions) since the prettier-baseline branch; a separate format job is a redundant runner. Stacked on 2026-09-26_prettier-baseline (#438).
The format gate runs inside the test matrix (both node versions) since the prettier-baseline branch; a separate format job is a redundant runner. Stacked on 2026-09-26_prettier-baseline (#438).
Closes #435
Root cause
No prettier config in the repo →
prettier --check .ran pure defaults against a mixed-style tree (~half ofsrc/*.tsalready conformed; JSON/config files hand-indented 4-space; prose lines over 80 cols). 125 files failed on master itself (verified:npm ci→ prettier 3.9.6 per lockfile →npm run format:check→ 125). CI never gated formatting, so drift accumulated silently and the check required by AGENTS.md §7.2/§7.4 was unsatisfiable.Commits
chore: add prettier config and CI format gate.prettierrc: explicit pin of prettier defaults (printWidth 80, tabWidth 2, semi, double quotes, trailingComma all, bracketSpacing, arrowParens always, endOfLine lf) — written out rather than{}so intent is documented and a future prettier major's default change cannot silently re-drift the tree..prettierignore:dist/,node_modules/,.tmp/, andpackage-lock.json(npm rewrites it in its own formatting on every dep change — formatting it would churn forever; it was ~4k of the original diff lines).ci.yml: new standaloneformatjob (checkout → setup-node 22 →npm ci→npm run format:check), runs on PRs to master + pushes to master.style: apply prettier defaults across tree— 124 files, layout only (+15,940 / −9,290, mostly line-wrap splits).Why "pure defaults" (the owner call in #435)
Measured failing-file counts under candidate configs against the current tree:
The de-facto style is closer to prettier defaults than to any consistent alternative (double quotes ✓, semis ✓, trailing commas ✓; deviations are only 80-col wrapping + 4-space JSON indent), so adopting defaults minimizes both the reformat diff and future churn.
Proof the reformat changed nothing
npm run typecheck✓ ·npm test1122/1122 ✓ ·npm run build✓ ·npm run format:check✓npx prettier --write .over the committed tree produces zero diff..tsfiles (whitespace-stripped old vs new): every character identical except;member separators before}in type literals: ×40 (TS no-op),"→') because that side needed fewer escapes — all 7 verified equal after decoding.package.json/tsconfig.json: value-equal via JSON.parse.pr-artifact.yml: pure 4→2-space reindent (block-scalar relative indentation preserved). Markdown docs: table padding,*x*→_x_, blank lines after headings, embedded-code indent — render-neutral. Prompt fixtures (tests/fixtures/*.txt) untouched — prettier has no parser for them.Known upstream quirk surfaced (not fixed here): prettier 3.9.6 oscillates across runs on one wrapped signature whose return type is an object literal (
parseCallText, src/hide-consumed.ts); two passes reach the fixed point this tree now sits at.Behavior changes (flagged per policy)
formatjob — previously ungated. Future PRs with drifted formatting fail CI (that is the fix).Deliberate deviations from the issue proposal
formatjob instead of insidepr-validation: pr-validation is script-only today (no node/npm); adding a fullnpm cithere for one command duplicates what the test matrix already does per node version.package-lock.jsonalready resolves 3.9.6 and CI usesnpm ci(exact lockfile install), so resolution cannot drift without an intentional lockfile update. Happy to addprettier@3.9.6as a one-line follow-up if you want belt-and-braces.