Skip to content

docs(examples): add a deterministic Node.js/npm stable-v1 integration recipe (#122) - #189

Open
wufangyong973 wants to merge 1 commit into
AETHERXGLOBAL:mainfrom
wufangyong973:gfi/122-node-npm-recipe
Open

wufangyong973 wants to merge 1 commit into
AETHERXGLOBAL:mainfrom
wufangyong973:gfi/122-node-npm-recipe

Conversation

@wufangyong973

Copy link
Copy Markdown

Closes #122

Mirrors the preserved Python/pytest recipe as examples/node-npm, but on the current stable ExecSurface v1.0.0 rather than the historical Alpha.5 pin. The recipe is a reproducible integration demonstration, not independent external validation or a safety certification.

What changed

  • examples/node-npm/fixture/{test.js,fixture.json,package.json}: a one-file, zero-dependency Node fixture that asserts a sum invariant and only writes a harmless drift.txt when the public write_extra flag is true.
  • examples/node-npm/run.js: a node:-built-ins-only runner that learns and checks the same real node test.js command, retaining an unchanged PASS (exit 0) and a deliberate-write REVIEW (exit 10) plus native command receipts, baseline immutability and verdict JSON. It targets the stable 1.0.0 binary (asserts execsurface --version) and the unchanged built-in review policy.
  • examples/node-npm/README.md: copy/paste walkthrough, expected exit codes, the controlled drift, and the current Linux x86_64 native-ptrace support boundary.
  • examples/README.md: registers the Node.js/npm recipe in the example-selection table as a current-v1 entry.

No changes to observer, normalization, baseline, lockfile, policy, verdict or GitHub Action semantics. The fixture is private to this repo and needs no network during the measured run.

Local verification

  • node --check examples/node-npm/run.js passes.
  • Fixture left + right = 5 invariant holds.
  • node test.js with write_extra:false exits 0 and writes no drift.txt.
  • node test.js with write_extra:true exits 0 and writes drift.txt with the documented controlled fixture drift content.

Full end-to-end learn/check assertions require the stable v1 Linux x86_64 execsurface binary with native ptrace; the runner encodes the expected verdict JSON shape (target.exit_code / target.signal / policy.source / verdict / findings[].change / effect_kind / evidence.effect.target.value) verbatim against the v1 schema in crates/execsurface-policy/src/lib.rs.

… recipe (AETHERXGLOBAL#122)

Mirror the preserved Python/pytest recipe as examples/node-npm, but on the current stable ExecSurface v1.0.0 instead of the historical Alpha.5 pin. The recipe is a reproducible demonstration, not independent external validation.

What changed:

- examples/node-npm/fixture/{test.js,fixture.json,package.json}: a one-file, zero-dependency Node fixture that asserts a sum invariant and only writes a harmless drift.txt when the public write_extra flag is true.

- examples/node-npm/run.js: a Node: built-ins-only runner that learns and checks the same real node test.js command, retaining unchanged PASS (exit 0) and deliberate-write REVIEW (exit 10) evidence plus native command receipts, baseline immutability and verdict JSON. It targets the stable 1.0.0 binary (asserting execsurface --version) and the unchanged built-in review policy.

- examples/node-npm/README.md: copy/paste walkthrough, expected exit codes, the controlled drift, and the current Linux x86_64 native-ptrace support boundary.

- examples/README.md: register the Node.js/npm recipe in the example-selection table as a current v1 entry.

No changes to observer, normalization, baseline, lockfile, policy, verdict or GitHub Action semantics. The fixture is private to this repo and requires no network during the measured run. Closes AETHERXGLOBAL#122.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Good first issue — add a Node.js/npm integration recipe with controlled runtime drift

1 participant