docs: add runnable Node package manifest walkthrough - #21
Conversation
Add a copy-pasteable Node package.json reduction walkthrough to docs/EXAMPLES.md. Reuses the existing benchmarks/node-package fixture and its Python oracle, runs from the repository root with the temporary output parent outside the fixture, validates the exported payload with 'report validate --payload --json', and shows the independent oracle rerun that exits 1 with ORIGINAL_FAILURE on stderr. Calls out the no-Node / no-install / no-registry / no-lifecycle-scripts / no-network boundary and the descriptive Python-oracle boundary, and links the fixture README plus SECURITY.md. Closes fly1d#20
fly1d
left a comment
There was a problem hiding this comment.
Thanks for the focused contribution. I ran the documented workflow from a clean review worktree: scripts/check_docs.py passed, the node-package benchmark passed, reduction produced the stated two-file payload, validation returned an exact verified fingerprint, and the independent oracle returned exit code 1 with ORIGINAL_FAILURE.
Please make two factual corrections before merge:
-
The
enginesblock is not "removable in principle" in this workflow. The current Node adapter deliberately discovers entries only in its supported object/array categories; it does not targetengines, and the observed payload retains that block unchanged. Please say thatenginesis outside the adapter categories and remains unchanged, or omit that sentence. -
tree-sha256-v2is stronger than a byte-only comparison: it also covers paths, entry kinds, permission modes, modification times, root metadata, and supported filesystem metadata. Please replace "matches ... byte-for-byte under the tree-sha256-v2 policy" with wording that says the exported tree content and recorded metadata match exactly. The transport-friendly content-only fallback is a separate mode.
Everything else is in scope and matches #20. One update addressing these two points should be enough; no broader rewrite is needed.
Two prose corrections in docs/EXAMPLES.md: 1. Replace the misleading 'engines block is not consulted... treat exact file shape as informational' sentence with: 'engines block is outside the adapter categories and is preserved unchanged.' 2. Replace the 'matches byte-for-byte' description with one that mentions tree content and recorded metadata matching under the tree-sha256-v2 policy, and notes the transport-friendly content-only fallback as a separate mode. No code, tooling, or other prose touched.
shoaibyazdani
left a comment
There was a problem hiding this comment.
Pushed commit 9c83f97 addressing both points:
enginessentence replaced with: "Theenginesblock is outside the adapter categories and is preserved unchanged."tree-sha256-v2description replaced to mention tree content + recorded metadata matching exactly, with the transport-friendly content-only fallback called out as a separate mode.
Local re-verification against the updated docs/EXAMPLES.md:
python3 scripts/check_docs.py→Documentation check passed (44 Markdown file(s)).python3 benchmarks/run_offline.py --only node-package→PASS node-package / offline benchmarks: 1 passed, 0 skipped, 0 failed
Note: the new push (9c83f97) shows the upstream CI workflow in action_required state on the GitHub side — gh pr checks 21 reports no checks reported and actions/runs/33632861736 is sitting at conclusion: action_required. Looks like a fork-PR workflow approval gate. A maintainer-side "Approve and run" on that run should let the 8-job matrix complete cleanly; no code or fixture touched, so the existing green matrix should reproduce.
|
Hey @fly1d — pushed commit
Both edits are confined to
Also, your Thanks! |
fly1d
left a comment
There was a problem hiding this comment.
Verified the revised walkthrough against the current Node adapter and report semantics. The documented reduction, exact fingerprint validation, independent oracle rerun, and no-install trust boundary all reproduce as stated. Full CI is green. Thank you for tightening the factual wording and for the runnable contribution.
Closes #20
This adds a runnable Node package manifest walkthrough to
docs/EXAMPLES.md,reusing the existing
benchmarks/node-package/fixture and its Python oracle.Every command below was executed from the repository root with the temporary
output parent outside the fixture.
python3 scripts/check_docs.pypython3 benchmarks/run_offline.py --only node-packagePayload validation evidence
The accompanying
report.jsonrecords the exact payload fingerprint under thetree-sha256-v2policy:{ "tree_fingerprint_policy": "tree-sha256-v2", "tree_sha256": "05910a3ddba2610a0fd9752024fa34f3c2243e9fdbf77b63bd3ae61442bfe58b", "tree_content_fingerprint_policy": "tree-content-sha256-v1", "tree_content_sha256": "131932bc106bfb2f046ae19482de42eca5bcad930ab0ab67a05af85c99300cb0", "bytes": 765, "files": 2 }So the validator's
payload_checked: true,payload_fingerprint_mode: "exact", andpayload_fingerprint_verified: truefields together are the expected exact fingerprint evidence.
Independent oracle rerun of the exported payload
stdout (suppressed), exit code, then stderr:
The exported payload's oracle exits
1and printsORIGINAL_FAILUREonstderr — the same marker the reducer matched during reduction, so the
required dependency + workspace contract holds without rerunning ReproMin.
Boundary statement
This fixture needs no Node runtime, no
npm install, no registry access, nolifecycle scripts, and no external network. It validates only the configured
Python oracle (
reproduce.py) against the exportedpackage.json; it isadapter evidence for that oracle, not proof that an arbitrary minimized npm
application installs, builds, or behaves correctly.