FDull 0.3.0-preview.3
See the version list below for details.
dotnet add package FDull --version 0.3.0-preview.3
NuGet\Install-Package FDull -Version 0.3.0-preview.3
<PackageReference Include="FDull" Version="0.3.0-preview.3" />
<PackageVersion Include="FDull" Version="0.3.0-preview.3" />
<PackageReference Include="FDull" />
paket add FDull --version 0.3.0-preview.3
#r "nuget: FDull, 0.3.0-preview.3"
#:package FDull@0.3.0-preview.3
#addin nuget:?package=FDull&version=0.3.0-preview.3&prerelease
#tool nuget:?package=FDull&version=0.3.0-preview.3&prerelease
FDull
F# with fewer sharp edges. By Wonderly.
FDull checks a deliberately restricted subset of F#: immutable data, explicit effects, controlled domain construction, explicit union cases and observed results. It uses FSharp.Compiler.Service to inspect resolved symbols and types, as well as source syntax. Aliases and nested payloads do not escape the checks.
This is a strict, experimental 0.3.0-preview.3 release for teams that want a small approved vocabulary and reviewable exceptions. It is not a new language or a proof that a program is safe.
Packages
| Package | Purpose |
|---|---|
FDull.Tool |
The fdull command with an isolated, resource-limited checker worker. Recommended for repositories and CI. |
FDull |
The analysis engine and policy/report types for F# tooling authors, compiler defaults and rule specification. |
FDull.Analyzers |
Advisory source diagnostics in FsAutocomplete/Ionide editors, using FDull's canonical syntax rules. |
There are no application-framework or company-internal dependencies. The library uses FSharp.Compiler.Service and FSharp.SystemTextJson. The tool contains its worker and dependencies and does not require a source checkout.
Compatibility
The preview supports .NET SDK 10.0.403, F# 10.0, net10.0, with FSharp.Core 10.0.x or 10.1.x. FDull itself pins FSharp.Core 10.1.201 and FSharp.Compiler.Service 43.12.201. The CLI and worker require Microsoft.NETCore.App 10.0.14. The worker disables runtime roll-forward. Install the matching SDK/runtime first. New toolchains require compatibility tests; the preview rejects untested compiler flags.
A Bazel workspace is checked on the runtime its build supplies. With --manifest,
lint and review start the worker on the exact runtime that runs the CLI, and
the launch line under Bazel workspaces lets the CLI roll forward to it. A
toolchain that carries one runtime newer than 10.0.14 is then enough. A target
of a Bazel workspace builds for net10.0 or net11.0. This mode is tested with
rules_dotnet at commit cfa2b4dfa6686b5fc63b57cd3a6323b97e3fb0ee, .NET SDK
11.0.100 with runtime 11.0.0, the net10.0 and net11.0 reference assemblies
(Microsoft.NETCore.App.Ref 10.0.14 and 11.0.0), language version 10.0 and
FSharp.Core 10.0.100. An MSBuild workspace still builds for net10.0 alone.
Projects affected by the pinned compiler's task-builder FS3180 warning may set
WarningsNotAsErrors to 3180. FDull accepts only that exact downgrade and
performs a private compiler pass for every workspace project. It permits the
known optimizer warning for awaiter at the compiler's unknown(1,1) location
only when 3180 is opted in. It also excludes FS3186 warnings from that private
pass for the compiler defect explained below. Other compiler warnings and all
compiler errors still fail analysis. The normal build continues to display
compatible warnings.
For executables, the private diagnostic pass omits the Windows manifest, which
FCS otherwise tries to load from the runtime directory. The SDK build still
produces its normal manifest and remains part of verification.
The default compiler preset remains strict; --nowarn and other warning
downgrades remain unsupported.
The FS3180 warning shape is a compatibility allowance, not proof of task provenance: an imported inline helper can produce the same diagnostic. Included projects are checked individually, so their authored captures still fail at their source locations. External inline APIs remain subject to their exact reviewed contracts. Do not use the warning setting without FDull's additional compilation check as evidence that authored capture warnings have passed.
FS3186 is not in the mandatory opt-in warning list. In the pinned FCS version, the F# metadata reader can emit it for healthy anonymous-record information in a referenced assembly even when the consumer does not need a missing type or member. The FCS linked-state check returns true for a missing link and false for a present one, while the metadata unpickler uses that check when deciding whether to emit FS3186. The result can be a false positive and can miss an unlinked node, so FS3186 is not a reliable safety condition by itself. It can still appear in compiler output without an opt-in. The FCS API used for the private pass can return that warning even when the SDK compiler does not display it for the same healthy reference. Compiler errors, missing output, unresolved symbols and types, and incomplete typed analysis still block completion. Authored implementation analysis and exact review of external APIs remain required.
Workspaces contain ordinary F# SDK projects with literal project references and
authored .fs/.fsi files. Release builds must use the standard
obj/Release/net10.0 generated metadata layout. Exact profiles cover SDK-owned
MVC application-part assembly metadata, Microsoft.NET.Test.Sdk 17.14.1's F# test
entry point, xUnit v3 Core 3.1.0 with Microsoft Testing Platform MSBuild 1.8.4
and optional JunitXml.TestLogger 7.0.2 registration, and Aspire AppHost 13.6.5
project metadata emitted by FSharp.Aspire.Hosting.AppHost 13.0.0. Multi-targeting,
other source generators and arbitrary configurations are not supported in this preview.
A Bazel workspace has one profile of its own in place of these.
An F# source can be included by multiple checked projects. Each owner is analyzed
independently, and all assignments for the shared file must use the same profile
and source fingerprint. Reviewed non-F# implementation, automation and tooling may coexist in a mixed
repository through the external workspace scope described below.
Start with a small project
Install locally in a repository:
dotnet new tool-manifest
dotnet tool install FDull.Tool --version 0.3.0-preview.3
Pin global.json:
{ "sdk": { "version": "10.0.403", "rollForward": "disable" } }
For a new repository without Directory.Build.props, create the compiler preset:
dotnet fdull defaults > Directory.Build.props
For an existing repository, inspect dotnet fdull defaults and merge its settings
into the existing props file. They enable checked arithmetic, nullability, strict
warnings, deterministic compilation, dependency lock files and NuGet auditing.
Restore so the evaluated compiler inputs exist, then initialize. Initialization does not compile the source and can bootstrap a repository whose newly enabled warnings do not yet pass:
dotnet restore --use-lock-file
dotnet fdull init .
dotnet build -c Release --no-restore -m:1 --disable-build-servers
dotnet fdull verify .
Pass a solution or project to restore/build when several projects exist without
a solution. init records the exact graph, source files and build fingerprints.
It starts every project in PURE, grants zero exceptions, and refuses to
replace an existing fdull.json. Review and commit policy and lock files, and add
.fdull/ to .gitignore for the local result cache. An initial verify failure
means the code or its explicit policy needs work.
For a mixed-language repository, create a reviewed scope document before init:
{
"Version": 1,
"External": [
{
"Path": "scripts",
"Kind": "automation",
"Reason": "Deployment checks run outside FDull's F# certification."
},
{
"Path": "web",
"Kind": "implementation",
"Reason": "The TypeScript frontend has its own required checks."
}
]
}
dotnet fdull init .
A reviewed fdull.scope.json at the workspace root is discovered automatically.
Use --scope <file> only for a differently named in-workspace document. The
selected scope file is fingerprinted into fdull.json. Classified paths cannot overlap
one another. A classified parent may contain F# source or protected build inputs,
but those inputs remain independently inventoried, fingerprinted and checked, so
the classification cannot hide them. Literal F# references to C# or Visual Basic
projects are excluded from F# cycle ordering only when the referenced project is
pinned and lies inside a reviewed implementation scope. Literal project paths
use platform-independent slash or backslash normalization before comparison with
the exact evaluated MSBuild closure. Classifications state
what FDull does not certify; they do not suppress an F# diagnostic or grant a
capability. Standard
bin, obj, artifacts, .artifacts, .nuget-feed, .worktrees,
.claude/worktrees, .pi/worktrees, .pi/git and node_modules
output/dependency trees are excluded from repository inventory;
exported compiler inputs remain exact. Inventory remains time/depth bounded and
supports up to 100,000 traversal steps. Symlinks are accepted only when their resolved target exists
inside the workspace; external and broken links fail inventory validation.
Excluding fixture projects
A project can be deliberately excluded from F# analysis with an exact path and
a review reason in fdull.scope.json:
{
"Version": 1,
"ExcludedProjects": [
{
"File": "tests/fixtures/Crm.Definitions/Crm.Definitions.fsproj",
"Reason": "Conditional CRM fixtures are validated by the definitions integration tests."
}
]
}
External can coexist with ExcludedProjects; both default to empty when absent
from a scope document. init copies the exclusions into fdull.json, fingerprints
the scope document, and exports only included projects. At least one F# project
must remain included. Existing policies without ExcludedProjects keep their
previous behavior. To change an existing policy, review its exclusions, source
assignments and protected input fingerprints together; init never overwrites it.
An exclusion accounts for the project's explicitly listed .fs and .fsi files,
including literal Compile Include entries in inactive conditional, project-level
ItemGroup elements. Nested groups (including Choose and ProjectExtensions)
are not supported for excluded source declarations.
It does not exclude a directory: new orphan sources and unrelated projects still
fail inventory validation. Wildcards, MSBuild expressions, item lists, missing
files and target-time Compile declarations are rejected. Imported or implicit
source lists are not inferred. Paths use forward slashes in the policy; literal
source includes can use either slash style and are normalized inside the workspace.
Excluded sources must be under their project's directory, except linked sources
that are also assigned to an included project and remain fully checked there.
An included project cannot reference an excluded F# project.
The excluded project's source bodies are not analyzed or fingerprinted. Its project file and all ordinary protected build inputs (including props, targets and existing lock files) remain fingerprinted. Adding source declarations therefore requires review of the changed project input. FDull does not directly restore, export, analyze or build excluded projects; normal build hooks of included projects still execute. Exclusions do not sandbox those builds.
Text, JSON and SARIF reports disclose excluded projects and reasons. A passing
result covers only included projects, and never certifies excluded fixtures.
JSON workspace/review reports contain ExcludedProjects; SARIF records them in
runs[].properties.excludedProjects. Exclusions do not grant capabilities or
suppress findings in included projects.
For example, this passes:
module Example
let increment value = value + 1
let firstPositive values = values |> List.tryFind (fun value -> value > 0)
Authored mutation reports MUT001/MUT002. A partial operation such as List.head
reports ERR006. Unapproved external calls report EFFECT001.
Service-owned monorepos
verify can discover service policies beneath a repository root without a root
fdull.json:
dotnet fdull verify . --all
dotnet fdull verify . --since <comparison-commit>
dotnet fdull verify services/billing
Bare repository verification selects every service. --since requires Git and
resolves the supplied commit once; it compares that revision with the current
working snapshot, including committed, staged, unstaged and untracked changes.
The initial affected mode supports Git repositories using SHA-1 object IDs.
CI should supply its intended comparison commit, such as a computed merge base.
An unavailable baseline blocks verification. --all and --since are mutually
exclusive. An empty selection reports no affected services, and skipped
services are never reported as verified. A baseline commit is not evidence that
unchanged services passed FDull; enforcing that is the responsibility of CI.
Existing version-one policies retain their single-workspace meaning. Services below a coordination root use version two, with this additional field:
{
"Version": 2,
"Repository": {
"Root": "../..",
"SharedInputs": [
{ "File": "Directory.Build.props", "Digest": "sha256:<reviewed hash>" }
],
"References": [
{
"Project": "Billing.fsproj",
"Target": "libraries/contracts/Contracts.fsproj",
"Policy": "libraries/contracts/fdull.json",
"PolicyDigest": "sha256:<reviewed policy hash>",
"Profile": "CONTRACTS"
}
]
}
}
This is an extension to the ordinary policy document: its projects, sources,
inputs and capabilities are still required and service-relative. Only the new
Repository.Root field accepts a bounded ancestor path. SharedInputs, cross
reference Target and Policy paths are repository-relative. Local references
remain in Projects[].References; cross-service references go in
Repository.References. Every target has an exact owner and policy digest.
An F# .fsproj target names its owner's exact Profile and omits Kind.
Cross-service references obey the same profile-direction rules as local
references and grant no capability. When a target has its own project
references, the consumer's graph must cover the evaluated MSBuild closure, as
it does for local references.
A C# or VB implementation project can be referenced only when its owner pins
the .csproj/.vbproj in Inputs and the project lies inside one of the
owner's reviewed implementation External entries. The edge omits Profile
and sets Kind to implementation:
{
"Project": "Billing.fsproj",
"Target": "services/native/Interop/Interop.csproj",
"Policy": "services/native/fdull.json",
"PolicyDigest": "sha256:<normalized policy digest>",
"Kind": "implementation"
}
The target is treated exactly like a local reviewed implementation project:
it must match the evaluated MSBuild references, it is not ordered by the F#
project graph, and it grants nothing. The consumer still pins the owner's
policy digest, and --since selects the consumer when the owner changes.
Capability, data, domain and constructor approvals remain owned by the policy
that declares them; no contracts are merged across owners. Constructor approvals
are allowed on either side of an edge: each policy's Constructors apply only
to definitions in its own sources, and unused approvals are reported per owner.
Domain contracts remain blocked on either side of a cross-service edge.
PolicyDigest is the SHA-256 of the dependency's fdull.json bytes with each
of its own Repository.References[].PolicyDigest string values replaced by
"". Every other byte, including whitespace, ordering and a byte-order mark,
is covered. Strict UTF-8, duplicate property names (anywhere), escaped property
names, comments, trailing commas, trailing content and a non-string pin are
rejected rather than hashed. Print the value with dotnet fdull policy-digest <path-to-fdull.json>. A consumer's pin therefore does not change when its
dependency re-pins its own dependencies, which permits service-level cycles;
project-level cycles across policies are still blocked. A transitive policy is
not covered by the top consumer's pin: it is verified through the pin of each
direct consumer, so every policy on the path must be reviewed. Every reachable
policy is loaded once, each edge's pin is checked, and the pins are re-checked
against the same snapshot before results are accepted.
Start with explicit init <service> calls, then review a version-two migration.
Initialization never discovers and writes policies for other services. Pin all
ancestor global.json, NuGet configuration and Directory.Build/Packages controls
that exist inside the repository, plus repository-local imports used by the
service. Changing a shared input selects its consumers but still requires every
reviewed digest to match. Changed libraries select their transitive consumers;
required dependencies are separately identified in the report. Under --since,
a dependency is by construction unchanged since the comparison commit: it is
built for its consumers but not re-analyzed, and the report lists it as built
only. Its verification evidence is the comparison commit's, which CI must
establish. Changed ownership or dependency graphs conservatively select all
current services. An explicit service invocation verifies that service and its
dependencies, without selecting unrelated reverse consumers.
Ownership is checked repository-wide even for affected runs. Nested policies, unowned F# sources/projects, unknown or excluded targets, dependency cycles and symlink aliases are blocked in coordination mode. Repository content outside service scopes is outside the verification claim. Discovery is bounded to 256 policies, 2,048 included projects, 100,000 traversal steps, depth 32 and 512 MiB of selection inputs (64 MiB per file); each service retains its 128-project limit. Generated and dependency directories use the ordinary inventory exclusions. Protected local/shared pins inside those excluded trees are rejected, so a reviewed input cannot disappear from the selection snapshot.
All selected projects share one --jobs budget. One locked restore and one
Release build cover the whole selection, through a solution generated under
<root>/.fdull/verify/ and deleted afterwards; the build uses up to --jobs
MSBuild nodes, and overlapping output directories force one. A failing project
fails the run with MSBuild's errors for that project. Dependencies finish
analysis and rebuilding before consumers are analyzed, followed by final input,
ownership and invocation checks. When repository verification is explicitly run
with --cache, a project served from the result cache skips the worker and the
rebuild; the final pass still re-exports and checks its compiler invocation.
Authored project, props and targets imports must be literal, repository-local
paths with reviewed pins, including imports under inactive conditions. Dynamic,
wildcard and SDK-qualified authored imports are blocked. Evaluated imports
reported by MSBuild are checked as an additional signal. Custom SDK property-driven
import hooks and arbitrary target-time file reads are outside this dependency
model; ordinary build trust and sandbox
requirements still apply. lint and advisory review retain their single-policy report
schemas; repository coordination currently applies to text verify reports.
lint of a version-two workspace also runs the repository discovery, ownership
and graph checks, and reads each consuming policy, so a consumer's stale
PolicyDigest pin on the linted workspace fails lint as it would fail verify.
Bazel workspaces
A Bazel workspace is one Bazel package whose F# targets rules_dotnet compiles. It
has no project files, so lint and review read a manifest that the build
writes, and the check runs as one build action inside the sandbox:
dotnet --roll-forward Major FDull.Cli.dll lint <root> --manifest <file> --report <file>
FDull.Cli.dll is tools/net10.0/any/FDull.Cli.dll in the FDull.Tool package,
with its safety-worker directory beside it. <root> is the package directory,
and the working directory is Bazel's execution root. Relative paths in the
manifest and in the argument files resolve against the working directory, as
they did for the compiler. --report gives the action its declared output.
The package holds an fdull.json with "Version": 3:
{
"Version": 3,
"Projects": [
{ "File": ":Billing", "Profile": "PURE", "References": [] },
{ "File": ":tests", "Profile": "TEST", "References": [":Billing"] }
],
"Sources": [
{
"File": "src/Billing/Invoice.fs",
"Project": ":Billing",
"Profile": "PURE",
"Digest": "sha256:<reviewed hash>"
},
{
"File": "tests/Billing.Tests/InvoiceTests.fs",
"Project": ":tests",
"Profile": "TEST",
"Digest": "sha256:<reviewed hash>"
}
],
"Inputs": [{ "File": "BUILD.bazel", "Digest": "sha256:<reviewed hash>" }],
"Capabilities": [],
"Domains": [],
"Constructors": []
}
Projects[].File, Projects[].References, Sources[].Project and
DataContracts[].Project name targets of that package, spelled :name. A name
starts with an ASCII letter or digit and continues with letters, digits, .,
_, + or -. Version three rejects any other spelling, a Repository and a
non-empty ExcludedProjects. Sources, Inputs, External, DataContracts,
Capabilities, Domains and Constructors keep their meaning, and Inputs
stays non-empty. Versions one and two still require .fsproj paths.
A version-three Sources[].File may also name a source that several workspaces
share from outside the package, such as a test entry point: one to sixteen ../
segments and then a local path, for example "../../tools/testing/Main.fs". It
must be the file's shortest path from the package and must resolve outside it.
FDull treats the file as authored source of the project that lists it: the
Digest pins it, the project's profile applies, and each use needs an exact
Capabilities entry under the same File spelling. Versions one and two reject
any .. segment.
The manifest names each target's compiler arguments and the build's inventory of the package:
{
"Version": 1,
"Projects": [
{
"Name": ":Billing",
"Arguments": "bazel-out/<configuration>/bin/libs/billing/Billing.fdull.params"
}
],
"Files": [
"libs/billing/BUILD.bazel",
"libs/billing/src/Billing/Invoice.fs"
]
}
Arguments is a file that holds one target's compiler arguments, one per line,
exactly as rules_dotnet passed them to the compiler. Files lists every file of
the package, as glob(["**"]) gives it, and replaces FDull's directory walk.
Each entry must lie inside <root>. FDull uses only the names in Files, so
those files need not be inputs of the action. The action does need the
manifest, the argument files, fdull.json, every file the policy pins in
Sources and Inputs, every source the compiler received and every reference
assembly. A malformed manifest, an unknown version or an unreadable argument
file blocks the run with BUILD003.
The audit applies the rules of an MSBuild workspace to that inventory, and tests nothing for existence on disk:
- The policy's projects are exactly the manifest's: at most 128, acyclic, each with a known profile and at least one classified source of the same profile.
- The inventory's
.fsand.fsifiles are exactly the policy'sSourcesinside the package. A shared source is outside the inventory, and its project must still compile it. - Other implementation and automation files need an
Externalclassification, and eachExternalentry must own at least one inventory file. - Build inputs in the inventory need a pin in
Inputs. That covers the MSBuild list and every file namedBUILD.bazelorBUILD, and the inventory must hold at least one of those..bzlfiles need no pin. No lock file or project file pin is required. - Project edges come from the invocations. Target A references target B when
A's
-r:arguments name B's--out:or--refout:file. The derived edges must equalProjects[].Referencesand obey the profile-direction rules. The manifest carries no reference list.
FDull rewrites rules_dotnet's spellings (--out:, -d:, /warn:,
/warnaserror, /nowarn:) and then applies the compiler policy. The required
settings are unchanged. For version three only it also accepts --utf8output,
--nowin32manifest, --nologo, --debug-, --pdb: and --refout:, and the
two symbols rules_dotnet adds for a net11.0 target, NET11_0 and
NET11_0_OR_GREATER. A target defines the symbols of one framework: NET10_0
beside either net11.0 symbol is rejected. A target passes with these
rules_dotnet settings and --compilation_mode=opt:
langversion = "10.0",
warning_level = 5,
treat_warnings_as_errors = True,
nullable = "enable",
compiler_options = [
"--warnon:21,22,52,1178,1182,3180,3218,3391,3395,3559,3570,3579,3582,3878",
"--checked+",
],
Bazel's default compilation mode passes --debug+, --optimize-,
--define:DEBUG and --tailcalls-, and FDull rejects each of them.
A net11.0 target compiles against reference assemblies of version 11.0.0.0.
FDull treats System.Runtime and System.Collections 11.0.0.0 as the framework,
as it treats their 10.0.0.0 versions, and the approved-API catalog reads the same
for both. Policy entries stay exact: a Capabilities or DataContracts identity
for a net11.0 target names Version=11.0.0.0.
A target may compile two kinds of source from outside <root>: a shared source
that the policy lists for it, and rules_dotnet's version file. The version file
is the one generated-source profile: a path that contains /bazel-out/ and ends
with /assemblyinfo.fs, holding exactly the three assembly version attributes
that rules_dotnet writes from the target's version attribute. The version
strings are free within a strict pattern, a target holds at most one such file,
and a target without a version has none. One changed byte in it blocks the
target, as does a source from outside <root> that the policy does not list
for that target. The MSBuild generated-source profiles do not apply to version
three, and this one does not apply to versions one and two.
Bazel caches the action, so a manifest run never reads or writes the result
cache and <root>/.fdull is never created. Text output names each diagnostic's
file relative to the working directory, because a sandbox path means nothing
once the action ends. JSON and SARIF keep absolute paths.
Not supported for a Bazel workspace: verify, init, the result cache,
repository discovery, cross-policy references and project exclusions. Each
MSBuild command fails a version-three policy with BUILD003, and a manifest
fails a version-one or version-two policy with BUILD003. Repository discovery
reads every fdull.json below the repository root, so repository verify and
lint of a version-two service fail while that tree holds a version-three
policy.
Policy and review
fdull.json assigns PURE, PURE_HELPER, CONTRACTS, BOUNDARY, ADAPTER,
GUARD_TOOLING or TEST profiles from outside source code. A profile alone does
not grant I/O, mutation or reflection. Necessary operations need exact entries
bound to a file, declaration, permission kind and resolved API identity. Every
entry needs a reason; unused, duplicate and overbroad entries fail verification.
Attribute permissions include the resolved attribute type, target, and exact
arguments. Literal named arguments include both the name and value. Supported
enum arguments include the resolved enum assembly, type, field, and 32-bit value;
changing a flag or named value requires a new review. Combined enum expressions
and other computed arguments remain unsupported. Simple typeof<T> and nameof
operands are bound to their resolved symbols; literal arrays retain element order
and are limited to 16 elements. Referenced string, Boolean and 32-bit integer
constants include their resolved symbol and value. This permits narrowly reviewed
test metadata such as MethodImplOptions.NoInlining without allowing attributes
by name alone.
Generated capture fields use Kind: "capture" for their rule permissions. FDull
maps each field's resolved declaration location to its authored constructor
parameter, named binding or auto-property, retaining the enclosing type, lexical
binding path and nested payload path. The key contains no source coordinates or generated field
name. For example, a stored callback binding can have this manually reviewed entry:
{
"File": "Service.fs",
"Owner": "App.Service.``.ctor``",
"Kind": "capture",
"Identity": "EFFECT003 | [[\"App.Service\",\"binding\",\"callback\"],[]]",
"Reason": "Reviewed callback storage; its authored body and exact effect calls remain checked."
}
Constructor parameters use "parameter" instead of "binding"; auto-properties
use "property" with the unique authored property name. These origins never share
a permission. The second array describes the payload location ("field"
with a field name or "tuple" with an index). Existing rule restrictions also
apply to capture permissions: pure/data profiles cannot grant callback exemptions.
Unknown or ambiguous source mappings fail analysis; use distinct named bindings.
Compiler names remain in diagnostic evidence. Actual external API identities stay
exact, and anonymous lambda bodies remain checked under their authored declaration.
Adding comments, lines or formatting does not change a capture key. Changed source
still requires fingerprint review, and moving captures between owners/files needs
new explicit review. Old permissions containing generated field names become
unused; review the new capture findings and replace those entries intentionally.
FDull never migrates or generates permissions automatically.
DataContracts provides an optional, reviewed data vocabulary for a consuming
project. An exact external F# record or union can be admitted once and then used
by any declaration in that project, including newly extracted helpers. Existing
policies without this field retain their behavior. init creates no data approvals.
For example, a manually reviewed entry has this shape (replace the illustrative
digest with the value from dotnet fdull data-digest <compiler-reference.dll>):
{
"DataContracts": [
{
"Project": "src/App/App.fsproj",
"Identity": "Shared, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null | Shared.CustomerDto",
"Assemblies": [
{
"Identity": "Shared, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null",
"Digest": "sha256:<64 lowercase hexadecimal characters>"
}
],
"Reason": "Reviewed immutable customer transport representation."
}
]
}
Pin every non-framework assembly reached through the record/union representation
and its concrete generic payloads. Use the actual compiler reference assembly
(often obj/Release/net10.0/ref/Shared.dll), which can differ from the runtime
assembly. Existing locked build inputs and before/after reference checks remain
required. Unused data entries and unused assembly pins fail verification.
data-digest prints a fingerprint, never a permission entry. F# reference
assemblies regenerate module IDs and PE timestamps during otherwise identical
builds. Their data fingerprints clear only the COFF timestamp, metadata module ID
and matching 16-byte .mvid section, after validating the reference-assembly marker
and layout. All other bytes, including metadata and embedded F# signature payloads,
remain hashed. Assemblies without that section use raw SHA-256. Source/build
fingerprints and per-analysis compiler-reference bindings always retain raw hashes.
Data fingerprinting supports assemblies up to 64 MiB; failures remain failed checks.
Every use recursively validates the actual representation, aliases, tuple/record/ union fields and concrete generic arguments. Mutable fields, arrays, callbacks, resources, mutable/null-backed representations and unknown classes cannot pass through an approved outer type. Custom equality/comparison and formatting hooks are also excluded because ordinary data operations can invoke them implicitly. Declaration type or rule grants cannot bypass this validation. An approval is for an exact root type; a nested type used independently in a helper's signature needs its own data entry, rather than new entries for every helper. Current consuming-project source types remain checked under their source fingerprints.
Data approvals do not approve methods, domain construction or materialization.
Those checks and exact effect grants remain independent. Changed representations
require intentional assembly-pin review and still have to pass structural
validation. review reports invalid data representations as source changes and
lists unused data entries/pins only after complete analysis.
Domains designates invariant-bearing types whose representations must be private.
Constructors holds exact approved construction-helper signatures. Serializers
must not construct private domain representations, including nested targets.
Source and build Digest fields are sha256: followed by a lowercase SHA-256
hash. A changed file invalidates its reviewed fingerprint. Review its existing
capabilities against the changed code before updating that hash. FDull provides
no suppression comment or automatic permission-baselining command.
This repository's own policy illustrates contracts around compiler metadata, local buffers, process supervision and test assertions. The library, CLI, worker, tests and build controls are themselves checked. Copying their tooling permissions into application code changes the trust model.
Check selected files in an existing project
fdull check applies a few FDull rules to chosen files of an ordinary F# project.
It needs no fdull.json, compiler preset, reviewed fingerprints or project
reorganization, so a team can adopt one rule in one folder and widen it later:
dotnet build src/Shop/Shop.fsproj -c Release
dotnet fdull check src/Shop/Shop.fsproj --rules MODEL004,ERR007,ERR006 src/Shop/Pricing src/Shop/Checkout.fs
dotnet fdull check src/Shop/Shop.fsproj --rules ERR007 src/Shop/Pricing --format json
Each path after the options is a compiled .fs/.fsi file of the project or a
directory; a directory selects every compiled source under it, including files
added later. Paths are relative to the current directory. Sources under the
project's bin and obj cannot be selected. There is no ignore list or baseline:
narrow the selection or fix the finding.
| Rule | Reports in selected files |
|---|---|
MODEL004 |
A wildcard or variable pattern that stands in for cases of a union declared in the project or in a project it references directly, and the compiler's incomplete-match warning (FS0025), so a new union case that a match misses fails even without warnings-as-errors. |
ERR007 |
A Result, or a Task of one, discarded through ignore (including aliases declared in a selected file), a _ or do binding, or a sequence. |
ERR006 |
Throwing access: collection head, tail, last, item, find, pick, exactlyOne, min, max, average and their By forms, Option.get/.Value, and Parse methods of System types. |
The project is evaluated with MSBuild in Release (-t:Compile with compiler
execution skipped) using its own SDK, flags, defines and warning settings, and
every source is type-checked with FDull's pinned compiler service. Build the
project's references in Release first. Only the selected files are inspected.
With MODEL004 selected, the project's NoWarn, warning level and
warnings-as-errors settings cannot hide FS0025 in selected files, and a
#nowarn naming it in a selected file makes the check incomplete.
Exit codes: 0 no findings, 1 findings, 2 an invalid request (no rules, an
unknown or unsupported rule, no selected path, or a path that matches no compiled
source), 3 incomplete. Analysis is incomplete, and never passes, when MSBuild
cannot evaluate the project, an input is missing, any project source has a
compiler error (selected or not), the analyzer cannot classify part of a selected
source or exceeds its budget, or an input changes during the check. Text output
names the selected files and rules; JSON carries Status (pass, fail,
invalid or incomplete), ExitCode, Project, Files, Rules, Claim,
Reason and Findings. For an incomplete run, Findings holds the blockers,
such as compiler errors.
A passing check establishes only that the selected rules found nothing in the selected files. It is not FDull verification and does not certify the project:
- Calls from selected files into unselected code are trusted. A helper in another
file that calls
List.headis not reported where it is used, and nothing is said about the purity of unselected code. ERR006reports every call, including one guarded by an earlier emptiness check; it has no flow analysis.ERR007recognizes the listed discard shapes, not every way a value can go unused.- A union from a transitively referenced project, a package or FSharp.Core is not a
closed domain union for
MODEL004. A directly referenced project is recognized by the assembly path MSBuild resolves for it, whatever its assembly name; projects the SDK adds transitively are told apart by the package id it records for them. - Projects built with another .NET 10 SDK are type-checked with FDull's pinned compiler service. A flag, language version or FSharp.Core it cannot load is a compiler error, so the check is incomplete rather than silently partial.
- Compiler warnings other than FS0025, and errors that appear only during code generation, are left to the normal build.
- Multi-targeted projects are not supported; MSBuild evaluation fails and the check is incomplete.
lint, review and verify keep their full guarantees; check does not change
what they inspect.
Commands and exits
dotnet fdull check src/Shop/Shop.fsproj --rules MODEL004,ERR007 src/Shop/Pricing --format json
dotnet fdull lint . --format json
dotnet fdull lint . --format sarif
dotnet fdull review .
dotnet fdull review . --format json
dotnet fdull verify . --jobs 4 --timings
dotnet fdull cache clear .
dotnet fdull coverage
dotnet fdull policy-digest services/billing/fdull.json
dotnet fdull lint libs/billing --manifest <manifest.json> --report <report.txt>
policy-digest <path-to-fdull.json> prints the normalized sha256:<hex> value
that a consumer pins in Repository.References[].PolicyDigest. Like
data-digest, it prints a fingerprint and never a permission entry.
lint, review and verify run independent projects concurrently. --jobs <n>
sets how many run at once, from 1 to 64. The default is the processor count, capped
at 4. Reports list projects in dependency order, and the output doesn't depend on
the job count. --memory <MiB> sets each analysis worker's managed heap ceiling,
from 256 to 16384; the default is 512. The worker's working-set limit is twice its
heap. A worker that runs out of memory makes the check incomplete, never clean.
Library callers set WorkspaceOptions.MemoryMiB; Workspace.defaultOptions holds
the defaults.
verify rebuilds each project after analyzing it, which changes the inputs of
every project that references it. So a project starts only after every project it
references has finished, and --jobs 1 is the fully sequential schedule. If a
project throws, the report stops at the first failure in dependency order, as it
would with one job. Within a job, analysis (1 GiB working set by default) and the
rebuild (2 GiB) run one after the other, so allow about 2 GiB of memory per job, or
twice --memory when that is larger. When two
projects share an intermediate or output directory, their builds would write the
same files: verify then runs one project at a time whatever --jobs says, and
the text report says which projects share which directory. The report's
Sequential field carries those lines; it is always empty in lint JSON. verify
takes no --format. Repository verify does not use the cache by default;
--cache opts into reuse, while --no-cache explicitly keeps it off. A standalone
(version-one) verify never uses the cache and rejects either flag.
--manifest <file> makes lint and review check a Bazel workspace from the
manifest its build wrote; see Bazel workspaces. --report <file> also writes
what lint or review prints to stdout to <file>, in any format and whatever
the exit code. The command holds its stdout until it finishes and then writes it
to both. Stderr and the exit code are unchanged. Each option may appear once.
--timings writes per-project times, and the run's total, to stderr. For lint
and review they are MSBuild export, analysis worker and parent validation; for
verify they are output-directory evaluation, restore, build, analysis, rebuild
and re-export per project, then a summary line with the restore and build of the
whole selection and the final validation pass. Repository verify reports restore
and build only in the summary, so they read 0 per project. Stdout and the exit
code are unchanged.
lint and review keep a per-project result cache in <root>/.fdull/cache by
default. Repository verify --cache also uses this cache. A
project is served from it only when everything its analysis reads is unchanged:
the exact compiler invocation, source and reference fingerprints, policy slice,
FDull build and .NET runtime. A cached result still passes the same input
comparison and validation as a fresh one, and unused-permission checks still see
every project. A malformed or mismatched entry is ignored and the project is
re-analyzed. Text output then reads N projects (M from cache), and JSON has a
Cached count and a per-project Cached flag; nothing else in the output or exit
code depends on the cache. --no-cache turns it off for lint and review, and a
--manifest run never uses it. cache clear <root>
deletes <root>/.fdull/cache (exit 3 if it is a symbolic link). Each cached run
evicts entries unused for 30 days, and the least recently used ones beyond 256 MiB
per cache. A new FDull build changes every key.
With deterministic builds, a project's F# reference assembly changes only when its
public signature or the optimization data of its public functions changes, such as
the body of a small or inline public function. Then the project and every project
that references it are re-analyzed; otherwise only the edited project is. A policy
edit re-analyzes only the projects whose slice it changes. Edits to Inputs,
Domains or Constructors, including compiler settings in a pinned project file,
re-analyze every project. A slice includes the workspace's PolicyDigest pins,
because analysis reads the dependency policies they pin. So any change to a
dependency's policy, including a re-pinned source fingerprint, re-analyzes every
project in its consuming workspaces.
The cache is trusted state, as build output is: an entry edited to stay consistent
is believed, and repository verify --cache accepts a hit as evidence. Plain
verify never reads or writes the result cache, so it is the authoritative gate
for an untrusted checkout or cache. In CI, use plain verify. During local
iteration, cached lint and review can reuse unchanged results. Use
verify --cache only when the local cache is trusted; it uses the same keys as
lint. A final policy pass is review, fix, review, verify.
| Exit | Meaning |
|---|---|
0 |
Complete analysis with no violations. |
1 |
Complete analysis found violations. |
2 |
Invalid command usage. |
3 |
Incomplete/failed analysis, invalid policy, changed inputs, or unavailable worker. |
lint checks current Release compiler inputs and fingerprints. Repository verify
performs one locked restore and one build of the selection; a standalone verify
restores one project at a time and builds each project once its references are
built. Both then analyze and recompile each project after its references without
rebuilding them, except that a cache hit is not recompiled. A final pass re-checks every project once all builds have finished. Source, reference, policy
and evaluated compiler inputs are compared before accepting the result. JSON includes completeness and errors.
SARIF includes diagnostics and an invocation success flag; also check the exit code.
Each project is analyzed against its policy slice: the whole fdull.json except
other projects' Sources and the Capabilities keyed to their files. A project
report's Policy and its diagnostics' policy field are the slice's sha256:
digest, so a policy edit that another project's analysis can't observe leaves it
unchanged. The worker re-reads the whole file, which stays pinned for the run, and
rejects a slice that differs from the requested digest.
Text output starts with PASS, FAIL or BLOCKED. BLOCKED means analysis did
not complete and no clean result was established, even when zero diagnostics
were reported. Resolve the reported blockers and rerun the command. lint only
reports an analysis result; verify reports a verification pass after its build
and input checks finish. Failed commands also print a BLOCKED status. For JSON
and SARIF, incomplete-analysis status is written to stderr so stdout remains
machine-readable. Always check completeness and the exit code as well as findings.
review presents an advisory review inventory for the current source snapshot.
It groups actual findings by file, declaration, profile, permission kind and exact
resolved identity, with source locations, rules and evidence. Each item says whether
an exact contract can be reviewed or the source must change. Catalog-approved
operations and unsuccessful permission lookups that still pass ordinary analysis
do not create review items. A type contract does not approve the type's methods.
Each item includes rule- and profile-specific Guidance in JSON and a
How to resolve explanation in text. It names the policy section and permission
kind to review, explains the effective profile's restrictions, and uses the
item's exact file/declaration/identity as the scope. It never creates an approval.
For example, a raw List.fold in PURE cannot be exempted by a member or rule
permission. Use an approved combinator, or isolate it in a named helper and review
that declaration's profile permission for PURE_HELPER and its exact member
permission. PURE_HELPER alone does not approve the fold. In an ADAPTER, the
fold is eligible for exact member contract review in that declaration. Type
permissions, API permissions, rule/capture exceptions, and Constructors entries
remain separate; the guidance explains which one applies to the emitted finding.
Unlike lint, review can examine authored source whose reviewed fingerprint is
stale. It lists changed files, reviewed/current hashes and existing contracts that
need renewed review. Policy structure, source inventory, project edges, compiler
settings and protected build fingerprints still have to validate. Review uses the
same bounded worker and detects changes to the current snapshot during analysis.
It does not edit source, permissions or fingerprints, perform verification, or
generate permission entries from findings. MSBuild export can update generated
build metadata, as it does for lint.
For review, exit 0 means complete advisory analysis with no outstanding review
items, source drift or unused contracts; exit 1 means complete advisory analysis
with review work remaining; exit 3 means the inventory is incomplete or blocked.
Neither a complete review report nor exit 0 certifies a build. Incomplete reports
retain available evidence and blockers and make no unused-contract claims. Some
nested requirements depend on admitting an outer type. Review reports these in
the same run: it examines authored classes' stored fields and concrete payloads
inside rejected arrays, byrefs and ruled generic types, while retaining each
unsatisfied outer finding. This exposes nested type and stored-callback review
keys before the outer approval. Existing permissions are still checked at each
level; suppressing an outer rule does not imply admission of its type. These are
advisory requirements for the current source and the chosen type-approval path.
Changing the source or choosing a different policy path can change the inventory.
Compiler failures, unresolved metadata and exhausted traversal/worker limits still
make review incomplete; an incomplete run cannot promise the full inventory.
The workflow is: run review, inspect the reported declarations and regression
evidence, intentionally edit exact contracts and reviewed fingerprints, then run
verify. JSON review reports have a distinct advisory schema (Advisory,
AnalysisComplete, Cached, Items, SourceChanges, UnusedCapabilities,
UnusedConstructors, Errors and per-project analysis/evidence); they cannot be
decoded as authoritative workspace reports.
Library integration and limits
For live editor feedback in FsAutocomplete/Ionide, reference the analyzer as a development dependency in each checked project:
<PackageReference Include="FDull.Analyzers" Version="0.3.0-preview.3"
PrivateAssets="All" IncludeAssets="analyzers" />
The editor frontend reports source-syntax findings while a file is being edited.
It is deliberately advisory: it does not validate resolved APIs, project graphs,
fingerprints, builds or policy capabilities. fdull verify remains the complete
repository gate. Analyzer suppression comments are themselves FDull violations
and do not affect the authoritative CLI.
Reference FDull version 0.3.0-preview.3 to consume SafetyDiagnostic,
SafetyReport, workspace policy types and SafetyEngine.check. The in-process
engine accepts ordered, fingerprinted source/reference inputs. Hosts must enforce
process limits themselves; the library package does not install a worker beside
arbitrary executables. FDull.Tool supplies the supported bounded host for
Workspace.check, Project.verify and source-only Safety.check. The library's
Workspace.check, Workspace.review and Repository.verify never use the result
cache. Workspace.checkManifest and Workspace.reviewManifest check a Bazel
workspace from a manifest file, and WorkspaceManifest.read decodes one.
The workspace worker has a 512 MiB managed heap ceiling (--memory or
WorkspaceOptions.MemoryMiB changes it), a working-set limit of twice the heap and
a 210-second wall-time limit and a 512-source limit per project. Source-only Safety.check keeps the
512 MiB heap and 1 GiB working set. Output and traversal are also bounded.
Exhausted limits cause an incomplete failed check. Tests run serially with a
separate 2 GiB heap ceiling.
The catalog contains 69 IDs. fdull coverage records implementation paths,
executable evidence and remaining work per rule. The broader safety standard is
not completely implemented. Required CI checks, protected policy ownership,
artifact signing and deployment admission need external infrastructure.
MSBuild evaluation executes repository build logic. Use repositories you trust
to build, or your CI sandbox. Fingerprints detect changed inputs; they are not an
OS sandbox or an external policy authority. A local policy can be edited by its
owner. Some result-flow, interprocedural validation and transitive dependency-asset
checks remain partial. See the coverage inventory and docs/fsharp-safety-standard.md.
Develop and package
dotnet tool restore
dotnet tool run fantomas src tests tools --check
dotnet restore FDull.slnx --locked-mode
dotnet build FDull.slnx -c Release --no-restore -m:1 --disable-build-servers
dotnet test tests/FDull.Tests/FDull.Tests.fsproj -c Release --no-build --no-restore -m:1
dotnet src/FDull.Tool/bin/Release/net10.0/FDull.Cli.dll verify .
dotnet pack src/FDull/FDull.fsproj -c Release --no-build --no-restore -m:1 --disable-build-servers -o artifacts
dotnet pack src/FDull.Analyzers/FDull.Analyzers.fsproj -c Release --no-build --no-restore -m:1 --disable-build-servers -o artifacts
dotnet pack src/FDull.Tool/FDull.Tool.fsproj -c Release --no-build --no-restore -m:1 --disable-build-servers -o artifacts
dotnet tools/FDull.Ci/bin/Release/net10.0/FDull.Ci.dll smoke . artifacts
dotnet tools/FDull.Ci/bin/Release/net10.0/FDull.Ci.dll bazel . artifacts 11.0.0
dotnet tools/FDull.Ci/bin/Release/net10.0/FDull.Ci.dll coverage .
The bazel check needs the named runtime installed beside the pinned SDK;
.NET SDK 11.0.100 carries runtime 11.0.0. It checks against net10.0
references, and against the named runtime's own reference assemblies when the
same installation holds that targeting pack, as an SDK installation does.
GitHub Actions runs four Linux jobs on pull requests: Format,
Build and test (Linux), Self-verification, and Package and consumer smoke.
Jobs install the exact
SDK from global.json (including its 10.0.14 runtime), restore locked dependencies,
keep strict compiler settings and preserve nonzero command exits. NuGet downloads
are cached by the lock files; results and logs are retained for seven days.
The serial build/test job has a 60-minute limit and reports each completed test.
A test with no completion after ten minutes aborts the run as a failure; the
retained artifacts include the active test sequence without a memory dump.
The compiled tools/FDull.Ci helper is part of the reviewed repository graph.
Its package smoke check uses fresh temporary projects and an isolated package
cache and CLI home outside the checkout. Source mapping requires all FDull
packages to come from the local feed. It installs the packed tool, checks the
bundled worker via successful verification, requires complete mutation failures
and blocked source drift, runs an independent library consumer and checks the
analyzer payload. Its bazel check runs the packed FDull.Cli.dll as a Bazel
action does: from the installed package, with dotnet --fx-version on a runtime
newer than the pinned one, against a Bazel-style workspace that must pass and
then fail on a seeded violation, once with net10.0 references and once with
net11.0 references. The package job installs .NET SDK 11.0.100 for it.
Self-verification also compares site/public/coverage.json with the built CLI's
coverage inventory. The workflow never publishes packages or deploys the site.
After merging the workflow, configure the main repository ruleset to require
all four named checks and code-owner review for the policy, build and workflow
paths in .github/CODEOWNERS. Review ownership currently names repository
administrator @c10r; select another trusted maintainer or team when independent
code-owner approval is needed for that administrator's own changes. These
repository settings are external controls, not guarantees made by fdull verify.
Releases
Publishing is manual; CI builds and checks packages but does not upload them to NuGet or create a GitHub release.
- Prepare a release PR with a new, unused package version. Update
<Version>inDirectory.Build.props, the CLI's--versionresponse insrc/FDull.Tool/Program.fs, and the version references in this README andsite/public/index.html. All three packages share that version. Review changed source/build contracts and update their SHA-256 fingerprints infdull.jsonas described under Policy and review. - Wait for all four required PR checks to pass, then merge the release PR. From
a clean checkout of the merged release commit, use the pinned SDK and run all
commands under Develop and package, including verification, packing and
the independent consumer smoke check. Keep the three
.nupkgfiles for the new version fromartifacts/; publish these packages from the same checked build. - Create and push a tag named
v<version>at that exact tested commit. In GitHub Releases, draft a release using that tag, add release notes and attach the three.nupkgfiles. Mark preview versions as a pre-release. See GitHub's release instructions for the standard UI steps. - Wonderly employees should look up the NuGet credentials in 1Password in the
login titled Nuget Account. Use that login to sign in to
NuGet.org, then use Upload to publish a new version
of all three packages:
FDull,FDull.ToolandFDull.Analyzers. Upload each matching.nupkgfrom the checked build inartifacts/, review its ID and version, and submit it. See NuGet's publishing instructions. - Wait for NuGet validation and indexing, confirm the new version is available for all three packages, then publish the GitHub release. NuGet package versions cannot be overwritten; corrections require a new version and release build.
MIT licensed. Copyright 2026 Wonderly.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- FSharp.Compiler.Service (= 43.12.201)
- FSharp.Core (>= 10.1.201)
- FSharp.SystemTextJson (= 1.4.36)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.3.0-preview.4 | 44 | 11/25/2026 |
| 0.3.0-preview.3 | 53 | 11/24/2026 |
| 0.3.0-preview.2 | 64 | 11/5/2026 |
| 0.3.0-preview.1 | 69 | 10/30/2026 |
| 0.2.0-preview.4 | 70 | 10/28/2026 |
| 0.2.0-preview.3 | 71 | 10/28/2026 |
| 0.2.0-preview.2 | 66 | 10/28/2026 |
| 0.2.0-preview.1 | 76 | 10/13/2026 |
| 0.1.0-preview.7 | 86 | 9/15/2026 |
| 0.1.0-preview.3 | 82 | 9/11/2026 |
| 0.1.0-preview.2 | 93 | 9/10/2026 |
| 0.1.0-preview.1 | 140 | 9/7/2026 |