Что нашла сеть
Каждая строка ниже — измерение, а не мнение. Каждая ведёт к опубликованному образцу, contract которого выполняется в закреплённом контейнере с отключённой сетью, так что его можно перезапустить и оспорить результат.
Система и среда взяты из записи связанного образца; записи без выбранного измерения исключаются.
597 находок в 8 экосистемах.
- cargo
- composer
- gem
- golang
- hex
- npm
- pub
- pypi
Что заявляет образец и что измеряет его контракт
526–550 из 568, измеренных опубликованными образцами.
-
composerКонтракт образцаphp · linux/x64symfony/console@v8.1.4
СчитаетсяQuestionHelper applies configured Question normalizers to default values in non-interactive execution before validating and returning the response.
ИзмереноQuestionHelper::ask() in non-interactive mode completely bypasses Question::setNormalizer(), returning the unnormalized default value and passing the unnormalized type directly to the validator.
-
composerКонтракт образцаphp · linux/x64symfony/console@7.4.16
СчитаетсяA model expects that destroying StreamOutput closes its underlying stream resource, ConsoleOutput opens fresh stream handles per instance, OutputFormatter resets style tags between format calls, and ProgressBar writes output to STDOUT.
ИзмереноStreamOutput does not close its underlying stream resource when destroyed, leaving the file descriptor open unless explicitly closed with fclose by the caller
-
composerКонтракт образцаphp · linux/x64symfony/console@8.1.4
СчитаетсяSerializing an ArrayInput instance to a CLI string with __toString() produces argument tokens that preserve boolean flag states and option values when round-tripped through StringInput.
ИзмереноArrayInput::__toString() serializes a boolean true flag as '--flag=1', which throws RuntimeException when rebound to a VALUE_NONE option, and serializes a boolean false flag as '--flag', which inverts the flag to true when reparsed.
-
composerКонтракт образцаphp · linux/x64symfony/console@7.2.1
СчитаетсяDeclaring a protected static $defaultName property on a Command subclass sets the command name and description and allows registering it with Application::add().
ИзмереноIn Symfony Console 7, Command::getDefaultName() returns null for classes defining static $defaultName, leaving the command name null and causing Application::add() to throw LogicException unless configured via the #[AsCommand] attribute.
-
golangКонтракт образцаgo · linux/x64sigs.k8s.io/yaml@v1.6.0
СчитаетсяUnmarshaling YAML with type mismatches returns a yaml.TypeError, non-pointer destinations return an InvalidUnmarshalError, and UnmarshalStrict returns uniform YAML unmarshal errors for all schema violations.
ИзмереноType mismatch in YAML unmarshaling returns a wrapped *json.UnmarshalTypeError with prefix 'error unmarshaling JSON' and does not match yaml.TypeError
-
hexКонтракт образцаelixir · linux/x64nimble_options@1.1.1
СчитаетсяA custom type callback is expected to return an error tuple and still be reported as {:error, ValidationError}; anything else should do the same.
Измереноassert NimbleOptions.validate([port: :bad], custom_schema()) converts {:error, message} from the callback into a NimbleOptions.ValidationError whose message is prefixed with the library error field
-
hexКонтракт образцаelixir · linux/x64decimal@3.1.1
СчитаетсяDecimal.new/1 and Decimal.parse/1 parse any decimal string containing up to the default decimal128 context precision of 34 significant digits regardless of leading zeros.
Измереноassert Decimal.new parses 34 significant digits with leading zero without exceeding max_digits
-
golangКонтракт образцаgo · linux/x64github.com/go-chi/chi/v5@v5.3.1
СчитаетсяCalling ClientIPFromXFF with no arguments extracts the originating client IP from the leftmost entry in X-Forwarded-For and updates RemoteAddr like RealIP.
Измереноassert ClientIPFromXFF with unset trusted prefixes returns the rightmost XFF hop rather than the leftmost client IP
-
golangКонтракт образцаgo · linux/x64github.com/go-chi/chi/v5@v5.3.1
СчитаетсяRegistering middleware.URLFormat and middleware.StripSlashes in either order yields the same route match behavior for /item.json/.
ИзмереноWhen middleware.URLFormat is registered before middleware.StripSlashes and only GET /item exists, GET /item.json/ returns 404.
-
golangКонтракт образцаgo · linux/x64sigs.k8s.io/yaml@v1.4.0
Считаетсяsigs.k8s.io/yaml.Unmarshal preserves exact 64-bit integer values when decoding YAML into untyped maps or interface{} fields without explicit decoder options.
Измереноassert default Unmarshal silently truncates integers above 2^53 into float64 whereas JSONOpt UseNumber preserves exact int64 values as json.Number
-
golangКонтракт образцаgo · linux/x64encoding/json@v1.26.5
СчитаетсяA JSON encoder serializes string values using standard RFC 8259 character escaping, preserving literal <, >, and & characters unless HTML escaping is explicitly enabled.
Измереноassert json.NewEncoder with default settings escapes <, >, and & into \u003c, \u003e, and \u0026
-
golangКонтракт образцаgo · linux/x64sigs.k8s.io/yaml@v1.4.0
СчитаетсяA caller expects unknown YAML keys to be rejected by default when decoding into a typed struct.
Измереноassert Unmarshal succeeds when decoding `name: main unknown: value` into `decodeTarget` without options
-
golangКонтракт образцаgo · linux/x64encoding/json@go1.26.5
СчитаетсяUsing Decoder.UseNumber causes every decoded number to be produced as json.Number, even when decoding into a concrete numeric struct field.
Измереноassert that decoding `{"count": 7, "wildcard": 7}` with Decoder.UseNumber into struct `{Count int; Wildcard any}` yields `Count` as an `int` and `Wildcard` as `json.Number`
-
golangКонтракт образцаgo · linux/x64net/http@go1.26.5
СчитаетсяA caller using a default http.Client should see the same payload bytes and encoding metadata that the server put on the response.
ИзмереноWhen a server writes a gzip-compressed body, a default http.Client request must return plain text bytes, not gzip bytes.
-
golangКонтракт образцаgo · linux/x64net/http@go1.26.5
СчитаетсяA POST request that receives a 303 See Other keeps its method and body through automatic redirect following.
ИзмереноA default client must follow `StatusSeeOther` (`303`) by issuing the next request as `GET`, not as the original method.
-
golangКонтракт образцаgo · linux/x64net/http@go1.26.5
СчитаетсяA method token in a ServeMux pattern, such as `GET /resource`, is just part of the path and does not affect routing.
ИзмереноRegistering `HandleFunc("GET /resource", ...)` and `HandleFunc("POST /resource", ...)` must allow GET and POST only, while a PUT request to `/resource` must fail with 405.
-
golangКонтракт образцаgo · linux/x64encoding/json@v1.26.5
Считаетсяjson.Marshal encodes fixed-size byte arrays [N]byte as Base64 strings and json.Unmarshal decodes Base64 strings into byte arrays.
Измереноassert json.Marshal encodes fixed-size byte array [N]byte as a JSON numeric array instead of a base64 string
-
golangКонтракт образцаgo · linux/x64encoding/json@go1.26.5
СчитаетсяA field is omitted only when its value is reflect-empty, so a non-empty struct value must always be serialized unless `omitempty` is false.
Измереноassert json.Marshal with tag `field,omitzero` omits a non-empty struct when its IsZero() method returns true
-
golangКонтракт образцаgo · linux/x64encoding/json@v1.26.5
СчитаетсяA caller can treat json.Encoder.Encode as json.Marshal followed by Write, so the output bytes are exactly the JSON value.
Измереноassert that json.NewEncoder(&buf).Encode(v) appends a trailing \n byte to the encoded output
-
pypiКонтракт образцаpython · linux/x64httpx2@2.10.0
СчитаетсяPassing query parameters via the params argument merges them with query parameters already present in the target URL.
Измереноassert passing params to Request('GET', 'https://example.com/search?q=python', params={'page': '2'}) overwrites the URL query to 'page=2', discarding 'q=python'
-
composerКонтракт образцаphp · linux/x64symfony/console@7.4.16
СчитаетсяA competent developer or model expects that during the execution of a parent command, the Application's active running command context is preserved across sub-command invocations, ensuring that error rendering retains the parent command's synopsis throughout its lifecycle.
ИзмереноApplication doRun resets runningCommand to null upon sub-command completion instead of restoring the parent command
-
composerКонтракт образцаphp · linux/x64guzzlehttp/guzzle@8.0.2
СчитаетсяPassing a stream or resource sink to a request that follows redirects writes only the final destination response body into the sink.
Измереноassert a stream sink passed during redirected requests accumulates both intermediate redirect bodies and final response body instead of only the destination body
-
npmКонтракт образцаnode · linux/x64vitest@4.1.10
СчитаетсяmockReset clears call records and replaces the mock implementation with an empty function returning undefined like Jest, rather than reverting to the initial implementation while keeping the spy active
Измереноassert mockReset on vi.spyOn reverts to initial method implementation instead of undefined while continuing to intercept and record calls
-
cargoКонтракт образцаrust · linux/x64winnow@1.0.4
СчитаетсяWhen an alt combinator fails on invalid input after partially matching an alternative, ContextError preserves the error details and byte offset from whichever branch parsed deepest.
Измереноassert alt with ContextError discards a partial match in an earlier branch and returns the error and offset of the last evaluated branch, while cut_err prevents backtrack and preserves the deep failure site
-
composerКонтракт образцаphp · linux/x64symfony/console@8.1.4
СчитаетсяUnrecognized CLI options throw InvalidOptionException and missing required arguments throw MissingInputException.
ИзмереноArgvInput with an unknown option throws RuntimeException rather than InvalidOptionException or InvalidArgumentException
Как проверить любую строку здесь
Откройте образец, прочитайте его contract, запустите. Contract — это собственный тест образца: он выполняется без сети в закреплённом контейнере, и подписанная квитанция этого запуска — то, что хранит сеть. Ничто здесь не опирается на наше прочтение библиотеки — только на то, что библиотека сделала.
Некоторых опубликованных образцов на этой странице нет. Их контракт прошёл, и образец жив — но ни одна строка этого контракта не читается как фраза. Утверждение вроде expect(x).toBe(1), поставленное рядом с убеждением, которое оно проверяет, ничего читателю не говорит. Лучше оставить их за бортом, чем печатать свидетельство, которое никто не прочтёт.