Skip to content

no-data-taggederror's fix line names Schema.TaggedErrorClass, which the effect-4 catalog does not export #9416

Description

@cansirin

What is wrong

biome-plugins/no-data-taggederror.grit fires an error diagnostic whose fix line tells the
reader to write Schema.TaggedErrorClass<MyError>()(...). effect@4.0.0-rc.112 does not export
that name. effect/dist/Schema.d.ts declares export declare const TaggedError at line 9870 and
nothing called TaggedErrorClass anywhere in the file, so following the rule's own fix line
verbatim yields TS2551: Property 'TaggedErrorClass' does not exist.

The rule contradicts the two files it tells you to copy. Both are correct at origin/main:

  • packages/fate-effect/src/CurrentUser.ts:41 — class Unauthorized extends Schema.TaggedError<Unauthorized>()(
  • packages/fabrika-cli/src/io/fs.ts:18 — class ReadFailed extends Schema.TaggedError<ReadFailed>()(

So a builder who reads the diagnostic writes broken code; a builder who opens the exemplar writes
working code. The diagnostic is the only wrong artifact in the chain.

Triage note — the scope is wider than the original report, and one part of it is already fixed

The original framed this as a split between the default catalog and the tuval catalog. That
framing is stale. chore(deps): unify Effect rc112 (#8934) landed 2026-09-17T18:50Z, about ten
hours after this was filed, and pnpm-workspace.yaml at origin/main now pins effect: 4.0.0-rc.112 in both the default catalog (line 88) and the tuval catalog (line 147). There
is no catalog that exports TaggedErrorClass. The fix line is wrong for every package in the repo,
not for packages/tuval-* only, so the suggested "name both spellings and say which catalog each
belongs to" no longer applies — there is one spelling and it is Schema.TaggedError.

.patterns/effect-errors.md is already correct at origin/main: every example in it
(lines 16, 55, 60, 73) uses Schema.TaggedError. That half of the report is superseded; do not
re-edit it.

The same stale name survives in four other places, and they are the real remaining scope:

  • biome-plugins/no-data-taggederror.grit — the header comment (lines 1, 4, 7) and the
    register_diagnostic message (line 21)
  • biome-plugins/no-effect-promise.grit — messages at lines 25 and 33
  • biome-plugins/no-raw-try-catch.grit — message at line 33
  • biome-plugins/no-throw-in-effect-gen.grit — comment at line 10, message at line 38
  • packages/fate-effect/walkthrough.md:21 — a ts-fenced sample that does not compile

Out of scope: .decisions/*.md. Five ADRs (0042, 0047, 0096, 0098, 0156) name
Schema.TaggedErrorClass in prose. Decision records are history and are not re-written to match a
later rename.

Why it is worth fixing

This is not hardening without an incident. It already cost one: #9413 / PR #9415 converted seven
Data.TaggedError classes in packages/tuval-workspace/src/provision.ts exactly as the rule's fix
line says, got seven TS2551s, and spent a construct-check round on a rename. The rule is
registered at error severity and fires on every package, so the next error class anyone writes
pays the same round.

Acceptance criteria

  • biome-plugins/no-data-taggederror.grit's register_diagnostic message names Schema.TaggedError, not Schema.TaggedErrorClass, in both the prose and the Fix: sample.
  • The header comment in biome-plugins/no-data-taggederror.grit names Schema.TaggedError at every occurrence.
  • biome-plugins/no-effect-promise.grit, biome-plugins/no-raw-try-catch.grit and biome-plugins/no-throw-in-effect-gen.grit name Schema.TaggedError in every diagnostic message and comment.
  • The ts sample at packages/fate-effect/walkthrough.md:21 uses Schema.TaggedError<NoteNotFound>().
  • grep -rn "TaggedErrorClass" --exclude-dir=node_modules --exclude-dir=.git . returns hits only under .decisions/.
  • No .decisions/*.md file is modified by the diff.

Original report (verbatim)

Summary

biome-plugins/no-data-taggederror.grit's diagnostic tells the reader to write
class MyError extends Schema.TaggedErrorClass<MyError>()(...). On the tuval pnpm catalog
(effect@4.0.0-rc.112) Schema.TaggedErrorClass does not exist — the export is Schema.TaggedError
— so following the fix line verbatim produces TS2551: Property 'TaggedErrorClass' does not exist … Did you mean 'TaggedClass'?.

What I was doing

Converting the seven Data.TaggedError classes in packages/tuval-workspace/src/provision.ts
(#9413, PR #9415). The issue body, the rule's message and .patterns/effect-errors.md all name
Schema.TaggedErrorClass; every one of them is right for the default catalog and wrong for the
tuval one.

What I observed

Seven classes written exactly as the rule's fix line says, then seven TS2551s. Renaming to
Schema.TaggedError compiles and behaves identically.

Why it matters

The repo now carries two effect majors side by side, and the rule that fires on every package fires
with a fix that only works on one of them. Every packages/tuval-* package, and anything else that
lands on catalog:tuval, hits this the first time it writes an error class — a whole
construct-check round spent on a rename.

Pointers

Suggested next step (non-binding)

Have the rule's message name both spellings and say which catalog each belongs to, and add the same
note to .patterns/effect-errors.md.


Filed by an agent · session 0ddbe020-704d-4a3c-bbee-70c7820dda44 · branch build/9413-tuval-no-data-taggederror-6c2a7ca0 · 2026-09-17T08:25:29Z

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

axis:pipeline-hardeningStanding cross-cutting axis: pipeline hardening (was milestone #1; go-forward label)class:codecreated by fabrika status bootstrap label-taxonomyclass:doccreated by fabrika status bootstrap label-taxonomyp2Lowest priorityready-for:humanA human picks this up.status:triagedTriage signed off; ready for write-code to picktype:bugBehavior diverges from intent

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions