Skip to content

docs: add an offline Layer 2 policy walkthrough - #22

Open
Logic769 wants to merge 1 commit into
yellowgram:mainfrom
Logic769:docs/layer2-offline-demo
Open

Logic769 wants to merge 1 commit into
yellowgram:mainfrom
Logic769:docs/layer2-offline-demo

Conversation

@Logic769

Copy link
Copy Markdown

Summary

Replace the missing demo-doc link with a self-contained, offline walkthrough of both checking
layers. In 1.0.0 the old demo:dual-layer script and docs/INBOUND_DEMO.md were folded into
npm run demo (see CHANGELOG 1.0.0), so this adds docs/DEMO.md describing the current command and
the Layer 1 (-32080) / Layer 2 (-32083) behaviour, and points the Quickstart at it.

Changes

  • docs/DEMO.md (new): offline Layer 1 (simulation abort) + Layer 2 (policy deny) walkthrough; how
    L2SG_POLICY_FILE and L2SG_POLICY=off turn Layer 2 on and off; "a deny is never fail-open";
    links to README › How it works and › Threat model and limits; notes the 1.0.0 consolidation of
    demo:dual-layer / INBOUND_DEMO.
  • README.md: a one-line pointer to docs/DEMO.md in Quickstart step 1. No code changes.

Verification

  • npm run demo (offline, no keys/network/funds) prints the expected cases, including
    2. … -32083 DESTINATION_NOT_ALLOWED and 4. … -32080 DEFINITE_REVERT, ending with
    The mock RPC received 2 of 7 transactions. Demo OK.
  • npx vitest run → 2 failed | 684 passed | 2 skipped (40 files), identical to unmodified main.
    Both failures are pre-existing and unrelated to this docs-only change:
    tests/evaluation.harness.test.ts:120 (expects POSIX evaluation/fixtures/corpus.jsonl, receives a
    Windows backslash path) and tests/guard/selectors.test.ts:419 ("README quickstart policy loads" —
    git CRLF makes the \``json\n` regex miss on Windows).
  • Docs-only: no src/, policy, or test files touched.

Closes #9

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] Docs: improve offline dual-layer / policy demo walkthrough

1 participant