Skip to content

fix(cli): scope check baselines to the selected project - #167

Draft
SaKaNa-Y wants to merge 4 commits into
x18n-dev:mainfrom
SaKaNa-Y:fix/check-baseline-project-ownership
Draft

SaKaNa-Y wants to merge 4 commits into
x18n-dev:mainfrom
SaKaNa-Y:fix/check-baseline-project-ownership

Conversation

@SaKaNa-Y

@SaKaNa-Y SaKaNa-Y commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

Summary

When documentation and web share a baseline, x18n check --project documentation counts known web diagnostics as fixed. Adding --update-baseline deletes those entries, so the next workspace check fails on the same errors again.

Each new entry now records which project reported it. For x18n check --project documentation --update-baseline, the change is:

- Replace the shared baseline with the current documentation entries.
+ Replace the documentation entries and keep the web entries.

Two projects can report the same file. If a scoped check needs the owner of an older entry, it exits with code 2 before applying fixes or writing the baseline. The message asks the user to review a full workspace check, then refresh the baseline once.

Evidence

In playground/monorepo, the shared baseline contained three web entries and none from documentation. The same commands produced these results:

Command Before After
x18n check --project documentation Reported 3 fixed Reported 0 fixed
x18n check --project documentation --update-baseline Deleted all 3 web entries Kept all 3 web entries
x18n check Reported the same errors again, exit 1 Suppressed all 3, exit 0

A separate test removed one of two configured projects. Both the scoped check and the scoped refresh exited 2 and preserved the old entry.

Merge Danger

Door: Two-way. The code can be reverted. A committed baseline can be restored from Git.

Blast Radius: Baselines. An incorrect project match can hide a new diagnostic from CI or make an accepted one fail CI again.

A project check compared its diagnostics against every project in the
shared baseline. Refreshing one project could discard every sibling's
accepted diagnostics.

Store the reporting project's workspace-relative configuration and
project directories. Keep sibling entries through a scoped refresh and
preserve workspace-wide matching for older baselines. When an explicit
selection cannot determine ownership, require an unscoped refresh before
applying fixes or updating the file.
Paths with spaces or backslashes need different quoting in different shells. Ask the caller to reuse their original arguments when a portable command cannot express the path directly.
@vercel

vercel Bot commented Nov 18, 2026

Copy link
Copy Markdown

@SaKaNa-Y is attempting to deploy a commit to the NuxtLabs Team on Vercel.

A member of the Team first needs to authorize it.

@SaKaNa-Y
SaKaNa-Y marked this pull request as draft November 18, 2026 07:19
Validate the fields required by previous readers and the optional project definition. Keep the original rows so scoped refreshes retain legacy metadata and occurrence counts.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant