🌱 100 Seeds Week is LIVE! Submit your computational seeds and help grow the ecosystem. Learn more →
Автопілот на стабільній ґратці: 1.61× швидше, PAC ≤ 2.22% @95%, нуль побічних ефектів (Gate G0). Embassy Pack — офлайн, read-only, з криптоперевіркою. Запустіть локально. Решта — ваша справа.
- 1.61× median speedup with mathematical guarantees
- PAC bound ≤ 2.22% @95% (135 orthogonal tests, 0 misroutes)
- Gate #0: 100% side effect blocking (oracle violations = 0)
- +61% energy efficiency | 0.039kg CO₂ saved weekly
Add to your .github/workflows/ file:
name: CI with Pure Lambda Canary
on: [push, pull_request]
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Run tests (baseline)
run: npm test
- name: Pure Lambda Canary
uses: s0fractal/pure-lambda@v1
with:
runner: vitest # or jest, pytest
node-version: 20
package-manager: npm
continue-on-error: true # Non-blocking- ESM Loader instruments code at runtime (zero changes needed)
- Oracle detects side effects and blocks unsafe optimizations
- Memoization caches pure function results using content-addressed storage
- Receipts provide cryptographic proof of equivalence and performance
# Install
curl -sSL -o loader.mjs https://raw.githubusercontent.com/s0fractal/pure-lambda/main/packages/loader/index.mjs
# Run with acceleration
node --loader=./loader.mjs node_modules/vitest/vitest.mjs run
# View receipts
ls .pl/receipts/- p-queue: 3× faster (6ms → 2ms, 91.6% cache rate)
- Validation libs: 2-4× faster on schema operations
- Build tools: 25-35% faster on file parsing
- State managers: 20-30% on reducer operations
✅ Non-blocking: continue-on-error: true - never breaks CI
✅ Zero code changes: Works via ESM loader only
✅ Side effect detection: Oracle monitors Date, Math.random, fs, etc
✅ Deterministic: Seeded randomness ensures reproducibility
✅ Cryptographic proofs: Receipts verify equivalence
✅ Kill switch: Remove action or set PL_DISABLE=1
| Input | Default | Description |
|---|---|---|
runner |
vitest |
Test runner: vitest, jest, pytest |
node-version |
20 |
Node.js version |
package-manager |
npm |
Package manager: npm, yarn, pnpm |
timeout |
10 |
Timeout in minutes |
upload-artifacts |
true |
Upload receipt artifacts |
| Output | Description |
|---|---|
baseline-time |
Baseline execution time (ms) |
canary-time |
Canary execution time (ms) |
speedup |
Speedup multiplier |
cache-rate |
Cache hit rate (%) |
┌─────────────────┐ ┌──────────────────┐ ┌─────────────────┐
│ ESM Loader │───▶│ Oracle │───▶│ Memoization │
│ │ │ │ │ │
│ • Instruments │ │ • Side effects │ │ • Content hash │
│ • Zero changes │ │ • Determinism │ │ • Cache storage │
│ • Runtime only │ │ • Safety checks │ │ • Receipts │
└─────────────────┘ └──────────────────┘ └─────────────────┘
See examples/ for integration with:
- Vitest
- Jest
- TypeScript
- Yarn/PNPM monorepos
- Fork the repository
- Create feature branch
- Add tests
- Submit PR
MIT © s0fractal