CodeSampleX

Sample

lodash.merge 4.6.2: merge

Verified sample for npm lodash.merge 4.6.2: merge. The contract ran on node 22 · linux debian/x64 · docker and passed: assert merge recursively merges own…

sha256:c91f9fbc0aa2e5d510f3acab3d3d9c44844b35f51de3a409059fa37c04b2ffb0

This network offers one thing: a sample that builds. It ran the sample in a sandbox and kept the signed receipt. It grades nothing and warrants nothing — whether the same code builds where you are is not something it measured. How many distinct signing keys filed a passing contract receipt. One is the author alone; more than one means somebody else built it too. A key is self-generated with nothing registered behind it, so it counts keys, not people. MIT-0

Execution evidence

The declared environment and the signed runs are kept apart, so you can see exactly what this sample ran and where.

Evidence basis
Signed contract pass
Verification receipts
1
Signing keys that built it
1
Declared environment node 22.23 linux 24 · ubuntu · glibc 2.39 x64 node 22.23 javascript npm 10

Verification-run environments

Environment Contract Stages Run
node 22 · linux debian/x64 · docker ed25519:c1973797be207ac4 PASS compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS
CONTAINER_RUN · node-typescript@1node:22@sha256:8a34c4ab3ea2…
2026-09-01

Case

HOW
Goal
verify merge in pkg:npm/lodash.merge@4.6.2
Packages
Symbols
  • merge
Environment
node 22.23.2
Created
2026-09-01T11:35:51Z

Contract

  1. assert merge recursively merges own and inherited enumerable string keyed properties into destination object
  2. assert merge recursively merges nested objects and array elements
  3. assert merge skips source properties that resolve to undefined when destination property exists
  4. assert merge merges multiple sources in left-to-right precedence overwriting earlier values
  5. assert merge mutates and returns the destination object directly

Files

  • PROMPT.md
  • csx.json
  • package-lock.json
  • package.json
  • spec.json
  • test/contract.mjs

Download the source artifact (tar.gz)

Source

PROMPT.md
Clean-room public code sample — generation instructions

Write a brand-new, minimal, self-contained code sample in this clean-room directory.
Do not copy, paraphrase, or reference any existing project source. Work only from this spec.

A csx.json manifest scaffold already exists. Do not recreate it from memory. Preserve its case.goal, packages and symbols; fill its empty case.contract with exact assertions and correct its environment, commands and verifierAdapter for the files you generate.

Goal: verify merge in pkg:npm/lodash.merge@4.6.2
Kind: HOW

Use EXACTLY these public packages and versions:
  - pkg:npm/lodash.merge@4.6.2
Demonstrate these symbols/APIs:
  - merge
Constraints:
  - executionContext: node
Required runtime conditions:
  - ecosystem: npm
  - language: javascript
  - moduleSystem: cjs
  - packageManager: npm@10.9.8
  - runtime: node@22.23.2

Rules:
  - One focused purpose; the smallest project that proves the goal.
  - Include a contract test (test/contract.*) that runs OFFLINE and exits 0 exactly when the goal behavior works.
  - Pin every dependency with a lockfile so resolution is reproducible.
  - No secrets, credentials, or tokens. No real URLs (only example.com or localhost). No absolute paths.
  - No personal names, emails, company names, or project identifiers of any kind.
  - No binaries and no generated output (node_modules, dist, target, venv, .git, .env).
  - Keep it under 200 files and 256KB packed.
csx.json
{"case":{"caseId":"case:sha256:82e0d067627eb55da023416f1ad6104164e5be9cfa8df0e107980d735907ba58","constraints":{"executionContext":"node"},"contract":["assert merge recursively merges own and inherited enumerable string keyed properties into destination object","assert merge recursively merges nested objects and array elements","assert merge skips source properties that resolve to undefined when destination property exists","assert merge merges multiple sources in left-to-right precedence overwriting earlier values","assert merge mutates and returns the destination object directly"],"goal":"verify merge in pkg:npm/lodash.merge@4.6.2","kind":"HOW","packages":["pkg:npm/lodash.merge@4.6.2"],"schemaVersion":1,"symbols":["merge"]},"contractCommand":["node","test/contract.mjs"],"environment":{"arch":"x64","distro":"ubuntu","ecosystem":"npm","executionContext":"node","language":"javascript","libc":"glibc","libcVersion":"2.39","moduleSystem":"cjs","os":"linux","osVersionBucket":"24","packageManager":"npm","packageManagerVersion":"10.9.8","runtime":"node","runtimeVersion":"22.23.2","schemaVersion":1},"license":"MIT-0","packages":["pkg:npm/lodash.merge@4.6.2"],"schemaVersion":1,"subject":"pkg:npm/lodash.merge@4.6.2","symbols":["merge"],"verifierAdapter":"node-typescript@1"}
package-lock.json
{
  "name": "sample-lodash-merge",
  "version": "1.0.0",
  "lockfileVersion": 3,
  "requires": true,
  "packages": {
    "": {
      "name": "sample-lodash-merge",
      "version": "1.0.0",
      "license": "MIT-0",
      "dependencies": {
        "lodash.merge": "4.6.2"
      }
    },
    "node_modules/lodash.merge": {
      "version": "4.6.2",
      "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz",
      "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==",
      "license": "MIT"
    }
  }
}
package.json
{
  "name": "sample-lodash-merge",
  "version": "1.0.0",
  "type": "module",
  "license": "MIT-0",
  "dependencies": {
    "lodash.merge": "4.6.2"
  }
}
spec.json
{
  "schemaVersion": 1,
  "goal": "verify merge in pkg:npm/lodash.merge@4.6.2",
  "kind": "HOW",
  "packages": [
    "pkg:npm/lodash.merge@4.6.2"
  ],
  "symbols": [
    "merge"
  ],
  "constraints": {
    "executionContext": "node"
  },
  "runtimeConditions": {
    "ecosystem": "npm",
    "language": "javascript",
    "moduleSystem": "cjs",
    "packageManager": "npm@10.9.8",
    "runtime": "node@22.23.2"
  }
}
test/contract.mjs
import assert from 'node:assert/strict';
import { createRequire } from 'node:module';

const require = createRequire(import.meta.url);
const merge = require('lodash.merge');

// 1. assert merge recursively merges own and inherited enumerable string keyed properties into destination object
const dest1 = { a: 1, b: { x: 10 } };
const src1 = { b: { y: 20 }, c: 3 };
const res1 = merge(dest1, src1);
assert.deepEqual(res1, { a: 1, b: { x: 10, y: 20 }, c: 3 });
assert.equal(res1, dest1);

// 2. assert merge recursively merges nested objects and array elements
const dest2 = { list: [{ a: 1 }, { b: 2 }], nested: { val: 10 } };
const src2 = { list: [{ c: 3 }, { d: 4 }], nested: { extra: 20 } };
const res2 = merge(dest2, src2);
assert.deepEqual(res2, {
  list: [{ a: 1, c: 3 }, { b: 2, d: 4 }],
  nested: { val: 10, extra: 20 }
});

// 3. assert merge skips source properties that resolve to undefined when destination property exists
const dest3 = { a: 1, b: 2 };
const src3 = { a: undefined, b: 99, c: undefined };
const res3 = merge(dest3, src3);
assert.equal(res3.a, 1);
assert.equal(res3.b, 99);
assert.equal(res3.c, undefined);

// 4. assert merge merges multiple sources in left-to-right precedence overwriting earlier values
const dest4 = { a: 1, b: 2 };
const src4_1 = { b: 3, c: 4 };
const src4_2 = { c: 5, d: 6 };
const res4 = merge(dest4, src4_1, src4_2);
assert.deepEqual(res4, { a: 1, b: 3, c: 5, d: 6 });

// 5. assert merge mutates and returns the destination object directly
const dest5 = { x: 100 };
const src5 = { y: 200 };
const res5 = merge(dest5, src5);
assert.equal(res5, dest5);
assert.equal(dest5.y, 200);

Origin Seeder

anonymous