Skip to content

docs(surface): publish contract ERRORS.md and EVENTS.md reference - #34

Open
jdjioe5-cpu wants to merge 1 commit into
Kinlock-Org:mainfrom
jdjioe5-cpu:docs/contract-surface-reference
Open

jdjioe5-cpu wants to merge 1 commit into
Kinlock-Org:mainfrom
jdjioe5-cpu:docs/contract-surface-reference

Conversation

@jdjioe5-cpu

Copy link
Copy Markdown

Summary

Closes #29. Fulfills Roadmap row \M1-39\ (Phase 1, M0 Validate, Priority P1).

This PR publishes the authoritative contract surface reference documentation:

  • **\docs/ERRORS.md**: Complete reference for all 32 active #[contracterror]\ codes across registry and vault, specifying exact trigger conditions, caller guidance (retryable vs terminal), and explicit documentation for retired codes 1 (\Paused) and 27 (\TokenTransferFailed).
  • **\docs/EVENTS.md**: Complete catalog of all 7 emitted contract events across payee lifecycle and vault operations, including \schema_version = 1, precise field types, stroops integer scaling (\10^7\ stroops per unit), and the rationale for immutable payee payout snapshotting (Hard rule 2).
  • Updated \README.md\ and \docs/ARCHITECTURE_ESSENTIALS.md\ to link to these contract surface references.
  • Updated \ROADMAP.md\ to mark \M1-39\ as \DONE\ with an entry in the Changelog.

Contract Surface Verification & Count Comparison

1. Error Codes Match (\�rrors.rs\ vs \docs/ERRORS.md)

  • Active error variants in \contracts/kinlock/src/errors.rs: 32
  • Documented error sections in \docs/ERRORS.md: 32
  • Retired codes noted: 2 (code 1 \Paused, code 27 \TokenTransferFailed)
  • Exact count comparison:
    • Code count: \32\ active variants in \�rrors.rs\
    • Doc count: \32\ sections in \docs/ERRORS.md\
    • Delta: \

- Closes Kinlock-Org#29 (Roadmap row M1-39)
- Publish authoritative docs/ERRORS.md covering all 32 active #[contracterror] codes, exact firing conditions, caller recovery guidance, lock terminality, and notes on retired codes 1 and 27
- Publish authoritative docs/EVENTS.md covering all 7 contract events across registry and vault with schema_version = 1, field types, stroops units, and payout snapshotting rationale
- Synced from canonical docs via sync-docs.sh
- Update README.md and docs/ARCHITECTURE_ESSENTIALS.md quick-reference links
- Update ROADMAP.md marking M1-39 as DONE with Changelog entry
@jdjioe5-cpu
jdjioe5-cpu force-pushed the docs/contract-surface-reference branch from e773fbe to a4341f9 Compare October 17, 2026 14:18
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.

Publish the contract surface reference: docs/ERRORS.md and docs/EVENTS.md

2 participants