Skip to content

fix(eslint-plugin-oracles): remove legacyCampaigns; every raw campaign in an oracle file is reported - #23

Merged
KyleAMathews merged 3 commits into
mainfrom
overnight/remove-legacy-campaigns
Nov 11, 2026
Merged

KyleAMathews merged 3 commits into
mainfrom
overnight/remove-legacy-campaigns

Conversation

@KyleAMathews

Copy link
Copy Markdown
Contributor

Summary

This change removes the settings.oracles.legacyCampaigns setting from @tanstack/eslint-plugin-oracles.

The rule oracle/oracle-property-only now reports every raw campaign in an oracle file. No list can exempt a file.

A configuration that still sets legacyCampaigns gets one removedSetting report at line 1 of each oracle file. The message starts with "legacyCampaigns is removed: convert the listed files to oracleProperty".

The rule does not throw on the setting. The rule also does not ignore the setting silently.

Why

The maintainer decision of 2026-11-10 says: "remove legacyCampaigns, as that's another out for agents".

TanStack DB emptied its legacyCampaigns list in TanStack/db#2408. Thus no file in DB needs the exemption now.

Changes

  • src/registration.js no longer parses the list. It sets legacyCampaignsSet when the configuration gives the setting a value other than undefined.
  • src/rules/oracle-property-only.js removes the entry checks and the exemption. The rule no longer has the messages baselineWithoutReason, staleBaseline, malformedList, malformedEntry, and refusedEntry. The new message is removedSetting.
  • The oracle tests/oracle-property-only-oracle.property.test.js has a new law and a new model. The model is now short: a set value causes one removal report, and the rule reports each use.
  • The README section for the rule now tells users that the setting is gone.
  • The plugin has never been released. So a new patch changeset states only the current behavior, and the pending changeset for the first release no longer describes the setting.

Evidence

  • Law: In an oracle file, the rule reports each raw campaign and each legacy import, and no configuration exempts the file. An implementation module is still exempt from its own uses. A legacyCampaigns setting with any value causes one removedSetting report at line 1, also in an implementation module. The authority is the maintainer decision of 2026-11-10 and the decision of 2026-11-09 that oracleProperty is the only campaign API. The never-throw part comes from frozen principle P8.
  • Reach: The new legacy dimension generates three forms. The first is an absent setting (no key, or undefined). The second is a list of any subset of ten entry kinds. The third is one of five values that are not lists. Each of thirteen required states has a constructed history. On the fixed seed 20261109, 17 histories reached "a file that a legacyCampaigns entry names still reports its raw uses". 8 histories reached the empty list. 18 histories reached a value that is not a list. 8 histories reached the implementation module with the setting. 20 histories reached refused or malformed entries.
  • RED: On 1bb905a, npx vitest --run --maxWorkers=2 tests/oracle-property-only-oracle.property.test.js failed both seeds. The shrunk history had legacy: { form: "list", entries: [] }, and the expected removedSetting report was missing. A scratch run that compared only reports after line 1 also failed. In that run, a reasoned entry for the file hid the rawProperty report.
  • GREEN: pnpm --filter @tanstack/eslint-plugin-oracles test -- --maxWorkers=2 passed 19 test files and 4320 tests. pnpm typecheck, pnpm lint:check, and prettier --check on the changed files also passed.
  • Mutant: Mutant (a) kept the exemption for a listed file with a reason. The oracle failed both seeds on entries: ["reasoned"] because the raw use was not reported. Mutant (b) ignored the setting silently. The oracle failed both seeds on an empty list because the removal report was missing.
  • Limits: The grammar does not generate a legacyCampaigns value whose read throws, such as a getter or a proxy. The rule still does not follow an aliased campaign, a campaign in a helper, or a re-exported fast-check binding. TanStack DB still reads the setting in check-legacy-oracle-campaigns.mjs and in the legacy-campaign-baseline oracle. DB must remove them when it updates its pin of this plugin. If DB keeps an empty legacyCampaigns key, each oracle file gets the removal report.

Size

The production change removes a net 90 lines from the rule and the settings parse. It adds no new state or branch other than one report.

Review round

An independent review found no defect in the rule. It found that the first changeset was minor and announced a removal that no release ever had. The changeset is now a patch that states only the current behavior.

This pull request and its description were written by Isaac.

KyleAMathews and others added 3 commits November 11, 2026 01:52
… campaign

oracle/oracle-property-only no longer exempts files listed in
settings.oracles.legacyCampaigns. A configuration that still sets the
setting, to any value, gets one removedSetting report at line 1 of each
oracle file and exempts nothing. The baselineWithoutReason, staleBaseline,
malformedList, malformedEntry, and refusedEntry reports are removed with it.

Maintainer decision 2026-11-10: "remove legacyCampaigns, as that's another
out for agents".

Co-authored-by: Isaac <no-reply@databricks.com>
…t behavior in the changeset

The plugin has never been released, so the changeset is a patch and states
only what the rule does now, not a removal of a setting no release had.

Co-authored-by: Isaac <no-reply@databricks.com>
Co-authored-by: Isaac <no-reply@databricks.com>
@changeset-bot

changeset-bot Bot commented Nov 11, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: e88aa0c

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@tanstack/eslint-plugin-oracles Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@coderabbitai

coderabbitai Bot commented Nov 11, 2026

Copy link
Copy Markdown

Important

  • Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 3dcf57c9-4f9b-4aa9-a52c-529be1fbc5ad
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@pkg-pr-new

pkg-pr-new Bot commented Nov 11, 2026

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/TanStack/oracles/@tanstack/eslint-plugin-oracles@23
npm i https://pkg.pr.new/TanStack/oracles/@tanstack/oracles@23

commit: e88aa0c

@KyleAMathews
KyleAMathews merged commit a3375e3 into main Nov 11, 2026
8 checks passed
@KyleAMathews
KyleAMathews deleted the overnight/remove-legacy-campaigns branch November 11, 2026 09:19
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