Skip to content

docs(tooling): clarify Simplex workflow and witness examples - #66

Draft
brenorb wants to merge 3 commits into
mainfrom
fix/simplex-workflow-guidance
Draft

brenorb wants to merge 3 commits into
mainfrom
fix/simplex-workflow-guidance

Conversation

@brenorb

@brenorb brenorb commented Nov 5, 2026 •

Copy link
Copy Markdown
Collaborator

Rust developers reading the tooling and witness references need a clear route to the Simplex project workflow. The initialization guide suggests running simplex init over an existing Rust project, although that command overwrites starter files, and its fuzz example uses the API removed in Simplex 0.2.0. The witness reference also describes typed objects as string-only entries and presents incomplete array values, an unsupported index expression, and a case-mismatched witness name.

Name and link the Simplex workflow, explain that it uses the SimplicityHL compiler library directly, and label the manual CLI workflow. Show initialization into a new directory, its success output and existing-directory error, and the in-place overwrite warning. Replace the obsolete fuzz fragment with a complete starter-project P2pk Scenario example, state its 0.2.0+ API requirement, and describe the current pre-execution spec contract. Make the regular-test prototype return unit so it compiles with the starter's existing dependencies. Preserve the existing section anchors and manual references. Describe both witness-entry forms and their string-valued fields, use a complete four-element u16 array, and demonstrate uppercase MYPAIR tuple destructuring. Remove the unsupported indexing claim and narrow coverage to common types and explicit built-in alias annotations.

Validation:

  • Checked the changed Simplex claims against smplx a1bf060 (Simplex 0.2.0).
  • Disposable CLI checks cover a new named project, a rejected existing named directory with files preserved, initial artifact build, empty-directory initialization, and the confirmed overwrite behavior when initializing existing starter files in place.
  • Baseline and revised MkDocs builds finish successfully. All 250 rendered content links and anchors across the four edited pages resolve locally after the final Simplex and witness-example updates.
  • Generated a fresh simplex init my_contract starter and ran simplex build. The entire fuzz block, extracted directly from the page into tests/p2pk_fuzz.rs, compiles with cargo test --offline --no-run --test p2pk_fuzz against the current local smplx-std 0.2.0 source at a1bf060 (only the proof manifest substitutes its local path; no extra dependency is required). This is compile-only validation on Rust 1.98.1: no node was started and the fuzz test was not executed. The old engine call, isolated with the same generated P2pk types, fails with E0107 (unwanted generic arguments) and E0061 (missing Scenario).
  • The entire regular-test prototype also compiles in that starter with cargo test --offline --no-run --test regular_prototype. Its previous anyhow::Result<()> signature fails there with E0433 because the generated manifest doesn't declare anyhow. The unit-returning replacement needs no added dependency (the placeholder context parameter remains unused until test code is added). No integration test was executed.
  • Executed 14 disposable cases through the actual current SimplicityHL 0.9.0 compiler library at 56e8f39, using CompiledProgram::new → serde_json::from_str<UnresolvedValues> → resolve(witness_types) → CompiledProgram::satisfy: six accepted and eight rejected as expected. Accepted cases cover bare/typed/mixed entries, the final complete array, uppercase tuple destructuring and a bare custom-alias value. Expected rejections cover raw JSON numbers/booleans, a numeric typed value, the old truncated array, wrong array length, unsupported [0], the old lowercase witness name, and a typed custom alias. The typed built-in Distance example is accepted. Final extracted page examples match these fixtures. This checks parsing, witness typing and population; the simc CLI frontend, transaction execution and signature verification were not exercised.
  • Three existing missing tutorial links remain. Earlier GitHub author-plugin API limits left author metadata incompletely verified.
  • A separate agent reviewed each whole edited page against .github/documentation-review.md. Fresh full reviews cover the exact final Simplex page (132 lines) and witness page (232 lines), all 13 criteria and all 13 formatting rules per page. The final witness review independently checks all 10 JSON blocks, 17 fences, and the 14 compiler-library outcomes; it found no introduced correctness or formatting failure. Its update preserves the other three review sections and source hashes.

Whole-page documentation screening (including inherited issues):

Page Verdict Highest-priority follow-up
simplex.md Conditional pass Add exact errors/recovery for eight command families, link six first technical uses, and replace two informal prose phrases. The regular-test dependency defect is resolved.
toolchain.md Fail: structural rewrite required Relocate embedded procedures, resolve the sighash input-type contradiction, and improve error recovery/private-key guidance.
wallet.md Conditional pass Narrow the LWK app-generation claim, complete first-use links, and end with one next action.
witness-format.md Conditional pass Add serialization diagnostics/recovery, repair eight first-use glossary links and three prose issues, and remove two groups of repeated guidance. The schema, array, name/index and alias-coverage defects are resolved.

This PR remains a draft because the whole-page screening retains those pre-existing issues. It proposes the bounded workflow, initialization, test API, and witness-format corrections for review. Source and compile checks cover the changed examples and claims; they do not establish runtime test success or validate every historical claim on the four pages against the current SDK.

Written by Codex.

Use the 0.2.0 Scenario API in a complete P2pk fuzz example and make the ordinary test prototype return unit without an added dependency. Both complete extracted blocks compile against the current SDK; no integration or fuzz run is claimed.

Written by Codex.
@brenorb brenorb changed the title docs(simplex): clarify project workflow and safe initialization docs(simplex): clarify workflow and repair starter test examples Nov 5, 2026
Describe string and typed-object entries, provide a complete array literal, use the actual uppercase tuple witness name, and remove unsupported indexing. Narrow the type-coverage and alias-annotation claims to the supported forms.

Validated through the pinned current SimplicityHL 0.9.0 compiler library parse/resolve/satisfy path, with six accepting and eight expected-rejection controls. No CLI, transaction, or signature verification is claimed.

Written by Codex.
@brenorb brenorb changed the title docs(simplex): clarify workflow and repair starter test examples docs(tooling): clarify Simplex workflow and witness examples Nov 5, 2026

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.

1 participant