Skip to content

fix(ci): a failed yarn run is not a dependency install (#359) - #360

Merged
PabloCodes7 merged 1 commit into
mainfrom
fix/yarn-run-footer-is-not-a-dependency-install
Jul 14, 2026
Merged

PabloCodes7 merged 1 commit into
mainfrom
fix/yarn-run-footer-is-not-a-dependency-install

Conversation

@PabloCodes7

Copy link
Copy Markdown
Contributor

Closes #359.

The bug

yarn classic ends every command with info Visit https://yarnpkg.com/en/docs/cli/<cmd> for documentation about this command., and node_dependency_install matched the bare host yarnpkg.com. So a failed yarn run prettier / yarn lint / yarn test scored a dependency verdict on a documentation link and the maintainer was told to reconcile a lockfile.

facebook/react's "Run prettier" step, run 29335289512, failed because a file wasn't formatted. The footer was /cli/run, not /cli/install. Reproduces identically on 0.6.1 through 0.7.1:

node_dependency_install  0.53  ['info Visit https://yarnpkg\.com']

Here node_dependency_install and javascript_lint each match exactly one witness (the footer vs prettier), and the dependency rule wins the tie on rule order.

The fix

One regex in classify.py: pin the footer to the two subcommands that are a dependency operation (install, add). The run/lint/test footers no longer match, so the log's real prettier witness wins:

javascript_lint  0.53  ['prettier']

Real yarn install failures keep their /cli/install footer (and the older /lang/en/…/install form), plus their other strong signals — untouched.

Evidence

  • Narrowness: the other five real logs I swept (scipy, tokio, duckdb, vue, polars) classify identically before and after — zero collateral.
  • Regression test tests/test_yarn_run_footer_notice.py: the react excerpt → javascript_lint; the footer line alone is no longer a dependency verdict; and a negative subtest keeps install / add / /lang/en/…install footers landing node_dependency_install.
  • Mutation-check: reverting the regex turns the two false-positive assertions red.
  • Benchmark 221/221, top-1 1.0 unchanged (no new fixture, no new class). Real-log excerpt committed at examples/real-world/react-29335289512-excerpt.log; benchmark page and CHANGELOG updated.

yarn classic ends every command with `info Visit
https://yarnpkg.com/en/docs/cli/<cmd> for documentation about this command.`,
and node_dependency_install matched the bare host. A failed `yarn run prettier`
/ `yarn lint` / `yarn test` therefore scored a dependency verdict on a
documentation link. facebook/react run 29335289512 (the "Run prettier" step)
failed on a formatting diff and was sent back to reconcile a lockfile.

Pin the footer to the two subcommands that ARE a dependency operation
(install, add); the run/lint/test footers no longer match, so the log's real
prettier witness wins and it answers javascript_lint. Real yarn install
failures keep the /cli/install footer and their other signals.

Regression test with a negative case (install/add footers still land
node_dependency_install); real-log excerpt committed; benchmark 221/221
unchanged.
@PabloCodes7
PabloCodes7 merged commit 6251503 into main Jul 14, 2026
5 checks passed
@PabloCodes7
PabloCodes7 deleted the fix/yarn-run-footer-is-not-a-dependency-install branch July 14, 2026 23:39
@PabloCodes7 PabloCodes7 mentioned this pull request Jul 15, 2026
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.

False positive: a failed yarn run (prettier/lint/test) is classified as node_dependency_install

1 participant