Skip to content

Add Tests as Contracts story#150

Merged
em3s merged 9 commits intomainfrom
docs/stories-contracts
Jan 31, 2026
Merged

Add Tests as Contracts story#150
em3s merged 9 commits intomainfrom
docs/stories-contracts

Conversation

@em3s
Copy link
Copy Markdown
Contributor

@em3s em3s commented Jan 30, 2026

Summary

Add new story explaining contract testing pattern at Actionbase.

Changes

  • Add Tests as Contracts story explaining how tests become integration documents
  • Describe two-phase workflow:
    1. Integration: Request → Write Test → Deploy → Iterate → Contract Locked
    2. Protection: Code Change → PR → All Contracts → Pass/Fail
  • Include mermaid diagram showing both workflows

How to Test

  1. Run cd website && npm run dev
  2. Navigate to /stories/contracts/
  3. Verify content and mermaid diagram renders correctly

- Add new story explaining contract testing pattern
- Describe integration workflow: request -> test -> deploy -> iterate -> lock
- Describe protection workflow: code change -> PR -> all contracts -> pass/fail
- Include mermaid diagram showing both workflows
@dosubot dosubot bot added size:M This PR changes 30-99 lines, ignoring generated files. documentation Improvements or additions to documentation labels Jan 30, 2026
- Add astro-d2 plugin for cleaner diagram rendering
- Add D2 CLI installation with cache to GitHub Actions workflows
- Convert contracts.mdx diagram from Mermaid to D2
@dosubot dosubot bot added size:L This PR changes 100-499 lines, ignoring generated files. and removed size:M This PR changes 30-99 lines, ignoring generated files. labels Jan 30, 2026
@em3s em3s force-pushed the docs/stories-contracts branch from fe44614 to bc69bc2 Compare January 30, 2026 12:23
@dosubot dosubot bot added size:M This PR changes 30-99 lines, ignoring generated files. and removed size:L This PR changes 100-499 lines, ignoring generated files. labels Jan 30, 2026
@dosubot dosubot bot added size:L This PR changes 100-499 lines, ignoring generated files. and removed size:M This PR changes 30-99 lines, ignoring generated files. labels Jan 31, 2026
em3s added 3 commits January 31, 2026 16:31
- Simplify Protection diagram with dotted lines for auxiliary flows
- Add 'Living with Contracts' section for contract lifecycle
- Rename comparison column from Traditional to Pact-style
- Update What We Learned with trust-focused insight
- Add Appendix with pseudo-code showing contract test structure
- Clarify that each inner class generates .mdx file, each test becomes section
- Reorganize Integration section for better narrative flow
- Note pseudo-code differs from actual implementation, tooling coming soon
@em3s em3s merged commit b00e9f6 into main Jan 31, 2026
10 checks passed
@em3s em3s deleted the docs/stories-contracts branch January 31, 2026 12:02
@em3s em3s self-assigned this Feb 2, 2026
@em3s em3s changed the title docs(stories): add Tests as Contracts story Add Tests as Contracts story Feb 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation size:L This PR changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant