ResourceFromFiberAnalyzerModule
PackageAxial.Guardrails
The `ResourceFromFiber` analyzer: flags a forked flow whose value is a scoped resource it acquired itself.
A forked fiber owns the scoped resources it acquires and releases them when it settles, so
`Flow.scopeResource r |> Flow.fork` followed by `Fiber.join` hands back a resource that has already been released.
The code compiles and reads like ZIO, where a forked fiber shares its parent's `Scope`, so the mistake is easy to
make and only shows up as use-after-dispose at runtime. `Flow.forkResource` is the form that keeps the resource.
The check is syntactic and narrow: it reports the flow passed to a `fork` variant when that flow is a
direct `scopeResource`/`scopeAcquireRelease` call, or a `flow { }` whose final `return`/`return!` hands back such
an acquisition. A flow built elsewhere and passed by name is not followed, which only costs a missed finding.
Summary
| Name | Signature | Synopsis |
|---|---|---|
| Operations | ||
| headIdent | headIdent expr | The identifier an application chain ultimately applies: fork in Flow.forkNamed "x" body is forkNamed. |
| pipe | pipe expr | x |> f parses as App(App(op_PipeRight, x), f). |
| childExprs | childExprs expr | No description available. |
| allExprsInModule | allExprsInModule decls | No description available. |
| rawRanges | rawRanges ctx | No description available. |
| analyze | analyze ctx | Runs the check without applying guardrail configuration, for tests. |
| resourceFromFiberAnalyzer | resourceFromFiberAnalyzer ctx | No description available. |

