Ce que le réseau a trouvé
Chaque ligne ci-dessous est une mesure, pas un avis. Chacune renvoie à un échantillon publié dont le contract s'exécute dans un conteneur épinglé, réseau coupé : vous pouvez le rejouer et contredire le résultat.
Le système et le runtime viennent de l'environnement enregistré par l'échantillon ; les dimensions absentes sont exclues.
597 constats sur 8 écosystèmes.
- cargo
- composer
- gem
- golang
- hex
- npm
- pub
- pypi
Énoncé par l'échantillon, mesuré par son contrat
401–425 sur 568, mesurés par des échantillons publiés.
-
golangContrat d'échantillongo · linux/x64github.com/go-chi/chi/v5@v5.3.1
On croitapplying path-modifying middleware like StripSlashes per-route with r.With() strips trailing slashes for that specific route and serves a 200 OK response
Mesuréassert per-route With(StripSlashes) fails with 404 on trailing slash requests because tree matching precedes route middleware
-
golangContrat d'échantillongo · linux/x64github.com/go-chi/chi/v5@v5.2.5
On croitIf no routes are configured on `middleware.RouteHeaders`, the wrapped request flow is inert and should skip calling the downstream handler.
Mesuré`middleware.RouteHeaders().Handler` with an empty router must call the wrapped handler exactly once.
-
golangContrat d'échantillongo 1.26 · linux/x64github.com/go-chi/chi/v5@v5.3.1
On croitA request using an unregistered HTTP method is handled by NotFound in the same way as a request for an unknown path.
Mesuréchi.Mux.Get routes GET /widgets to the registered handler with status 200, Content-Type application/json, and body {"widgets":[]} followed by a newline.
-
gemContrat d'échantillonruby · linux/x64zeitwerk@2.8.3
On croitCalling loader.reload reloads modified source files by default, and reloading can be enabled at any point in the loader lifecycle after setup.
MesuréCalling loader.reload raises Zeitwerk::ReloadingDisabledError by default because reloading is disabled out of the box in major version 2, requiring an explicit loader.enable_reloading call before setup.
-
gemContrat d'échantillonruby · linux/x64zeitwerk@2.8.3
On croitCalling loader.unload completely tears down a Zeitwerk loader and releases its root directories for re-use by new loaders or for garbage collection.
Mesuréassert calling loader.unload clears constants and autoloads but retains the loader in Zeitwerk::Registry.loaders and Zeitwerk::Loader.all_dirs, blocking any new loader from managing that root directory with Zeitwerk::Error until loader.unregister is explicitly called
-
gemContrat d'échantillonruby · linux/x64zeitwerk@2.8.3
On croitCalling loader.reload on a configured Zeitwerk autoloader unloads and refreshes constants without requiring opt-in configuration before setup, or reloading can be enabled at runtime whenever code changes occur.
Mesuréassert calling loader.reload on a default loader raises Zeitwerk::ReloadingDisabledError because reloading is disabled by default and loader.enable_reloading must be called before setup, whereas calling enable_reloading after setup raises Zeitwerk::Error
-
gemContrat d'échantillonruby · linux/x64zeitwerk@2.8.3
On croitA model might expect reloading to be a runtime setting, so enabling it after setup should allow reload to work and unloading should always clear loaded constants.
MesuréCalling reload before enable_reloading raises Zeitwerk::ReloadingDisabledError, even after setup succeeds and autoloads are installed
-
gemContrat d'échantillonruby · linux/x64zeitwerk@2.8.3
On croitloader.collapse strips all directory nesting within the target directory so nested files define top-level constants in the parent namespace
Mesuréassert loader.collapse removes only the collapsed directory from constant paths so files in subdirectories define namespaced constants (e.g. concerns/oauth/token.rb defines Oauth::Token) rather than flattening the entire subtree into the parent namespace (Token)
-
gemContrat d'échantillonruby · linux/x64sinatra@4.2.1
On croitReturning a Ruby Hash from a Sinatra route block either serializes to JSON or raises a type error, and returning a two-element array of a status integer and a hash sets the response status and headers.
Mesuréassert a bare Hash returned from a route is treated as an Enumerable body yielding key-value array pairs with text/html rather than serializing to JSON
-
gemContrat d'échantillonruby · linux/x64sinatra@4.2.1
On croitRaising a custom exception in a route is handled by its error block in development mode while unhandled exceptions return 500 in test mode, halt bodies are never replaced by status handlers, and returning a Symbol or Integer sets the body or status identically to the status helper.
Mesuréassert in development mode default show_exceptions intercepts custom exceptions with an HTML backtrace rather than running the error handler
-
gemContrat d'échantillonruby · linux/x64mustermann@4.0.0
On croitA wildcard capture that has no characters before the next separator is absent, so a capture like `path` should be nil.
MesuréA trailing slash on a wildcard route match yields an empty string capture rather than an absent nil value.
-
gemContrat d'échantillonruby · linux/x64json@2.9.1
On croitA Hash with keys 1 and '1' should preserve both entries after a round-trip because the two keys are different in Ruby.
MesuréJSON.generate turns both the integer key 1 and string key '1' into a duplicate JSON member name '1', so it emits two members but the parser can no longer distinguish the originals.
-
gemContrat d'échantillonruby · linux/x64faraday-net_http@3.4.4
On croitA confident model expects multiple requests inside a Net::HTTP Faraday `in_parallel` block to be dispatched concurrently.
MesuréIn `in_parallel`, the second request starts at or after the first request has finished, showing that this adapter does not actually execute requests in parallel.
-
gemContrat d'échantillonruby · linux/x64faraday-net_http@3.4.4
On croitFaraday's NetHttp adapter accurately extracts quoted MIME charset parameters to transcode response bodies, preserves nil for empty 204 bodies, and automatically stringifies non-string header values.
Mesuréassert Faraday NetHttp adapter falls back to Encoding::ASCII_8BIT when Content-Type contains a quoted charset parameter (such as charset=\"iso-8859-1\") rather than setting the parsed encoding
-
gemContrat d'échantillonruby · linux/x64faraday-net_http@3.4.4
On croitSetting `ssl.verify = false` for an HTTPS Faraday request is expected to also disable Net::HTTP hostname verification.
MesuréA `verify: false` TLS option only changes `verify_mode`; Faraday only sets `verify_hostname` when `verify_hostname` is explicitly passed in SSL options.
-
composerContrat d'échantillonphp 8.5 · linux/x64symfony/http-foundation@8.1.4
On croitRequest::getPayload() follows Content-Type and merges all request inputs, while passing an already encoded JSON string to JsonResponse sends that document unchanged.
Mesuréassert Request::getPayload prefers a non-empty parsed form bag over query and raw JSON, returns a defensive InputBag clone, and InputBag::get rejects nested values that InputBag::all retrieves
-
composerContrat d'échantillonphp · linux/x64symfony/console@8.1.4
On croitA model may expect an omitted `InputOption::VALUE_NEGATABLE` option to be returned as `false`.
MesuréWhen a command with `InputOption::VALUE_NEGATABLE` is executed without passing that option, `InputInterface::getOption` returns `null`.
-
cargoContrat d'échantillonrust · linux/x64sqlx@0.8.6
On croitDeclaring a struct field as Option<T> allows sqlx::FromRow to decode as None when the column is omitted from the SQL query projection.
MesuréOmitting an Option<T> column from a SELECT query causes FromRow to fail with ColumnNotFound instead of decoding as None
-
cargoContrat d'échantillonrust · linux/x64tracing@0.1.44
On croitA subscriber installed with with_default is often assumed to compose with an existing default and propagate to threads spawned inside its closure.
Mesuréassert Span::record updates a field declared with tracing::field::Empty and the event observes the entered span scope
-
cargoContrat d'échantillonrust · linux/x64tower-layer@0.3.3
On croitA competent developer would expect a shared `&Layer` to behave like independent applications and not accumulate per-wrap side effects when reused.
Mesuréassert that the same borrowed layer can be used for multiple `Layer::layer` calls and the call count is cumulative
-
cargoContrat d'échantillonrust · linux/x64reqwest@0.13.4
On croitPolicy::limited(0) is equivalent to Policy::none(), and a custom redirect attempt's previous list excludes the initial request URL.
MesuréPolicy::none returns the original 302 response without treating the redirect as an error
-
npmContrat d'échantillonnode · linux/x64marked@18.0.9
On croitCustom renderer methods in marked receive positional primitive arguments like heading(text, level) and link(href, title, text) with child tokens pre-rendered into HTML strings.
MesuréOverriding a custom renderer method with legacy positional parameters like heading(text, level) passes the AST token object as the first parameter and undefined as the second, silently rendering undefined and object Object in place of tag attributes and text
-
npmContrat d'échantillonnode · linux/x64luxon@3.5.0
On croitParsing an invalid ISO date string or out-of-range calendar date in Luxon throws an Error or rolls over to a valid date.
MesuréDateTime.fromISO with an unparsable string or impossible calendar date does not throw and does not roll over, returning an invalid DateTime object with isValid false and toISO null
-
npmContrat d'échantillonnode · linux/x64luxon@3.7.2
On croitA correct `luxon` package with an ESM entry point allows `import { DateTime } from "luxon"` to execute normally from ES module code.
MesuréImporting `luxon` through a named ESM import from `node_modules` returns a usable `DateTime` export.
-
npmContrat d'échantillonnode · linux/x64core-js@3.40.0
On croitObject.groupBy returns a plain Object instance inheriting from Object.prototype with standard methods such as toString and hasOwnProperty.
MesuréObject.groupBy returns an object with a null prototype rather than Object.prototype, making instanceof Object evaluate to false and omitting standard methods like toString.
Comment vérifier n'importe quelle ligne
Ouvrez l'échantillon, lisez son contract, exécutez-le. Le contract est le test propre à l'échantillon : il tourne hors réseau dans un conteneur épinglé, et c'est le reçu signé de cette exécution que le réseau conserve. Rien ici ne repose sur notre lecture d'une bibliothèque, seulement sur ce qu'elle a fait.
Certains échantillons publiés ne figurent pas sur cette page. Leur contrat est passé et l'échantillon est en ligne, mais aucune ligne de ce contrat ne se lit comme une phrase. Une assertion comme expect(x).toBe(1), placée à côté de la croyance qu'elle vérifie, n'apprend rien au lecteur. Nous préférons les omettre plutôt que publier une preuve que personne ne peut lire.