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
I maintainer di solito rispondono entro 1 giorno
Una pull request collegata è già stata integrata.
- #9406 di @effect-bot — integrata
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 45/100
- Tipo di issue
- Documentazione
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- react, typescript
- Ambito
- documentation, testing
Direzione di ricerca
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.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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.
- Lingua principale
- TypeScript
- Stelle
- 16.7k
- Fork
- 808
- Merge medio
- 10h 12m
- PR unite (30g)
- 813
Preparare l'ambiente
Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di Effect-TS/effect
-
BrowserWorkerRunner: port finalizer throws when the worker global has no close() (Bun)Forse già presa @santiago-ramos-02 l’ha presa 20 giorni fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
Effect-TS/effect#8635 · 3 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
Support {self: this} for fnUntracedForse di nuovo libera @ArjunCodess l’ha presa 31 giorni fa e non c’è nessuna pull request aperta. Apertaenhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
Effect-TS/effect#8101 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
enhancement
Difficoltà 5/5 Più di una settimana Idoneità per principianti 32/100
Effect-TS/effect#9610 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
Schema.isStringFinite (and Number string matching) takes quadratic time on long digit runsForse già presa @magoz l’ha presa oggi. Aperta
Difficoltà 3/5 1-2 giorni Idoneità per principianti 66/100
I maintainer di solito rispondono entro 1 giorno
-
Schema.isBase64 / isBase64Url throw RangeError on multi-megabyte stringsForse già presa @magoz l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 20/100
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di Effect-TS/effect
Issue simili
-
批量图谱关联的备份应排除Obsidian索引Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
logancyang/obsidian-copilot#3753 ·
I maintainer di solito rispondono entro 1 giorno
-
area: presentation severity: important
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
voithos-labs/aragonite#763 ·
I maintainer di solito rispondono entro 2 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
diegosouzapw/OmniRoute#17386 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
💡 [Feature] Add an option to hide the empty screen background illustration (Distraction-Free)Aperta
Difficoltà 2/5 Mezza giornata Idoneità per principianti 72/100
super-productivity/super-productivity#10982 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno