CodeSampleX

Sample

lodash.merge 4.6.2

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

sha256:23f8cc0934ac745c5e8ecb62c3bf8caf0a6f06b3033d6e4b9703b89b360b7d03

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 alpine/x64 · docker ed25519:c1973797be207ac4 PASS compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS
CONTAINER_RUN · node-typescript@1node:22-alpine@sha256:c610fcdfb1d5…
2026-08-28

Case

HOW
Goal
verify pkg:npm/lodash.merge@4.6.2
Packages
Environment
node 22.23.2
Created
2026-08-28T05:01:19Z

Contract

  1. assert merge recursively merges own and inherited enumerable string keyed properties into destination object
  2. assert merge recursively merges nested plain objects and arrays
  3. assert merge preserves destination value when corresponding source property is undefined
  4. assert merge applies multiple source objects in left-to-right precedence
  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 pkg:npm/lodash.merge@4.6.2
Kind: HOW

Use EXACTLY these public packages and versions:
  - pkg:npm/lodash.merge@4.6.2
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:97448c223a9f4d967c0dec8c05229e9fc235f5014e15fc2d72f4121f3743329f","constraints":{"executionContext":"node"},"contract":["assert merge recursively merges own and inherited enumerable string keyed properties into destination object","assert merge recursively merges nested plain objects and arrays","assert merge preserves destination value when corresponding source property is undefined","assert merge applies multiple source objects in left-to-right precedence","assert merge mutates and returns the destination object directly"],"goal":"verify pkg:npm/lodash.merge@4.6.2","kind":"HOW","packages":["pkg:npm/lodash.merge@4.6.2"],"schemaVersion":1},"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","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 pkg:npm/lodash.merge@4.6.2",
  "kind": "HOW",
  "packages": [
    "pkg:npm/lodash.merge@4.6.2"
  ],
  "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. Recursively merges properties into destination object
const target1 = { a: 1, b: { x: 10 } };
const src1 = { b: { y: 20 }, c: 3 };
const res1 = merge(target1, src1);
assert.deepEqual(res1, { a: 1, b: { x: 10, y: 20 }, c: 3 });

// 2. Recursively merges nested plain objects and arrays
const target2 = { a: [{ b: 2 }, { d: 4 }] };
const src2 = { a: [{ c: 3 }, { e: 5 }] };
const res2 = merge(target2, src2);
assert.deepEqual(res2, { a: [{ b: 2, c: 3 }, { d: 4, e: 5 }] });

// 3. Preserves destination value when source property is undefined
const target3 = { a: 1, b: 2 };
const src3 = { a: undefined, b: 3, c: undefined };
const res3 = merge(target3, src3);
assert.equal(res3.a, 1);
assert.equal(res3.b, 3);
assert.equal(res3.c, undefined);

// 4. Applies multiple source objects in left-to-right precedence
const target4 = { a: 1 };
const src4_1 = { b: 2, c: 3 };
const src4_2 = { c: 4, d: 5 };
const res4 = merge(target4, src4_1, src4_2);
assert.deepEqual(res4, { a: 1, b: 2, c: 4, d: 5 });

// 5. Mutates and returns the destination object directly
const target5 = { a: 1 };
const res5 = merge(target5, { b: 2 });
assert.equal(res5, target5);
assert.equal(target5.b, 2);

Origin Seeder

anonymous