Skip to content

docs: add a docs/ set covering the cycle pipeline, manifest format, and operations - #21

Merged
Oyinkans0la12 merged 9 commits into
mainfrom
docs/cycle-docs
Sep 16, 2026
Merged

Oyinkans0la12 merged 9 commits into
mainfrom
docs/cycle-docs

Conversation

@Oyinkans0la12

@Oyinkans0la12 Oyinkans0la12 commented Sep 16, 2026 •

Copy link
Copy Markdown
Collaborator

This repo is the authoritative source for the distribution manifest format, its payout rule is frozen, and almost none of that was written down outside the README and source comments. This adds a docs/ set — one commit per page, all content read from the current src/, schemas/, action.yml, and .github/workflows/ rather than from memory.

Pages

Page Covers
docs/SUMMARY.md Reading order.
docs/introduction.md The shared protocol opening, plus what this repo owns.
docs/how-it-works.md The eight pipeline stages, the payout rule stated once with a worked example (including a non-zero dust remainder), cross-repo aggregation, the oracle pre-flight, and why the window boundary is compared as epochs.
docs/manifest-reference.md Every manifest field with its real type (decimal strings vs. integers), the Merkle leaf XDR layout, sorted-pair tree construction, and why the newest committed manifest defines the next window.
docs/for-maintainers.md Schedule vs. dispatch, CYCLE_POOL_AMOUNT/CYCLE_ID, the pool guard and why CYCLE_ID has none, the registry field by field, oracleAccount matching the deployment, and what to check in a dry run.
docs/developer-guide.md Local setup, the golden-fixture cross-check, the gated testnet suite, and the new manual integration workflow.
docs/contributing.md Points at CONTRIBUTING.md, then states that a manifest-format or Merkle change is a breaking cross-repo change.

Two things worth reviewing closely:

  • The Merkle example root is computed, not written by hand — it comes from buildMerkleRoot() for the exact entries shown, so the page cannot drift from the implementation.
  • A new workflow, .github/workflows/integration-check.yml. The gated suite had no CI entry point, so an unset gate and a passing run looked identical. This one is workflow_dispatch only, runs against a throwaway vault, and fails fast when SOROBAN_RPC_URL, SPLITSTREAM_VAULT_CONTRACT, or ORACLE_SECRET_KEY is unset. wave-cycle-close.yml is intentionally left alone: it must always relay, so it cannot be made conditional on a flag.

npm run typecheck and npm test pass (76 passed, 3 skipped — the skipped ones are the gated testnet blocks). No source, schema, or dist/ change, so the ncc bundle is untouched.

The README Socials section is not in this PR — it landed after the merge, in #22.

Oyinkans0la12 and others added 9 commits September 16, 2026 11:34
The gated suite in test/relay.integration.test.ts had no workflow, so it could
only be run from a developer's shell with three env vars set by hand — and an
unset gate is indistinguishable from a pass, because every test skips. Add a
workflow_dispatch-only workflow that runs it against a throwaway vault, with a
gate check that fails loudly instead of reporting green on a suite that
verified nothing. It is deliberately never scheduled: the submit test is
state-changing and the cycle-closing workflow must stay the only thing that
touches the treasury vault.

Generated with Codebuff 🤖

Co-Authored-By: Codebuff <noreply@codebuff.com>
The documentation existed only as a single README; give it an entry point that
fixes the reading order before the pages land.

Generated with Codebuff 🤖

Co-Authored-By: Codebuff <noreply@codebuff.com>
Readers arriving at the action repo need the same framing the other two repos
use — what the protocol settles and which repo does what — before they meet
GitHub-specific mechanics. Name this repo as the authoritative source for the
manifest format up front, since that is the part other repos depend on.

Generated with Codebuff 🤖

Co-Authored-By: Codebuff <noreply@codebuff.com>
…ives in

The rule that decides who gets paid was spread across the README's numbered
stages and its terminology, so a reader had to assemble it. Give it one
prominent statement with a worked example that includes a non-zero dust
remainder, then document the stages around it: registry load, window, ingest,
count, shares, tree, manifest, relay — plus the cross-repo aggregation and the
oracle pre-flight that refuse to relay on a mismatch.

Generated with Codebuff 🤖

Co-Authored-By: Codebuff <noreply@codebuff.com>
… contract

This repo produces the manifest and every consumer has to decode it exactly, so
the field-by-field shape and the leaf/tree construction belong in one reference
with the string-vs-number distinction called out. The example root is computed
with buildMerkleRoot() rather than hand-written, so the page cannot quietly
drift from the implementation.

Generated with Codebuff 🤖

Co-Authored-By: Codebuff <noreply@codebuff.com>
The operational knowledge — which variable the schedule path reads, why the
pool guard exists but CYCLE_ID has none, that cycle 0 cannot run on the
schedule path, and what a dry run's output should look like — was only
discoverable by reading the workflow and src/index.ts. Include the caveat that
the manifest commit's push is rejected on a branch whose ruleset requires a PR,
since that is where the audit trail can silently stop.

Generated with Codebuff 🤖

Co-Authored-By: Codebuff <noreply@codebuff.com>
…ated suite

The Merkle cross-check against splitstream-core's Rust implementation is the
one procedure that must run before a real relay, and it was only described in
CONTRIBUTING.md's golden-fixture section. Point at it from a developer-facing
page, record the 2026-09-10 verified values, and explain the gates and the new
manual integration workflow — including why it stays separate from the
cycle-closing workflow, which cannot be flag-gated because it must always
relay.

Generated with Codebuff 🤖

Co-Authored-By: Codebuff <noreply@codebuff.com>
A contributor reading only this repo's CONTRIBUTING.md will not know that the
manifest format and Merkle scheme are consumed byte-for-byte elsewhere, so a
"small" format tweak lands as a protocol break. Link the repo's own guide
rather than duplicating it, and state who depends on this repo's output.

Generated with Codebuff 🤖

Co-Authored-By: Codebuff <noreply@codebuff.com>
…ze()

The page said only that oracleAccount must match the deployment, which reads
like a value someone could change later. The vault exposes no setter, so the
account stored on-chain is the only one that will ever accept a relayed root —
say so, and point at the fix(config) history that already repointed this
registry once.

Generated with Codebuff 🤖

Co-Authored-By: Codebuff <noreply@codebuff.com>
@Oyinkans0la12
Oyinkans0la12 merged commit a1301ab into main Sep 16, 2026
1 check passed
@Oyinkans0la12
Oyinkans0la12 deleted the docs/cycle-docs branch September 16, 2026 11:37
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