Docs that contradict the code: MCP.md's adapter list, RcMap capacity eviction, `disableChecks`, an unbounded "max attempts" retry example, the `@effect/vitest` logging example, and names v4 does not have
Maintainers usually reply within 1 day
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 45/100
- Issue type
- Documentation
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- react, typescript
- Domain
- documentation, testing
Research direction
This is ten separate doc corrections, each naming its file and line range, so split them up and take one first: the disableChecks JSDoc in src/Schema.ts or the forkDetach JSDoc in src/Effect.ts. Check each claim against the cited code before editing, since the issue links pin 4.0.5. Done means each listed wording is corrected in its own file, and for the item 4 retry example, the attempt bound is verified under TestClock. Items 1 and 4 also touch packages/effect/MCP.md and ai-docs/src/06_schedule/10_schedules.ts.
Written by the indexing model from the issue text.
Description
What is the type of issue?
Documentation is incorrect, Documentation is missing
What is the issue?
These docs in 4.0.5 disagree with the code. #9331 did not touch them, and each is unchanged on main (c9a1e72). Links are pinned to the 4.0.5 tag.
Behaviour described wrongly
-
MCP.mdlists three protocol adapters (MCP.md#L82-L83): "This release supportsMcpProtocol.v2024_11_05,McpProtocol.v2025_03_26, andMcpProtocol.v2025_06_18."McpProtocolalso exportsv2025_11_25andv2026_07_28(McpProtocol.ts#L211-L254).layerStdioandlayerHttpaccept any of the five (McpServer.ts#L1520, #L1657), andProtocolAdapters.test.tsbuildslayerHttpwith all five.layerHttpRequestScopedaccepts onlyv2026_07_28(#L1713-L1715), which the sentence leaves out.- The same paragraph (MCP.md#L88-L89) says logs go to stderr through
Logger.consolePretty({ stderr: true }). #8074 removed that option (Logger.ts#L823-L829). #8079 then moved the example toLayer.succeed(Logger.LogToStderr, true)(MCP.md#L64-L65), but left this sentence. - Fix: list all five adapters, note that
layerHttpRequestScopedaccepts onlyv2026_07_28, and nameLogger.LogToStderr.
-
RcMap's module header (RcMap.ts#L6-L8) says that when the last scope for a key closes, the resource can be "removed by capacity limits".- Capacity evicts nothing. Once the map is full,
getfor a new key fails withExceededCapacityError(#L358-L361), and idle entries count toward the limit. - Example: with
capacity: 1andidleTimeToLive: "1 hour", borrow and release"a", then get"b". Thegetfails withExceededCapacityError, and"a"is neither removed nor released. - Fix: "…released, kept alive for its idle time to live, or removed by
invalidate.capacitycaps how many keys are held, idle ones included; once it is reached,getfor a new key fails withExceededCapacityError."
- Capacity evicts nothing. Once the map is full,
-
disableChecksis described as disabling validation: "to skip validation" (Schema.ts#L126), "Whether to disable validation for the schema" (#L142), and, in theClassGotchas, "skips constructor validation" (#L16054).- It skips only checks. Types and structure are still parsed.
Schema.Int.make(1.5, { disableChecks: true })returns1.5.Schema.Int.make("a" as any, { disableChecks: true })throws "Schema validation failed".- So does a
Classconstructor given a string for aSchema.Intfield.
ParseOptionsalready states this precisely (SchemaAST.ts#L492-L493).- The first two sentences predate the rename from
disableValidationin Effect-TS/effect-smol#1842. That rename made construction parse with checks off, instead of skipping parsing. - Fix: "skips the schema's checks (filters such as
isInt); constructor defaults still apply, and input of the wrong type or shape is still rejected."
- It skips only checks. Types and structure are still parsed.
-
ai-docs
productionRetrySchedule(10_schedules.ts#L8-L18) is commented "capped exponential backoff with jitter and max attempts".loadUserWithRetryrefers to "exhausting the schedule" (#L47-L48).- Nothing bounds the attempts.
Schedule.mincontinues while either schedule does, and neitherexponentialnorspacedends, soSchedule.while(retryable)is the only stop. - Against an always-retryable
HttpErrorunderTestClock, it makes about 8,650 attempts in 24 hours and keeps going. - The file ships in the package and is linked from its
AGENTS.md. - Fix: add
Schedule.upTo({ times: 5 })afterSchedule.jittered(6 attempts, then the error), or wrap the schedule inSchedule.max([…, Schedule.recurs(5)]), as #L75-L81 does. PuttingSchedule.recurs(5)inside theminarray does not bound it.
- Nothing bounds the attempts.
-
@effect/vitest's README Logging example (README.md#L291-L297) says anit.effecttest that providesLogger.layer([Logger.consolePretty()])displays its log, and the intro (#L277) offers a custom logger for this. It does not:it.effectprovidesTestConsole(internal.ts#L59), so the line lands inTestConsole.logLines.- Fix: use
it.live, or provideEffect.provideService(Console.Console, globalThis.console).
- Fix: use
-
Effect.forkDetach(Effect.ts#L8894-L8896) says the fiber is "attached to the global scope". v4 has no global scope: a detached fiber has no parent and no scope.- Fix: "Forks the effect into a new fiber with no parent and no scope. It keeps running after the forking fiber ends, until it completes or is interrupted through its handle."
Names v4 does not have
-
Effect.forkChild(Effect.ts#L8755-L8756) suggests "higher-level methods, such asraceWith,zipPar". Neither exists in v4.- Fix: point to
Effect.race,Effect.raceFirst, orEffect.allwithconcurrency. - The
Sink.raceWithmigration note (effect__Sink.yaml#L177, rendered intov3-to-v4.md) also suggests "Effect.raceWithon the run effects". - The
Sink.raceBothnote (effect__Sink.yaml#L174) suggestsEffect.raceBoth, which v4 does not have either.Effect.raceorEffect.raceFirstfits both notes.
- Fix: point to
-
Effect.runFork's example (Effect.ts#L9054-L9060) annotatesprogramasEffect<number, never, never>and the fiber asRuntimeFiber<number, never>.programends inEffect.as("done"), so it isEffect<string, never, never>.runForkreturnsFiber<string, never>(#L9070).
Behaviour not documented
-
ManagedRuntime.makekeeps a failed layer build for its lifetime (ManagedRuntime.ts#L316-L330): every later run fails with the first build error and the layer is never rebuilt, so one transient failure on first use disables a long-lived runtime. Its docs (#L245-L246) cover only success.- Fix: say so, and point to retrying inside the layer.
-
useAtomSetanduseAtomwithmode: "promise"or"promiseExit"(Hooks.ts#L185-L194) settle with the atom's next result, not their own write's. When writes to oneAtom.fnoverlap, the first promise gets the second run's result (concurrent: true: both get the first's). Solid and Vue match.
- Fix: a Gotchas note on the setter.
Where did you find it?
JSDoc in the effect 4.0.5 sources, plus packages/effect/MCP.md, packages/vitest/README.md, ai-docs/ and migration/ (links above). Each line is the same on main at c9a1e72.
- Dominant language
- TypeScript
- Stars
- 16.7k
- Forks
- 808
- Avg merge
- 8h 41m
- Merged PRs (30d)
- 711
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from Effect-TS/effect
-
BrowserWorkerRunner: port finalizer throws when the worker global has no close() (Bun)Possibly taken @santiago-ramos-02 claimed this 18 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Effect-TS/effect#8635 · 3 comments ·
Maintainers usually reply within 1 day
-
Support {self: this} for fnUntracedMay be free again @ArjunCodess claimed this 29 days ago, and no pull request is open. Openenhancement
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
Effect-TS/effect#8101 · 1 comment ·
Maintainers usually reply within 1 day
-
Effect.callback keeps state from finished suspensions alive until the next full GCPossibly taken @effect-bot claimed this today. Open
Effect-TS/effect#9497 · 1 assignee ·
Maintainers usually reply within 1 day
-
Replay-enabled PubSub keeps every published value alive until the next full GCPossibly taken @effect-bot claimed this today. Open
Effect-TS/effect#9496 · 1 assignee ·
Maintainers usually reply within 1 day
-
Socket.readerString corrupts UTF-8 characters split across TCP chunksPossibly taken @jayhemnani9910 claimed this today. Open
Difficulty 4/5 3-5 days Newbie friendliness 35/100
Maintainers usually reply within 1 day
All issues in Effect-TS/effect
Similar issues
-
bug priority: P2
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
wayfinder:task
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
Maintainers usually reply within 1 day
-
bug customer-reported data-plane question Service Attention Storage
Difficulty 2/5 1-3 hours Newbie friendliness 69/100
Azure/azure-rest-api-specs#47397 · 2 comments ·
Maintainers usually reply within 1 day
-
Claude thinking budget can shrink capped Haiku responses to 2,048 tokensPossibly taken @DavyMassoneto claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
diegosouzapw/OmniRoute#17109 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
paperclipai/paperclip#16785 ·
Maintainers usually reply within 1 day