网络测出了什么
下面每一行都是测量结果,不是观点。每一条都链接到一个已发布的样本,其 contract 在断网的固定容器中执行,你可以自己重跑并反驳结论。
操作系统和运行时来自所链接样本记录的环境;缺少该维度的条目会在筛选时排除。
597 条发现,覆盖 8 个生态。
- cargo
- composer
- gem
- golang
- hex
- npm
- pub
- pypi
样本自述,其契约实测
正在显示已发布样本测得的第 26–50 条(共 568 条)。
-
golang样本契约go · linux/x64github.com/mattn/go-isatty@v0.0.20
普遍认为isatty.IsTerminal and isatty.IsCygwinTerminal inspect terminal and shell environment variables such as TERM or CYGWIN to determine or override terminal detection for redirected descriptors
实测isatty.IsTerminal evaluates file descriptors via OS ioctl/syscall and returns false for files and pipes regardless of whether TERM is configured to xterm-256color or another terminal type.
-
golang样本契约go · linux/x64github.com/jackc/pgpassfile@v1.0.0
普遍认为ParsePassfile returns a parsing error when encountering unescaped colons in password fields or parses them as part of the password field.
实测ParsePassfile silently discards lines with unescaped colons in password fields rather than returning an error or preserving colons, causing FindPassword to return an empty string.
-
golang样本契约go · linux/x64github.com/dustin/go-humanize@v1.0.1
普遍认为FormatInteger with an empty format string or "#,###" formats an integer with comma thousands grouping and no decimal places
实测humanize.FormatInteger with an empty format string returns "12,345.00" rather than "12,345" because it delegates to FormatFloat with the default two-decimal template.
-
pypi样本契约python · linux/x64joblib@1.5.3
普遍认为Configuring parallel_config with prefer='threads' and n_jobs=4 executes subsequent unparameterized Parallel calls across 4 worker threads.
实测Setting prefer='threads' in parallel_config with n_jobs=4 switches to ThreadingBackend but silently resets implicit n_jobs in context to 1, while explicit backend='threading' preserves n_jobs=4.
-
golang样本契约go · linux/x64github.com/stretchr/testify@v1.11.1
普遍认为A testify suite always executes its SetupSuite and TearDownSuite hooks whenever suite.Run is called, even when the testify.m flag filters out all test methods.
实测Setting the testify.m flag to a regular expression filters executed test methods and their per-test lifecycle hooks, and skips suite-level SetupSuite and TearDownSuite entirely when zero methods match.
-
golang样本契约go · linux/x64github.com/Microsoft/go-winio@v0.6.2
普遍认为guid.FromString parses standard Windows registry GUID strings with braces or unhyphenated hex, and ToWindowsArray produces standard RFC 4122 big-endian byte ordering.
实测guid.GUID.ToWindowsArray encodes Data1, Data2, and Data3 in little-endian order while preserving Data4, differing from standard RFC 4122 big-endian layout.
-
golang样本契约go · linux/x64golang.org/x/sys@v0.30.0
普遍认为execabs.LookPath and execabs.Command resolve and execute bare command names from relative directories when PATH contains '.' or a relative path
实测execabs.LookPath fails with an error and returns an empty string when PATH lookup resolves a bare command name to an executable in the current working directory, and execabs.Command immediately populates cmd.Err to prevent execution.
-
npm样本契约node · linux/x64fast-xml-parser@5.11.0
普遍认为XMLParser automatically creates an Array for repeated schema elements regardless of whether the document contains one or multiple child tags.
实测XMLParser parses single-child elements into plain objects rather than 1-element arrays by default, causing array methods like map to throw TypeError, unless the isArray callback explicitly returns true for the tag or jPath.
-
npm样本契约node · linux/x64three@0.185.1
普遍认为Returning false from an Object3D.traverse callback aborts traversal or skips subtrees, and child node mutations during traversal are safely handled.
实测Object3D.traverse executes a pre-order depth-first traversal across all descendants and ignores boolean return values from callbacks, continuing traversal without early abort or subtree pruning.
-
npm样本契约node · linux/x64three@0.185.1
普遍认为ImageUtils.sRGBToLinear preserves alpha channel transparency untouched when converting canvas ImageData, and Lut maps color gradients bottom-up.
实测ImageUtils.sRGBToLinear extracts canvas pixel data via CanvasRenderingContext2D.getImageData and applies the sRGB-to-linear conversion curve across all 4 channels, transforming translucent alpha values rather than preserving alpha intact.
-
npm样本契约node · linux/x64three@0.185.1
普遍认为BufferAttribute.getX indexes raw flat array offsets, divides Int8Array values symmetrically by 128, and modifies Float32Array values when normalized is true.
实测BufferAttribute.getX multiplies the passed index by itemSize to access the first component of that logical vertex, rather than accessing the flat array offset directly.
-
npm样本契约node · linux/x64react@18.3.1
普遍认为React useId accepts a prefix string parameter to customize generated element IDs and produces unescaped CSS-compatible selector strings.
实测useId returns colon-delimited strings like :R0: that ignore any prefix arguments passed to the hook and cannot be used directly in unescaped CSS ID selectors.
-
npm样本契约node · linux/x64react@18.3.1
普遍认为startTransition accepts async callbacks and returns a Promise tracking the pending transition, maintaining transition batching across await boundaries.
实测startTransition returns undefined synchronously even when passed an async callback, and restores the transition batch config to null before any post-await microtasks run.
-
cargo样本契约rust · linux/x64regex@1.13.1
普遍认为RegexBuilder compiles any syntactically valid regular expression into memory without size constraints and supports standard octal escape sequences by default.
实测RegexBuilder::size_limit restricts the compiled regex memory footprint, returning Error::CompiledTooBig with the configured limit when exceeded rather than panicking or truncating the pattern.
-
pypi样本契约python · linux/x64jinja2@3.1.6
普遍认为a template string ending with a newline will render with that newline intact by default
实测Environment().from_string('hello\n').render() returns 'hello' rather than 'hello\n', because the default is to strip exactly one trailing newline.
-
npm样本契约node · linux/x64pino@9.14.0
普遍认为A mixin function that returns a shared object safely adds those properties to the log record while leaving the shared object unmodified.
实测returning a shared object from mixin() results in that object being mutated with the properties of the logged payload, causing subsequent log entries to inherit those properties.
-
golang样本契约go · linux/x64github.com/spf13/cobra@v1.9.1
普遍认为Local flags declared on a parent command are parsed when specified before a subcommand name on the command line.
实测By default with TraverseChildren false, passing a parent local flag before a subcommand name fails with an unknown flag error because all preceding flags are evaluated in the child command context.
-
npm样本契约node · linux/x64marked@13.0.2
普遍认为Returning undefined from a custom marked renderer method falls back to the default renderer rather than suppressing output.
实测Returning undefined from a custom renderer method produces an empty string rather than delegating to the default renderer, which requires returning explicit boolean false.
-
npm样本契约node · linux/x64happy-dom@20.11.2
普遍认为Evaluating scripts in a GlobalWindow executes in an isolated window context where bare window and document identifiers resolve to the instance.
实测DOM scripts evaluated in GlobalWindow run in host globalThis without a VM context, causing unqualified window references to throw ReferenceError rather than resolving the window instance
-
npm样本契约node · linux/x64happy-dom@20.11.2
普遍认为readAsString() and read() inspect captured virtual console logs non-destructively without clearing the internal buffer until an explicit clear() invocation.
实测VirtualConsolePrinter.read() and readAsString() destructively drain the internal log buffer upon invocation, causing subsequent immediate reads to return empty results.
-
npm样本契约node · linux/x64minimatch@10.1.1
普遍认为slashless glob patterns match file basenames at any directory depth when filtering path arrays
实测minimatch.filter generates a curried predicate function for Array.prototype.filter where slashless patterns match root paths by default and match base filenames across directories when matchBase is enabled
-
npm样本契约node · linux/x64minimatch@10.1.1
普遍认为minimatch.escape prefixes backslashes before all special characters including Windows path separators and braces
实测minimatch.escape wraps wildcard and grouping characters in single-character classes rather than prefixing backslashes when windowsPathsNoEscape is enabled, preserving backslash directory separators while leaving braces unescaped unless magicalBraces is set
-
npm样本契约node · linux/x64fast-glob@3.3.3
普遍认为fg.sync with stats: true returns string path arrays unless objectMode is explicitly requested, flat basename patterns never match nested directories, and pattern array order changes negative pattern filtering.
实测fg.sync with stats: true automatically produces an array of Entry objects containing fs.Stats and Dirent instances without requiring objectMode: true.
-
golang样本契约go · linux/x64github.com/caddyserver/caddy/v2@v2.11.4
普遍认为A bare numeric address like "8080" configures listening port 8080, and URI schemes like "tcp://localhost:2019" parse as standard TCP addresses.
实测caddy.ParseNetworkAddress("8080") parses 8080 as the hostname with StartPort 0, while ":8080" is required to configure port 8080.
-
pypi样本契约python · linux/x64requests@2.34.2
普遍认为Custom transport adapters receive allow_redirects directly in send() kwargs and must handle redirect following themselves.
实测BaseAdapter.send is an unimplemented interface method that raises NotImplementedError, requiring custom adapters to supply transport execution.
如何核对这里的任何一行
打开样本,读它的 contract,然后运行。contract 就是该样本自己的测试:它在断网的固定容器中运行,那次运行的签名回执才是网络所存储的东西。这里没有一条依赖我们对某个库的理解,只依赖这个库实际做了什么。
有些已发布的样例不在这个页面上。它们的契约通过了,样例也是活的 —— 但契约里没有一行能当句子读。像 expect(x).toBe(1) 这样的断言,放在它所检验的那个认知旁边,对读者什么也没说。与其登出没人能读的证据,不如空着。