docs: dev-setup guide, markdown CI, and behaviour specs - #25
Closed
Godbrand0 wants to merge 1 commit into
Closed
Conversation
…s#15, StelFlow-labs#14, StelFlow-labs#8) Three independent doc/tooling issues bundled onto one branch: - docs/dev-setup.md: a verified path from empty toolchain to working Rust/wasm32v1-none/stellar-cli/Node/pnpm setup, with real command output from this machine. Two steps (a from-empty stellar-cli install timing, and live testnet identity funding) are explicitly flagged as not run in this pass rather than faked. CONTRIBUTING.md now points here instead of duplicating the setup steps. - .github/workflows/docs.yml: markdownlint-cli2 + Prettier + lychee for markdown, gated on PRs touching docs. Internal link/anchor checking runs offline and blocks the PR; external link checking is schedule-only and never fails the build, since third-party outages aren't the PR's fault. Actions are pinned to commit SHAs. Ran prettier --write once across the existing docs to establish a passing baseline (mechanical formatting only — table alignment and emphasis-marker style — no prose was reworded). - docs/specs/behaviour.md: Given/When/Then scenarios for create_stream, withdraw, cancel, and approve_milestone, including the awkward cases (double withdrawal in one ledger, indivisible totals, degenerate durations, milestone-vs-cancel interaction) with the deposit == withdrawn + refunded + remaining invariant asserted on every state-changing scenario. Cases the docs don't decide are marked UNDECIDED and listed together at the end. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Contributor
Author
|
Splitting this into one PR per issue instead — easier to review and merge independently:
Closing this one in favor of those three. |
6 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this changes
Bundles three independent, small doc/tooling issues onto one branch:
docs/dev-setup.md(docs: write docs/dev-setup.md and run every step yourself #15) — a path from an empty toolchain to a verified Rust/wasm32v1-none/stellar-cli/Node/pnpm setup, with real command output captured on this machine (Pop!_OS 22.04, x86_64).CONTRIBUTING.md's old setup section now points here instead of duplicating it..github/workflows/docs.yml(ci: markdown lint, link checking, and formatting workflow #14) — markdownlint-cli2 + Prettier + lychee, gated on PRs touching markdown. Configs (.markdownlint-cli2.jsonc,.prettierrc.json,lychee.toml) are tuned to this repo's existing prose rather than the other way around.docs/specs/behaviour.md(spec: Gherkin scenarios for create, withdraw, cancel, and milestone release #8) — Given/When/Then scenarios forcreate_stream,withdraw,cancel, andapprove_milestone, including the awkward cases the issue asked for.Closes #15, closes #14, closes #8.
Why
All three are groundwork issues with no code dependency on each other, small enough individually that three separate reviews would be more overhead than value, but related enough (all "docs + CI for docs" work) that reviewing them together makes sense.
On #15 — honesty gap, flagged rather than hidden
This machine already had
rustup, the stable toolchain, andstellar-cliinstalled from earlier project work, so two things in the doc are not verified in this pass and are called out explicitly in the doc's own "What wasn't verified here" section instead of being faked:cargo install --locked stellar-clirun.stellar keys generate --network testnet --fundandstellar network settings --network testnetagainst live testnet.Everything else in the doc (rustc/cargo/stellar/node/pnpm versions,
rustup target add wasm32v1-noneactually downloading and installing,pnpm installagainst the newpackage.json) is real output from commands actually run during this PR, not transcribed from documentation. I'd rather ship this with an honest gap flagged than claim a false full pass — happy to have someone confirm the two flagged steps and I'll fold the real output in, or a maintainer can close that gap directly.On #14 — the external-link tradeoff
Chose schedule-only, non-blocking for external links (
link-check-external, weekly cron +workflow_dispatch), and offline, blocking for internal links/anchors (link-check-internal, every PR). Rate limits and transient 5xx on third-party hosts would fail builds for reasons unrelated to the PR under review; internal link/anchor breakage is squarely this repo's fault and worth blocking on. I ranprettier --writeonce across the existing docs to get the format-check job to a passing baseline — that diff is purely mechanical (table column alignment,*emphasis*→_emphasis_marker style) and reworded no prose. Actions are pinned to commit SHAs, not tags.On #8 — the useful part
27 scenarios across all four entry points, each with an explicit
Given <caller>authorization precondition, anddeposit == withdrawn + refunded + remaining_in_contractasserted on every state-changing scenario. Five cases the current docs don't determine are markedUNDECIDEDand collected at the end — most notably whethercancel()is even callable once a stream has reachedend, and double-approval of an already-met milestone.Test plan
pnpm run docs:lint— clean across all tracked markdownpnpm run docs:format:check— clean across all tracked markdownlychee.tomlvalidated as well-formed TOML; internal-link job config reviewed by hand for the anchor-checking casesdocs/architecture.mdanddocs/concepts.mdcross-referencelink-check-internalfor real against the PR — I didn't have a locallycheebinary in this pass to run the deliberate-broken-anchor check the issue asks for; the config is written to catch it (include_fragments = true, offline mode still validates local anchors) but that specific demonstration is unverified heredocs/dev-setup.md